# nfse-canvas

> Pre-registered test of pinned-template decoding in DiffusionGemma: +0.130 on one layout, −0.018 across four municipal ones. The pilot lied — that is what pre-registration is for.

- Tags: AI, Evals, Research
- Author: Caio Theodoro (https://caio.theodoro.dev/about.md)
- Canonical HTML: https://caio.theodoro.dev/projects/nfse-canvas
- Source repository: https://github.com/caiotheodoro/nfse-canvas
- Hugging Face: https://huggingface.co/collections/caiotheodoro/nfse-canvas-one-layout-said-yes-four-said-no-6ab750b90e32dd23e0fa5cd0

---

Does pinning a fixed answer template into a diffusion language model make extraction more consistent? The pilot said yes. I pre-registered the real test before running it.


## The pilot lied

- Pilot, one layout: +0.130 field exact match, 95% CI [+0.093, +0.167], n=161 — a clean win
- Pre-registered study, four municipal layouts: −0.018, CI [−0.053, +0.014], n=428 — nothing
- Autoregressive Gemma under the same template beats pinned DiffusionGemma by 11.1 points
- Entropy as an error flag: AUROC 0.661 against a pre-registered 0.80 bar — not supported
- Cost of pinning: 8.0s vs 0.9s per note — about 9x slower

The pilot is exactly where false positives live, and the pilot is the study most people would publish. The real NFS-e data stays private; the method, the checker, the four-part leak gate, and a 10,000-document synthetic dataset are public, including a red-team file that attacks the claims.

---

## Writing about this project

- [Pinning an Answer Template into DiffusionGemma on Five NFS-e Layouts](https://caio.theodoro.dev/blog/diffusiongemma-pinned-one-layout-said-yes.md)

All projects: https://caio.theodoro.dev/projects.md · About the author: https://caio.theodoro.dev/about.md · Machine-readable index: https://caio.theodoro.dev/llms.txt
