Attention Manifolds: Steering or Blocking Language Models by Editing Learned B-Spline Surfaces
Not on the map. Why?
Abstract (arXiv)
In standard transformer attention, a source token sends the same value vector to every receiver. The query determines how much to attend but not what to extract. This work introduces attention manifolds: learned 2D B-spline surfaces Sd(qd, kd) 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 (``the CAP theorem has three main components'' → ``it is impossible to guarantee all three''), increasing precision (``impossible to know certain properties'' → ``impossible to know both position and momentum''), and adding specificity (a generic quote → 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.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 16 of its 17 references that are in the map. First posted on arXiv 24 Sep 2026.
Builds on
16 of 17 references.
References · 16
- 2017Attention Is All You Needcited by 60,361
- 2022Training language models to follow instructions with human feedbackcited by 15,971
- 2024The Llama 3 Herd of Modelscited by 14,715
- 2023Direct Preference Optimization: Your Language Model is Secretly a Reward Modelcited by 8,065
- 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,703
- 2016Pointer Sentinel Mixture Modelscited by 3,096
- 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 2,022
- 2023GQA: Training Generalized Multi-Query Transformer Models from Multi-Head Checkpointscited by 1,346
- 2023Representation Engineering: A Top-Down Approach to AI Transparencycited by 1,336
- 2023Steering Llama 2 via Contrastive Activation Additioncited by 1,085
- 2024KAN: Kolmogorov-Arnold Networkscited by 649
- 2025Gated Attention for Large Language Models: Non-linearity, Sparsity, and Attention-Sink-Freecited by 283
4 more
- 2017DiSAN: Directional Self-Attention Network for RNN/CNN-Free Language Understandingcited by 71
- 2025Nested Attention: Semantic-aware Attention Values for Concept Personalizationcited by 21
- 2025Kolmogorov-Arnold Attention: Is Learnable Attention Better For Vision Transformers?cited by 2
- 2026InKAN: B-Spline KANs via Truncated Power Formcited by 2
Built on by
Not cited yet.