Fixing Neural Compression Error Accumulation
Compressing neural networks layer-by-layer often fails because individual matrix errors compound; a three-level optimization approach targets the entire Transformer block instead.
Most neural network compression techniques treat individual weight matrices as standalone problems. By applying Singular Value Decomposition (SVD) to each layer, researchers minimize the reconstruction error of a single matrix in isolation. This approach relies on the Eckart-Young theorem, which guarantees the best low-rank approximation for a matrix given its size. However, a transformer block is a sequence of matrix multiplications, activation functions, and normalization layers. When you approximate layers independently, the tiny errors introduced in the first linear layer are passed into the next layer and distorted by the intervening nonlinearity. By the time the data reaches the end of the transformer block, these independent errors have cascaded into significant deviations from the original model output.
Compression Results on LLaMA-7B
| Method | WikiText-2 Perplexity | Compression Rate |
|---|---|---|
| Baseline Dense | 8.4 | 0% |
| Traditional SVD | 42.1 | 60% |
| Two-Level (L1 + L2) | 19.1 | 60% |
| Three-Level (L1 + L2 + L3) | 11.4 | 60% |
Solving for Block-Level Error
Researchers now treat the entire transformer block as the unit of compression rather than the individual matrix. Instead of minimizing the distance between the original matrix and the compressed matrix, this joint approach minimizes the difference between the final outputs of the original block and the compressed block. To achieve this, the authors implement an optimization process that calculates the gradient of the loss with respect to the low-rank factors of all matrices within the block simultaneously. By using backpropagation through the entire block for each iteration, the optimizer accounts for how errors in the first layer influence the input to the next, specifically respecting the non-linear transformations like LayerNorm or SiLU activations. This allows factors in earlier layers to compensate for potential noise introduced by downstream layers. It is an end-to-end optimization of the block's input-output mapping.
The Calibration Trade-off
This method requires calibration data to define the target outputs for the block-level optimization. If you have access to larger calibration datasets, the relative advantage of this complex three-level optimization diminishes. With more samples, simpler methods become more competitive because the increased data allows the approximation to statistically average out the errors that would otherwise manifest as sharp deviations. In effect, the volume of data provides a proxy for structural awareness, making the high cost of block-level backpropagation less necessary for maintaining performance. This represents a clear compute-data trade-off for engineers: if you have limited calibration samples, you must use block-level optimization to maintain output accuracy, but with large datasets, the marginal gains of the complex approach shrink.
While this technique brings perplexity closer to the dense baseline than independent matrix compression ever could, it does not fully restore the model's original capabilities. The latent space of a compressed model is fundamentally altered by the dimensionality reduction, and downstream accuracy on tasks requiring specialized reasoning or code generation often trails behind the dense original. It is currently unknown whether further scaling of this joint optimization approach could eventually reach parity with dense weights, or if there is a theoretical limit to how much information a low-rank bottleneck can preserve regardless of the optimization path used. We have the architecture to reduce the size, but the structural cost of discarding internal features during compression is not yet fully reversible.