Attribute-Based Activation Steering of LLMs for Group-Specific Explanation Generation¶
Conference: EMNLP 2026
Paper: ACL Anthology
Code: https://github.com/webis-de/EMNLP-26
Area: Interpretability
Keywords: activation steering, personalized explanations, explanatory style, knowledge attributes, large language models
TL;DR¶
This paper introduces an unsupervised, training-free attribute-based activation steering approach that extracts style and knowledge attributes of target groups from community Q&A texts and injects weighted activation vectors at inference time, achieving significantly improved group specificity while preserving factual accuracy.
Background & Motivation¶
Natural language explanations are vital for explainable artificial intelligence (XAI) and educational technologies, yet their effectiveness fundamentally hinges on the background and cognitive abilities of the recipient. For example, explaining "How does DNA work?" to game developers warrants analogies centered around blueprints, object initialization, and code architecture, whereas explaining it to philosophers requires emphasizing teleology, information transmission, and existential implications. When explanations fail to accommodate the recipient's frame of reference, they induce cognitive overload or fail to foster true conceptual understanding.
Existing approaches to personalized explanation generation exhibit critical limitations. Prompt-based steering often yields superficial lexical modifications, proves overly sensitive to phrasing, and struggles to enforce fine-grained structural adjustments. Supervised fine-tuning (SFT) is bottlenecked by the absence of paired, group-annotated explanation datasets. On the other hand, recent representation and activation steering techniques largely rely on coarse, text-level activation differences (such as difference-in-means across whole documents). These methods are notoriously prone to "oversteering," generating syntactically degenerate outputs, repetitive tokens, or hallucinations that severely degrade factual precision.
This paper tackles these challenges by hypothesizing that a target group's cognitive background and explanatory preferences are implicitly embedded within the community texts its members produce. Rather than relying on continuous uninterpretable embeddings or manual feature crafting, these characteristics can be explicitly decomposed into explanatory style and knowledge attributes. Core idea: decompose target group preferences into unsupervised style and knowledge attributes, extract contrastive activation vectors for these attributes, and inject their softmax-weighted combination into intermediate hidden layers during inference to achieve an optimal balance between group specificity and factuality.
Method¶
Overall Architecture¶
The proposed approach operates in three consecutive, training-free stages: (1) Group-Specific Attribute Extraction: extracting candidate style and knowledge attributes from domain-specific Stack Exchange answers using two-stage LLM prompting, followed by four-class filtering, radius-based semantic clustering, and point-biserial correlation ranking; (2) Attribute-Specific Activation Vector Construction: converting ranked attributes into standardized second-person and first-person assertions, and computing forward-pass directional difference vectors between positive and negated formulations; (3) Attribute-Based Steering Vector Injection: weighting activation vectors according to the group's attribute profile and dynamically shifting residual stream activations across preselected middle layers during autoregressive decoding.
%%{init: {'flowchart': {'rankSpacing': 24, 'nodeSpacing': 28, 'padding': 6, 'wrappingWidth': 400}}}%%
flowchart TD
A["Target Group Community Texts<br/>Stack Exchange Answers"] --> B["Group-Specific Attribute Extraction<br/>Two-stage prompting for style and knowledge"]
B --> C["Semantic Clustering & Attribute Selection<br/>Four-way filtering + cosine clustering + correlation"]
C --> D["Attribute-Specific Activation Vectors<br/>Forward difference between positive and negated prompts"]
D --> E["Attribute-Based Steering Vector Injection<br/>Softmax profile weighting and layer-wise intervention"]
E --> F["Output: Tailored Group-Specific Explanation"]
Key Designs¶
1. Unsupervised Style and Knowledge Attribute Extraction: disentangling audience priors
Standard activation steering methods aggregate whole-text representations, inadvertently entangling domain terminology, syntax, and spurious context. To overcome this, the authors extend unsupervised attribute extraction to capture two complementary dimensions: explanatory style and domain knowledge. For style, 92 prompts are leveraged to capture syntactic, grammatical, and rhetorical nuances. For knowledge, 18 novel prompts are devised based on Bloom's taxonomy and educational psychology frameworks, systematically spanning six cognitive dimensions: factual, conceptual, procedural, metacognitive, situational, and conventional knowledge.
A second-stage prompt rewrites each generated description into standardized atomic propositions ("The author is/uses X." for style; "The author knows/understands X." for knowledge). To eliminate hallucinations, candidate attributes undergo four-way classification (style, knowledge, both, none) via Qwen2.5-72B-Instruct. Surviving candidates are clustered using radius-based neighbor clustering (threshold 0.85) on Qwen3-Embedding-8B embeddings. Overly broad attributes (extracted for >7 groups) and sparse noise (<6 occurrences) are pruned, yielding a shared set of \(|F| = 1250\) attributes (340 style, 910 knowledge). Finally, point-biserial correlation identifies the \(m\) most salient attributes per group.
2. Perspective Rewriting and Contrastive Activation Differences: isolating clean semantic directions
To extract robust latent vectors free of surface formatting artifacts, the top \(m\) attributes are converted into active operational perspectives. Style attributes are rewritten in the second person (e.g., "You include code snippets.") to act as behavioral instructions to the model. Conversely, knowledge attributes are formulated in the first person (e.g., "I understand game development."), mirroring how real users present their background context.
For each attribute \(f_j\), a negated counterpart is constructed (e.g., "You do NOT include code snippets."). Given a base LLM, forward passes extract the hidden state vectors \(a_j^{+(i)}\) and \(a_j^{-(i)}\) at layer \(i\). The final attribute-specific activation vector isolates the directional shift: $\(a_j^{(i)} := a_j^{+(i)} - a_j^{-(i)}\)$ This contrastive formulation cancels out general language modeling representations, isolating the pure causal direction associated with the attribute.
3. Profile-Weighted Activation Steering: mitigating oversteering and preserving factual fidelity
Directly adding unweighted or uncurated vectors leads to severe representation drift. The proposed approach derives a group steering vector \(s_g^{(i)}\) at layer \(i\) by computing a softmax-weighted sum over the activation vectors of the \(m\) most important style attributes \(F_{mg}^{(S)}\) and \(m\) knowledge attributes \(F_{mg}^{(K)}\), weighted by their empirical profile \(\bar{v}_g\): $\(s_g^{(i)} := \sum_{f_j \in F_{mg}^{(S)} \cup F_{mg}^{(K)}} \text{softmax}(\bar{v}_g)_j \cdot a_j^{(i)}\)$ During inference, given an explanatory prompt \(x\), the steering vector is added to the original hidden state \(a^{(i)}(x)\) scaled by hyperparameter \(\lambda\): $\(\hat{a}^{(i)}(x) := a^{(i)}(x) + \lambda \cdot s_g^{(i)}\)$ The steered layer set \(I\) (a sliding window of 3 layers) and strength \(\lambda \in [0.25, 2.5]\) are tuned on a validation split with length and repetition penalties. By steering solely along discrete, verified attribute axes, the intervention avoids collapsing the model's factual recall circuits while reorienting output framing toward the target audience.
A Worked Example¶
Consider explaining "How does DNA work?" to Game developers:
1. Attribute Salience: The top correlated attributes include style features (including code snippets, \(r=0.3132\); video game terminology, \(r=0.2732\)) and knowledge dimensions (game development, \(r=0.6761\); rendering techniques, \(r=0.4227\)).
2. Intervention: A steering vector is constructed and injected into layers [10, 11, 12] of Qwen2.5-7B with \(\lambda = 1.50\).
3. Generated Outputs:
- Prompting Baseline: Generates a standard biology paragraph and awkwardly tacks on a generic closing sentence: "In games, you might use DNA analogies for character customization..."
- Konen et al. (2024): Suffers catastrophic oversteering, emitting executable C# code defining public class DNA { private List<Vector2> points; } that completely abandons answering the biological question.
- Attribute Steering (Ours): Seamlessly frames the explanation: "From a game developer's perspective, you might want to think of DNA as a blueprint that defines the structure and behavior of your game. Just like DNA codes for the traits of an organism, your game's code defines its behavior and features... functions are like genes... comments explain complex parts much like DNA sequences are annotated..."
Key Experimental Results¶
Main Results¶
Evaluated across 97 science questions for 11 professional target groups on Specificity (classifier prediction), Factuality (FACTSCORE probability), and Harmonic Mean (HMean).
| Model | Prompt Components | Steering Vectors | Factor \(\lambda\) | Layers \(I\) | Specificity ↑ | Factuality ↑ | HMean ↑ |
|---|---|---|---|---|---|---|---|
| Qwen 7B | Group | - | - | - | 0.128 | 0.322 | 0.183 |
| Qwen 7B | Group + attributes (5) | - | - | - | 0.224 | 0.303 | 0.257 |
| Qwen 7B | Group | Konen et al. (2024) | 1.75 | [17, 18, 19] | 0.694 | 0.126 | 0.213 |
| Qwen 7B | Group + attributes (5) | Konen et al. (2024) | 1.50 | [18, 19, 20] | 0.803 | 0.096 | 0.171 |
| Qwen 7B | Group | Ours (5) | 2.00 | [10, 11, 12] | 0.386 | 0.264 | 0.313 |
| Qwen 7B | Group + attributes (5) | Ours (5) | 1.50 | [10, 11, 12] | 0.442 | 0.225 | 0.299 |
| Llama 3.1 8B | Group | - | - | - | 0.217 | 0.326 | 0.261 |
| Llama 3.1 8B | Group + attributes (5) | - | - | - | 0.410 | 0.258 | 0.316 |
| Llama 3.1 8B | Group | Konen et al. (2024) | 1.25 | [15, 16, 17] | 0.532 | 0.195 | 0.285 |
| Llama 3.1 8B | Group + attributes (5) | Ours (5) | 0.75 | [17, 18, 19] | 0.448 | 0.215 | 0.291 |
| Ministral 8B | Group | - | - | - | 0.111 | 0.376 | 0.171 |
| Ministral 8B | Group | Konen et al. (2024) | 1.00 | [20, 21, 22] | 0.300 | 0.252 | 0.274 |
| Ministral 8B | Group + attributes (5) | Ours (5) | 1.00 | [5, 6, 7] | 0.215 | 0.330 | 0.260 |
Ablation Study¶
Ablation across attribute count \(m \in \{3, 5, 10\}\) and model scaling (Qwen 7B vs. Qwen 32B) on science questions.
| Model | Config | \(\lambda\) | Layers \(I\) | Specificity ↑ | Factuality ↑ | HMean ↑ |
|---|---|---|---|---|---|---|
| Qwen 7B | Group + Ours (\(m=3\)) | 1.75 | [10, 11, 12] | 0.356 | 0.279 | 0.313 |
| Qwen 7B | Group + attrs + Ours (\(m=3\)) | 1.50 | [10, 11, 12] | 0.433 | 0.230 | 0.300 |
| Qwen 7B | Group + Ours (\(m=5\)) | 2.00 | [10, 11, 12] | 0.386 | 0.264 | 0.313 |
| Qwen 7B | Group + attrs + Ours (\(m=5\)) | 1.50 | [10, 11, 12] | 0.442 | 0.225 | 0.299 |
| Qwen 7B | Group + Ours (\(m=10\)) | 2.00 | [11, 12, 13] | 0.366 | 0.281 | 0.318 |
| Qwen 7B | Group + attrs + Ours (\(m=10\)) | 1.50 | [10, 11, 12] | 0.439 | 0.228 | 0.300 |
| Qwen 32B | Group (Prompting) | - | - | 0.144 | 0.328 | 0.200 |
| Qwen 32B | Group + attrs (Prompting) | - | - | 0.229 | 0.289 | 0.255 |
| Qwen 32B | Group + Ours (\(m=10\)) | 1.00 | [41, 42, 43] | 0.187 | 0.370 | 0.249 |
| Qwen 32B | Group + attrs + Ours (\(m=10\)) | 2.00 | [38, 39, 40] | 0.374 | 0.315 | 0.342 |
Human Expert Evaluation¶
A double-blind user study with nine domain experts (three biologists, three game developers, and three philosophers recruited on Upwork) evaluating explanations generated by Qwen 7B across 50 questions (5-point Likert scale):
| Method | Steering Success ↑ | Plausibility ↑ | Helpfulness ↑ | HMean ↑ |
|---|---|---|---|---|
| (a) Prompting (Group) | 3.12 ± 1.21 | 4.56 ± 0.86 | 4.03 ± 1.10 | 3.81 |
| (b) Konen et al. (2024) | 3.46 ± 1.44 | 2.75 ± 1.46 | 2.70 ± 1.36 | 2.93 |
| (c) Ours (\(m=5\)) | 4.17 ± 1.01 | 3.87 ± 1.18 | 3.64 ± 1.17 | 3.88 |
Key Findings¶
- Specificity vs. Factuality Trade-off: The experimental evidence underscores an inherent tension: incorporating rich domain-specific analogies and framing risks oversimplification, slightly lowering factual precision. The whole-text steering baseline of Konen et al. (2024) oversteers drastically (0.803 specificity but collapsing to 0.096 factuality). The proposed attribute-based steering maintains an effective compromise, achieving the highest HMean of 0.313 for Qwen 7B.
- Saturation of Attribute Counts: Varying \(m\) across 3, 5, and 10 exhibits negligible performance divergence, confirming that top-5 attributes capture the core stylistic and epistemic signature of a domain without introducing unnecessary noise.
- Model Scaling Ameliorates Trade-offs: Scaling to Qwen 32B boosts the harmonic mean to 0.342, retaining a strong factuality of 0.315 alongside 0.374 specificity, indicating that larger models synthesize domain framing with factual constraints more effectively.
- Divergence Between Steering Success and Subjective Helpfulness: While expert evaluators rated our approach substantially higher in steering success (4.17 vs. 3.12 for prompting), generic prompting remained slightly favored for plausibility and helpfulness on simple ELI5 questions. Tailored analogies proved most advantageous on intrinsically complex scientific topics where generic explanations fail to provide sufficient cognitive grounding.
Highlights & Insights¶
- Interpretable Decomposition of Latent Vectors: Unlike opaque user embeddings, breaking down audience representations into explicit, natural-language-grounded style and knowledge attributes enables modular, inspectable activation steering.
- Training-Free Inference-Time Control: The framework achieves state-of-the-art audience steering without requiring fine-tuning, parameter updates, or complex auxiliary probe classifiers.
- Cross-Model Alignment: Steering directions derived from attributes extracted by Llama or Ministral achieve 0.80–0.96 cosine similarity with those extracted by Qwen, confirming that underlying latent attributes are robust and model-agnostic.
Limitations & Future Work¶
- Risk of Group Stereotyping: Defining groups via community averages risks erasing intra-group heterogeneity and projecting rigid personas onto diverse individual learners.
- Static Steering Strengths: Steering factors \(\lambda\) and layer indices \(I\) are fixed globally, lacking the dynamic capacity to dial down steering on simple prompts where generic explanations suffice.
- Language and Domain Constraints: The study is confined to English and technical Stack Exchange sub-forums; generalizing to broader cultural backgrounds and everyday conversational contexts remains open.
Related Work & Insights¶
- vs Konen et al. (2024): Konen et al. compute steering vectors from uncurated whole-text differences, frequently inducing catastrophic oversteering and hallucinated code; our approach extracts discrete, verified attributes to anchor generation.
- vs Patel et al. (2023): Patel et al. introduced two-stage prompting solely for stylistic author modeling; this paper substantially broadens the formulation to six cognitive knowledge categories based on educational taxonomies.
- vs Persona Prompting: Standard prompting suffers from prompt sensitivity and context drift; internal activation steering directly intervenes on attention representations, generating structurally integrated analogies rather than superficial keyword insertions.
Rating¶
- Novelty: ⭐⭐⭐⭐☆ [Novel synthesis of Bloom's cognitive taxonomy, unsupervised attribute extraction, and contrastive activation steering for explanation customization]
- Experimental Thoroughness: ⭐⭐⭐⭐⭐ [Spans 11 target groups, multiple model families and scales, automated factuality/specificity metrics, and a rigorous 9-expert human evaluation]
- Writing Quality: ⭐⭐⭐⭐⭐ [Exemplary clarity, coherent empirical motivation, and honest discussion of trade-offs and negative results]
- Value: ⭐⭐⭐⭐☆ [Pioneering practical blueprint for fine-grained, training-free personalized generation and mechanistic controllable decoding]