SmallJumpDiffusion: Masked Discrete Diffusion Generator for Low-Collision Integer Subsets

Model Summary

This repository hosts reproducibly retrained safetensors checkpoints of SmallJumpDiffusion, a compact 1D residual convolutional masked-unmasking generator conditioned on O(M log M) FFT triple-correlation collision pressure, trained to sample low-collision finite integer subsets A of {1, ..., 512} with fixed cardinality J = 48. These checkpoints accompany the technical paper When Does Diffusion Amortize Combinatorial Subset Design? A Mathematical Analysis and Empirical Audit of Low-Collision Integer Subsets (code & reproduction suite, part of the research-papers collection).

Important Provenance Note: The original exploratory script (diffusion_jump_amortization.py) recorded aggregate metrics in diffusion_jump_amortization.json without saving model weights. The weights packaged here are reproducibly retrained checkpoints (training seed 202612, 120 SA-1200 teacher subsets, 400 AdamW steps), and their measured metrics are reported separately from the original run below.

Important Scientific Scope & Limitation: This model is released as a reproducible research artifact for an empirical audit of diffusion amortization on finite integer subsets. Our controlled audit finds that: (i) when a single reusable subset suffices for fixed (M, J), reusing the best cached teacher subset (energy 1656.16) strictly dominates generative sampling; (ii) the model's two FFT pressure channels (sum_p, diff_p) are algebraically identical; and (iii) a 0-parameter GPU FFT-Greedy heuristic using the same FFT primitive achieves lower energy (1669.92 vs. 1743.73) at lower latency with zero training data.

Packaged Files

File Description Parameters
small_jump_diffusion_m512_j48_repro.safetensors Faithful reproduction checkpoint (fft_mode="both", 6 input channels) 70,945
small_jump_diffusion_m512_j48_1fft.safetensors Deduplicated ablation checkpoint (fft_mode="single", 5 input channels) 70,705
config.json Exact architecture, training, and objective configuration + SHA-256 checksums N/A
metrics.json Original reported metrics vs. retrained reproduction & 3-seed audit metrics N/A
model.py Self-contained PyTorch module (SmallJumpDiffusion) N/A
example_inference.py Minimal load, sampling, and exact collision-scoring script N/A
PROVENANCE.md Source provenance and exact checksums N/A
requirements.txt Minimal runtime dependencies (torch, numpy, safetensors, huggingface-hub) N/A

Objective

For a subset A of {1, ..., M} with |A| = J, let Q_4(A) denote unordered 4-distinct additive quadruples (a + b = c + d) and T_3(A) denote 3-term arithmetic progressions (a + b = 2c). The aperiodic collision count is:

C_tot(A) = C_sum(A) + C_diff(A) = 3 * Q_4(A) + 2 * T_3(A)

and the composite objective is:

E(A) = C_tot(A) + 120 * (E[X^2] / E[X]^2 - 1) + 80 * (E[X] / M - 0.5)^2

Evaluation Results (Original Reported vs. Retrained Checkpoints vs. Baselines)

Evaluated at M = 512, J = 48, steps = 16, temp = 0.6:

Run / Method Weights Saved Mean total_4cyc Mean Composite Energy Notes
Original reported run (diffusion_jump_amortization.json, n=24) No 1681.29 1737.99 Historical baseline (no saved checkpoint)
Retrained faithful_2fft_repro (seed=202612, n=24) Yes 1668.96 ± 21.5 (SD) 1726.79 ± 20.31 (SD) 24/24 unique, 0 exact train matches
Multi-seed audit 2-FFT (3 seeds, n=72) Seed 0 saved 1688.96 1743.73 ± 10.66 (95% CI) GPU B=24: 0.2342 ms/tbl; B=1: 4.6098 ms
Multi-seed audit 1-FFT dedup (3 seeds, n=72) Seed 0 saved 1668.46 1727.43 ± 7.32 (95% CI) Removes redundant FFT channel (70,705 params); GPU B=24: 0.2423 ms/tbl
Uniform random baseline (n=72) N/A 2406.31 2445.80 ± 33.51 (95% CI) Analytical expectation: 2388.48 4-cycles
SA-1200 teacher (Python CPU, n=72) N/A 1643.60 1700.10 ± 4.33 (95% CI) Pure-Python teacher; CPU B=24: 51.15 ms/tbl
SA-1200 compiled C99 -O3 (1-core CPU, n=72) N/A 1646.88 1703.09 ± 4.31 (95% CI) 1-core C99 -O3; CPU B=24: 0.185 ms/tbl; B=1: 0.179 ms/tbl
0-param GPU FFT-Greedy (n=72) N/A 1610.93 1669.92 ± 5.58 (95% CI) Zero training; GPU B=24: 0.1072 ms/tbl
Best cached teacher subset (n=72) N/A 1600.00 1656.16 ± 0.80 (95% CI) Zero marginal search cost when 1 subset suffices

Quickstart Usage

pip install -r requirements.txt
python example_inference.py \
  --weights small_jump_diffusion_m512_j48_repro.safetensors \
  --fft-mode both \
  --batch-size 4 --steps 16 --temp 0.6 --seed 42

Or load directly from the Hugging Face Hub (pinned to a commit revision):

import torch
from huggingface_hub import hf_hub_download
from safetensors.torch import load_file
from model import SmallJumpDiffusion

weights_path = hf_hub_download(
    repo_id="FloorIsAwake/diffusion-for-low-collision-subsets",
    filename="small_jump_diffusion_m512_j48_repro.safetensors",
    revision="<COMMIT_SHA>",
)
model = SmallJumpDiffusion(M=512, channels=48, fft_mode="both").eval()
model.load_state_dict(load_file(weights_path))
subsets = model.sample_batch(batch_size=4, J=48, steps=16, temp=0.6)
print(subsets.shape)  # (4, 48)

Limitations & Intended Use

  • Trained solely on fixed (M=512, J=48) subsets under one composite objective. Zero-shot transfer to sparser cardinalities (e.g., J=24) degrades substantially (9.1% gap capture).
  • Not intended to supersede cached optimal tables or training-free FFT-greedy / compiled classical solvers on fixed instances; provided for full experimental reproducibility and ablation auditing.
Downloads last month
39
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Collection including FloorIsAwake/diffusion-for-low-collision-subsets