Add exposure autoencoder pretraining

This commit is contained in:
2026-07-09 13:15:57 +08:00
parent 8976f1ed89
commit 8a083ed538
4 changed files with 457 additions and 1 deletions

View File

@@ -58,3 +58,15 @@ disease event token + pre-onset exposure embedding -> same next-token Transforme
```
The key constraint is that a disease event's own pre-onset exposure must not be used to predict that same disease event.
Pretrain the exposure encoder as a denoising autoencoder using training-set EIDs:
```bash
python train_exposure_autoencoder.py \
--exposure_cache_dir ukb_exposure_cache \
--train_eid_file ukb_train_eid.csv
```
The best checkpoint contains both `model_state_dict`, an `encoder_state_dict`
compatible with the default gated `TimesNetExposureEncoder`, and the channel
normalization statistics needed when the encoder is attached to DeepHealth.