Manuscript Offprint

arXiv:2609.07264

Dense Structural Compression of Transformers via Gauge-Correct Channel Removal

Jed A. Duersch, Naïm Es-Sebbani, Nathanaël Haas, Zied Bouraoui

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

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 F31\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×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.

1 Introduction

The energy required to process a token drives both the environmental footprint and operating costs of a deployed transformer. Nearly all of that energy is spent in dense matrix-matrix products. Attention and MLP projections use one fused multiply-accumulate (FMA) per parameter per token (two FLOPs by convention), and attention adds a further term that grows with context length. Reducing inference energy means reducing this arithmetic, and the memory traffic that feeds it, while preserving the predictable access patterns that make dense GPU kernels efficient.

Transformers used in practice simplify design by using structurally uniform layers that contain equivalent processing dimensions. Although a block at depth 1 may serve a fundamentally different role than a block at depth 12, both are allocated identical resources because the space of

*Corresponding author.

Preprint.

heterogeneous depth-dependent architectures is far too large to search by enumeration. Moreover, the structure needed to discover a solution can be far larger than the structure needed to perform inference, leaving the trained network wasteful.

We develop a methodology to dynamically adapt network structure during training, compelling operators to reorganize into smaller dense tensors that retain full GPU throughput. 2^{2} Calibrated channel-level penalties drive entire tensor slices to zero on both sides of every structural axis, enabling physical removal of channels without introducing sparsity. We price each channel in inference utility per FMA, rather than just parameters, to account for the additional compute used by key and value channels. Further, FMA is a kernel- and hardware-independent model property that we can optimize at design time without referencing a deployment target. Prior approaches to efficient architectures, including post-hoc structured pruning, neural architecture search, and during-training methods such as CoFi [Xia et al., 2022], either operate on fixed representations, search discrete candidate sets, or handle multiplicative coupling between connected factors heuristically.

The natural approach is to penalize the operator norm acting through each channel, but this is provably pathological. Transformers contain gauge-connected tensors: rescaling one factor and inversely rescaling the other preserves the network function. This freedom destabilizes product-norm penalties, driving one factor toward zero while the other compensates until updates become too sensitive. GaugeLasso resolves this problem with efficiency-scaled additive symmetric penalties on channel-aligned factors, which drive the network toward a particular gauge balance where the group norms measure inference utility per FMA. This suppresses channels with under-performing utility per cost. Applied to diverse tasks, GaugeLasso discovers architectures far smaller than those needed for learning. Figure 1 traces this process on polynomial long division over F31\mathbb{F}_{31}, where layers adopt markedly different dimensions during compression. The method achieves up to 255×255\times compression (median 187×187\times) over seeds that maintain perfect accuracy. For character-level language modeling, compressed models outperform the hand-designed baseline at equal FMA, while continuous dense compaction accelerates training by up to 5×5\times.

Structural regularization during training allows the network to adopt more efficient representations as it is forced into fewer dimensions, rather than merely removing redundancies. We test this directly by applying the same gauge-calibrated utility metric to trim fully trained models. On F31\mathbb{F}_{31}, post-hoc pruning cannot compress the model at all; on character-level language modeling, it achieves 22% worse perplexity at equal FMA. A matched comparison against CoFi, the closest during-training method, stalls at 1.97×1.97\times compression where 7.09×7.09\times was requested, plausibly because its mask space cannot narrow dimensions inside units that remain alive (Section 5.4). Sustained resource pressure is therefore what discovers these architectures. Whether it is additionally required to train them depends on the task: retraining a discovered architecture from fresh initialization recovers baseline quality on our statistical tasks, but not on exact algorithmic execution.

Our contributions are the following.

  1. Symmetric group-lasso equilibrium and inference utility. At gauge balance, group norms directly measure each channel's inference utility. Efficiency-scaled calibration normalizes to utility per FMA, enabling gradual suppression of under-performing channels across structural axes (Section 3).

  2. Dense adaptive training framework. Our implementation techniques (adaptive penalty strength from a loss target, gauge-Sinkhorn iterations to accelerate balance, and optimizer-preserving tensor surgery) yield continuous dense compression without sparsity masks, discrete search, or optimization restarts. Because compressed dimensions are physically removed, step time decreases as the model compresses (Section 4).

  3. Sustained pressure discovers architectures that search does not reach. Transformers reorganize into smaller dense architectures that match or exceed baselines, and neither post-hoc pruning with the same utility metric nor a matched during-training baseline reaches them. Retraining from fresh initialization recovers baseline quality on our statistical tasks but fails on exact algorithmic execution. Structural profiles also reveal when axes saturate their initial budget, directly informing architecture design (Section 5).

2^{2}Code: https://gitlab.com/jduersch/gaugelasso

Polynomial long division over F31\mathbb{F}_{31}: structural profiles and compression trajectory.

Figure

Figure 1: An 8-layer transformer trained on polynomial long division over F31\mathbb{F}_{31} discovers specialized depth structure under compute pressure (L∗=0.005L^*=0.005, 25 seeds, 18 converged; see Section 5.1). Median 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 DD and classifier input dcd_c along with inference compute.

References (30)

  • Slicegypt: Compress large language models by deleting rows and columns
  • Sharp minima can generalize for deep nets
  • Reducing transformer depth on demand with structured dropout (opens arXiv in a new tab)
  • The lottery ticket hypothesis: Finding sparse, trainable neural networks
  • Learning both weights and connections for efficient neural network
  • Advances in Neural Information Processing Systems, 35, 2022
  • Dynabert: Dynamic bert with adaptive width and depth
  • Tinybert: Distilling bert for natural language understanding
  • Muon: An optimizer for hidden layers in neural networks
  • Scaling Laws for Neural Language Models
  • Pruning filters for efficient convnets
  • Darts: Differentiable architecture search
  • Deep learning face attributes in the wild
  • Are sixteen heads really better than one? Advances in neural information processing systems, 32, 2019
  • Importance estimation for neural network pruning
  • Norm-based capacity control in neural networks
  • Compressive transformers for long-range sequence modelling
  • On the effect of dropping layers of pre-trained transformer models
  • DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lighter
  • Movement pruning: Adaptive sparsity by fine-tuning
  • GLU Variants Improve Transformer
  • Equi-normalization of neural networks
  • Learning structured sparsity in deep neural networks
  • Structured pruning learns compact and accurate models
  • Sheared llama: Accelerating language model pre-training via structured pruning
  • Model selection and estimation in regression with grouped variables
  • To prune, or not to prune: Exploring the efficacy of pruning for model compression (opens arXiv in a new tab)
  • Neural architecture search with reinforcement learning
  • $L_2$ regularization applies pressure proportional to magnitude, so weights shrink but never reach exactly zero; it cannot drive channels to extinction
  • Sparse pruning zeroes channels but keeps tensors at full size; dense slice removal produces physically smaller tensors at full hardware utilization