Repository

diffusiongemma_latent_reasoning

Does DiffusionGemma do latent reasoning?

README

Does DiffusionGemma do latent reasoning?

Source for the blog post, self-contained on two levels: the figures regenerate on CPU from
the vendored study outputs in src_data/, and the experiments that produced those outputs
can themselves be rerun from experiments/.

Layout

  • post.md — the post text (figures referenced from figs/).
  • scripts/ — one script per figure plus shared helpers (payload.py, compose_figs.py,
    build_html.py). Each script's docstring states its data provenance.
  • src_data/ — vendored study outputs (JSON) that the figure scripts consume.
    src_data/gated/ holds two inputs with verbatim GPQA problem text as password-protected
    zips (see the README there).
  • data/ — small per-illustration extracts produced by the extract_* scripts.
  • figs/ — committed renders. figs/parts/card_*.png are browser screenshots of the
    native-HTML illustration cards (generated by build_html.py card, not regenerable offline);
    every other PNG regenerates from src_data/ via scripts/plot_*.py.
  • experiments/ — the vendored experiment code behind every src_data/ file: the
    DiffusionGemma worker server, the truncation-ladder, letter-arithmetic, ember, thinkfast,
    and post-hoc studies, and the interpretability-transfer suite. See experiments/README.md
    for the section→experiment map, hardware/model requirements, and entry points.

Reproduce the figures (CPU, no network)

Python 3 with numpy, matplotlib, pillow:

for s in scripts/plot_*.py; do python3 "$s"; done
python3 scripts/compose_figs.py      # composes matrices + card screenshots into appendix figures
python3 scripts/build_html.py        # renders post.md -> post.html

Rerunning the figure scripts reproduces the committed PNGs from src_data/ alone.

Rerun the experiments (GPU)

experiments/README.md documents the full chain: models (google/diffusiongemma-26B-A4B-it,
google/gemma-4-26b-a4b-it; HF-gated), the worker server the capture scripts talk to, exact
entry points per study, benchmark staging (experiments/lockin/stage_*.py + the encrypted
GPQA zip), and the two LLM-judge endpoints. The extract_* scripts in scripts/ then reduce
fresh experiment outputs back into src_data/.