multigeom / diffusion /README.md
steevelaquitaine's picture
Diffusion models trained for 200 epochs (replace 120-epoch ones; add ON-OFF, README, config, checksums)
019019c verified
|
Raw History Blame Contribute Delete
2.87 kB

Conditional diffusion models, 200 epochs with classifier-free guidance

These are the six conditional diffusion models used for the figures of the NeurIPS 2026 paper, "A multi-scale information geometry reveals the structure of mutual information in neural populations". There is one model per encoder (Inception, ResNet-50, ON-OFF) and per area (V1, V4).

Contents

inception/V1/final_model.pt     inception/V4/final_model.pt
resnet50/V1/final_model.pt      resnet50/V4/final_model.pt
onoff/V1/final_model.pt         onoff/V4/final_model.pt
*/*/train_log.json              loss per epoch
diffusion.yaml                  training configuration, shared by all six models
SHA256SUMS                      checksums of the checkpoints

Training recipe

The recipe is the same for all six models, as in the paper's appendix:

  • Network: a single-channel 64x64 DDPM U-Net with block widths (64, 128, 256, 512) and two layers per block, conditioned on the 50-dimensional response vector through an MLP token (dimension 256) and cross-attention.
  • Training data: 100,000 TinyImageNet training images, converted to grayscale and resized to 64x64. Each image is paired with the responses that the encoder fitted to that area (Inception, ResNet-50 or ON-OFF) predicts for it, plus Gaussian noise with sigma = 0.22.
  • Classifier-free guidance: the responses are dropped (null token) with probability 0.1, so the same network also gives the unconditional prediction. Algorithm 1 uses that prediction to compute E[x | x_t].
  • Noise schedule: 1000 steps, linear schedule with beta from 1e-4 to 0.02, epsilon prediction.
  • Optimiser: AdamW with learning rate 1e-4 and weight decay 1e-4, cosine schedule with 500 warm-up steps, batch size 128, bfloat16 precision, gradient clipping at 1.0, seed 42.
  • Length: 200 epochs. The final training loss is between 0.0561 and 0.0564 for all six models.

Format

Each final_model.pt is a dictionary with the following keys:

  • model_state_dict: the network weights;
  • epoch: 200;
  • loss: the final training loss;
  • config: the configuration file and the response file used for training;
  • encoder_name and area: which model this is;
  • provenance: the git commit of the training code and the command line.

To load a model with the paper code (github.com/sazio/MultiscaleInformationGeometry):

from src.diffusion_model import build_diffusion_model, build_scheduler
unet = build_diffusion_model(diff_cfg)          # diff_cfg loaded from diffusion.yaml
ckpt = torch.load("inception/V1/final_model.pt", map_location="cpu", weights_only=False)
unet.load_state_dict(ckpt["model_state_dict"])

Encoders

The encoders that produced the conditioning responses are the same as before. Their test correlations reproduce Table 1 of the paper exactly, so the encoder checkpoints do not change.