Download README.md from Anivarth/Diffusion_twigs: direct link, hf CLI and curl.
- Browser
- Download file 3.46 kB
-
https://huggingface.co/Anivarth/Diffusion_twigs/resolve/main/README.md
- Command line
-
hf download hf://Anivarth/Diffusion_twigs/README.md
-
curl -L -o README.md https://huggingface.co/Anivarth/Diffusion_twigs/resolve/main/README.md
license: mit
tags:
- diffusion
- molecule-generation
- qm9
- conditional-generation
- twigs
- jodo
Diffusion Twigs on QM9 (α, μ), warm-started from JODO
A conditional 3D molecule generator for QM9, conditioned on polarizability α and dipole moment μ.
It follows Diffusion Twigs with Loop Guidance for Conditional Graph Generation
(Mercatali, Verma, Freitas, Garg, NeurIPS 2024), using the authors' released QM9 architecture (cond_DGT_twigs,
8 layers, 256 hidden) with bug fixes, fine-tuned from the published
JODO α/μ checkpoint (Zenodo, source step 2,500,001).
Code: the orx/qm9-twigs-from-pretrained-jodo-alpha-mu branch of the project repository (qm9_twigs/).
How it was trained
- Initialisation: the JODO trunk (EMA weights) was copied in and checked to reproduce JODO's outputs exactly
("trunk parity"). The 94 new Twigs tensors (property heads
cls,cls2, and the evolving-property embeddingcond_mlp2,cond_lin2) were freshly initialised, withcond_lin2set to zero. - Variant:
official-fixed, the authors' released training behaviour (independent Gaussian stem input) with corrected per-example property losses and indexing. - Budget: 15 hours on 4× RTX 2080 Ti, 116,845 optimizer updates, effective batch 128 (16 per GPU × 2 accumulation × 4 GPUs), lr 2e-4, 5,000 warmup updates, fp32, EMA decay 0.999, seed 42. For comparison, the authors' released recipe trains 3,000,000 updates from scratch.
- Software: Python 3.10, PyTorch 2.5.1 (CUDA 12.4).
Results (256 samples, one seed)
Property MAE measured with independent EGNN property predictors, targets drawn from the reference distribution, 1,000 sampling steps with loop guidance.
| This model (256 samples) | Twigs, paper Table 5 (10k samples) | JODO, paper Table 5 | |
|---|---|---|---|
| MAE α (bohr³) ↓ | 1.576 | 1.46 | 1.52 |
| MAE μ (D) ↓ | 0.683 | 0.712 | 0.717 |
| Quality | 3D | 2D |
|---|---|---|
| Validity | 96.5% | 96.9% |
| Molecule stability | 91.8% | 96.5% |
| Atom stability | 99.1% | 99.7% |
| FCD ↓ | 2.29 | 1.54 |
Uniqueness among valid molecules is 100%, and novelty is 72.6%.
Caveats. These are 256 molecules from one sampling seed, not the paper's 10,000. The JODO column is the paper's number, not a same-conditions evaluation of the JODO checkpoint, so this card does not show that the Twigs fine-tune beats JODO.
Files
| File | Contents |
|---|---|
last.pt |
Full training checkpoint (model weights, EMA weights, optimizer, update count, RNG state). Evaluation used the EMA weights. |
config.json |
Training configuration, including the resolved model config |
provenance.json |
SHA-256 of every source file used, plus Python, PyTorch and CUDA versions |
sample_metrics.json |
Full evaluation output |
sample_properties.csv |
Target and predicted α, μ for each generated molecule |
samples_valid.sdf, samples_valid_3d.sdf |
Valid generated molecules (2D / 3D) |
train.jsonl |
Training log, every 100 updates |
Load last.pt with torch.load(path, map_location="cpu", weights_only=False) only if you trust this file;
it contains pickled training state as well as tensors.
License and attribution
MIT. Twigs (© 2024 Aalto-QuML) and JODO are both MIT-licensed; please cite both papers if you use this model.