Adaptive Computation Pruning for the Forgetting Transformer
Not on the map. Why?
Abstract (arXiv)
The recently proposed Forgetting Transformer (FoX) incorporates a forget gate into softmax attention and has shown consistently better or on-par performance compared to the standard RoPE-based Transformer. Notably, many attention heads in FoX tend to forget quickly, causing their output at each timestep to rely primarily on local context. Based on this observation, we propose Adaptive Computation Pruning (ACP) for FoX, a method that dynamically prunes computations involving input-output dependencies that are strongly decayed by the forget gate. In particular, our method performs provably safe pruning via a dynamically set pruning threshold that guarantees the pruned attention weights are negligible. We apply ACP to language model pretraining with FoX and show it consistently reduces the number of FLOPs and memory accesses in softmax attention by around 70% across different model sizes and context lengths, resulting in a roughly 50% to 70% reduction in attention runtime (or a 2-3× speedup) and a roughly 10% to 40% increase in end-to-end training throughput. Furthermore, longer context lengths yield greater computational savings. All these speed improvements are achieved without any performance degradation. Our code is available at https://github.com/zhixuan-lin/forgetting-transformer.
Key facts. Cited by 6 papers in the map (data through 7 Oct 2026). Builds on 29 of its 35 references that are in the map. First posted on arXiv 9 Apr 2025.
Builds on
29 of 35 references.
References · 29
- 2017Attention Is All You Needcited by 59,932
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
- 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,581
- 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,551
- 2023Efficient Streaming Language Models with Attention Sinkscited by 2,115
- 2019Root Mean Square Layer Normalizationcited by 1,425
- 2023H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Modelscited by 805
- 2023Scaling Vision Transformers to 22 Billion Parameterscited by 690
- 2024Quest: Query-Aware Sparsity for Efficient Long-Context LLM Inferencecited by 487
- 2023Model Tells You What to Discard: Adaptive KV Cache Compression for LLMscited by 466
- 2023Scissorhands: Exploiting the Persistence of Importance Hypothesis for LLM KV Cache Compression at Test Timecited by 428
- 2025Native Sparse Attention: Hardware-Aligned and Natively Trainable Sparse Attentioncited by 391
17 more
- 2024MInference 1.0: Accelerating Pre-filling for Long-Context LLMs via Dynamic Sparse Attentioncited by 375
- 2024Parallelizing Linear Transformers with the Delta Rule over Sequence Lengthcited by 373
- 2024DuoAttention: Efficient Long-Context LLM Inference with Retrieval and Streaming Headscited by 283
- 2024InfLLM: Training-Free Long-Context Extrapolation for LLMs with an Efficient Context Memorycited by 192
- 2025MoBA: Mixture of Block Attention for Long-Context LLMscited by 188
- 2024Eagle and Finch: RWKV with Matrix-Valued States and Dynamic Recurrencecited by 155
- 2024SeerAttention: Learning Intrinsic Sparse Attention in Your LLMscited by 121
- 2023LM-Infinite: Zero-Shot Extreme Length Generalization for Large Language Modelscited by 120
- 2024Transformers are Multi-State RNNscited by 120
- 2024Not All Heads Matter: A Head-Level KV Cache Compression Method with Integrated Retrieval and Reasoningcited by 96
- 2023Dynamic Context Pruning for Efficient and Interpretable Autoregressive Transformerscited by 67
- 2024ClusterKV: Manipulating LLM KV Cache in Semantic Space for Recallable Compressioncited by 65
- 2024Quantifying Variance in Evaluation Benchmarkscited by 52
- 2025Forgetting Transformer: Softmax Attention with a Forget Gatecited by 50
- 2024Mixture of Attention Spans: Optimizing LLM Inference Efficiency with Heterogeneous Sliding-Window Lengthscited by 44
- 2024Selective Attention Improves Transformercited by 26
- 2024HashAttention: Semantic Sparsity for Faster Inferencecited by 23
Built on by
Citing papers per year: 2025: 3; 2026: 3.
6 papers.
- 2025PaTH Attention: Position Encoding via Accumulating Householder Transformationscited by 32
- 2025SeerAttention-R: Sparse Attention Adaptation for Long Reasoningcited by 28
- 2025Sentence-Anchored Gist Compression for Long-Context LLMscited by 3
- 2026Screening Is Enoughcited by 1
- 2026Abstention and Noise Filtering: Two Missing Primitives of Softmax Attentioncited by 0
- 2026A Self-Pruning Transformer: Extreme KV-Cache Compression with Universal Attentioncited by 0
- 2026A Self-Pruning Transformer: Extreme KV-Cache Compression with Universal Attention6 Oct 2026
- 2026Abstention and Noise Filtering: Two Missing Primitives of Softmax Attention18 Sep 2026
- 2026Screening Is Enough1 Apr 2026
- 2025Sentence-Anchored Gist Compression for Long-Context LLMs11 Nov 2025
- 2025SeerAttention-R: Sparse Attention Adaptation for Long Reasoning10 Jun 2025
- 2025PaTH Attention: Position Encoding via Accumulating Householder Transformations22 May 2025