Lune

ACL2024Top-tier venue

Your Transformer is Secretly Linear

Anton Razzhigaev, Matvey Mikhalchuk, Elizaveta Goncharova, Nikolai Gerasimenko, Ivan V. Oseledets, Denis Dimitrov, Andrey Kuznetsov

Abstract

This paper reveals a novel linear characteristic exclusive to transformer decoders, including models such as GPT, LLaMA, OPT, BLOOM and others. We analyze embedding transformations between sequential layers, uncovering a near-perfect linear relationship (Procrustes similarity score of 0.99). However, linearity decreases when the residual component is removed due to a consistently low output norm of the transformer layer. Our experiments show that removing or linearly approximating some of the most linear blocks of transformers does not affect significantly the loss or model performance. Moreover, in our pretraining experiments on smaller models we introduce a cosine-similarity-based regularization, aimed at reducing layer linearity. This regularization improves performance metrics on benchmarks like Tiny Stories and SuperGLUE and as well successfully decreases the linearity of the models. This study challenges the existing understanding of transformer architectures, suggesting that their operation may be more linear than previously assumed. 1

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

7 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • A Simple and Effective Pruning Approach for Large Language Models cites LoRA: Low-Rank Adaptation of Large Language Models
  • A Simple and Effective Pruning Approach for Large Language Models cites SparseGPT: Massive Language Models Can be Accurately Pruned in One-Shot
  • SliceGPT: Compress Large Language Models by Deleting Rows and Columns cites LoRA: Low-Rank Adaptation of Large Language Models
  • SliceGPT: Compress Large Language Models by Deleting Rows and Columns cites A Simple and Effective Pruning Approach for Large Language Models
  • SliceGPT: Compress Large Language Models by Deleting Rows and Columns cites LLM-Pruner: On the Structural Pruning of Large Language Models
  • SliceGPT: Compress Large Language Models by Deleting Rows and Columns cites SparseGPT: Massive Language Models Can be Accurately Pruned in One-Shot
  • ReplaceMe: Network Simplification via Depth Pruning and Transformer Block Linearization cites A Simple and Effective Pruning Approach for Large Language Models
  • ReplaceMe: Network Simplification via Depth Pruning and Transformer Block Linearization cites LLM-Pruner: On the Structural Pruning of Large Language Models
  • ReplaceMe: Network Simplification via Depth Pruning and Transformer Block Linearization cites SparseGPT: Massive Language Models Can be Accurately Pruned in One-Shot
  • LLM-Pruner: On the Structural Pruning of Large Language Models cites LoRA: Low-Rank Adaptation of Large Language Models
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers7

  1. Attention Sinks and Compression Valleys in LLMs are Two Sides of the Same CoinEnrique Queipo-de-Llano, Alvaro Arroyo, Federico Barbero, Xiaowen Dong et al.ICLR 2026 · 56 citations
  2. AdaptAgent: Adapting Multimodal Web Agents with Few-Shot Learning from Human DemonstrationsGaurav Verma, Rachneet Kaur, Nishan Srishankar, Zhen Zeng et al.ACL 2025 · 19 citations
  3. ReplaceMe: Network Simplification via Depth Pruning and Transformer Block LinearizationDmitriy Shopkhoev, Ammar Ali, Magauiya Zhussip, Valentin Malykh et al.NeurIPS 2025 · 10 citations
  4. ACE-Merging: Data-Free Model Merging with Adaptive Covariance EstimationBo Xu, Haotian Wu, Hehai Lin, Weiquan Huang et al.CVPR 2026 · 5 citations
  5. Cache Me If You Must: Adaptive Key-Value Quantization for Large Language ModelsAlina Shutova, Vladimir Malinovskii, Vage Egiazarian, Denis Kuznedelev et al.ICML 2025

Builds on8

  1. LoRA: Low-Rank Adaptation of Large Language ModelsEdward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu et al.ICLR 2022 · 18,833 citations
  2. SparseGPT: Massive Language Models Can be Accurately Pruned in One-ShotElias Frantar, Dan AlistarhICML 2023 · 1,240 citations
  3. LLM-Pruner: On the Structural Pruning of Large Language ModelsXinyin Ma, Gongfan Fang, Xinchao WangNeurIPS 2023 · 994 citations
  4. A Simple and Effective Pruning Approach for Large Language ModelsMingjie Sun, Zhuang Liu, Anna Bair, J. Zico KolterICLR 2024 · 794 citations
  5. SliceGPT: Compress Large Language Models by Deleting Rows and ColumnsSaleh Ashkboos, Maximilian L. Croci, Marcelo Gennari Do Nascimento, Torsten Hoefler et al.ICLR 2024 · 346 citations

Related papers

  1. BERT Busters: Outlier Dimensions that Disrupt TransformersOlga Kovaleva, Saurabh Kulshreshtha, Anna Rogers, Anna RumshiskyACL Findings 2021 · 39 citations
  2. The Structure of Relation Decoding Linear Operators in Large Language ModelsMiranda Anna Christ, Adrián Csiszárik, Gergely Becsó, Dániel VargaNeurIPS 2025 · 1 citation
  3. Rethinking Layer Relevance in Large Language Models Beyond Cosine SimilarityCristian Hinostroza, Rodrigo Toro Icarte, Christ Devia, Andres Carvallo et al.ICLR 2026 · 4 citations
  4. Scaling Laws for Linear Complexity Language ModelsXuyang Shen, Dong Li, Ruitao Leng, Zhen Qin et al.EMNLP 2024 · 2 citations
  5. Incorporating Residual and Normalization Layers into Analysis of Masked Language ModelsGoro Kobayashi, Tatsuki Kuribayashi, Sho Yokoi, Kentaro InuiEMNLP 2021 · 28 citations
Dusk over the sea between two cliffs drawn in fine vertical lines