Skip to content
AI.info

Research

Surgical Activation Steering via Generative Causal Mediation

Overview Research area: Natural language processing / mechanistic interpretability — specifically activation steering and causal mediation analysis of transformer language models. Technical level: Adv

Surgical Activation Steering via Generative Causal Mediation
arXiv
2602.16080
Published
2026-02-17
Authors
Aruna Sankaranarayanan, Amir Zur, Atticus Geiger, Dylan Hadfield-Menell

AI summary

Overview

  • Research area: Natural language processing / mechanistic interpretability — specifically activation steering and causal mediation analysis of transformer language models.
  • Technical level: Advanced (the paper assumes familiarity with attention heads, activation patching, and causal graphs, though the core intuition is accessible).
  • Scope: The paper introduces and evaluates Generative Causal Mediation (GCM), a method for choosing which attention heads to intervene on in order to steer behaviors that are spread across the many tokens of a long-form language model response.

What This Paper Is About

Most prior work on locating ("localizing") a concept inside a language model relies on signals from a single output token or from a small, restricted subset of tokens — for example, detecting the word "wedding" or the phrase "As an AI." That approach cannot capture behaviors that are diffused across an entire long response, such as talking in verse instead of prose, or being sycophantic rather than critical. This paper asks where inside the model you should intervene to control such diffuse, multi-token behaviors, and answers by ranking attention heads according to how strongly they causally mediate the concept, then steering the strongest ones.

Key Contributions

  1. The GCM framework. A procedure that builds datasets of contrastive long-form input–response pairs (e.g., "Talk in prose. What is time?" vs. "Talk in verse. What is time?"), measures the indirect effect of patching each attention head with its contrastive value, and selects the top k% of heads as steering sites.
  2. Three localization variants. Activation patching, attribution patching (a first-order Taylor approximation requiring only 2 forward passes and 1 backward pass for all heads), and attention head knockouts (which do not use the contrastive input at all).
  3. A systematic evaluation across three tasks and three models. Refusal induction, sycophancy reduction, and verse style transfer, tested on Qwen1.5-14B-Chat, OLMo-2-1124-13B-DPO, and SOLAR-10.7B-Instruct-v1.0, with 16,200 hyperparameter settings and a reported 810k total samples.
  4. Separation of "where to steer" from "how to steer." GCM only selects locations; the authors pair it with three steering methods — mean steering, difference-in-means steering, and representation fine-tuning (ReFT) — and compare against linear-probe (ITI) and random-selection baselines.

Main Findings

  • GCM beats probe-based and random baselines. Averaged across all models and tasks (N=120, k=12, α=10), activation patching and attribution patching each reach 0.40 steering success, versus 0.34 for ITI linear probes and 0.27 for random selection. Attention head knockouts underperform both baselines at 0.26. All comparisons are reported as statistically significant (p < 0.001).
  • Localization enables surgical steering. The authors report a steering success rate of at least 80% when steering at most 5% of attention heads, with the single exception of the Refusal Induction task on the SOLAR-10B model.
  • Some concepts are easier to steer than others. Sycophancy reduction was trivial to steer on the held-in data — even selecting 3% of attention heads at random yielded a 100% steering success rate. Verse style transfer was highly localized to a minimal set of heads and was correspondingly harder to steer, producing sparse success grids.
  • Unsupervised steering benefits more from localization than supervised steering. Across 3 models, 3 tasks, and 2 baselines (18 settings), at least one GCM variant outperformed probes and random selection in 78% of cases for mean steering (p < 0.05) and 94% for difference-in-means steering (p < 0.05). For supervised ReFT, the advantage was smaller at 44% of cases (p < 0.05).
  • The lean approximation holds up. Attribution patching, which needs only 2 forward passes and 1 backward pass, is reported as equally performant to full activation patching, though the authors note its correlation with the true indirect effect is weaker at the first and last layers.
  • Transfer to held-out datasets is partial. Evaluated with Llama-3.1-70B-Instruct as judge on 100 prompts per dataset across 3 random seeds (300 samples), transfer rates were 10–30% for sycophancy reduction, rising to 60–80% when concept judge scores of 4 are included alongside 5; 50–80% for refusal induction; and 25–80% for verse style transfer.
  • Judge calibration is substantial. Model–human agreement on binarized judge scores ranged from 0.82 to 0.95 across five tasks, with a macro-average of 0.87.
  • Localized steering is more robust than global steering. Although the authors replicate prior findings that global steering can be as effective as localized steering, they report a difference-in-means variant where global steering fails while local steering remains robust.

