From Layers to Submodules: Rethinking Granularity in Replacement-Based LLM Compression

Elia Cunegatti, Marcus Vukojevic, Erik Nielsen, Giovanni IaccaarXiv 2026

TL;DR

Post-training LLM compression typically drops entire, contiguous layers, which can severely degrade model performance. This paper introduces SUBFIT, a method that operates at the finer granularity of individual Attention and FeedForward submodules, selecting them non-contiguously across the network and replacing them with lightweight, analytically fitted residual bypasses. This approach achieves significantly better accuracy-efficiency trade-offs, especially under aggressive compression budgets.

What Problem Does This Paper Address?

Deploying Large Language Models (LLMs) under tight memory and latency constraints usually requires post-training compression. Structural pruning methods—which remove entire architectural blocks—are highly attractive because they provide real hardware speedups without requiring specialized sparse kernels.

However, existing block-replacement methods suffer from two major constraints: they operate at full-layer granularity (treating the entire Transformer layer as an indivisible unit) and remove contiguous blocks of layers. The authors argue that this is overly restrictive. Redundancy in pretrained transformers is scattered non-contiguously throughout the network and varies significantly between Attention and FeedForward Network (FFN) submodules. Forcing the removal of entire contiguous layers disrupts the model's residual stream unnecessarily, leading to sharp drops in text quality and downstream accuracy.

Methods

The authors propose SUBFIT (Submodule-level Fitted residual replacement), a calibration-guided, select-and-replace pipeline that relaxes the constraints of contiguity and layer-level granularity:

  1. Sequential Selection: SUBFIT first evaluates and replaces Attention submodules across the network, then evaluates FFN submodules on the partially compressed model. This allows FFN selection to account for the residual-stream shift induced by the Attention replacements. Submodules are selected non-contiguously based on an "Impact score" that measures directional and magnitude perturbations to the residual stream.
  2. Fitted Residual Replacement: Instead of simply deleting submodules, SUBFIT replaces them with a lightweight parametric surrogate. This surrogate includes an affine correction (gating, bias, and centering terms) to handle mean shifts and feature scaling, plus a low-rank linear operator to capture cross-feature interactions.
  3. Asymmetric Rank Design: Attention submodules are replaced using independent low-rank bases (rank 256). FFN submodules require a higher rank (rank 4096) to maintain quality. To keep deployment costs low, SUBFIT introduces a shared input basis across all removed FFN layers, meaning only the output coefficients specialize per layer.
  4. Closed-Form Fitting: Crucially, the surrogate parameters are computed analytically from calibration data covariance statistics using ridge regression and eigen-decomposition. This requires zero gradient-based optimization or full-model fine-tuning.

Datasets

  • Calibration Data: SlimPajama (for base models) and SlimOrca (for instruction-tuned models), sampling 8k sequences at a maximum length of 1024 tokens.
  • Evaluation Benchmarks:
  • Base models: Lambada, C4, and WikiText-2 (evaluated via perplexity).
  • Instruction-tuned models: 13 downstream tasks spanning commonsense reasoning (HellaSwag, PIQA, Winogrande, OpenBookQA, SocialIQA), question answering (BoolQ, TruthfulQA), knowledge (MMLU), reasoning (ARC-Challenge, ARC-Easy), math (MathQA, GSM8K), and science (SciQ).

Key Insights and Ideas

  • Attention vs. FFN Redundancy: Attention and FFN submodules exhibit fundamentally different approximation behaviors. As shown in rank-sensitivity sweeps, Attention surrogates saturate quickly at a very low rank (rank 256), whereas FFNs need a much higher rank (rank 4096) to properly recover lost information.
  • Subspace Sharing Across Depths: Even though FFNs require a high-rank approximation, the underlying input subspace where their activation variance lies is highly shared across different depths. Tying the input basis across layers drastically reduces parameter overhead while matching the performance of unconstrained per-layer variants.
  • Masking is a Poor Proxy for Replacement: A submodule's sensitivity to simple deletion (masking) does not correlate well with how successfully it can be replaced by a fitted surrogate. Selection criteria must explicitly account for post-replacement behavior rather than just local deletion tolerance.
Rank sensitivity sweeps showing that Attention saturates at lower ranks than FFN submodules.

Key Results

  • Superior Trade-offs: Across ten LLMs (from the Llama, Qwen, and DeepSeek families) and five sparsity levels, SUBFIT consistently outperforms layer-level baselines like LLM-Streamline and ReplaceMe.
  • Aggressive Compression Performance: At 25% sparsity, SUBFIT retains 84.6% of dense downstream accuracy and incurs only a 2.42× perplexity degradation, compared to 81.6% accuracy and a harsh 4.34× perplexity degradation for the strongest baseline.
Figure 1: Downstream accuracy retention versus aggre- gate perplexity degradation across sparsity levels for SUBFIT and four replacement-based baselines.
  • Real Hardware Efficiency: Tested on an NVIDIA A100 GPU, SUBFIT delivers Time-to-First-Token (TTFT) speedups of 1.18× to 1.40× and decode speedups of 1.12× to 1.17×. Furthermore, completely removing Attention submodules yields KV-cache memory savings directly proportional to the sparsity level (e.g., a flat 25% reduction in KV-cache size at 25% sparsity).

Limitations and Future Work

  • Explicit Parameter Overhead: Unlike methods that fold linear transformations directly into adjacent remaining weights (like ReplaceMe), SUBFIT introduces explicit bypass parameters. This adds roughly 10% of the removed parameters and 15% of the removed MACs at 25% sparsity, slightly reducing the maximum achievable inference speedup compared to pure deletion.
  • Scale Limits: The evaluation was restricted to models in the 3B to 8B parameter range. The authors note that it remains future work to establish whether these submodule-level redundancy patterns hold true for 32B or 70B+ scale models.
  • Offline Calibration Cost: While it does not affect inference, the offline calibration pipeline takes 25–32 minutes on an A100 GPU, primarily driven by the rank-4096 shared-basis regression for the FFNs.

Summary updated

BibTeX
@misc{cunegatti2026from,
  author = {Elia Cunegatti and Marcus Vukojevic and Erik Nielsen and Giovanni Iacca},
  title = {{From Layers to Submodules: Rethinking Granularity in Replacement-Based LLM Compression}},
  year = {2026},
  eprint = {2606.02559},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2606.02559},
}
Figure