Manuscript Offprint

arXiv:2609.40127

Learning Functional Subspaces for Neural Network Compression

Massimo Bini, Anders Christensen, Stephan Alaniz, Judah Goldfeder, Ole Winther, Yann LeCun, Ravid Shwartz-Ziv, Zeynep Akata

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

ABSTRACT

Modern transformers pair impressive capabilities with substantial memory and compute demands. Low-rank weight factorization reduces both while keeping the matrices dense, and thus efficient on standard hardware. Existing methods, however, choose the subspace to remove from each weight matrix with local closed-form criteria: activation energy, layer-wise reconstruction error, or a quadratic approximation of the loss. These criteria ignore how errors propagate through the network, so at high compression the errors compound with depth and performance collapses. We introduce Learnable Subspace Projections (LSP), which instead learns the subspaces to discard end-to-end. Each linear layer, or tied group of layers that read the same activations, is assigned an orthogonal projector. All projectors are optimized jointly against a global objective—the KL divergence to the dense model's output distribution or the model's original training loss—while the pretrained weights remain frozen. Projectors are initialized from a whitened SVD truncation, and ranks are allocated by the output KL each projector induces per parameter saved. After training, the projectors merge into standard low-rank factors, with each tied group sharing one factor. In attention, this also lets the model cache one narrow latent in place of full keys and values. Across LLMs (OPT-125M/1.3B, Qwen3-4B, Llama-2-7B) and ViT-B/16, LSP outperforms baselines, and its advantage widens as compression increases. At −70% compression, LSP brings Llama-2-7B to 10.9 WikiText-2 perplexity and 42.2% mean zero-shot accuracy, versus 13.3 and 36.0% for the strongest baseline. The factorized model decodes up to 1.6× faster than the dense model at small batch sizes, and aching the shared latent shrinks the combined memory of weights and KV cache by 13.5× at a 128k-token context, versus at most 6.5× for untied baseline factorizations.

1 INTRODUCTION

Transformers (Vaswani et al., 2017) have become the dominant architecture in deep learning, owing to their flexibility, scalability, and strong performance across tasks and modalities. Their uniform design enables rapid development and stable scaling; however, it also leaves trained models highly redundant. Large models exhibit low intrinsic dimensionality (Aghajanyan et al., 2021; Kuzborskij & Abbasi Yadkori, 2025), with their capabilities concentrated in a low-dimensional subspace of their parameters. Compression exploits this redundancy to reduce memory and compute while preserving the model's behavior.

Low-rank compression is a natural way to realize these savings, replacing each weight matrix with the product of two smaller factors. Yet this redundancy is not directly visible in the weights' spectra. The singular values of pretrained Transformer weights decay slowly, so naive truncated SVD severely degrades performance (Hsu et al., 2022). Practical low-rank compression instead builds on an empirical observation: the activations flowing between layers lie in low-dimensional subspaces (Yu & Wu, 2023; Yuan et al., 2024; Garg et al., 2024; Skean et al., 2025). Existing methods read the useful subspace off activation statistics, either from the energy of the layer input, as in ASVD.

Figure

Figure 1: Spectral energy is not function. Each arrow is a direction in the input activation space of a linear layer W: its length is the spectral energy it carries, its orientation how much the network output depends on it (horizontal right: most), and faded arrows are removed. Activation-based low-rank compression (top) keeps the highest-energy directions, even when the output barely depends on them (red), and can discard functional ones (blue). LSP (bottom) learns the projector P against the network output, removing the directions the output is least sensitive to, whatever their energy.

