Hands-On Examples for Constraint Locality in Learned Syndrome Decoding

Four interactive demos — the rate–distortion frontier, why global projection breaks a good guess, the post-processing scoreboard, and temporal fusion

Companion to the tutorial and to the paper “Constraint Locality in Learned Syndrome Decoding for 3D Occupancy Grids” (B. Guarraci, Galatheus, May 2026). The tutorial explains why constraint geometry matters and what the paper claims; this page lets you see it. Every widget below runs entirely offline with hand-written canvas + JavaScript — no libraries, MathJax aside. The voxel slice in Widget 2 is a schematic of the local-vs-global story; every number on this page (Widgets 1–4) is taken verbatim from the paper's tables and the reproducer artifacts in data/clean-v2-may02-rsfix/aggregate_summary.json and data/clean-v2-may02-strata/strata_summary.json (seeds 42/43/44, 200 ShapeNet validation samples). Nothing is invented.

The one idea to hold onto When a neural net has already guessed a 3D shape to IoU \(\approx0.94\), forcing it to exactly satisfy a set of big, global parity equations makes it worse (\(-0.0588\) IoU) — because the algebraically-minimal fix has nothing to do with where the real surface is, and \(94.7\%\) of its bit-flips move away from the truth. But nudging the same guess toward many small, overlapping, surface-placed local checks makes it better (up to \(+0.0623\)). Useful constraints are local, overlapping, and content-aware. Widget 2 lets you watch both happen on one voxel slice.

1. The rate–distortion frontier

More of the shared sketch ⇒ sharper reconstruction

What this teaches: the learned proposal sits on a smooth rate–distortion frontier. Drag the spectral level \(L2\!\to\!L8\): retaining more low-frequency coefficients costs more bits but lifts reconstruction IoU from \(0.69\) to \(0.997\). These are the post-hard-projection numbers (before surface BP) — the “sanity-check” curve the paper reports as a nominal bandwidth diagnostic, not a serialized codec.

Why bits are accounted “nominally” Each curve point counts the 2,977-bit fixed syndrome, 8 coarse bits, and 8 bits per retained low-frequency spectral coefficient. No entropy-coded coefficient bitstream is implemented, so read this as “how much bandwidth the proposal had,” not “competitive compression.” The L4 point (5,729 bits, IoU 0.8781) is exactly the post-projection setting that reappears as the damaged “after” row in Widget 2's diagnosis — the same 200 samples, seeds 42/43/44.

2. Local helps, global hurts

One voxel slice, two post-processing choices

What this teaches: the learned proposal is already \(98.4\%\) consistent with the syndrome. Pick hard global projection and watch it flip a handful of high-confidence surface voxels to satisfy big parity rows — \(94.7\%\) of those flips land on correct voxels, so IoU drops. Pick local surface checks and watch small overlapping committees refine the boundary instead — IoU rises. Same proposal, same data; only the constraint geometry changes.

true surface (ground truth) predicted-on, correct flipped away from truth refined toward truth

Why hard global projection backfires (the smoking gun) The proposal violates only \(47.6\) of \(2{,}977\) checks (\(1.6\%\)). Projection flips just \(52.5\) bits (\(0.16\%\) of the grid) to satisfy them — yet IoU falls \(0.9370\!\to\!0.8782\) (\(\mathbf{-0.0588\pm0.0058}\)), because only \(\mathbf{5.3\%\pm0.5\%}\) of the flips move toward the truth. The minimum-Hamming-weight algebra operates at the scale of full rows (32 voxels) while real errors live on \(2\!-\!8\)-voxel surfaces. It even flips lower-confidence bits (mean \(|\text{logit}|\) \(8.665\) flipped vs \(14.151\) kept) — reasonable-sounding, still wrong \(95\%\) of the time.
Why local overlapping checks help Small surface-placed checks are single-error-informative: a violated weight-\(w\) check almost always has exactly one wrong voxel inside, and overlapping neighbors plus the network's own confidence pin which one. Belief propagation over these checks lifts the same proposal by \(\mathbf{+0.0363}\) (weight-8 patches) up to \(\mathbf{+0.0623}\) (weight-2 neighbor pairs) — lower weight helps more, exactly as \(P_1(w,p)=w(1-p)p^{\,w-1}\) predicts. (Lower weight also costs more extra syndrome bits, so it is not a free lunch — see Widget 3.)

3. Post-processing scoreboard

Which constraints actually help — \(\Delta\)IoU on a fixed proposal

What this teaches: hold the learned proposal fixed (IoU \(0.9370\pm0.0028\)) and swap only the post-processing. Hard global projection is the lone bar going the wrong way (red, \(-0.0588\)); all three local surface families go the right way (green), and lower weight helps more. The mode toggle adds the per-occupancy-quartile breakdown — note neighbor pairs help most on the densest, hardest objects (Q4, \(+0.088\)).

Read the “extra bits” column honestly The lower-weight winners cost more extra syndrome bits: weight-2 neighbor pairs spend \(12{,}806\) extra bits for their \(+0.0623\), versus \(4{,}205\) for the weight-8 patches' \(+0.0363\) — roughly \(3\times\) the side-information. The paper keeps these out of the rate–distortion curve and labels the table a constraint-design ablation, not a rate-matched codec comparison. Do not read “\(+0.062\)” as free improvement; read it as “local overlapping checks are the right shape of constraint.”

4. Temporal Bayesian accumulation

Fusing several noisy frames of the same scene (appendix diagnostic)

What this teaches: this is an explicit side dish — no neural decoder, just spectral prior + surface BP on a 20-frame morphing scene with \(8\%\) surface tampering per frame. Single-frame surface BP holds at IoU \(0.847\). Step the frames: a per-voxel Bayesian log-odds accumulator (EMA \(\alpha=0.7\), clamped to \(\pm5\)) fuses evidence and lifts IoU to \(0.958\), reaching \(0.975\) by frame 5. The constraint refinement composes over time.

Why this is a side dish, not the headline The temporal table is deterministic (identical across seeds) and uses no checkpoint-sensitive neural decoder, so it is reported in an appendix and the paper does not lean on it. The static-grid story — Widgets 1–3 — is the central contribution: hard global projection damages a strong proposal, local overlapping surface checks refine it, and a one-line check-weight theory explains both directions.

Companion to the tutorial and main.tex (“Constraint Locality in Learned Syndrome Decoding for 3D Occupancy Grids”, B. Guarraci, Galatheus). Widget 1 numbers are the rate–distortion table from data/clean-v2-may02-rsfix/aggregate_summary.jsonlevels. Widget 2–3 diagnosis and \(\Delta\)IoU figures come from main.tex Tables 1–2 (reproducer Sections 5–6, aggregate_summary.jsonprojection); the per-quartile breakdown is from data/clean-v2-may02-strata/strata_summary.json. Widget 4 is the appendix temporal table (\(0.847\!\to\!0.958\!\to\!0.975\)). The voxel slice in Widget 2 is an illustrative schematic; all reported values are verbatim from the artifacts. No results were invented.