Projected Compression: Trainable Projection for Efficient Transformer Compression

Maciej Stefaniak, Michal Krutul, Jan Malasnicki, Maciej Pióro, Jakub Krajewski, Sebastian Jaszczur, Marek Cygan, Kamil Adamczewski, Jan LudziejewskiarXiv 2025 · DOI

Introduction

As Large Language Models (LLMs) continue to scale, the computational costs associated with inference and fine-tuning have become increasingly prohibitive. The standard industry solution is hard pruning, which involves identifying and permanently deleting "unimportant" weights to reduce model size. However, hard pruning is a one-way street: once a weight is removed, its representational capacity is lost. If the model requires that specific information to recover performance during retraining, it cannot be retrieved.

Projected Compression (PC) is introduced as a "soft" pruning alternative that compresses models without permanently discarding information during the retraining phase. By using trainable projection matrices to "filter" a frozen base model, PC allows the compressed model to dynamically re-incorporate useful dimensions that traditional hard pruning would have lost forever.

Methodology

Projected Compression treats the task of model reduction as a trainable projection problem. Instead of deleting weights, the original high-dimensional weight matrix ($W$) is frozen and wrapped in two small, trainable projection matrices ($P_1$ and $P_2$). These matrices act as "lenses" that downsample the input and output dimensions to the target compressed size.

The compressed weight matrix ($W_C$) is calculated as: $$W_C = P_1 W P_2 + W_r$$

  • $W$ (Frozen): The original, high-dimensional weights containing the model's pre-trained knowledge.
  • $P_1, P_2$ (Trainable): Projection matrices that learn how to best map the high-dimensional space into the compressed space.
  • $W_r$ (Residual): A small, zero-initialized matrix that provides additional flexibility during the training process.
The Projected Compression (PC) mechanism multiplying a frozen weight matrix $W$ by trainable projection matrices $P_1$ and $P_2$.

During training, the model only updates $P_1, P_2$, and $W_r$. Because the original $W$ remains accessible, gradients can effectively "choose" which parts of the original knowledge to project into the new, smaller space. Once training is complete, the expression $P_1 W P_2 + W_r$ is mathematically collapsed into a single standard matrix. This ensures the final model has the exact same architecture and inference speed (FLOPs) as a traditionally pruned model.

Experimental Setup

The researchers evaluated PC using GPT-2 style architectures at two scales: 300M and 800M parameters. The models were trained on the C4 (Colossal Clean Crawled Corpus) dataset. To assess how base model maturity affects compression, they tested models trained with 20 tokens per parameter and "high-quality" models trained with 80 tokens per parameter.

Results and Discussion

Projected Compression consistently achieved lower Cross-Entropy loss compared to Hard Pruning with Retraining (HPR) across 35%, 50%, and 65% compression levels.

Key Insights:

  • Information Preservation: Unlike hard pruning, which fixes the set of retained weights before retraining, PC allows the importance of dimensions to be learned dynamically. This results in significantly better performance, especially as the models are retrained on more tokens (up to 10B).
  • Quality Synergy: PC shows its greatest advantage on high-quality or "over-trained" models. For highly mature base models, hard pruning is often too blunt an instrument; PC’s ability to selectively project information becomes much more valuable.
  • Training Efficiency: Despite keeping the large frozen $W$ in the loop, modern auto-differentiation ensures that the backward pass only accumulates gradients in the smaller projected space. This makes the training cost per token roughly equivalent to standard retraining methods.

Conclusion and Future Work

Projected Compression offers a robust framework for Transformer compression that preserves the representational capacity of the base model during the critical retraining phase. While the method requires higher VRAM during training to store the frozen base model, the resulting performance gains—particularly for large, high-quality models—outweigh the temporary memory overhead. Future work will investigate the application of PC to modern architectures like Llama and Mistral, as well as its potential combination with quantization techniques.

Summary updated

BibTeX
@misc{stefaniak2025projected,
  author = {Maciej Stefaniak and Michal Krutul and Jan Malasnicki and Maciej Pióro and Jakub Krajewski and Sebastian Jaszczur and Marek Cygan and Kamil Adamczewski and Jan Ludziejewski},
  title = {{Projected Compression: Trainable Projection for Efficient Transformer Compression}},
  year = {2025},
  eprint = {2506.22255},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2506.22255},
}
Figure