Methodology in Plain English

  1. Build contrastive datasets. For each task the authors create 50 paired prompts that differ at a single token position (e.g., "I hate this haiku" vs. "I love this haiku", or a system directive to respond in verse vs. prose). Because the prompts are nearly identical, any difference in the model's response can be attributed to that one change. Responses are generated with greedy decoding and are approximately 128 tokens long.
  2. Measure each head's causal role. Run the model on the original prompt, but replace one attention head's internal activation with the value it would have taken on the contrasting prompt. Then check: did the probability of the contrasting response go up relative to the original response? That difference is the indirect effect, computed for every attention head.
  3. Rank and select. Sort heads by indirect effect and pick the top k%. This is the "where to steer" decision. The cheaper attribution-patching variant approximates the same numbers with one backward pass instead of an intervention per head.
  4. Steer. Apply one of three interventions at the selected heads during inference — mean steering, difference-in-means steering, or a trained ReFT adapter — scaled by a factor α.
  5. Judge the output. Since the behavior is spread over many tokens, an auxiliary judge model (Llama-3.1-70B-Instruct) scores each response on a 5-point Likert concept scale, plus fluency and relevance. Only responses scoring the maximum on all three axes count as successes. These judgments are calibrated against a human evaluator.
  6. Verify presence of the concept first. Before any experiment, the authors validate that the contrasting prompts genuinely elicit the target concept using the judge model.

Why This Matters

Impact on research. The paper extends causal mediation analysis from token-level behaviors to behaviors that only exist across a whole generated passage. It establishes attention heads as effective steering sites for such diffuse concepts, and finds that localization is necessary — and more robust than global steering — in a setting where prior work (Hase et al., 2023) concluded localization was not needed. It also shows that a first-order linear approximation (attribution patching) is sufficient, which makes the method far cheaper to run.

Real-world applications:

  • Safety tuning at inference time — the refusal induction task targets whether a model refuses harmful requests, a directly relevant safety behavior.
  • Reducing sycophancy in assistants — making critique-style feedback more likely and flattery less likely when a user states an opinion.
  • Creative writing control — reliably switching a model between verse and prose, a style case that token-level proxies cannot capture.
  • Cheap behavioral auditing — attribution patching's 2-forward/1-backward-pass cost makes large-scale component ranking practical.

Industry relevance. The method offers a way to adjust deployed model behavior without retraining or full fine-tuning, and the direction-in-weight-space nature of the successful difference-in-means steering suggests the targeted concepts may be represented linearly. The compute footprint is modest: all experiments ran on 12 80GB NVIDIA A100 GPUs using HuggingFace Transformers, PyTorch, and NNsight.

Future Directions

  1. Consistency between short- and long-form steering. The authors explicitly invite work on whether the steering locations and effects found for long-form responses match those for single-token responses.
  2. Closing the held-out transfer gap. Transfer rates on out-of-distribution datasets range from 10–30% at the strictest judge threshold for sycophancy reduction, leaving substantial room for more generalizable steering vectors.
  3. Making supervised steering benefit from localization. ReFT gained less from GCM localization than the unsupervised methods (44% of cases versus 78% and 94%), which the authors do not fully resolve.
  4. Generalizing beyond these three tasks and three models. The evaluation covers refusal, sycophancy, and style transfer on models from 10B to 14B parameters; other concepts, architectures, and scales remain untested. The authors also note the causal graphs they assume are univariate and only one of several possible abstractions.

Target Audience

Researchers and engineers working on mechanistic interpretability, activation steering, and model alignment — particularly those who need to control behaviors that span an entire generated response rather than a single token. It is also relevant to practitioners building inference-time safety or style-control systems, and to anyone comparing causal localization methods against correlational probes. The judging protocol and dataset construction details make it useful for readers designing their own steering evaluations.

Authors’ abstract

Where should we intervene in a language model (LM) to control behaviors that are diffused across many tokens of a long-form response? We introduce Generative Causal Mediation (GCM), a procedure for selecting model components, e.g., attention heads, to steer a binary concept (e.g., talk in verse vs. talk in prose) from contrastive long-form responses. In GCM, we first construct a dataset of contrasting inputs and responses. Then, we quantify how individual model components mediate the contrastive concept and select the strongest mediators for steering. We evaluate GCM on three tasks--refusal, sycophancy, and style transfer--across three language models. GCM successfully localizes concepts expressed in long-form responses and consistently outperforms correlational probe-based baselines when steering with a sparse set of attention heads. Together, these results demonstrate that GCM provides an effective approach for localizing and controlling the long-form responses of LMs.

Read the original paper