atlas

Research map / Learning theory and algorithms / Prediction and decision losses

Softmax is not Enough (for Sharp Size Generalisation)

ICML 2025 · Learning theory and algorithms › Prediction and decision losses · approach: Theory of neural network sensitivity · 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.

Proves that softmax attention coefficients must disperse (decay as Θ(1/n)) as the number of input items grows with a finite token vocabulary, and proposes an inference-time adaptive temperature that sharpens softmax on larger inputs.

Problem

Softmax attention cannot robustly stay sharp (select a constant number of items) when the number of input items at test time exceeds training sizes, causing out-of-distribution size generalisation failures in reasoning tasks.

Approach

Shows theoretically that bounded logits force softmax coefficients to decay as O(1/n) for every item, and proposes an entropy-based adaptive temperature (a fitted inverse degree-4 polynomial mapping entropy to temperature, capped at 1) that sharpens softmax at inference time, streamable like Flash Attention.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Apply adaptive temperature at inference without changing learned parameterssingle-head attention model · max retrieval, size 16accuracy: 98.6% -> 98.6%No clear effect
Apply adaptive temperature at inference without changing learned parameterssingle-head attention model · max retrieval, size 32accuracy: 97.1% -> 97.1%No clear effect
Apply adaptive temperature at inference without changing learned parameterssingle-head attention model · max retrieval, sizes 64–16,384accuracy: 94.3% -> 94.5%; 89.7% -> 89.9%; 81.3% -> 82.1%; 70.1% -> 72.5%; 53.8% -> 57.7%; 35.7% -> 39.4%; 22.6% -> 24.9%; 15.7% ->Helped
Use adaptive-temperature softmax during fine-tuning and inferenceGemma 2B fine-tuned on CLRS-Text · CLRS-Text algorithmic tasksaccuracyMixed
Apply the learned adaptive-temperature function only at inference (ablation)Gemma 2B on CLRS-Text · CLRS-TextaccuracyHurt

Surprising findings

Limitations

Experimental setup

Datasets: CLRS-Text synthetic max retrieval dataset

Benchmarks: max retrieval (synthetic, up to 16,384 items) CLRS-Text

Metrics: accuracy entropy paired t-test p-value

Baselines: Baseline softmax attention (no adaptive temperature)

Builds on: Transformer Flash Attention CLRS-Text

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