GOVINDFROM's picture
training/: organise around the Sudoku project README; earlier study moved to training/earlier_study/
2a46769 verified
|
Raw History Blame Contribute Delete
6.14 kB
metadata
license: apache-2.0

Training — Recursive Masked Diffusion on Sudoku (MSML612)

Training curves, hyperparameters and epochs for every model in the project README, Recursive Masked Diffusion on Sudoku: Benchmark Saturation, Classical Baselines, and Two Corrections. Each run is mapped to the README table row it produces. Recovered from the Slurm logs and runs/*/result.json on UMD's Zaratan cluster.

folder contents
sudoku/curves/ figures 1–6 below
sudoku/sudoku_runs.csv one row per Sudoku run: README row, board accuracy, architecture, optimiser, epochs, final loss
sudoku/sudoku_loss_curves.csv raw (run, step, loss) behind every figure
earlier_study/ same records for the README's earlier study (addition, inflection, text8, graphs, QM9)

Training setup

  • Data. HARD benchmark (README §1): 100,000 training puzzles, 1,000 held out, 20–30 clues. --augment relabels digits with a random permutation each batch, so the model rarely sees the exact same board twice.
  • Steps, not epochs. Each step samples a batch with replacement. Epochs = steps × batch ÷ 100,000.
  • Optimiser. AdamW, weight decay 0.01, linear warmup then cosine decay to 0, gradient clipping 1.0, bf16.
  • Objective. full = schedule-matched masked diffusion (K = 8 passes, λ = 1.0); mdlm = plain MDLM. Recurrent models add deep supervision, loss on every one of the R = 32 applications weighted r/R (README §7).
  • Hardware. H100 (gpu-h100) for batch-256 runs; A100 1g.5gb MIG slices for the batch-64 R-MDM and injection arms.
  • Loss logging. Single-batch loss every 5,000 steps, so curves are noisy. Losses from different objectives are not comparable with each other, which is README §6's point.

Run → README row

README row § runs params architecture batch steps lr warmup epochs final loss (per seed) board accuracy (README)
recurrent diffusion, full method §2, §4 rec1-full-s0, rec1-full-s1 212k d128, 1 block × R=32 256 120,000 0.0003 3000 307.2 0.1590 / 0.1485 99.70% (99.6 / 99.8)
recurrent, no deep supervision §2, §4 abl-nodeepsup-s0, abl-nodeepsup-s1 212k d128, 1 block × R=32 256 120,000 0.0003 3000 307.2 0.0606 / 0.0425 97.75% (97.3 / 98.2)
recurrent diffusion, MDLM objective §2, §4 rec1-mdlm-s0, rec1-mdlm-s1 212k d128, 1 block × R=32 256 120,000 0.0003 3000 307.2 0.0115 / 0.0162 96.55% (97.1 / 96.0)
feed-forward, 32 distinct layers @bs256 §2, §4 abl-deep32L-s0 6.3M d128, 32 layers 256 120,000 0.0003 3000 307.2 0.1004 94.50%
feed-forward diffusion, schedule-matched §2, §3, §4 sudh-full-s0, sudh-full-s1 37.9M d512, 12 layers 256 150,000 0.0001 4000 384 0.0815 / 0.0734 88.90% (88.3 / 89.5)
feed-forward diffusion, MDLM §2, §3 sudh-mdlm-s0, sudh-mdlm-s1 37.9M d512, 12 layers 256 150,000 0.0001 4000 384 0.0161 / 0.0186 88.15% (89.0 / 87.3)
recurrent, no input injection @bs64 §2, §4 inj-noinject-s0, inj-noinject-s1 212k d128, 1 block × R=32 64 110,000 0.0003 3000 70.4 0.2685 / 0.3159 94.10% (93.0 / 95.2)
feed-forward, 32 distinct layers @bs64 §2, §4 inj-deep32L-s1 6.3M d128, 32 layers 64 110,000 0.0003 3000 70.4 0.3656 83.40%
R-MDM faithful: step embedding, injection OFF §2b rmdm-faithful-s0, rmdm-faithful-s1 228k d128, 1 block × R=32 64 110,000 0.0003 3000 70.4 0.1829 / 0.1643 96.85% @61 NFE (96.6 / 97.1)
R-MDM + input injection ON §2b rmdm-both-s0 228k d128, 1 block × R=32 64 110,000 0.0003 3000 70.4 0.1908 96.90% @61 NFE
autoregressive prefix-LM (baseline reimplementation) §2, §6 fix-arprefix-s0, base-ar-s0 2.4M d128, 12 layers 256 110,000–120,000 0.0003 3000 281.6–307.2 0.0486 / 0.5934 0.15% (row, n=2)
direct recurrent classifier (baseline reimplementation) §2, §6 fix-directall-s0, fix-directall-s1, base-directrec-s0, base-directrec-s1 212k d128, 1 block × R=32 256 110,000–120,000 0.0003 3000 281.6–307.2 0.0722 / 0.0712 / 0.3594 / 0.4830 31.00% (row, n=4)

Batch-256 and batch-64 runs are separate training budgets and must not be compared (README §4). The AR and direct rows each include the first attempt (base-*) and the fixed version (fix-*); the README's §6 losses come from the fix-* runs.

Figures

1 · Main result and ablation ladder, batch 256 (README §2, §4)

fig1

The 212k-parameter recurrent model (full method) ends at higher training loss than the 37.9M feed-forward models and still solves 99.70% against 88.90%. Schedule matching and deep supervision change what the loss measures, so loss levels across arms don't rank accuracy.

2 · Ablation at batch 64 (README §4)

fig2

3 · Matched R-MDM test (README §2b)

fig3

Injection ON drops loss faster for the first ~30k steps, then the arms converge to the same loss by ~35k, consistent with the retraction (+0.05 points at 61 NFE) and with the README's single-pass hint. All three arms stopped at step 80,000 of 110,000.

4 · Low loss, no capability (README §6)

fig4

5 · The SATNet split is saturated (README §1, §5b)

fig5

Every SATNet-split run (31.6M params, batch 128, 60k steps = 853 epochs over 9,000 puzzles) drives training loss to exactly 0.

6 · Every HARD-benchmark run

fig6

Reproduce the headline run

python src/train_sudoku.py --recurrent --R 32 --R_infer 64 --mode full \
    --hard data/sudoku_hard --augment --d 128 --layers 1 --heads 4 \
    --bs 256 --steps 120000 --lr 3e-4 --warmup 3000 --K 8 --lam 1.0 --out runs/rec1-full-s0