Skip to content

HyperSteer: Hypernetwork-based activation steering at scaleHyperSteer: Activation Steering at Scale with Hypernetworks

arXiv· arXiv:2506.03292· Jiuding Sun, Sidharth Baskaran, Zhengxuan Wu, Michael Sklar, Christopher Potts, Atticus GeigerStanford University; Pr(Ai)2 R Group; Georgia Institute of Technology; Confirm LabsIndexed by this site · 2026-10-15· Originally publishedAlignment

Quick read

Defenses

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

HyperSteer produces steering vectors; on Gemma-2-9b unseen prompts, the Cross Attention steering score is 0.934.

Questions
How to reliably control LM outputs. Prompt engineering encounters jailbreaks, forgotten instructions, and insufficient alignment, while fine-tuning requires modifying or injecting parameters. Unsupervised dictionary learning struggles to create vectors for specified tasks, and supervised steering requires collecting data or training per task.
Methods
The base LM is frozen; the hypernetwork outputs a steering vector according to the steering prompt, added to the hidden state. Variants are no-context, concatenating the base prompt, and cross-attention reading the base LM residual stream. Trained end-to-end with a language modeling loss.
Experiments and results
On Concept500, Cross Attention's held-out is higher than ReFT-r1 held-in, lower than Prompting; held-in is higher than Prompting. The authors state that as data increases, performance without prompt does not rise, and per-sample training computation decreases.
Limitations and future work
The authors point out that the concept data scope and quantity are limited, intervention is only on the residual stream and all tokens, hypernetwork training compute is greater than ReFT-r1, and white-box access is required. Evaluations include Gemma-2-2B and 9B, with gpt-4o-mini as judge. The paper does not report judge-human agreement.
Experimental setupGemma-2-2b、Gemma-2-9b · AxBench、Concept500-HI et al. · steering performance、base prompt following et al.
Evaluated models
Gemma-2-2bGemma-2-9b
Benchmarks
AxBenchConcept500-HIConcept500-HOConcept10AlpacaEvalDolly-15KGSM8KGemmaScope
Metrics
steering performancebase prompt followingsteering prompt followingtext fluency
AI summaryThe researchers propose HyperSteer, a set of hypernetwork-based architectures trained end-to-end to generate steering vectors from natural language steering prompts and the internal states of the steered model. The paper states that scaling HyperSteer with thousands of steering prompts outperforms current state-of-the-art activation steering methods, including on steering prompts unseen during training, and matches the effectiveness of prompting-based steering. The work addresses the problem that unsupervised dictionary learning (such as sparse autoencoders) is scalable but offers no guarantee for individual steering vectors, while supervised methods are effective but require additional data collection and training for each new steering vector; instead, it uses a hypernetwork to generate steering vectors uniformly.

The researchers propose HyperSteer, a set of hypernetwork-based architectures trained end-to-end to generate steering vectors from natural language steering prompts and the internal states of the steered model. The paper states that scaling HyperSteer with thousands of steering prompts outperforms current state-of-the-art activation steering methods, including on steering prompts unseen during training, and matches the effectiveness of prompting-based steering. The work addresses the problem that unsupervised dictionary learning (such as sparse autoencoders) is scalable but offers no guarantee for individual steering vectors, while supervised methods are effective but require additional data collection and training for each new steering vector; instead, it uses a hypernetwork to generate steering vectors uniformly.

Related events and news

0 events · 1 news mentions

