Skip to content

Attention Manifolds: Steering or Blocking Language Models by Editing Learned B-Spline Surfaces

Sep 2026 · 0 citations · 17 references
Computer Science

TL;DR

Learned 2D B-spline surfaces that modulate each value dimension based on the query-key interaction are introduced, suggesting a path toward safety-oriented manifold shaping.

Abstract

In standard transformer attention, a source token sends the same value vector to every receiver. The query determines \emph{how much} to attend but not \emph{what} to extract. This work introduces \textbf{attention manifolds}: learned 2D B-spline surfaces $S_d(q_d, k_d)$ that modulate each value dimension based on the query-key interaction. Each surface is a tensor-product cubic B-spline initialized to zero, preserving pretrained behavior. Applied to LLaMA 3.2-1B-Instruct and 3B-Instruct, attention manifolds reduce WikiText-2 validation perplexity by 2--2.5 points with 0.3\% parameter overhead. Across 112 diverse prompts, surfaces change greedy-decoded output for 69\% (1B) to 83\% (3B) of cases, with the strongest effects on ambiguous and polysemous inputs (94--100\% change rate). The surfaces improve output quality: correcting factual errors (\emph{``the CAP theorem has three main components''} $\to$ \emph{``it is impossible to guarantee all three''}), increasing precision (\emph{``impossible to know certain properties''} $\to$ \emph{``impossible to know both position and momentum''}), and adding specificity (a generic quote $\to$ an attributed Saint Augustine citation, consistently at both scales). The learned surfaces are also mechanically editable: inverting a layer's coefficients changes greedy output for 9/10 prompts (KL~0.010), providing a geometric mechanism for model steering. Setting surface coefficients to $-1$ creates ``attention walls''that block value flow through specific dimensions. In a preliminary experiment, a layer-wide wall redirects an explosive-device prompt from specific instructions to general educational content, suggesting a path toward safety-oriented manifold shaping.

View source

Similar papers

Preprint Oct 2026

Editing the Goal: Per-Token SAE Steering and Its Depth Limits in $\pi_{0.5}$

It is shown that replacing the SAE features of a single goal word with those of an alternative goal word, leaving the instruction text unchanged, steers $\pi_{0.5}$-LIBERO into completing the alternative task, proof of existence in an RFM in simulation and an initial map of how deep goal-redirecting edits remain effect...

Rocio Perales Valdes, Animesh Garg · 0 citations

SMat-Attention: Structured Long-Context Sequence Modeling

This work introduces Structured Matrix Attention via a family of causal masks with structured long-range routing whose row supports have VC-dimension, which makes VC-dimension an explicit knob governing access-pattern complexity, prefill cost, and decoding memory.

E. Anand, Abdullah Ateyeh, Archer Wang et al. · 3 citations
#machine learning Preprint Nov 2026

GatedV: Self-Gated Values for Transformer Language Models

Standard attention forms query (Q), key (K), and value (V) matrices through learned linear projections of input hidden states. Architectures such as GAU and Mega incorporate nonlinear transformations into attention. In this paper, we propose GatedV, a simple attention variant that applies SiLU only to V before aggregat...

Li-Ming Yu, Hong-Yu Zhou · 0 citations
#machine learning Preprint Oct 2026

From Spectral Saliency to Finite Deletion: Evaluating Selective Language Model Edits

Deleting singular components offers a precise way to remove a capability from a language model, yet the first-order spectral saliency used to rank components predicts only a local loss change, whereas deletion is a finite intervention. In this paper, we study how prediction error affects selective editing, where select...

Ibne Farabi Shihab, Joyanta J. Mondal · 0 citations
Preprint Nov 2026

Asymmetric Multimodal Learning with Decomposed JEPAs

Cross-modal alignment is the standard objective for building multimodal representations. We show that alignment as a \emph{sole} objective is lossy wherever modalities are informationally asymmetric---where neither can express what the other carries. Visual question answering is an obvious case: a question is a selecti...

Yusuf Shihata · 0 citations

Related blog posts

MIT News · Artificial Intelligence Nov 17, 2026

Learning the language of machine learning

By studying the computational foundations of language learning, Associate Professor Jacob Andreas builds intelligent systems that can communicate effectively with humans.

Microsoft Research Blog Nov 16, 2026

TokenEconomizer: Learning from Experience to Make AI Coding Agents More Efficient

AI coding agents are increasingly help developers fix bugs and build features largely on their own, but every interaction with their models consumes tokens. In each session, an agent sends instructions, tool descriptions, and session history to its model. Most efforts to reduce this cost focus on individual tasks. Yet developers return to the same […] The post TokenEconomizer: Learning from Experience to Make AI Coding Agents More Efficient appeared first on Microsoft Research.

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.