Compressing Transformers: Features Are Low-Rank, but Weights Are Not!
Hao Yu, Jianxin Wu
Abstract
Transformer and its variants achieve excellent results in various computer vision and natural language processing tasks, but high computational costs and reliance on large training datasets restrict their deployment in resource-constrained settings. Low-rank approximation of model weights has been effective in compressing CNN models, but its application to transformers has been less explored and is less effective. Existing methods require the complete dataset to fine-tune compressed models, which are both time-consuming and data-hungry. This paper reveals that the features (i.e., activations) are low-rank, but model weights are surprisingly not low-rank. Hence, AAFM is proposed, which adaptively determines the compressed model structure and locally compresses each linear layer's output features rather than the model weights. A second stage, GFM, optimizes the entire compressed network holistically. Both AAFM and GFM only use few training samples without labels, that is, they are few-shot, unsupervised, fast and effective. For example, with only 2K images without labels, 33% of the parameters are removed in DeiT-B with 18.8% relative throughput increase, but only a 0.23% accuracy loss for ImageNet recognition. The proposed methods are successfully applied to the language modeling task in NLP, too. Besides, the few-shot compressed models generalize well in downstream tasks.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext a677b03e-cba1-4836-a112-846d50199660Cited by top-tier papers20
- Small Singular Values Matter: A Random Matrix Analysis of Transformer ModelsMax Staats, Matthias Thamm, Bernd RosenowNeurIPS 2025 · 21 citations
- LoRAP: Transformer Sub-Layers Deserve Differentiated Structured Compression for Large Language ModelsGuangyan Li, Yongqiang Tang, Wensheng ZhangICML 2024 · 11 citations
- GPLQ: A General, Practical, and Lightning QAT Method for Vision TransformersGuang Liang, Xinyao Liu, Jianxin WuNeurIPS 2025 · 10 citations
- CR-Net: Scaling Parameter-Efficient Training with Cross-Layer Low-Rank StructureBoao Kong, Junzhu Liang, Yuxi Liu, Renjia Deng et al.ICLR 2026 · 7 citations
- ASER: Activation Smoothing and Error Reconstruction for Large Language Model QuantizationWeibo Zhao, Yubin Shi, Xinyu Lyu, Wanchen Sui et al.AAAI 2025 · 7 citations
Builds on10
- Swin Transformer: Hierarchical Vision Transformer using Shifted WindowsZe Liu, Yutong Lin, Yue Cao, Han Hu et al.ICCV 2021 · 31,683 citations
- Training data-efficient image transformers & distillation through attentionHugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa et al.ICML 2021 · 8,974 citations
- CutMix: Regularization Strategy to Train Strong Classifiers With Localizable FeaturesSangdoo Yun, Dongyoon Han, Sanghyuk Chun, Seong Joon Oh et al.ICCV 2019 · 5,843 citations
- RandAugment: Practical Automated Data Augmentation with a Reduced Search SpaceEkin Dogus Cubuk, Barret Zoph, Jonathon Shlens, Quoc LeNeurIPS 2020 · 4,453 citations
- Random Erasing Data AugmentationZhun Zhong, Liang Zheng, Guoliang Kang, Shaozi Li et al.AAAI 2020 · 4,134 citations
Related papers
- Dense Vision Transformer Compression with Few SamplesHanxiao Zhang, Yifan Zhou, Guo-Hua WangCVPR 2024 · 5 citations
- Parameter-Efficient Fine-Tuning with Discrete Fourier TransformZiqi Gao, Qichao Wang, Aochuan Chen, Zijing Liu et al.ICML 2024 · 71 citations
- Compressing Models with Few Samples: Mimicking then ReplacingHuanyu Wang, Junjie Liu, Xin Ma, Yang Yong et al.CVPR 2022 · 11 citations
- Variance-Based Pruning for Accelerating and Compressing Trained NetworksUranik Berisha, Jens Mehnert, Alexandru Paul ConduracheICCV 2025 · 7 citations
- OATS: Outlier-Aware Pruning Through Sparse and Low Rank DecompositionStephen Zhang, Vardan PapyanICLR 2025
