Lattice Error-Feedback Residual Blocks
Implementation & benchmark of arXiv:2607.23390 — When Can Depth Replace Precision? A Resource Theory of Quantized Neural Computation
Source paper: When Can Depth Replace Precision? A Resource Theory of Quantized Neural Computation arXiv:2607.23390 ⓘ · analyzed Aug 30, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Replace full-state quantized write-back in a deep low-bit residual stack with quantized increment error feedback. The residual branch quantizes the proposed increment after adding the previous carry, while the carry stores the exact discrepancy; this makes the total error telescope instead of accumulating approximately once per layer.
Formulas
Mathematical statement
The paper distinguishes full-state write-back, whose execution error can incur a depth-dependent penalty of the form D rho_z, from increment error feedback, which has a bounded carry term and an exact common-lattice conservation law. Let z_t be the hidden state, Delta_t be the real-valued residual increment proposed by block t, Q_h be a componentwise quantizer onto lattice h Z^d, and c_t be the stored quantization carry. Use c_0=0, q_t=Q_h(Delta_t+c_t), z_{t+1}=z_t+q_t, and c_{t+1}=Delta_t+c_t-q_t. The conservation identity is c_{t+1}=c_t+Delta_t-q_t, hence sum_{t=0}^{D-1} q_t=sum_{t=0}^{D-1} Delta_t-c_D and z_D=z_0+sum_t Delta_t-c_D. If the carry is not saturated, each coordinate satisfies |c_{D,i}|<h/2 for nearest rounding, so the discrepancy from the unquantized residual trajectory is bounded by ||c_D|| rather than D times the per-step rounding radius.
Implementation notes
Integrate this into the residual addition of a post-training or quantization-aware-training ResNet, Transformer residual stream, or MLP residual stack. Keep the main hidden state z in an int8- or int4-compatible fixed-point format and maintain one higher-precision carry tensor c per residual stream; fp16 carry is sufficient for the first experiment. For block t, compute the ordinary floating-point residual proposal Delta=alpha_t*F_t(z), add the carry u=Delta+c, quantize u with a fixed symmetric scale h_t, write q=clip(round(u/h_t))*h_t, update z=z+q, and update c=u-q. During training, backpropagate through round with a straight-through estimator or simulated additive noise; at inference, use exact integer or fixed-point rounding. Pseudocode is: c=zeros; z=input; for t in range(D): Delta=alpha[t]*F[t](z); u=Delta+c; q=clip(round(u/h[t])*h[t]); z=z+q; c=u-q. Track maximum and RMS carry, saturation count, final output error, and the ratio of error to depth. The telescoping identity is computed exactly; the unsaturated carry range and structural residual error are estimated empirically. First test CIFAR-10 with a 20-block ResNet using int4 residual increments, comparing ordinary int4 state write-back, stochastic rounding, and this method at equal scales and FLOPs. Success is a flatter output-error-versus-depth curve, at least 2x lower validation error at fixed bit width, or equivalent accuracy with fewer bits. Failure is frequent carry saturation or no improvement over stochastic rounding.
Verification
Stage 1 · Toy mechanism gate: Passed ✓
Stage 2 · Mechanism transferred to benchmark: Not reproduced ✗
Stage 2 · Practical benchmark result: Significant win ✓
Methodology: 8 paired seeds, permutation test (p<0.05) against a learning-rate-tuned baseline. How verification works
How to read this: The implementation beat the baseline, but the claimed mechanism did not reproduce at benchmark scale. The gain may come from another effect; treat the cause as unresolved.
Stage 1 — Mechanism check agent confidence 9/10
Built and numerically verified scalar lattice error-feedback residual updates. The conservation identity held to 4.4e-16, baseline full-state error grew with depth at 0.49h per layer as predicted, while feedback error stayed below h/2; carry magnitude scaled linearly with h and remained 0.5h normalized. The mechanism clearly manifested, although this does not establish end-to-end neural-network accuracy or speed gains.
- Agent confidence
- 9/10
- Baseline
- For Delta=0.49h, depth-512 absolute error=250.88h and fitted depth slope=0.4900000000000001h/layer; random-increment mean absolute error at depth 512=2.3713 with h=0.5.
- Idea
- Identity error=4.44e-16; maximum normalized carry=0.5; depth-512 absolute error=0.12 with h=1; random-increment mean absolute error at depth 512=0.1254 versus baseline 2.3713; carry/error scaled linearly with h.
Limitations: Only a scalar toy residual stream was tested, with fixed nearest rounding and no learned CNN, ResNet, Transformer, CIFAR data, clipping stress test, training dynamics, GPU execution, memory accounting, or wall-clock speed measurement. The bounded-carry result assumes no saturation and does not test finite-range int4/int8 state interactions.
How to run: python3 toy_experiment.py
Stage 2 — Benchmark vs. tuned baseline (arXiv:2607.23390)
Beats the tuned baseline by 88.0% (p=0.0081, wins 8 / 8 paired seeds; metric: lower is better).
- Benchmark
- Dynamics forecasting
- Model
- quantized_residual_rnn
- Paired seeds
- 8
- Baseline mean
- 0.0176
- Idea mean
- 0.0021
- Effect (Δ)
- -0.0155 (−88.0%; negative = idea better)
- Wins
- 8 / 8 paired seeds
- p-value
- 0.0081 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±33.6%
- Mechanism
- Not confirmed ✗
- Practical effect
- Helps
- Baseline tuning
- swept over 3 configs
Only the registered dynamics track was tested. No wall-clock or memory benchmark was run. Saturation occurred in the mechanism probe, so the unsaturated carry-bound prediction was not globally confirmed. The custom residual recurrent architecture was shared exactly between baseline and idea but was not the built-in rnn_small implementation.
How to run: python3 official_bench.py
Verdict computed by deterministic test code from paired-seed statistics — not by the language model.
Stage 2 — Benchmark latest Worked ✓
Agent confidence: 8/10
The official dynamics benchmark reports a significant win for lattice error feedback: test MSE decreased from 0.0176259 to 0.00211563, with all 8 paired seeds improving and permutation p=0.0081. The trained-model telescoping residual was about 8.46e-9 and carry stayed near 0.5h, although 58 saturation events occurred, so the mechanism signature is correctly not confirmed globally.
- Baseline
- Tuned 8-seed mean MSE 0.0176258667, best configuration lr=0.003, h=0.05.
- Idea
- Best 8-seed mean MSE 0.0021156328, configuration lr=0.01, h=0.05; paired delta=-0.0155102339, p=0.0081.
Benchmark result
Beats the tuned baseline by 88.0% (p=0.0081, wins 8 / 8 paired seeds; metric: lower is better).
- Benchmark
- Dynamics forecasting
- Model
- quantized_residual_rnn
- Paired seeds
- 8
- Baseline mean
- 0.0176
- Idea mean
- 0.0021
- Effect (Δ)
- -0.0155 (−88.0%; negative = idea better)
- Wins
- 8 / 8 paired seeds
- p-value
- 0.0081 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±33.6%
- Mechanism
- Not confirmed ✗
- Practical effect
- Helps
- Baseline tuning
- swept over 3 configs
Only the registered dynamics track was tested. No wall-clock or memory benchmark was run. Saturation occurred in the mechanism probe, so the unsaturated carry-bound prediction was not globally confirmed. The custom residual recurrent architecture was shared exactly between baseline and idea but was not the built-in rnn_small implementation.
How to run: python3 official_bench.py
Artifacts
- README.md 1.1 KB View
- bench_report.json 4.9 KB View Raw
- lattice_bench.py 4.2 KB View Raw
- official_bench.py 5.4 KB View Raw
- report.md 1.5 KB View
- report_bench_2026-08-31T092558.md 3.8 KB View
- results.json 4.3 KB View Raw
- toy_experiment.py 4.9 KB View Raw