Skip to content

Efficient and accurate steering of large language models via attention-guided feature learningEfficient and accurate steering of Large Language Models through attention-guided feature learning

arXiv· arXiv:2602.00333· Parmida Davarmanesh, Ashia Wilson, Adityanarayanan Radhakrishnan·Indexed by this site · 2026-10-12· Originally publishedAlignment

Quick read

Interpretability

Based on the paper PDF (AI-generated); refer to the original

On Llama-3.1-8b, attention-guided soft-label RFM achieves an average steering score of 94.8% over 512 concepts.

Questions
Concept steering is sensitive to token and layer selection; many concepts that appear unsteerable become steerable after changing the extraction method. The authors argue this affects the identification and manipulation of concept representations in LLMs.
Methods
Given prompts with and without a concept prefix, select embeddings by token attention to the prefix, and use that attention as soft labels to learn a concept vector. Then use permutation testing to select blocks with high enrichment, and additively perturb activations during inference.
Experiments and results
Llama-3.1-8b, RFM soft labels average 94.8% over 512 concepts, while fixed end_header_id hard labels are 49.3%. Qwen2.5-14b topophiles soft labels are 19.4%, lower than hard labels at 26.7%.
Limitations and future work
The authors state it remains unclear why concept representations emerge and why a few hundred prompts suffice for extraction; they suggest sequence models in other domains are worth studying. The reviewer is GPT-4o; the paper does not report agreement with humans or quantitative jailbreak success rates.
Experimental setupLlama-3.1-8b、Llama-3.3-70b et al. · 512-concept benchmark from [3] · steering score、concept enrichment score
Evaluated models
Llama-3.1-8bLlama-3.3-70bQwen2.5-32bQwen2.5-14b
Benchmarks
512-concept benchmark from [3]
Metrics
steering scoreconcept enrichment score
AI summaryThe paper proposes an attention-guided framework for more efficiently and accurately steering the internal activations of large language models. The framework automatically selects relevant token embeddings for extracting concept-related features, handles the heterogeneity of concept-related features across different activations, and identifies the layers most suitable for steering. On a steering benchmark containing 512 semantic concepts, it nearly doubles the number of successfully steered concepts compared with the previous best method, and achieves improvements across different model architectures and scales (up to 70 billion parameters). The authors also use the framework to analyze the distribution of concept-specific features across layers of large language models, calling it a direction for efficient, scalable fine-tuning algorithms for industrial-grade large language models.

