VAE1D compresses a 12-lead ECG into a short sequence of Gaussian latent vectors and
reconstructs it. After training, decoding random draws from N(0, I) generates new ECGs.
Code: src/ecgen/families/vae/, loss: src/ecgen/families/vae/losses.py. Written reference: VAE.
The KL term pulls each ECG's posterior q(z | x) towards the prior N(0, I). The sketch below is
schematic (one latent dimension, four ECGs); it is not computed from a trained model.
Small weight: posteriors are narrow and far apart, so reconstructions are sharp but random z from N(0, I) may land between them. Large weight: posteriors collapse onto the prior, so samples are smooth but blurry.