ICML papers
Search ICML papers by title, author, or track. Open a paper’s abstract to read more.
Explore the ICML analysisSearch results
181–200 of 251
- ICML · Workshop · High Dimensional Learning Dynamics: the Science of Scaling
Positional LSH: Binary Block Matrix Approximation for Attention with Linear Biases
Daniel Wolfson, Tal Wagner
Abstract
Positional encoding in transformers is commonly implemented through positional embeddings, attention masks, or bias terms, but formal connections between these mechanisms remain limited. We study attention with positional bias through the lens of locality-sensitive hashing (LSH), focusing on Attention with Linear Biases (ALiBi). We show that the ALiBi bias matrix is the expectation of contiguous block-diagonal binary masks induced by a ``positional LSH'' scheme. The empirical mean of masks sampled from this scheme yields spectral norm and max-norm approximation guarantees with bounded block sizes with high probability. This structural theorem implies a uniform approximation theorem for ALiBi-biased attention: with high probability over the sampled masks, the approximate attention output is accurate simultaneously for all query-key-value inputs and can be computed in near-linear time in the context length, reducing long-context ALiBi to a collection of randomized short-context regular (positionally unbiased) attention operations. Conceptually, this connects positional bias, masks, and positional embeddings in a single formal framework and suggests an approach to efficient ALiBi-biased attention. Experiments on large language models validate our theoretical findings.
Abstract source - ICML · Workshop · High Dimensional Learning Dynamics: the Science of Scaling
When and Why Grouping Attention Heads Accelerates Muon Optimization
Hongtao Zhang, WenJie Zhou, Wei Chen, Xueqi Cheng
Abstract
Muon orthogonalizes matrix updates, but multi-head attention naturally operates at the level of heads. This granularity mismatch raises the question of whether Muon should be applied to the full attention projection, to individual heads, or to intermediate head groups. We study this question through a one-step descent comparison between full-matrix Muon and group-wise Muon. Our analysis reveals a trade-off between the \textbf{group-wise whitening gain} from group-wise updates and the \textbf{grouping-induced norm cost}, an additional update-norm cost caused by replacing full-matrix whitening with group-wise whitening. Motivated by this trade-off, we propose \textbf{Group Muon}, which treats head group size and grouping rule as optimizer hyperparameters. On GPT-2 Small trained on FineWeb, appropriate grouping improves validation loss over both full-QKV Muon and fully head-wise MuonSplit.
Abstract source - ICML · Workshop · High Dimensional Learning Dynamics: the Science of Scaling
Sharp Generalization for Shallow Neural Networks with Channel Attention
Yingzhen Yang
Abstract
We study nonparametric regression using an over-parameterized two-layer neural network with channel attention, where training features are drawn from an arbitrary continuous distribution on the unit sphere in $\RR^d$, and the target function lies in a standard interpolation space. We show that early-stopped gradient descent achieves a sharp regression risk of $\cO(\eps_n^2)$, where $\eps_n$ is the critical population rate of the induced attention kernel, improving upon the state-of-the-art~\citep{Yang2025-generalization-two-layer-regression} for distribution-free spherical covariates. When the covariate distribution satisfies an eigenvalue decay with parameter $2\alpha$ and $\alpha > 1/2$, the rate becomes $\cO(n^{-\frac{6\alpha}{6\alpha +1}})$ under spectral bias assumptions, improving over the nearly-optimal rate $\cO(n^{-\frac{6\alpha}{6\alpha+1}})\log^2(1/\delta)$~\citep{Li2024-edr-general-domain}, where $n$ is the sample size and $\delta \in (0,1)$. This is, to our knowledge, the first work establishing a theoretical advantage of channel attention for nonparametric regression. Our analysis shows that channel attention aligns with spectrally biased targets and induces a novel attention kernel. We decompose the network output at each gradient descent step into an RKHS component of this kernel and a small $L^{\infty}$ residual, and combine this with local Rademacher complexity to obtain sharp bounds. Our results further show that channel attention changes the training dynamics of the vanilla network without attention and enables escape from the linear NTK regime of the vanilla network, yielding better generalization than vanilla networks with lower kernel complexity, supported by simulations on synthetic and real data.
Abstract source - ICML · Workshop · Graph Foundation Models: A New Era for Graph Machine Learning
Per-Link Attention for Cross-Embodiment Graph-Conditioned Diffusion Policies
Oliver Y Chen
Abstract
Cross-embodiment robot policies encode a robot's kinematic tree as a graph and run a graph neural network over it, producing per-node (per-link) embeddings that are then pooled into a single fixed-size morphology vector before conditioning the policy. We show that this graph-level pooling step -- standard in GNN pipelines across domains -- collapses morphology-discriminative node-level information into an actuation-magnitude default. A seven-intervention conditioning audit applied to two independently trained pipelines yields sign-unanimous evidence (5/5 seeds, p ~ 0.031 each) that the pooled graph embedding fails to function as a structured morphology code. We propose Per-Link Attention Diffusion (PLA-D), an architecture that routes per-node GNN embeddings directly into a Transformer denoiser's cross-attention as a variable-length key/value sequence with learned node-position embeddings and a key-padding mask. PLA-D preserves |V| * d_h node-level dimensions that pooling discards, strictly subsumes the pooled baseline, and trains to comparable validation loss in less than half the optimisation budget. The finding that graph-level pooling destroys task-relevant node structure generalises beyond robotics to any graph foundation model pipeline that pools node embeddings before a downstream task head.
Abstract source - ICML · Workshop · Graph Foundation Models: A New Era for Graph Machine Learning
Edge-aware FlexAttention Network for Efficient Graph Generation
Vincent Jung, Alba Carballo-Castro, Yiming Qin, Lonneke van der Plas, Pascal Frossard
Abstract
Graph generative models commonly use graph-specific Transformer architectures to jointly update node and edge features. However, these architectures do not directly benefit from recent hardware-aware attention implementations such as FlexAttention, limiting their scalability. This adaptation is non-trivial: edge and graph-level features must be injected into pairwise attention scores, graph masks must be respected, and dynamic edge updates remain a major source of quadratic memory usage. We propose a FlexAttention-compatible edge-aware Transformer for graph generation that incorporates structural information through head-wise score modulation inside the fused kernel, while updating edge representations with a lightweight residual mechanism that retains key attention-score dependent edge updates. This architecture achieves similar generation quality as our baseline while reducing peak GPU memory by around 65\% and substantially improving training and sampling throughput. These results suggest the proposed architecture is a practical step toward scalable graph foundation models.
Abstract source - ICML · Workshop · Graph Foundation Models: A New Era for Graph Machine Learning
GRATE: Temporal Extensions for Inductive KG Foundation Models via Gated Rotary Attention
Jiaxin Pan, Osama Mohammed, Daniel Hernández, Steffen Staab
Abstract
Knowledge graph foundation models such as ULTRA and TRIX achieve strong inductive transfer by learning relation-graph representations that generalise to unseen entities and relations. Extending this transferability to temporal knowledge graphs (TKGs) remains challenging: existing temporal models tie their parameters to dataset-specific entities, relations, or timestamps and are not designed to transfer to TKGs with disjoint vocabularies. We propose GRATE (Gated Rotary Attention for Temporal Encoding), an entity-side message function that adds no learnable parameters and encodes time through relative time differences by rotating each edge message according to its time gap to the query and applying a query-conditioned gate to select temporally relevant signals. GRATE integrates into NBFNet-style KG foundation model backbones while preserving structural transferability. Existing TKG benchmarks evaluate within shared train/test vocabularies and cannot directly test cross-dataset temporal transfer; we therefore construct GDELTINDT and WIKIINDT, fullyinductive benchmark suites with disjoint entities, relations, and timestamps spanning both interpolation and extrapolation. Across these benchmarks and held-out forecasting datasets, a single jointly pretrained GRATE checkpoint improves over the static backbone in most settings and recovers most of the performance of trained transductive models, especially when recurrence is weak.
Abstract source - ICML · Workshop · From Frames to Stories (F2S): Toward Reliable, Controllable and Trustworthy Long-Horizon Video Generation
Quantized Keys Steal Attention: Bias Correction for KV-Cache Compression in Video Diffusion
Tuna Tuncer, Felix Becker, Thomas Pfeil
Abstract
Autoregressive video diffusion models rely on a KV cache of previously generated frames to avoid redundant computation, but this cache quickly becomes a memory bottleneck as videos grow longer. Methods that quantize the KV cache to low bitwidths reduce memory pressure but degrade video quality. We show that a key driver of this degradation is a systematic bias in the cached partition sum: due to the convexity of the exponential in softmax attention, quantization noise inflates the contribution of cached keys, a phenomenon we call the Jensen bias. This effect causes quantized keys to steal attention mass from the unquantized current tokens. We derive a per-attention-score correction that removes this bias in expectation, computed on the fly from quantization step sizes and query statistics; a second-order Taylor approximation makes the correction cheap and requires no additional KV-cache storage. Evaluated on MAGI-1, SkyReels-V2, and HY-WorldPlay at INT2 quantization, our correction improves PSNR by up to 5.9 dB and raises VBench Score by 7.8 points, recovering much of the quality lost to quantization.
Abstract source - ICML · Workshop · From Frames to Stories (F2S): Toward Reliable, Controllable and Trustworthy Long-Horizon Video Generation
Dual-PAG: Bidirectional Perturbed-Attention Guidance for Residue-Free Video Editing
JeongSeon Oh, Swuoong Yeom, ChangHee Yang, Suk-Ju Kang
Abstract
Text-driven video editing aims to modify desired semantic content while preserving the motion, layout, and temporal coherence of a source video. However, velocity-based editing methods often leave source residue when the target edit requires a large object-level transformation. To address this issue, we propose Dual-PAG, a bidirectional Perturbed Attention Guidance framework that suppresses source-side structural traces while reinforcing target-side geometry. Dual-PAG further uses cross-attention-based masking to localize the correction to the edit region. Dual-PAG preserves the single-trajectory nature of inversion-free video editing while more effectively reducing source residue in challenging object replacement scenarios.
Abstract source - ICML · Workshop · Combining Theory and Benchmarks: Towards A Virtuous Cycle to Understand and Guarantee Foundation Model Performance
When Does Polynomial Attention Concentrate? A Relative-Margin Diagnostic for Zero-Shot Softmax Substitution
Sanny Kim
Abstract
We study zero-shot pointwise substitution of softmax attention in pretrained language models, where the score row is held fixed and only the row map is replaced. For normalized polynomial attention with active-branch degree $p$, the target receives mass $1/(1+S_p)$, where $S_p = \sum_{j \neq } (r_j/r_)^p$, and the criterion $S_p < 1$ is exactly the recall criterion under aligned-binary value vectors. Softmax is uniquely characterized among continuous positive pointwise normalized maps by additive row-shift invariance. In contrast, polynomial attention concentrates according to relative margin $(1-\Delta/r_*)^p$, yielding a worst-case sufficient degree $p^\star = \log A / \log(1/(1-\rho))$ for $A$ active distractors at relative margin $\rho$, in contrast to softmax’s absolute-margin envelope $1/(1 + A e^{-\beta \Delta})$. We audit four small open-weight decoder LMs at contexts up to 4096 tokens. Three of four models exceed 70% unsafe active-unsaturated rows on every diagnostic suite at $p = 2, b = 0$, and a 14-recipe substitution sweep finds no universal drop-in replacement. However, on an uncontaminated needle-in-a-haystack probe, two of the four models admit sample-perfect polynomial recipes. We position $S_p$ as a no-go signal: in our tested cells, very low measured-safe fraction was a sharp negative screen, but high measured-safe fraction did not guarantee preservation, implying that behavioral substitution tests remain necessary even when diagnostic statistics appear favorable.
Abstract source - ICML · Workshop · Combining Theory and Benchmarks: Towards A Virtuous Cycle to Understand and Guarantee Foundation Model Performance
A Numerical Study of Robustness Verification for Lightning Self-Attention
Yulia Alexandr, Hao Duan, Guido Montufar
Abstract
We study the algebraic complexity of robustness verification for lightning self-attention. Since lightning self-attention is polynomial, a binary linear readout defines a cubic decision boundary, and exact Euclidean robustness certification reduces to a nearest-boundary problem. We use the Euclidean distance degree to measure boundary complexity and the ED discriminant to study how the real nearest-boundary problem varies with the input. Our computations show that lightning self-attention boundaries have ED degree far below that of generic cubic hypersurfaces, while still varying systematically with sequence length, embedding dimension, output dimension, and attention rank. We also compute two-dimensional slices of the ED discriminant for a small architecture, showing chambers with different numbers of real critical points.
Abstract source - ICML · Workshop · Combining Theory and Benchmarks: Towards A Virtuous Cycle to Understand and Guarantee Foundation Model Performance
A Cognitive Battery for Foundation Models: Theory-Grounded Benchmarks for Attention, Learning, Metacognition, Executive Function, and Social Cognition
Zacharie Bugaud
Abstract
We present a cognitive benchmark battery for foundation models: five procedurally generated evaluations totalling 25,390 items across 1,138 sub-task types, each operationalising a widely studied family of cognitive constructs: selective attention (Controlled Distractor Injection, CDI), fluid learning (Alien Grammar Induction, ALGIn), metacognitive calibration (Epistemic Calibration Under Uncertainty, ECUU), executive control (Dynamic Rule Override, DRO), and theory of mind (Recursive Belief Tracking, RBT). Rather than report a single accuracy number, each benchmark traces a degradation profile along a controlled difficulty axis (distractor count, rule count, recursion order, etc.), turning the evaluation into a parametric probe whose shape can be predicted from a candidate theory of the underlying capability. We describe the design, give worked examples, and discuss how the resulting profiles plug into the workshop's theory–benchmark virtuous cycle. This paper introduces the battery and its rationale; a companion release will report calibration and model scores.
Abstract source - ICML · Workshop · Generative and Agentic AI for Biology
Scaling Pocket Docking with Data Augmentation and Heterogeneous Equivariant Graph Attention
Thi Xuan Huyen Nguyen, Van-Tuan Le, Kim-Loc Nguyen, Yuxing Peng, Emine Kucukbenli, Mai Thi Hien, Steven Truong, Van H Tang
Abstract
Accurate pocket-level molecular docking is limited by narrow training distributions, costly all-atom modeling, and ranking functions that often fail to select the best pose from high-quality generated ensembles. We introduce a scalable docking pipeline that combines large-scale data augmentation, efficient all-atom equivariant modeling, and improved pose ranking. Our diffusion model is trained on curated PLINDER complexes augmented with SAIR synthetic structures, using leakage removal, structural quality filtering, and dataset-specific pocket cutoffs to improve generalization. For ranking, we replace fully connected tensor-product convolutions in the confidence model with Heterogeneous Equivariant Graph Attention (HeteroEGA), enabling interaction-specific attention across ligand, receptor-residue, and receptor-atom graphs. We also evaluate an independent physics-based refinement track using Vina minimization followed by GNINA reranking. On PoseBusters-308, our confidence-ranking pipeline achieves 81.85\% Top-1 success rate and 94.51\% Oracle success rate, surpassing SigmaDock and DiffDock-RL++. The proposed HeteroEGA confidence model slightly outperforms the post-refinement track while ranking poses substantially faster. These results show that combining broader training data with attention-based equivariant ranking can close much of the gap between Top-1 and Oracle docking accuracy.
Abstract source - ICML · Workshop · SCALE: SCALABLE LEARNING AND OPTIMIZATION FOR EFFICIENT MULTIMODAL AI AGENTS
Detection-guided Attention Steering for Vision Language Models
Alan W Zhang, Rui Pan, Mike Wong, Ravi Netravali
Abstract
Modern Vision Language Models (VLMs) have demonstrated remarkable versatility in a wide range of applications, including multimodal reasoning, captioning, and analysis. However, VLMs still struggle with the fundamental tasks of object detection and localization, especially when compared to traditional Convolutional Neural Network (CNN) models. Contemporary VLMs tend to allocate very scarce attention to non-textual inputs such as image tokens and lack the inductive biases present in CNNs, making it difficult for them to identify challenging objects in complex scenes. To address these limitations, we propose a detection-guided dynamic attention steering system that leverages the locality insight from CNNs to efficiently steer a VLM's attention toward more relevant sections of an image. The steering intensity during each inference is dynamically scaled according to the confidence of CNN-generated bounding boxes. Extensive evaluations across multiple state-of-the-art VLMs show substantial improvements on object localization-oriented benchmarks, achieving up to a 4% accuracy gain. Results demonstrate the effectiveness of combining different model architectures to harness their respective strengths for advancing VLM capabilities.
Abstract source - ICML · Workshop · SCALE: SCALABLE LEARNING AND OPTIMIZATION FOR EFFICIENT MULTIMODAL AI AGENTS
Quantized Keys Steal Attention: Bias Correction for KV-Cache Compression in Video Diffusion
Tuna Tuncer, Felix Becker, Thomas Pfeil
Abstract
Chunk-wise autoregressive video diffusion models rely on a KV cache of previously generated chunks to avoid redundant computation, but this cache quickly becomes a memory bottleneck as videos grow longer. This bottleneck is a central obstacle for efficient multimodal AI systems, where video and world models must maintain long temporal context for interactive simulation, planning, and embodied agents. Methods to quantize the KV cache to low bitwidths reduce memory pressure but degrade video quality. We show that a key driver of this degradation is a systematic bias in the cached partition sum: due to the convexity of the exponential in softmax attention, quantization noise inflates the contribution of cached keys, a phenomenon we call the Jensen bias. This effect causes quantized keys to steal attention mass from the unquantized current chunk. We derive a per-attention-score correction that removes this bias in expectation, computed on the fly from the quantization step sizes of the cached keys and the query norm. Using a second-order Taylor approximation, the additional computational overhead is negligible, and no additional memory is needed alongside the cache. Evaluated on MAGI-1 and HY-WorldPlay at INT2 quantization, our correction improves PSNR by up to 5.9~dB and raises VBench Score by 7.8 points, recovering much of the quality lost to quantization.
Abstract source - ICML · Workshop · Workshop on Weight-Space Symmetries: from Foundations to Practical Applications
WK, WV is (Linearly) All You Need: On the Necessity of the QKV Weight Triplet in Self-Attention Transformers
Marko Karbevski, Antonij Mijoski
Abstract
Multi-head attention is invariant under the joint $GL(d)$ action $(X, W_Q, W_K, W_V) \mapsto (X\Theta,\Theta^{-1}W_Q,\Theta^{-1}W_K,\Theta^{-1}W_V)$ with two consequences for the QKV triplet. First, any one of $W_Q, W_K, W_V$ can be fixed to $I_d$ without loss of expressivity if $X W$ is precomputed; under mild structural conditions the precomputation folds into the preceding MLP (or, in the first layer, the embedding) at no parameter cost, removing $25\%$ of attention parameters per layer. We prove the multi-layer reduction and analyse the normalisation obstructions. Second, every linear $W_Q$ already lies on the orbit of $I_d$, so a learned linear query is redundant: expressive gains in the QKV pathway require at least one of the three to be nonlinear, a branch we realise with the residual query $Q(X)=\frac{1}{2}(X + f_\theta(X))$ at parity of parameters. This research also led us to examine residual skip connections: MLPs with and without a skip form generically disjoint function classes for modern activations. We validate both halves on GPT-style models trained from scratch under batch-matched comparisons: the reduced $117$M model matches the dense $124$M baseline; reallocating the saved parameters to the feed-forward sublayer strictly improves on it; and the residual nonlinear query outperforms a baseline with a wider feed-forward sublayer carrying $12.5$ % more non-embedding parameters.
Abstract source - ICML · Workshop · Workshop on Weight-Space Symmetries: from Foundations to Practical Applications
Generic Fibers and Functional Dimension of Multi-Head Attention
Nathan Henry
Abstract
Weight-space symmetries are pervasive across neural architectures, where symmetries often generate positive dimensional families of parameter tuples that realize the same function. Multi-head self-attention has two known symmetries, including linear changes of basis within Q-K and O-V products and permutations of heads. We prove that for generic parameters, multi-head self-attention has no additional hidden symmetries, characterizing the generic fibers of the parametrization. As a consequence, we derive a formula for the functional dimension of multi-head attention. While an architecture's number of parameters is often used as a measure of expressivity as models are scaled, our functional dimension formula demonstrates when this heuristic is valid and when it is less reliable. We study a setting where the number of attention heads is varied while keeping the number of parameters fixed, and experimentally demonstrate that the model's memorization capacity in bits per parameter varies with the number of heads, but that most of this variation is explained away when the bits memorized is normalized by the functional dimension instead of the number of parameters.
Abstract source - ICML · Workshop · Workshop on Weight-Space Symmetries: from Foundations to Practical Applications
Attention Weight Decomposition for Vision Model Compression
Hyunwoo Yu, Yubin Cho, Kyeongbo Kong, Suk-Ju Kang
Abstract
Weight decomposition is a practical compression approach, yet prior methods overlook that multi-head attention consists of paired linear projections ($Q$–$K$ and $V$–$O$). We propose \textit{Uni}lateral decomposition for attention \textit{Com}pression (\textit{UniCom}), which decomposes only one side of each pair to better manage approximation error while leveraging attention’s linear operations. Since $Q$-$K$-$V$-$O$ weights exhibit different low-rank sensitivities across heads, UniCom adaptively chooses which side to decompose based on rank sensitivity. Experiments show strong generalization across vision and vision–language tasks. Under 60\% MHA reduction, UniCom improves Top-1 by +11.2\% / +5.7\% / +6.4\% over combined decomposition on DeiT-S / DeiT-S(distill) / DeiT-B, respectively.
Abstract source - ICML · Workshop · Foundations of Deep Generative Models: Understanding Memorization, Generalization, and Reasoning
Interdomain Attention: Beyond Token-Level Key-Value Memory
Naoki Kiyohara, Harrison B Zhu, Riccardo El Hassanin, Zhuo Sun, Wenlong Chen, Samir Bhatt, Yingzhen Li
Abstract
Transformers and deep SSMs sit at opposite ends of a basic design choice: attention learns where to read through query-dependent matching at quadratic cost and a growing KV cache, while deep SSMs compress context into a fixed-size recurrent state at the cost of query-independent readout. We propose Interdomain Attention, which integrates an SSM into an attention module through kernel methods: an attention kernel is approximated by a finite feature map, the resulting key features and values are projected onto a shared set of basis functions maintained by a single SSM recurrence, and each query selects a slice of the stored coefficients through its own feature map, recovering the query-dependent read-out of attention at fixed state. The scalable layer is a learned relaxation of this derivation, and we validate its components through ablations. In a 125M–1.3B autoregressive language-modeling study on FineWeb-Edu at matched recurrent-state budget, Interdomain Attention improves on an SSM token mixer at every scale, surpasses a same-recipe softmax baseline at 1.3B on validation perplexity and on the eight-task commonsense suite, and inherits the length-flat behavior of its fixed-state core out to $3.5\times$ the training context. Ablations indicate that the query-dependent readout is the main source of the gain.
Abstract source - ICML · Workshop · Foundations of Deep Generative Models: Understanding Memorization, Generalization, and Reasoning
SALSA: State Augmentation via Learned Selective Attention
Joel Manu, Frederick Hoffman, Krithik Ramesh
Abstract
Hybrid architectures combining attention and recurrent primitives have emerged as a popular paradigm in sequence modeling, achieving favorable tradeoffs between the in-context recall of transformers and the bounded state compression of recurrences. However, existing hybrids statically interleave primitives at fixed, hand-designed ratios, invoking expensive attention operations regardless of whether the recurrent state is sufficient, raising concerns about adaptability and efficiency. We introduce SALSA, a dynamic hybrid architecture that pairs the recurrent primitive with a learned router that selectively invokes attention on a per-token basis, when projected to improve the recurrent state quality. We evaluate this approach on short and long context benchmarks at scale. At 1.3B parameters, SALSA achieves lower pretraining perplexity than the static hybrid (9.72 vs. 9.99), outperforms it on 8 of 8 LM-Eval metrics by an average of 1.5\%, and improves PG19 perplexity at every sequence length evaluated from 2k to 32k. Additionally, we investigate the learned routing patterns of SALSA to reveal sparse, structured attention patterns that suggest SALSA acquires meaningful, content-dependent strategies for when global context is necessary. Together, these results position dynamic primitive allocation as a principled and practical direction for hybrid sequence modeling.
Abstract source - ICML · Workshop · Foundations of Deep Generative Models: Understanding Memorization, Generalization, and Reasoning
Manifold-Guided Attention Steering
Ian Li, Kapilesh Guruprasad, Raunak Sengupta, Ninad Satish, Loris D'Antoni, Rose Yu
Abstract
Large language models frequently produce errors in reasoning tasks despite possessing the underlying knowledge required for correct reasoning. One possible approach to improve reasoning consistency is through activation steering. However, existing activation steering approaches apply fixed, pre-computed correction vectors, ignoring where the model currently sits along its generation trajectory; the result is indiscriminate perturbation that disrupts already-correct steps as freely as erroneous ones. We propose Manifold-Guided Attention Steering (MAGS), a trajectory-aware inference-time intervention grounded in a geometric observation: the output activations of specific attention heads diverge from a low-dimensional correctness manifold at the point of error, and this deviation compounds through subsequent steps. For each identified attention head, we learn a low-dimensional subspace from contrastive pairs of correct and incorrect traces that capture the directions along which error behavior deviates from correct behavior. During inference, we monitor each head's proximity to this manifold and apply a targeted projection correction when deviation exceeds a learned threshold, steering the attention output back toward the correct subspace before the error propagates. MAGS consistently outperforms both unsteered baselines and static steering approaches across benchmarks spanning mathematical reasoning (MATH-500, GSM8K), code generation (HumanEval, MBPP), and molecular generation (SMILES), suggesting that correctness manifolds are a general feature of LLM attention geometry.
Abstract source