News that mentions this paper

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    The core problem is: without changing parameters, generate steering vectors for any natural language steering prompt.

    How to generate steering vectors for a base prompt from a natural language steering prompt, without changing model parameters, to control LM output.

    • Scenario: the authors ask how to reliably control LM output. The usual approach for instruction-tuned models is prompt engineering; the authors consider it vulnerable to user jailbreaks, forgotten instructions, and insufficient robustness when alignment is lacking. Parameter-efficient fine-tuning modifies or injects new parameters.
    • Existing gap: activation steering (Giulianelli et al., 2018) does not change or add parameters. Unsupervised dictionary learning (e.g., SAE) can produce many unlabeled vectors, but the authors consider it lacking per-vector efficacy guarantees and control over task coverage, and unable to construct vectors for specified tasks. Supervised methods can specify tasks, but each additional vector requires data collection and/or training.
    • This paper's approach: proposes HyperSteer, a family of end-to-end trained hypernetworks. It conditions on the steering prompt, optionally using the base prompt and base LM internal activations, and generates steering vectors added to hidden states. Training and evaluation use AxBench's steering prompts.
    • Authors' claims: the authors state that after scaling to thousands of steering prompts, it exceeds previous activation steering methods even on steering prompts unseen in training, and is comparable to steering-via-prompting.
  2. What related research exists?

    The paper discusses activation steering, SAE, and hypernetworks, and uses AxBench's fine-tuning, steering, and prompting as baselines.

    The paper has no separate Related Work section; relevant discussion is in the introduction, preliminaries, and appendix.

    Activation steering

    • Giulianelli et al. (2018): modifying internal activations to control generation. The authors place it between prompting and fine-tuning: it does not change parameters and can influence the model in ways standard prompting cannot.
    • Supervised construction: vectors can be trained directly (Wu et al., 2024a, 2025) or derived from labeled data (Li et al., 2023a; Marks and Tegmark, 2023; Turner et al., 2023; Rimsky et al., 2024). The authors consider these methods effective and task-specifiable, but each additional vector requires data collection and/or training.

    Unsupervised dictionary learning

    • SAE-type methods: Hernandez et al. (2022), Cunningham et al. (2023), Bricken et al. (2023), Gao et al. (2024), Marks et al. (2025) produce many unlabeled steering vectors. The authors consider them scalable but lacking per-vector efficacy guarantees and coverage control, and unable to produce vectors for specified tasks.
    • GemmaScope (Lieberum et al., 2024): the training steering prompts come from its SAE feature labels. The paper does not develop it as a comparison method.

    Hypernetworks

    • Ha et al. (2016): mapping tasks to parameters. Here the task is a pairing of input and steering prompt, and the output is a steering vector.
    • Phang et al. (2023) HyperTuning: the authors paraphrase that hypernetworks can zero-shot adapt LMs, matching or exceeding parameter-efficient fine-tuning.
    • Sun et al. (2025) HyperDAS: the authors state the cross-attention variant is their simplification. The paper does not report score comparisons between the two.

    Baselines and benchmarks

    • Baseline methods: AxBench's prompting, fine-tuning (LoReFT, SFT, LoRA), and activation steering (ReFT-r1, DiffMean, SAE, SAE-A). The authors state ReFT-r1 is the previous state-of-the-art supervised activation steering method on AxBench, and that steering-via-prompting outperforms all activation steering methods on AxBench. The prompting baseline rewrites the steering prompt with gpt-4o-mini and prepends it to the base prompt.
    • Benchmark/datasets: AxBench; evaluation is split into Concept500-HI and Concept500-HO, with Concept10 for ablations. Evaluation base prompts come from AlpacaEval; training base prompts come from Dolly-15K and GSM8K.

    The authors position HyperSteer as simultaneously achieving the scalability of unsupervised dictionary learning and the specificity of supervised activation steering: one hypernetwork produces vectors from natural language steering prompts and the steered LM's internal state, rather than training a separate vector per task.

  3. How does the paper address this problem?

    Freeze the base LM, and three hypernetwork variants map steering prompts to residual stream steering vectors.

    HyperSteer freezes the instruction-tuned base LM and trains a separate transformer hypernetwork: it reads the steering prompt, outputs a steering vector, and adds it to the base LM's hidden state.

    Problem setup

    • The base LM is denoted B, running on base prompt x. The goal is to make the output reflect the behavior requested by steering prompt s, by adding a vector to hidden vector h.
    • The steered output is ŷsteer=B(x∣ h← h+Δxs), i.e., continuing generation after adding the vector to that hidden state.
    • The hypernetwork is written H(x,s)=Δxs∈ℝd. The no-context variant does not use x; the vector depends only on s.
    • Table 1's intervention is at Layer 20 of both Gemma-2 models. The authors follow prior convention and apply the intervention at all token positions.

    Three variants

    • No Context: does not access the base prompt or the base LM. The last layer's last token residual stream goes through an MLP to produce the vector.
    • In Context Learning: concatenates the base prompt after the steering prompt, then feeds it to the same hypernetwork.
    • Cross Attention: the authors state this is the best-performing variant. The text says: each layer uses the hypernetwork residual stream as query and attention output, and the base LM's residual stream at the steering layer as key and value. The authors state this is a simplification of HyperDAS. Self-attention is initialized from pretrained Gemma-2, cross-attention uses PyTorch default initialization. Appendix A.3's notation is not fully consistent with this text.
    • The 2B cross-attention version has 22 modified decoder blocks, parameter count about 0.998 times Gemma-2-2B; each such block is about 1.18 times a standard block. In Table 3, to align parameter counts, cross-attention has fewer layers: 2B 22 vs 26, 9B 34 vs 42.

    Training

    • The loss is cross-entropy between the steered output and AxBench's expected output y_label. Labels are generated by gpt-4o-mini. The base LM is frozen; the hypernetwork is a copy of the base model with later layers removed, updated during training.
    • Input-conditioned variants do not add a concept detection loss and do not normalize the steering vector. No Context has an additional reconstruction variant fitting AxBench's ReFT vectors, with a loss containing a cosine term and squared L2; the authors state the two terms are roughly comparable, so the main method uses the language modeling loss.
    • Training data from AxBench: 16,000 steering prompts from GemmaScope's SAE feature labels. Base prompt to steering prompt ratio, training 72:1, evaluation 10:1. Negative examples removed because only steering, not concept detection, is done.
    • Main experiments 3 epochs, single NVIDIA A100-80GB. 2B learning rate 8e-5: cross attention batch size 12, 8 heads, other variants batch size 6. 9B learning rate 5e-6: cross attention batch size 4, other variants 6 (Table 3). Training set size from 10 to all about 16,000.

    How scores are computed

    • Steering is applied to base prompts from AlpacaEval, unseen in training. gpt-4o-mini scores three dimensions {0, 1, 2}: whether the base prompt is followed, whether the steering prompt is followed, and whether the text is fluent.
    • The harmonic mean of the three is called steering performance. The paper does not give a score threshold for "success".
  4. What experiments did the paper conduct?

    On unseen prompts, Cross Attention is higher than ReFT-r1 held-in and lower than Prompting for both models.

    Experimental setup

    • Models tested: Gemma-2 2B and 9B instruction-tuned variants, parameters frozen. The hypernetwork is a copy of the same family with later layers removed.
    • Data: AxBench. 16,000 training steering prompts from GemmaScope SAE feature labels; scale experiments from 10 to about 16,000. Training base prompts from Dolly-15K and GSM8K, genres code, text, math. Ratio 72:1 for training, 10:1 for evaluation. Negative examples omitted.
    • Splits: Concept500-HI is 500 seen steering prompts with unseen base prompts; Concept500-HO is 500 unseen steering prompts. Concept10 for ablations. Evaluation base prompts from AlpacaEval.
    • Baselines: prompting, LoReFT, SFT, LoRA, ReFT-r1, DiffMean, SAE, SAE-A. Prompting rewrites the steering prompt with gpt-4o-mini and prepends it. The authors state that on held-out, only prompting besides HyperSteer can be evaluated.
    • Metrics: gpt-4o-mini scores {0, 1, 2} on following the base prompt, following the steering prompt, and fluency; the harmonic mean is steering performance. The paper does not report the number of main experiment repetitions, nor reviewer and human agreement.
    • Implementation: Table 1's intervention is at Layer 20 on all tokens for both models. Main experiments 3 epochs, single A100-80GB. Layers, batch, learning rate in Table 3.

    Main results

    Per Table 1, intervention at Layer 20, cells are steering performance. "–" in the table is written as not reported. 2b/9b are Gemma-2-2b/9b, HO/HI are Concept500-HO/HI.

    Swipe horizontally to read the table

    Method2b HO2b HI9b HO9b HI
    Prompting0.7620.7311.0911.075
    LoReFTnot reported0.722not reported0.777
    ReFT-r1not reported0.509not reported0.630
    SAE-Anot reported0.132not reported0.186
    No Context0.3730.5120.6330.751
    In Context Learning0.4800.5470.7600.842
    Cross Attention0.6080.7420.9341.091
    • Omitted rows: SFT, LoRA, DiffMean, SAE. In Table 1's held-in, SFT's 2b is 0.714, 9b not reported; LoRA is 0.641 and 0.602; DiffMean is 0.178 and 0.322; SAE is 0.151 and 0.191. SAE-A is the lowest held-in row in the table.
    • Comparison with the authors' summary: the authors state cross attention substantially outperforms the other two variants on held-out and approaches prompting on held-in, and all three variants' held-in are higher than ReFT-r1. In this table's held-in, Cross Attention is higher than Prompting and LoReFT; on held-out it is lower than Prompting.
    • Cross-setting comparison: the authors state that cross attention on unseen steering prompts outperforms supervised activation steering baselines trained and evaluated on the same steering prompts. On 2b, No Context and In Context Learning held-out are not higher than ReFT-r1 held-in. The abstract says on par, the introduction says match, and the conclusion says narrowing the gap with prompting; in the table, the lower-than-Prompting values are held-out.

    Data scale

    • Figure 2: x-axis is number of training steering prompts, log scale, labeled 9, 500, 1,862, 5,458, 15,571; y-axis labeled Performance Score. Caption states performance increases approximately linearly as data increases exponentially. The introduction states performance grows logarithmically with the number of training prompts. The y-axis readings of intermediate points are not visible in the text; not transcribed.
    • Authors state: cross-attention is higher than other architectures at every data scale; after training on all about 16k prompts, unseen steering prompt performance exceeds ReFT-r1 trained and evaluated on the same prompts.
    • Comparable scope: ReFT-r1's held-out is not reported in Table 1. The above "exceeds" comparison is between HyperSteer's unseen prompts and ReFT-r1's held-in.

    Computational efficiency

    • Figure 3: y-axis is TFLOPS Per Steering Prompt, x-axis labeled 10, 100, 1k, 10k. Visible in the figure are 2.4X and 0.07X. The authors state that as data increases, cross attention's computation per prompt needed to reach similar held-in evaluation loss decreases, while ReFT-r1 is approximately constant.
    • Appendix A.3.2: single ReFT-r1 training computation is 666.27 ± 20.74 TFLOPs, averaged over 5 random seeds. Fitting gives a=87.7035, b=1521.1495, c=−0.0034, R²=0.9976. The authors state the asymptotic value a is less than that ReFT constant. The stopping criterion is the average best evaluation loss on held-in Concept10.
    • Wording inconsistency: the conclusion writes reaching the same held-out loss with fewer training updates; Figure 3 and the appendix write held-in. The paper does not give a TFLOPS table per scale.

    Qualitative analysis

    • Dimensionality reduction plots: 2500 vectors generated on held-out, 250 per concept on Concept10. Figure 4 is t-SNE, Figure 5 is 2-component PCA, legend is Table 4's 10 concepts. The text does not describe whether clusters are separated. The authors state preliminary experiments looking for geometric structure by shared concept gave negative results, likely because evaluation prompt words have high semantic similarity.
    • Similarity: Figure 6 is pairwise cosine similarity averaged by steering prompt. The authors state cross-attention has high alignment within the same steering prompt, off-diagonal still affected by shared templates and language structure; no-context's off-diagonal is weaker. 1.00 is visible on the diagonal of Figure 6b. The authors state additional conditioning weakens inter-concept similarity without reducing steering performance.
    • Attention and labels: the authors state query tokens tend to attend with high attention mass to the same or few key/value tokens, consistent across layers 0–19, 8 heads per module; Figures 9–12 are layers 0, 5, 10, 19, specific numeric values not visible in text. Figure 7 perplexity truncated at 200, the authors state gpt-4o-mini labels are right-skewed; Figure 8 x-axis to 22.5, the authors state Gemma-2-2B output range is much smaller. In preliminary experiments training on both label types, the authors state gpt-4o-mini labels still give better steering performance; the paper does not give scores for that experiment. Appendix Figures 13–22 captions distinguish success and failure of steering and instruction following, temperature 1.0, multinomial sampling.

    Other ablations and analyses

    • Initialization (Table 2, Gemma-2-2B, Concept10, 1 epoch): random initialization held-in/held-out 0.601/0.582, pretrained initialization 0.733/0.623. The authors state improvement +0.112; this number differs from the difference between the two cells, the table numbers take precedence.
    • Depth: N=2/4/8/20 held-in 0.707/0.713/0.721/0.733, held-out 0.549/0.597/0.610/0.623. Learning rate adjusted by 8e-5 times the square root of 20/n. The authors state the effect on unseen steering prompts is +0.07, another comparison +0.03; both places in that sentence write unseen.
    • No Context objective: reconstruction loss 0.511/0.375, language modeling loss 0.517/0.340. The authors state the two are comparable. On held-out language modeling is lower, on held-in reconstruction is slightly lower.
  5. What are some points that can be further explored?

    The authors point out limitations regarding data, intervention sites, computation, model scale, and white-box access.

    Limitations and future directions noted by the authors

    • Data: The scope and quantity of concept data are limited. The authors believe that more complex and difficult concepts are likely to improve performance and make evaluations more robust. Concept quality is limited by GemmaScope feature labels; collecting data from humans or other high-quality sources is a viable alternative, which the authors list as a future priority (§7 Data).
    • Intervention location: Experiments only intervene on the residual stream, covering all tokens. The authors believe there may be more effective sites within decoder blocks and attention computation; more targeted interventions may reduce off-target effects and improve steering scores (§7 Steering Sites).
    • Compute: Relative to supervised dictionary learning, training the hypernetwork has large compute requirements; the authors state that trainable parameters exceed ReFT-r1 (§7 Compute).
    • Model scale: The authors state that due to compute constraints they only experimented with the Gemma-2-2B architecture, whose instruction following and in-context learning are weaker than open-source models with more parameters; training at multiple scales would help confirm steering performance relative to in-context learning in larger models (§7 Model Scale). Table 1 additionally reports Gemma-2-9b.
    • White-box: Using steering vectors requires white-box access to internals, which prompting does not have, so it relies on sufficiently strong open-source models (§7 Open Source Models).
    • Appendix directions: Test the architecture ceiling with more concept data of varying complexity; due to compute constraints and focus on activation steering, other parameters such as generative ReFT or LoRA were not explored; more efficient architectures might close the gap with dictionary learning baselines under the compute the authors describe (Appendix A.1).

    Experimental coverage

    • The base LMs for main results are Gemma-2-2B and Gemma-2-9B instruction-tuned, with intervention layer at Layer 20 in Table 1. Table 2 uses only Gemma-2-2B and trains for only 1 epoch.
    • Evaluation sets are Concept500-HI and Concept500-HO, each with 500 steering prompts; ablation is Concept10. Training steering prompts number at most about 16,000, from GemmaScope SAE feature labels. Training base prompts come from Dolly-15K and GSM8K, and evaluation base prompts from AlpacaEval.
    • Baselines in Table 1 are prompting, LoReFT, SFT, LoRA, ReFT-r1, DiffMean, SAE, SAE-A. SFT is a dash in the Gemma-2-9b column. The held-out column has numbers only for prompting and the three HyperSteer variants.
    • The judge is gpt-4o-mini, with three dimensions taken from {0, 1, 2}. The paper does not report judge-human agreement, nor the number of repetitions of the main experiments. The ReFT compute constants in Appendix A.3.2 are averaged over 5 random seeds.
    • The compute curve compares cross attention with ReFT-r1, stopping at the average best evaluation loss on Concept10. Qualitative analysis uses 2,500 held-out generated vectors. Appendix examples use sampling temperature 1.0 with multinomial sampling.
  6. Summarize the main content of the paper

    Cross Attention without prompt is higher than ReFT-r1's held-in, lower than Prompting.

    HyperSteer is a family of hypernetworks that generate activation steering vectors from natural language steering prompts without modifying base LM parameters.

    • Problem: Controlling instruction-tuned LM generation on base prompts. The authors believe prompting encounters jailbreaks, forgotten instructions, and insufficient alignment, while fine-tuning requires modifying parameters. Unsupervised vectors struggle to specify tasks, and supervised vectors require per-task training.
    • Method: Freeze Gemma-2-2B and Gemma-2-9B. Variants can ignore the base prompt, concatenate the base prompt into the context, or use cross-attention to read the residual stream at the steering layer. Vectors are added back to hidden states, with cross-entropy on AxBench labels. Intervention is at Layer 20, all tokens.
    • Table 1: On Gemma-2-2b, Cross Attention Concept500-HO/HI is 0.608/0.742, Prompting is 0.762/0.731, ReFT-r1 HI is 0.509. On Gemma-2-9b, Cross Attention is 0.934/1.091, Prompting is 1.091/1.075, ReFT-r1 HI is 0.630. On held-in, all three variants are higher than ReFT-r1 in the same table; on 2b, the other two variants' held-out is lower than that ReFT-r1 held-in.
    • Scale and compute: The authors state that performance rises logarithmically with the number of training steering prompts. In Figure 2, on all about 16k prompts, no unseen prompt outperforms ReFT-r1 trained and evaluated on the same prompt. The authors state that as data increases, per-prompt training compute to reach similar held-in loss decreases; the conclusion uses the term held-out loss.
    • Author conclusions: Both held-in and held-out support the method's scalability. Without modifying parameters, it narrows the gap with fine-tuning and prompting. The abstract states parity with steering-via-prompting; Table 1 held-out is still below Prompting, while on held-in Cross Attention is higher.
Read originalarxiv.org