(Yuan et al., 2024), SliceGPT (Ashkboos et al., 2024), and MoDeGPT (Lin et al., 2025), or from the reconstruction error of the layer output, as in SVD-LLM (Wang et al., 2025d) and Swift-SVD (Qi et al., 2026). Either criterion captures the layer, not the network: a low-energy direction is discarded whether or not the network's output depends on it (Figure 1), and a layer-wise optimum says nothing about how its residual error propagates downstream. Loss-aware methods bring the network in through a local surrogate—Fisher-weighted reconstruction in FW-SVD (Hsu et al., 2022) or a quadratic curvature model in LLM-Surgeon (van der Ouderaa et al., 2024)—but such surrogates hold only for small perturbations of the dense weights, whereas aggressive compression moves far from them. Dobi-SVD (Wang et al., 2025b) optimizes the loss directly, but learns only the per-matrix truncation rank. The loss thus shapes local approximations, sets ranks, or repairs the weights after truncation; in none of these methods does the network loss itself choose which directions are removed. What compression has to identify, then, is the network's functional subspace: the directions whose retention preserves its behavior on the data of interest. Our starting observation is that choosing a subspace amounts to choosing an orthogonal projector: applying a rank-r projector to a weight matrix leaves it with rank at most r, so it factors into two thin matrices. The search for the functional subspace can thus be cast as a search over projectors. This raises our central question: can we obtain better compressed models by learning which subspace to remove, optimizing the projectors end-to-end against the frozen network's output?

We propose Learnable Subspace Projections (LSP), which does exactly this: every projector is learned against a global objective, by default the KL divergence to the dense model's output distribution, or alternatively the model's original training objective, a variant we denote LSP T^{T}. Our contributions are:

(1) Learned subspace projections. Layers that read the same activations (Q/K/V, gate/up) form a tied group and share one projector; we optimize all projectors jointly across the network with the pretrained weights frozen. An activation-space parameterization with fused QR orthonormalization keeps this tractable at billion-parameter scale.

(2) Whitened initialization and measured-KL allocation. Each projector is initialized from a whitened truncation, recast as an orthogonal projector and extended to tied groups. To decide how many directions each layer or tied group removes, we apply each projector in isolation, measure the KL divergence it induces on the model output, and allocate the budget by KL cost per saved parameter. The model at initialization, which we call NoLSP, serves as a control that isolates the effect of learning.

(3) Efficient low-rank inference. After training, the projectors merge into plain low-rank factors, so the deployed model contains no LSP-specific operations. At the same compression ratio it requires the same FLOPs per token as other factorizations, yet the input factor shared by each tied group speeds up small-batch decoding and, in a latent-cache deployment, stores one narrow latent per group where untied factorizations store two (one each for keys and values), shrinking the KV cache.

Because LSP applies to any linear layer, the same recipe transfers across Transformer models without architecture-specific surgery. LSP outperforms pruning and SVD baselines by a margin that grows with the compression ratio, and on ViT it degrades least among the compared methods when calibration and evaluation distributions differ.

  1. Learnable Subspace Projection (LSP) Operation

Figure

P projector along directions U=[u1,…,uk]U = [u_1, \ldots, u_k]

removes subspace

span(U) from weights W

  1. Tied and Untied Projectors

Figure

tied on shared inputs

untied, on the smaller side

  1. Gather Whitening Statistics

Figure

collect activation statistics for whitened initialization

  1. Measured-KL Allocation

Figure

allocation based on each projector's effect on KL

  1. Learning the Subspace

Figure

learning least-functional directions uiu_{i} to remove

  1. Low-Rank Compressed Model

Figure

Figure 2: Overview of LSP. (1) An orthogonal projector P=I−UU⊤P = I - U U^{\top} removes the learned subspace span( UU) from the input or output of WW. (2) Layers that read the same activations (Q/K/V, gate/up) share a tied projector; the remaining (untied) layers are projected on their smaller side. (3) Calibration activations give the whitened SVD of WS, whose trailing directions initialize UU. (4) The KL divergence that each candidate truncation induces on the model output, per saved parameter, sets how many directions each unit removes. (5) The unconstrained VV is trained, with WW frozen, on the KL to the dense model or on the task loss; U=qf(V)U = \text{qf}(V) is its orthonormal QR factor, so the removed directions are those the output depends on least. (6) The trained projectors decompose into low-rank factors U⊥U⊥⊤U_{\perp} U_{\perp}^{\top}, and are merged with the frozen weights.

