Backstepping Quantization: Setting Each Layer's Target From What the Layers After It Need

Compressing a large language model to 2 bits per weight usually works one layer at a time. Each layer's rounded weights are chosen so that its output matches the original full-precision output, as if every other layer were still exact. That assumption is false. Rounding errors made early in the network change the inputs seen by later layers and compound with depth. On Llama-2-7B at 2 bits this pushes WikiText-2 perplexity to 17,783 (Quantization Error Propagation). Current fixes either look upstream only, letting each layer absorb errors already made before it, or optimize the whole network jointly and overfit a small calibration set.

Control theory has a tool for exactly this layered structure. Backstepping is a method for stabilizing a chain of dynamical stages in which the true control acts only through intermediate states. It works backward from the output. It first decides what the stage feeding the output should produce, calling that a "virtual control," and then asks the stage before it to produce that. Along the way it builds an energy-like function, a Lyapunov function, that certifies the whole chain stays stable. We propose to quantize a Transformer the same way. The target for each block's quantized output is not its full-precision activation. It is a virtual target: the activation that the already-quantized downstream blocks need in order to reproduce the full-precision model output. How hard each block works to correct upstream error is then set by how much the blocks after it amplify perturbations, rather than by a fixed hand-tuned constant. The same amplification measurement also gives a testable explanation of the sub-3-bit "performance cliff."

Core Claim

Two things are new relative to the closest work, and both can be falsified.

First, compensation runs backward as well as forward. Quantization Error Propagation (QEP) changes layer $l$'s objective to match the full-precision output given the perturbed upstream input, with a scalar propagation strength $\alpha_l$ defaulting to 0.5. That corrects for the past but never asks what the quantized future layers need. Backstepping adds that missing half. Each block is asked to produce an activation shifted so that downstream rounding errors partly cancel. This is the inter-layer cancellation that Network-Wise Quantization (NWQ) exploits through expensive joint optimization. Here it is obtained through a sequence of cheap per-block problems.

Second, the correction strength is derived from a measured quantity. A residual Transformer block maps $x_{l+1} = x_l + F_l(x_l)$. Let $e_l$ be the gap between quantized and full-precision activations entering block $l$. Let $d_l$ be the new error that block $l$'s rounding injects. Let $\gamma_k$ be the empirical incremental gain of block $k$, meaning the worst ratio, over calibration data, of how much a small input perturbation grows across that block. Then the standard incremental input-to-state bound gives

$$\|e_L\| \le \sum_{l=1}^{L} \Big(\prod_{k=l+1}^{L} \gamma_k\Big)\, \|d_l\|.$$

This is the discrete-layer analogue of the incremental stability guarantee that Backstepping Design for Incremental Stability constructs for continuous-time chains. The bound says an error injected at block $l$ is weighted by the product of downstream gains. So a block followed by expanding blocks needs full correction, and a block followed by contracting blocks can tolerate more rounding error. We set each block's correction strength, and each block's share of the error budget, from these downstream gain products.

The cliff hypothesis follows directly. The abrupt collapse below 3 bits (Evaluating Quantized Large Language Models) should occur when the gain products along the network cross from contracting to expanding at the perturbation sizes that low-bit rounding produces. That is a loss of incremental stability, not a smooth rise in noise.

Research Program

The algorithm alternates two passes over the Transformer blocks, operating on top of an existing per-block rounding method. The default base is QuIP's incoherence processing plus adaptive rounding (QuIP), so improvements are attributable to the targets and not the rounding.

In the backward pass, blocks are quantized from the last to the first. For the final block, the target is the full-precision output. For block $l$, we compute a virtual correction $v_l$. It is the change to block $l$'s output that best cancels the output error of the already-quantized blocks $l+1,\dots,L$, obtained from a regularized least-squares solve using vector-Jacobian products of the downstream quantized stack on the calibration batch. Block $l$'s rounding then minimizes the usual layer-wise Hessian-weighted error, but against $W_l x_l + v_l$ instead of $W_l x_l$. The correction is scaled by a strength derived from the downstream gain product, capped at full correction.

The forward pass then re-quantizes blocks in order using the actual perturbed inputs, as QEP does, but keeps the virtual targets. The two passes can repeat. We will report whether one round suffices.

Backstepping's classic weakness is the "explosion of terms": each virtual control must be differentiated through every earlier stage (Robust Adaptive Control for Strict-Feedback Nonlinear Systems; Zamani). Here that weakness appears as the cost of differentiating through all downstream blocks. We address it with truncated lookahead: each virtual target looks only $k$ blocks ahead, and we sweep $k$ from 1 to full depth. If most of the gain comes at small $k$, the method costs a small multiple of QEP.

The virtual-target shift is also regularized toward zero. Unlimited target shifting would recreate the calibration overfitting that NWQ reports. The strength of this regularizer is the one hyperparameter we tune.

Backstepping Temporal Difference Learning shows the same move of treating one part of a learning update as a virtual input can stabilize a computational cascade. Its guarantees are limited to linear function approximation, and we inherit that caveat. Our certificate is empirical, measured on calibration data, not a proof for arbitrary inputs.

