Dense Structural Compression of Transformers via Gauge-Correct Channel Removal

Jed A. Duersch, Naïm Es-sebbani, Nathanaël Haas, Zied BouraouiNeurIPS 2026

TL;DR

Transformers are typically built like cookie-cutter skyscrapers—every floor has the exact same layout, even if the top floors do completely different work than the lobby. GaugeLasso introduces a mathematically principled way to physically shrink and reshape these layers during training, melting away unneeded matrix slices while keeping tensors completely dense and GPU-friendly. By forcing the network to reorganize under sustained compute pressure, it uncovers ultra-compact, specialized architectures (up to 255× smaller on algorithmic tasks) that post-training pruning simply cannot find.

What Problem Does This Paper Address?

Every token a deployed transformer generates costs energy, dominated by massive, dense matrix multiplications—measured in fused multiply-accumulate (FMA) operations. To make models cheaper to run without breaking the predictable memory patterns GPUs love, we don’t want sparse matrices full of holes; we want physically smaller, dense matrices.

Furthermore, the massive capacity a network needs to discover a solution during training is often way larger than what it needs to execute that solution at inference. Ideally, we could penalize low-utility channels during training and slice them right out.

Here lies a sneaky mathematical trap: gauge freedom. Inside a transformer, matrices are multiplicatively coupled (like the value projection $W_v$ and output projection $W_o$). If you multiply a column in $W_v$ by 1,000 and divide the corresponding row in $W_o$ by 1,000, the network’s output doesn't change at all. If you naively penalize their product to shrink channels, gradient descent goes haywire—driving one matrix toward zero while blowing the other up until optimization destabilizes.

Methods

The authors resolve this instability from first principles with GaugeLasso (targeting LLaMA-style SwiGLU transformers using the standard Muon optimizer):

  • Additive Symmetric Group-Lasso: Instead of penalizing matrix products, they apply separate Frobenius-norm penalties to both sides of every coupled structural axis. At equilibrium, this drives coupled slices to a stable "gauge balance" where their norms match, cleanly measuring each channel's true impact on task loss.
  • Efficiency-Scaled Calibration: Not all channels cost the same compute (e.g., attention key/value channels scale with sequence length, unlike simple scaling weights). Penalties are normalized by exact FMA costs so every channel across the entire model is judged on a universal "utility per unit compute" scale.
  • Gauge Sinkhorn & Dense Surgery: Because a live training run isn't at exact mathematical equilibrium, periodic Sinkhorn-like rescaling iterations enforce gauge balance on the fly (adjusting optimizer momentum to match). Once a channel's utility drops within one learning-rate step of zero ("trust-drop"), it is physically excised from memory—no sparsity masks, no restarts.
  • Adaptive Pressure ($\rho$): Rather than guessing a fixed penalty weight, a dynamic controller adjusts compression pressure so the model orbits a user-specified target loss $L^*$, squeezing out excess compute whenever task performance allows.

Datasets

The authors evaluate their framework across four distinct tasks (training all models from scratch):

  • Polynomial Long Division over $\mathbb{F}_{31}$: A deterministic, multi-step symbolic math task with exact ground truth.
  • PG-19: Used for character-level language modeling.
  • CelebA: Used for vision masked autoencoding (MAE).
  • Synthetic Retrieval Task: A lightweight custom benchmark designed to test attention and residual-stream compression for ablation studies.

Key Insights and Ideas

  • Sustained pressure reorganizes representations: If you train a standard model to completion and prune it post-hoc using the exact same gauge-calibrated utility metric, it fails. Without penalty pressure during training, utility spreads uniformly across all channels. Compression during training actively forces the network to pack its knowledge into tighter subspaces.
  • Discovery vs. Trainability: If you take a compact architecture discovered by GaugeLasso, re-initialize its weights, and train it from scratch without penalties, it works fine on statistical tasks (text, retrieval). On exact algorithmic execution ($\mathbb{F}_{31}$ division), however, from-scratch training completely fails—proving the wide initial network was essential as a temporary "scaffolding" to learn the algorithm.
  • Compression as an architectural X-ray: Watching which axes shrink and which hit their ceiling tells you exactly where your design is starved for capacity. On CelebA, noticing that attention key/value dimensions refused to shrink led the authors to widen just those axes in a second run, handily beating their baseline.