References (95)

  • Intrinsic dimensionality explains the effectiveness of language model fine-tuning (opens the publisher in a new tab)
  • Mathqa: Towards interpretable math word problem solving with operation-based formalisms, 2019
  • SliceGPT: Compress Large Language Models by Deleting Rows and Columns
  • Ether: Efficient finetuning of large-scale models with hyperplane reflections
  • PIQA: Reasoning about physical commonsense in natural language
  • Food-101 – mining discriminative components with random forests
  • Palu: Compressing kv-cache with low-rank projection
  • UniQL: Unified quantization and low-rank compression for adaptive edge LLMs
  • Describing textures in the wild
  • Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challenge
  • An Analysis of Single Layer Networks in Unsupervised Feature Learning
  • DeepSeek-AI. Deepseek-v2: A strong, economical, and efficient mixture-of-experts language model, 2024. URL https://arxiv.org/abs/2405.04434. (opens arXiv in a new tab)
  • An image is worth $16 \times 16$ words: Transformers for image recognition at scale
  • The approximation of one matrix by another of lower rank
  • MaskLLM: Learnable semi-structured sparsity for large language models
  • Sparsegpt: massive language models can be accurately pruned in one-shot
  • The language model evaluation harness, 07 2024a
  • DISP-LLM: Dimension-independent structural pruning for large language models
  • Revealing the utilized rank of subspaces of learning in neural networks (opens arXiv in a new tab)
  • PELA: Learning parameter-efficient models with low-rank approximation
  • Learning both weights and connections for efficient neural network
  • Deep compression: Compressing deep neural network with pruning, trained quantization and huffman coding (opens arXiv in a new tab)
  • Optimal brain surgeon: extensions and performance comparisons
  • Introducing eurosat: A novel dataset and deep learning benchmark for land use and land cover classification
  • Distilling the Knowledge in a Neural Network
  • Language model compression with weighted low-rank factorization
  • Sola: Leveraging soft activation sparsity and low-rank decomposition for large language model compression
  • Low-rank bias, weight decay, and model merging in neural networks, 2025 (opens arXiv in a new tab)
  • Optimal brain damage, pp. 598–605
  • Moe-SVD: Structured mixture-of-experts LLMs compression via singular value decomposition
  • MoDeGPT: Modular decomposition for large language model compression
  • ProxSparse: Regularized learning of semi-structured sparsity masks for pretrained LLMs (opens arXiv in a new tab)
  • Llm-pruner: On the structural pruning of large language models
  • Fine-grained visual classification of aircraft
  • Shortgpt: Layers in large language models are more redundant than you expect
  • Pointer sentinel mixture models, 2016
  • Can a suit of armor conduct electricity? a new dataset for open book question answering
  • Understanding calibration and truncation error propagation in training-free low-rank compression for LLMs (opens arXiv in a new tab)
  • Cats and dogs
  • Swift-SVD: Theoretical optimality meets practical efficiency in low-rank LLM compression
  • Exploring the limits of transfer learning with a unified text-to-text transformer
  • Winogrande: An adversarial winograd schema challenge at scale (opens arXiv in a new tab)
  • Movement pruning: adaptive sparsity by fine-tuning
  • Layer by layer: Uncovering hidden representations in language models
  • A simple and effective pruning approach for large language models
  • Stanford alpaca: An instruction-following llama model
  • Flar-svd: Fast and latency-aware singular value decomposition for model compression
  • Llama 2: Open Foundation and Fine-Tuned Chat Models
  • The llm surgeon
  • Attention is all you need
  • Basis sharing: Cross-layer parameter sharing for large language model compression
  • Dobi-SVD: Differentiable SVD for LLM compression and some new perspectives
  • SVD-LLM V2: Optimizing singular value truncation for large language model compression
  • SVD-LLM: Truncation-aware singular value decomposition for large language model compression
  • QSVD: Efficient low-rank approximation for unified query-key-value weight compression in low-precision vision-language models (opens arXiv in a new tab)
  • From local to global: Revisiting structured pruning paradigms for large language models
  • Qwen3 Technical Report
  • Asvd: Activation-aware singular value decomposition for compressing large language models, 2024 (opens arXiv in a new tab)
  • Hellaswag: Can a machine really finish your sentence? In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, 2019
  • OPT: Open Pre-trained Transformer Language Models
  • Places: A 10 million image database for scene recognition
  • Orthogonal invariance of the Frobenius norm and the block decomposition give
  • which directions are removed is chosen by the whitened criterion of Section 2.2 at initialization and by the loss thereafter, whereas among all maps that annihilate a given $S$ only $P$ leaves $S^\perp$ untouched
  • Throughout, $\ell$ indexes projectors (one per untied layer or tied group), $d_{\ell}$ is the dimension of the projected side, and $k_{\ell}$ is the number of removed directions
  • the columns are unit-norm at initialization, and since the optimizer applies no weight decay, the raw form also keeps their norms from growing
  • Because $S$ is invertible, $C_r$ has full column rank and $C_r^+ = (C_r^\top C_r)^{-1} C_r^\top$; if $\sigma_r > 0$, $\Sigma_r$ is invertible as well, so the excess vanishes if and only if $C_r^\top C_{>r} = 0$
  • We use $P_{init}$, which reproduces the whitened truncation exactly on the kept subspace
  • The implementation accumulates the unnormalized input Gram matrix $H = nG$
  • Each measurement applies the actual initialized orthogonal projector, including the input-side recast of Proposition 1, and $\Delta_u(0) = 0$
  • Starting with all units dense, we solve it greedily: among all units and all grid counts $k' > k$ with $s_u(k') > s_u(k)$, we take the move with the smallest marginal cost
  • An output-tied group factors as
  • Output-tied K/V share $B$ but generally need separate latents $A_k x$ and $A_v x$; when K/V are both input-tied with Q and output-tied with each other, the input latent $z$ still suffices and the output tie only narrows $B_k$ and $B_v$
  • The allocation subset $D_{alloc}$ holds 128K calibration tokens for the LLMs and 4,096 images for the ViT, and $\Delta_u$ compares the dense and the truncated model's next-token or class distributions
  • The LLMs are WikiText-2 perplexity, ViT-B/16 is CIFAR-100 accuracy on the single (CIFAR-100 only) pool
  • >OPT-125M</td><td rowspan=
  • A tied group uses $k_{\mathcal{G}} = \min_{\ell \in \mathcal{G}} k_{\ell}$, and $\rho$ is set by binary search on the merged parameter count, shared factors counted once
  • ><tr><td rowspan=
  • WikiText-2 test perplexity (dense 27.6) of the training-free truncation and of LSP distilled from it, only the initialization changed
  • LSP distilled on Alpaca, uniform removed rank per layer, the better of two learning rates per arm; WikiText-2 test perplexity and mean zero-shot accuracy (Avg6) of the validation-selected epoch
  • Four budgets at the same realized savings (within 0.05 points), whitened tied initialization, distilled on WikiText-2, the better of two learning rates per arm; WikiText-2 test perplexity and Avg6 of the validation-selected epoch
  • >Allocation</td><td colspan=
  • Uniform is the retained fraction of Equation (19); Measured KL is the per-unit KL cost of Equation (3)
  • The gain comes at the cost of the KL measurements (Section F), although one set of measurements serves every ratio and both objectives; the effect on the deployed shape is given in Table 14
  • LSP distilled on C4, same learning rate, epoch budget and realized savings; gate/up are tied in every arm
  • >Allocation</td><td rowspan=
  • -30/-50/-70% (15-point grid)
  • -30/-50/-70% (7-point grid)
  • Figure 5 repeats the two spectral panels of Figure 3 for an early, a middle and a late block of OPT-1.3B (blocks 3, 12 and 21 of 24) and Llama-2-7B (blocks 4, 16 and 28 of 32)
  • The uniform and measured-KL allocations compared in Table 11, here on the WikiText-2-calibrated checkpoints, on one GH200, Q/K/V tied on the input side
  • When deployment efficiency matters more, LSP supports the other trade-offs: uniform allocation with output-side K/V holds the longest context, and measured allocation with input-side tying decodes fastest
  • The four arms of Table 12 on one GH200
  • Giving the loss-aware baselines more budget does not close the gap
  • We argue it should therefore not drive the choice between methods, whereas accuracy and inference efficiency (Section 3.3) are paid on every query
  • The pools grow from CIFAR-100 alone (10k images) to the six-dataset pool of Table 3 (47k), with the same images for every method
  • Compressed on: the datasets in the pool (√) and its size, the same pools for every method; √$^{\dagger}$ is CIFAR-100 alone at the size of the six-dataset pool