The analysis track measures per-block incremental gains on full-precision and quantized models at 4, 3, 2, and roughly 1 bits. It then tests whether the downstream gain product predicts two things: where error accumulates, and at what bit-width each model's perplexity and GSM8K accuracy collapse.

Baselines

The naive reference is greedy layer-wise quantization with no propagation handling: OPTQ/GPTQ and plain QuIP, run with the same calibration data. The file reports this regime collapsing: OPTQ reaches 123.91 WikiText-2 perplexity at 2 bits on Llama 2 70B, against 6.33 for QuIP (QuIP). It also reports 17,783 for 2-bit Llama-2-7B without propagation handling (QEP).

The strongest direct competitor is QEP applied to QuIP. It is the only method in the file that explicitly targets cascaded error in LLM post-training quantization, and it is cheap. The number to beat is its reported WikiText-2 perplexity of 11.97 for 2-bit Llama-2-7B. We will rerun QEP with its released default $\alpha=0.5$ and also with $\alpha_l$ tuned per layer by search on held-out data, under the same compute budget our method uses. Beating it means lower WikiText-2 and C4 perplexity and higher zero-shot accuracy at matched bits and matched calibration data, with gains exceeding seed-to-seed variation over at least three calibration draws.

For the strongest overall pipeline we compare against QuIP#, which reports 4.16 WikiText-2 perplexity at 2 bits on Llama 2 70B using Hadamard rotations, E8 lattice codebooks, and inter-layer fine-tuning. We test backstepping targets as a drop-in replacement for its per-layer targets, with its fine-tuning stage kept identical. The file gives no reported QuIP# result on Llama-2-7B, so we will produce that number ourselves. For vision and joint weight-activation quantization we compare against NWQ, which reports 35.13% ImageNet top-1 for 2-bit MobileNetV2 versus 14.89% for QDROP (NWQ).

Two ablations isolate the key ingredient. The first keeps gain-derived strengths but sets all virtual targets to zero; this is forward-only with principled $\alpha$. The second keeps virtual targets but uses a constant strength. If the first ablation matches the full method, the backward pass is not doing anything.

Why not just…?

Why not just tune QEP's $\alpha_l$ per layer? This is the most serious threat. If gain-derived strengths are all that matters, a search over $\alpha_l$ on held-out data could match them. The ablation with zero virtual targets and tuned $\alpha_l$ answers this directly. Search can only reweight upstream correction, while virtual targets move each block's objective in a direction set by downstream rounding. If tuned QEP matches the full method, we will report that the contribution reduces to a cheap, search-free rule for choosing $\alpha$ and a cliff diagnostic.

Why not weight each layer's loss by how sensitive the final output is to it? Downstream-sensitivity weighting changes how much each layer's error counts but still aims every layer at the full-precision activation. It cannot produce deliberate cancellation, where a block's output is intentionally moved off the full-precision value. We will run this weighting as an additional baseline using the same vector-Jacobian products. The difference between it and our method measures the value of the shifted target alone.

Why not just fine-tune end to end after quantizing? End-to-end tuning does capture cancellation, but at a cost the file documents. CRVQ notes that quantization-aware training needs over 7,000 GPU hours for a 13B model, versus about 50 for targeted post-training quantization (CRVQ). NWQ reports overfitting to small calibration sets. Light fine-tuning, as in QuIP#, is complementary, so we test backstepping as a better starting point for it. The success criterion is that the tuned result improves, or reaches the same quality with fewer tuning steps.

Why not protect salient channels with extra bits? Mixed precision, as in CRVQ or AlphaQ, changes the bit budget rather than the targets, so it is orthogonal to our method. We will apply our method on top of CRVQ-style allocation at about 1 bit to check that the gains are additive.

Proposed Experiments

The main study uses Llama-2-7B, Llama-2-13B, Llama-3-8B, and Mistral-7B, the families QEP evaluates, plus Llama-2-70B for the QuIP# comparison. Calibration data is C4 or RedPajama sequences, with the same count across methods. We run weight-only quantization at 4, 3, 2, and about 1 bits, and a W4A8 setting to probe activation fragility. Metrics are WikiText-2, C4, and Penn Treebank perplexity, plus zero-shot accuracy on ARC-Easy, PIQA, and StoryCloze. GSM8K is included because multi-step reasoning is the first capability lost below 3 bits (Evaluating Quantized Large Language Models). The file gives no numeric FP16 GSM8K result for these models, so we measure it. The ImageNet MobileNetV2 and MnasNet 2-bit experiments test whether the method matches NWQ's joint optimization at a fraction of its cost.

There are three decisive checks.

The first is whether backstepping-QuIP beats tuned QEP-QuIP on 2-bit Llama-2-7B below the 11.97 perplexity reference. It must do so with the virtual-target ablation clearly behind the full method.

The second is the lookahead sweep. If $k=1$ or $2$ captures most of the gain, the method is practical. If only full-depth lookahead helps, the explosion-of-terms problem has reappeared and we will report the cost honestly.

The third is the cliff test. We ask whether the bit-width at which each model's downstream gain product first exceeds 1 on calibration data predicts, across models and in advance, the bit-width at which perplexity and GSM8K accuracy collapse. We also ask whether our method moves that crossing lower. A clear failure of this prediction would falsify the dynamical explanation of the cliff even if the algorithm still helps.