Figure 1: An 8-layer transformer trained on polynomial long division over F31 discovers specialized depth structure under compute pressure (L∗=0.005, 25 seeds, 18 converged; see Section 5.1). Me- dian trends are shown in 3 of 7 adaptive structural axes. See Section 3.1 for details and full profiles in Appendix D. The hatched band spans the middle 78%. The right panel tracks the embedding dimension D and classifier input dc along with inference compute.

Key Results

  • Extreme Algorithmic Compression: On $\mathbb{F}_{31}$ polynomial division, an 8-layer transformer compresses by a median of 187× (up to 255×, from 13.2M down to ~70k FMAs) while maintaining 100% exact-match accuracy, discarding entire attention and MLP blocks in deeper layers.
  • Outperforming Hand-Designed Baselines: Compressing a 12-layer PG-19 language model by 7.1× beats a uniform 6-layer baseline at the exact same 7.6M FMA budget (2.610 vs. 2.652 perplexity), whereas post-hoc pruning degrades perplexity by 22% (3.191).
  • Real Wall-Clock Speedups: Because tensors stay dense and physically shrink during training, training steps monotonically accelerate—finishing 1.6× to 5.0× faster by the end of the run.

Limitations and Future Work

  • Fixed Attention Heads: While dimensions inside heads ($d_k, d_v$) shrink freely—and entire attention blocks vanish if all channels hit zero—the number of heads $H$ itself remains fixed. Extending penalties to prune individual heads is left to future work.
  • No Channel Regrowth: Once a channel is sliced out, it cannot grow back through nonlinearities, making conservative drop thresholds crucial.
  • Scale and Latency: All experiments were run from scratch on relatively small models (<150M FMAs). Additionally, because models tend to grow narrower rather than shallower, kernel launch and memory overhead mean a 7.1× FMA reduction translates to a smaller (though still substantial) ~2.4× wall-clock speedup at this scale. Scaling the framework to compress massive pretrained foundation models is the natural next step.

Summary updated

Abstract

Inference energy per token drives the cost and carbon footprint of deployed transformers. It is dominated by dense matrix products that incur fused multiply-accumulate (FMA) operations and memory traffic. To reduce these computations while retaining dense tensors for high GPU throughput, we develop a methodology from first principles to adapt structural complexity during training to maximize inference utility per unit compute. Channel penalties drive entire tensor slices to zero to enable physical removal while preserving density and the network function. The natural approach, penalizing the norm of operator components acting through each channel, is provably destabilized by gauge freedom. We resolve this pathology with GaugeLasso: additive symmetric group-lasso penalties that recover a monotone function of product-norms when the network converges to gauge balance. Our equilibrium analysis enables per-channel calibration to correctly suppress slices that under-perform in inference utility per unit compute. Under adaptive pressure, the network reorganizes into depth-dependent structural profiles that can be far smaller than the architecture required to learn the task. On polynomial long division over $\mathbb{F}_{31}$, compute compresses from 148 to 255 times with perfect accuracy. On character-level language modeling, compressed models outperform the hand-designed baseline at equal FMA. On masked autoencoding, a compression trial exposes which axes were over-provisioned and which saturated, guiding a better second design. Compaction also accelerates training monotonically (final steps 1.6 to 5 times faster) as the model progresses. Post-hoc pruning with the same utility ranking cannot reach these structures, showing that sustained pressure is central to discovery of efficient models. Retraining a discovered architecture recovers baseline quality on our statistical tasks, but fails on our exact algorithmic task.
BibTeX
@inproceedings{duersch2026dense,
  author = {Jed A. Duersch and Naïm Es-sebbani and Nathanaël Haas and Zied Bouraoui},
  title = {{Dense Structural Compression of Transformers via Gauge-Correct Channel Removal}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=qq8R6cSNpW},
}
Figure