atlas

Research map / Architectures and efficiency / Attention and transformers

Forgetting Transformer: Softmax Attention with a Forget Gate

ICLR 2025 · Architectures and efficiency › Attention and transformers · approach: Linear attention approximations · 1 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes Forgetting Attention, a softmax attention variant that adds a data-dependent forget-gate decay to attention logits, yielding the Forgetting Transformer (FoX) that outperforms Transformers and recurrent models on long-context language modeling and short-context tasks.

Problem

Transformers lack an explicit data-dependent mechanism for forgetting past information, while recurrent sequence models with forget gates underperform Transformers on long-context capabilities.

Approach

Derive the parallel form of gated linear attention and apply the same exact forget-gate down-weighting D_ij = sum log f_l to softmax attention logits, making softmax attention forget-gated, compatible with FlashAttention and requiring no positional embeddings; add a "Pro" block with output gates, output norm, QK-norm, and KV-shift.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
use FoX (Pro) instead of Transformer (Pro)760M-parameter models trained on LongCrawl64 · LM-eval-harnessaverage score: 50.39 -> 50.88Helped
use FoX (Pro) instead of Transformer (Pro)760M-parameter models trained on LongCrawl64 · LongBenchtask scoresMixed
add QK-norm (ablation)FoX (Pro) · LongCrawl64 validation, context 16384perplexity: 6.79 -> 6.62Helped
add output gate (ablation)FoX (Pro) · LongCrawl64 validation, context 16384perplexity: 6.86 -> 6.62Helped
add output norm (ablation)FoX (Pro) · LongCrawl64 validation, context 16384perplexity: 6.69 -> 6.62Helped
add KV-shift (ablation)FoX (Pro) · LongCrawl64 validation, context 16384perplexity: 6.80 -> 6.62Helped
add RoPE (ablation)FoX (Pro) · LongCrawl64 validation, context 16384perplexity: 6.62 -> 6.63No clear effect
add forget gate (ablation)Transformer (Pro) · LongCrawl64 validation, context 16384perplexity: 6.82 -> 6.62Helped
add forget gate (ablation)Transformer (LLaMA) · LongCrawl64 validation, context 16384perplexity: 7.49 -> 7.19Helped
add RoPE (ablation)Transformer (LLaMA) without RoPE · LongCrawl64 validation, context 16384perplexity: 29.30 -> 7.49Helped
use a data-dependent rather than data-independent or fixed forget gate (ablation)FoX · LongCrawl64 validationper-token lossHelped

Surprising findings

Limitations

Experimental setup

Datasets: LongCrawl64 RedPajama-v2 SlimPajama LM-eval-harness tasks LongBench LongAlign needle prompts

Benchmarks: LongCrawl64 validation per-token loss needle-in-the-haystack LM-eval-harness LongBench

Metrics: per-token loss perplexity accuracy acc-n F1 Rouge-L edit similarity needle score 1-10

Baselines: Transformer (LLaMA) Transformer (Pro) Mamba-2 HGRN2 DeltaNet Transformer++

Builds on: GLA Mamba-2 FlashAttention-2 ALiBi LLaMA

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy