--- license: other license_name: see-terms-below tags: - variational-autoencoder - particle-physics - jets - quark-gluon --- # jet-vae models Trained weights of the variational autoencoders behind the jet-vae paper: the models of the paper's jet table and of its non-jet benchmark table. Code: . Jet samples: [Shayla216/jet-vae-samples](https://huggingface.co/datasets/Shayla216/jet-vae-samples). `MANIFEST.csv` lists every model (path, family, dataset, latent size, β, seed, best epoch). `SHA256SUMS.txt` has the checksum of every file. All files are the original training outputs, unchanged. ## Contents | Folder | Models | Latent size | β | |---|---|---|---| | `transformer_vae/trf_beta<β>_seed/` | particle-level Transformer VAE on shape-only point sets `(z, eta, phi)`, Sinkhorn-EMD reconstruction loss, no particle-ID input | 32 | 1e-5 (seed 42), 1e-4, 2e-4, 3e-4, 4e-4, 5e-4, 1e-3 (seed 1) | | `cnn_vae/cnn32_beta<β>/` | image-level CNN VAE on 32 × 32 jet images | 32 | 1e-6, 2e-6, 3e-6, 4e-6, 5e-6, 1e-5, 1e-4 (effective β) | | `nonjet//z_beta<β>/` | image VAEs on MNIST, FashionMNIST, CelebA, dSprites, trained with [YannDubs/disentangling-vae](https://github.com/YannDubs/disentangling-vae) (`-l betaH`) | 10, 32, 128 | 0.1, 1, 4 | The jet models are trained on the quark/gluon dijet jets of the paper. The Transformer β = 1e-5 model is the run with seed 42; the other Transformer models use seed 1, with the same recipe. For the CNN VAE the effective β is the saved `beta` divided by `recon_loss_weight` (stored in the checkpoint), e.g. 0.001 / 1000 = 1e-6. The non-jet table of the paper also contains rows (marked R) computed from the pre-trained models that ship with disentangling-vae; those models are not repeated here, take them from that repository. The non-jet folders hold `model.pt`, `specs.json` (the exact training arguments) and `train_losses.log`. CelebA and dSprites models with latent size 10 are only included for β = 0.1. ## Loading ```python # Transformer VAE (code: transformer_vae/ in the jet-vae repository) from transformer_vae.encode import load_model, encode model, ckpt = load_model("transformer_vae/trf_beta1e-4_seed1/best_model.pth") # CNN VAE: cnn_vae/code_training/betaVae.py (BetaVAE); the checkpoint is a dict with the weights and the settings # non-jet models: disentangling-vae from disvae.utils.modelIO import load_model model = load_model("nonjet/mnist/z32_beta1", is_gpu=False) ``` ## Terms The jet models are trained on simulated jets. The non-jet models were trained on public datasets and remain subject to the terms of those datasets: MNIST (LeCun et al.), Fashion-MNIST (Xiao et al., MIT), dSprites (Matthey et al.) and CelebA (Liu et al.), the last of which is available for non-commercial research purposes only; the CelebA models should be used accordingly. Please cite the datasets and disentangling-vae when using the non-jet models.