The paper proposes an attention-guided framework for more efficiently and accurately steering the internal activations of large language models. The framework automatically selects relevant token embeddings for extracting concept-related features, handles the heterogeneity of concept-related features across different activations, and identifies the layers most suitable for steering. On a steering benchmark containing 512 semantic concepts, it nearly doubles the number of successfully steered concepts compared with the previous best method, and achieves improvements across different model architectures and scales (up to 70 billion parameters). The authors also use the framework to analyze the distribution of concept-specific features across layers of large language models, calling it a direction for efficient, scalable fine-tuning algorithms for industrial-grade large language models.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    Existing steering is sensitive to token and layer selection; after changing the extraction method, many concepts become steerable.

    Existing concept vector extraction and activation steering are sensitive to token embedding and layer selection; many seemingly unsteerable concepts become steerable after changing the extraction method.

    • Scenario: The authors state that concepts such as language, emotion, political views, and refusal of unsafe requests can be represented as linear directions in LLM activation space; additively perturbing these directions during inference can guide responses. The authors state that identifying and steering these representations could open avenues for safeguarding models and improving capabilities.
    • Existing shortcomings: The authors note that existing algorithms are brittle. Three points: manually fixing the token embedding used for learning (usually the last token); using hard labels without addressing heterogeneity of concept activity across embeddings; and layer selection by manual specification or grid search.
    • Authors' claim: After inserting a prefix that activates the concept, a token's attention to the prefix tokens can serve as a heuristic for tracking concept activity. The authors state that their support comes from steering improvements across concepts, model scales, and model families.
    • This paper proposes: An attention-guided framework that automatically selects the token with the highest attention to the prefix, uses that attention as soft labels, and uses permutation testing to determine which blocks to perturb. The authors also use it to examine the distribution of concept-related features across layers for the 512 concepts.
  2. What related research exists?

    Related work focuses on linear concept directions, steering applications, and manual selection of tokens and layers.

    The paper has no separate Related Work; relevant discussion is in the introduction and results sections.

    • Linear concept directions: Zou et al. (2023) representation engineering writes concepts as directions in activations. Beaglehole et al. (2025) do general steering and monitoring; this paper's 512-concept benchmark and evaluation pipeline come from that work. Arditi et al. (2024) discuss refusal being mediated by a single direction; the paper lists Marks and Tegmark (2024), Park et al. (2023), etc., as linear representation works without per-paper comparison.
    • Uses of steering: The authors list subtracting the refusal direction to make models not refuse requests, and mitigating hallucination, improving coding, manipulating style or persona. These are application examples; the paper does not compare effects per paper here. Relative to prompting, the authors state steering is more direct because it avoids designing special phrases for each query to elicit misaligned behavior.
    • Extraction algorithms and layer selection: Extraction methods include mean difference, PCA, as well as linear regression, logistic regression, and RFM. The authors state that Beaglehole et al. (2025) show supervised methods (e.g., RFM) outperform unsupervised ones (e.g., PCA). Wu et al. (2025) is cited for aggregating over all token embeddings; other works fix the last or second-to-last token. For layer selection, Zou et al. (2023) use blocks 8-32 of llama-2-7b, Beaglehole et al. (2025) use blocks 2-32, Arditi et al. (2024) and Zhang et al. (2024) grid-search over blocks. The authors argue these approaches do not dynamically select blocks based on concept heterogeneity across blocks.
    • Baselines and benchmarks: Baselines are the five extraction methods above, and fixed tokens (especially end_header_id used by Beaglehole et al.) versus attention-guided token selection. The benchmark is Beaglehole et al.'s 512 concepts, with five categories: fears, topophiles, personas, experts, moods. There is also a control selecting tokens by embedding difference norm (Fig. S4).

    The authors position this paper as using attention to the prefix to simultaneously address token selection, label heterogeneity, and layer selection, and state that it improves the number of steerable concepts relative to prior state-of-the-art.

  3. How does the paper address this problem?

    Use attention to the prefix to select tokens, use it as soft labels, and use permutation testing to choose blocks to perturb.

    Given a set of prompts Pc with a fixed prefix and P0 without the prefix, the attention-guided framework proceeds in three steps: select tokens by attention to the prefix, learn a concept vector using that attention as soft labels, then select blocks via permutation testing and additively perturb activations.

    Data and additive perturbation

    • Data: Follows [3]. n=400 general statements, split equally between Pc and P0. Pc includes a fixed prefix to activate the concept; P0 does not. The paper uses concepts like refusal and fear to illustrate the prefix's role.
    • Embeddings: Each transformer block outputs hidden states H^(ℓ), from which one row is taken for feature learning. Prior work often fixes the last or second-to-last row, and uses the same selection across blocks.
    • Perturbation: After learning each block's vector v^(ℓ), during inference, add ε times v^(ℓ) to each token position in that block. Positive ε activates the concept; negative ε suppresses it. Block ranges and coefficients for each experiment are in Fig. S1.

    Attention-guided token selection

    The candidate set T consists of the four tokens common at the end of each prompt: start_header_id, assistant, end_header_id, newline. The authors note that even these four tokens yield 432 combinations on llama-3.1-8b, making exhaustive evaluation infeasible.

    On block ℓ, select the token with the highest total attention to the prefix: tℓ=argmaxt∈ T(maxp∈ Pc∑j=1PA(ℓ)t,j(Xp)). Here A^(ℓ) is the attention matrix of that block, and prefix token indices are 1 to P. This formula first sums over each prompt in Pc, then takes the maximum, then takes argmax over T.

    The authors also set a control that selects tokens by the norm of the embedding difference between Pc and P0, and hypothesize that attention more directly corresponds to concept activity, while embedding differences may arise from non-concept factors like positional encodings. Fig. S3 also compares averaging over statements instead of taking the maximum.

    Soft labels and feature learning

    Existing supervised methods use hard labels: 1 for Pc, 0 for P0. The authors argue that the prefix may not enrich concept features in every prompt's embedding.

    Soft labels are defined per block: yp(ℓ)=∑j=1PA(ℓ)tℓ,j(Xp) (p∈ Pc; 0 otherwise). That is, for Pc, it equals the attention of the selected token to the prefix; for P0, it is 0.

    • Available algorithms: Appendix A states that mean difference and PCA do not directly use soft labels; linear regression, logistic regression, and RFM can. RFM uses kernel ridge regression as the base learner; the concept vector is the top eigenvector of the final AGOP matrix M_T, with direction determined by Pearson correlation with labels. Linear and logistic regression use normalized coefficients, also oriented by Pearson correlation.
    • Regularization: Linear regression's C is grid-searched over 10^-4, 10^-3, 10^-2, 10^-1, 0, 1, 10; logistic regression has no bias term, with C searched over 1000, 10, 1, 0.1. RFM uses a Laplace kernel; the appendix does not provide the bandwidth and regularization values used in this paper.

    Concept enrichment score and determination

    • Permutation test: For each block and each attention head, test whether the selected token's attention to the prefix is significantly high. 500 permutations, threshold 0.01. When permuting, exclude the first token (which the authors call an attention sink) and the self-attention position. The concept enrichment score is the average number of times the token is significantly high across heads and prompts. The authors state that this score does not fully track the magnitude of attention to the prefix (Fig. S17).
    • Block selection: Select the top or bottom k blocks by enrichment score, with k sweeping over all possible values. This experiment follows [3] in not perturbing the first block. Block ranges listed in Fig. S1: Llama-3.1-8b [2-32], both 70B Llama [2-80], Qwen2.5-14b [2-48], Qwen2.5-32b [2-64].
    • Determination: Follows [3]. For each concept category, 5 questions; GPT-4o-2024-11-20 judges whether the answer addresses the concept (0 or 1). Each question takes the highest score across coefficients; concept score is the average of five questions, category score is the average of concepts within the category. Possible concept scores: 0, 0.2, 0.4, 0.6, 0.8, 1. Evaluation questions and judge prompts are in [3]; this paper does not reproduce them.
  4. What experiments did the paper conduct?

    On Llama-3.1-8b, the 512-concept average steering score for soft-label RFM is 94.8% (Fig. 3B).

    Experimental setup

    • Models: Manipulated models are Llama-3.1-8b, Llama-3.1-70b, Llama-3.3-70b, Qwen2.5-14b, Qwen2.5-32b. Reviewer is GPT-4o-2024-11-20.
    • Data: 512 concepts from [3], five classes, the authors state approximately 100 per class. Training statements n=400, Pc and P0 equally split; Appendix E additionally uses n=1200.
    • Methods: RFM, linear regression, logistic regression, mean difference, PCA. The main comparison is hard labels vs. soft labels after attention-guided token selection, with RFM as the primary extractor.
    • Metrics: Steering score is the average of five 0/1 judgments, each taking the highest score across coefficients. The authors also call the class average the proportion of successful manipulation. Concept enrichment scores are described in the methods section.
    • Coefficients and blocks: See Fig. S1. Hard-label coefficients match [3]. Fig. S1 labels both rows for Qwen2.5-32b as soft, with coefficients 15, 16, 17, 18, 19, 20, 21; the paper does not separately list hard-label coefficients for that model.
    • Not reported: The paper does not report the number of repetitions, nor agreement between the reviewer and human judgments. Block selection scans use 25 random concepts, 5 per class.

    Main results

    After attention-guided token selection, the average steering scores for hard and soft labels are as follows.

    Swipe horizontally to read the table

    ModelHard labelsSoft labelsSource
    Llama-3.1-8b78.2%94.8%Fig. 3B
    Llama-3.3-70b78.1%84.0%Fig. 3B
    Qwen2.5-14b42.1%60.2%Fig. S10
    Qwen2.5-32b44.2%65.4%Fig. S10

    Llama-3.1-70b does not appear in these two figures; its numbers appear only in the data-size ablation (Fig. S7).

    • The authors state soft labels outperform hard labels, and that RFM with soft labels successfully manipulated over 90% of the 512 concepts. The abstract writes about 95%, and states that compared to previous methods with less than 50% success rates, the number of successfully manipulated concepts nearly doubled. The direct correspondence to these two sentences is the Llama-3.1-8b row in the table, and the average 49.3% for fixed end_header_id with RFM hard labels in Fig. 2B, not the 70B or the two Qwen rows.
    • Not every class improves. In Fig. 3B, Llama-3.1-8b moods goes from 99.0% to 96.9%, with the other four classes at 91.5%, 95.6%, 93.6%, 96.5% under soft labels; Llama-3.3-70b experts goes from 67.5% to 68.4%. In Fig. S10, Qwen2.5-14b topophiles goes from 26.7% to 19.4%, and moods from 89.2% to 88.0%.
    • The authors state that responses under soft labels better match the target concept, with examples in Fig. 3C and Fig. S11–S14.

    Token selection

    • Fig. 2B (Llama-3.1-8b, RFM, hard labels): Averages for fixed start_header_id, assistant, end_header_id, newline are 61.3%, 26.6%, 49.3%, 39.9%, and attention-guided is 78.2%. On fears, start_header_id is 74.5% and end_header_id is 10.3%; the main text writes the latter as about 9%. On moods, the two are 72.5% and 99.0%.
    • The authors state that the selection in equation (3) roughly corresponds to the higher-scoring tokens in Fig. 2B: fears most often selects start_header_id, and moods most often selects end_header_id and newline (Fig. 2C). The class percentages in Fig. 2C do not align with the text; numbers are not reproduced here.
    • Fig. S3: Across five methods, taking the maximum attention-guided over statements is higher than fixed end_header_id. RFM is 78.2% vs. 49.3%, linear regression 50.8% vs. 40.2%, logistic regression 69.7% vs. 44.6%, mean difference 74.4% vs. 42.1%, PCA 73.8% vs. 40.9%. Taking the average over statements is lower than taking the maximum, with RFM at 73.1%.

    Layer selection and refusal direction examples

    • The authors state that selecting the highest-scoring block by enrichment score yields more successfully manipulated concepts than selecting the lowest-scoring block (Fig. 4A, 25 concepts). This experiment omits the first block. The authors state that Llama-3.1-8b performs best using all remaining blocks; Llama-3.3-70b performs best with about 70 blocks, and performance is comparable with about half the blocks. The text does not give endpoint scores for the curves. Class-wise curves are in Fig. S18, also without reproducible endpoint numbers.
    • The authors state that enrichment for Llama-3.1-8b is high in blocks 5 to 20, with the first and last blocks near 0; experts and personas are more heterogeneous. Larger models have high values only in a few blocks: Llama toward the front, Qwen toward the back. Llama's topophile and persona show bimodal patterns in blocks 10–40 and 65–75 (Fig. 4B, Fig. S10C). The authors state that the middle-block pattern in the 8B model is consistent with several works claiming middle blocks are better for steering in small models.
    • Appendix D uses prefixes that request refusal to extract refusal concept vectors, with Fig. S15 and S16 giving qualitative examples after subtracting that vector. The authors state this is behavior that prompting does not easily elicit but steering can. The paper does not report jailbreak success rates. Fig. S16's title writes llama-3.3-70b, while the caption writes llama-3.1-8b.

    Other ablations and analyses

    • Fig. S4, Llama-3.1-8b, hard labels: attention-guided average 0.782, token selection by embedding difference norm is 0.627.
    • Fig. S8 does not specify the model. The per-class numbers for RFM match those of Llama-3.1-8b in Fig. 3B. Linear regression soft-label average is 83.5%, hard-label 50.8%. The authors state soft labels also benefit linear regression, and RFM is overall higher.
    • Fig. S9 does not specify the model. Hard labels under standard coefficients give five classes 0.73, 0.78, 0.63, 0.79, 0.99; with extended coefficients 0.76, 0.73, 0.67, 0.77, 0.99; soft labels under extended coefficients give 0.92, 0.96, 0.94, 0.97, 0.97.
    • Fig. S7 compares n=400 and n=1200, and applies input ℓ2 normalization and soft-label min-max normalization. Llama-3.3-70b averages: hard labels 74.7% to 72.1%, soft labels 83.0% to 85.9%. Llama-3.1-70b averages: hard labels 83.0% to 83.4%, soft labels 72.5% to 84.3%. The authors state that tripling the data makes hard labels worse and soft labels better; Llama-3.1-70b's hard-label average does not decrease. In that figure, at n=400, Llama-3.1-70b soft labels are lower than hard labels.
    • Fig. S17: The authors state that enrichment scores do not fully track attention to the prefix. The text does not give numerical endpoints for that figure.
  5. What are some points that can be further explored?

    The authors state that why concept representations emerge and why small amounts of data suffice for extraction remain unclear.

    Limitations and future directions noted by the authors

    • Representation source (Discussion): The authors state it remains unclear why training produces such concept representations and why relatively few data (hundreds of prompts) suffice for extraction.
    • Other sequence models (Discussion): The authors suggest it is worth studying which concepts can be discovered and accurately steered in sequence models from other domains, citing protein language models and DNA language models as examples.

    Experimental coverage

    • Steered models: Llama-3.1-8b, Llama-3.1-70b, Llama-3.3-70b, Qwen2.5-14b, Qwen2.5-32b; judge: GPT-4o-2024-11-20 (Appendix B, Fig. S1, Fig. S7, Fig. S10).
    • Main evaluation uses 512 concepts from [3], five categories; 5 questions per concept, each question takes the highest score across coefficients in Fig. S1, then averages (Appendix B).
    • Extraction methods compared: RFM, linear regression, logistic regression, mean difference, and PCA (Fig. S3, Appendix A). The main comparison with soft labels is reported on Llama-3.1-8b, Llama-3.3-70b, and the two Qwen models (Fig. 3B, Fig. S10).
    • Block selection by enrichment score uses 25 random concepts (Fig. 4A). Data size ablation: n=400 and n=1200, models are two 70B Llama (Fig. S7).
    • The paper does not report the number of repetitions for steering scores, nor the agreement between GPT-4o judgments and human judgments. The refusal direction section provides qualitative examples (Fig. S15, S16); the paper does not report quantitative success rates.
  6. Summarize the main content of the paper

    On Llama-3.1-8b, the average score of soft-label RFM over 512 concepts is 94.8%, with Qwen having class-like exceptions.

    This work extracts concept vectors from attention to prefixes and applies additive perturbations during inference to manipulate the concepts reflected in LLM responses.

    • Problem: The authors argue that existing steering is fragile with respect to token and layer selection. Hundreds of concepts can appear unsteerable, but become steerable after changing embeddings and blocks.
    • Method: On prompts with and without concept prefixes, select tokens with the highest attention to the prefix, use that attention instead of hard labels to train models such as RFM, then use a concept enrichment score with 500 permutations and a threshold of 0.01 to select blocks to perturb.
    • Main results: On Llama-3.1-8b, RFM, and 512 concepts, the average steering score with fixed end_header_id is 49.3% (Fig. 2B), with attention-guided hard labels is 78.2%, and with soft labels is 94.8% (Fig. 3B). Llama-3.3-70b with soft labels averages 84.0%, Qwen2.5-32b 65.4%, and Qwen2.5-14b 60.2%. Qwen2.5-14b topophiles with soft labels is 19.4%, lower than the hard-label 26.7%.
    • Layer distribution: The authors state that concept enrichment in the 8B model is concentrated in middle blocks; the 70B Llama and Qwen models have high values only in a few blocks, and the high positions vary by model family.
    • Authors' conclusion: The authors state that attention to prefixes can characterize the heterogeneity of concept activity and argue this provides a path for understanding knowledge representation in LLMs and developing domain-specific fine-tuning methods. They also state that why such representations emerge during training and why a few hundred prompts suffice for extraction remains unclear.
Read originalarxiv.org