Skip to content

CAM-Steer: A Multi-Category Adaptive Safety Steering Framework for Large Language ModelsHow to Tame a Multi-Headed Hydra? Adaptive Multi-Category Safety Steering for Large Language Models

arXiv: Interpretability· arXiv:2609.34514· Chenxi Wang, Ruiyang Huang, Li Huang, Yifan Wu·Indexed by this site · 2026-10-01· Originally publishedDefenses

Quick read

Defenses

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

CAM-Steer combines safety directions using category risk scores and performs norm-preserving spherical rotation, achieving an average DSR of 92.71% on seven BeaverTails categories on Llama-3.1-8B-Instruct.

Threat modelInference-time defense: no parameter updates, intervenes on the hidden state of the last prompt token of the selected layer. The victim system is an open-source LLM; inputs are prompts that may trigger multiple predefined harm categories simultaneously. The paper does not specify attacker knowledge or whether prompts can be adaptively rewritten as white-box/black-box. Success is measured by defense success rate judged by GPT-4.1-mini.

Questions
A harmful prompt often involves multiple harm categories simultaneously; intervening with activation steering toward only one safety direction, or combining multiple directions with fixed weights, leaves other categories' harmful content and disrupts generation coherence.
Methods
CAM-Steer compares the current hidden state with safe/unsafe prototypes for each category at inference time, obtains category risk scores, combines safety directions in the tangent space accordingly, and performs a norm-preserving spherical rotation with a risk-gated angle.
Experiments and results
On three 8–9B open-source backbones and seven BeaverTails categories, the authors report that its average DSR is higher than the evaluated baselines; under multi-category co-occurrence, Qwen3-8B Overall DSR is 88.85%. Utility is largely maintained, with a median relative change in end-to-end latency of −0.33% under the 512/128 token setting.
Limitations and future work
The authors point out that currently only three 8–9B open-source models and seven harm categories are covered; larger models, more categories, and more complex co-occurrences have not been evaluated; the method does not guarantee complete safety and may still falsely refuse or fail on unseen harmful forms.
Experimental setupQwen3-8B、Llama-3.1-8B-Instruct et al. · BeaverTails、AlpacaEval et al. · DSR、AUROC et al.
Evaluated models
Qwen3-8BLlama-3.1-8B-InstructGemma-2-9B-IT
Benchmarks
BeaverTailsAlpacaEvalXSTestGSM8KMATHMMLUHumanEvalJailbreakBench
Metrics
DSRAUROCXSTest complianceAlpacaEval half-tie win rateend-to-end latency
AI summaryThe researchers propose CAM-Steer, a category-adaptive multi-category safety steering framework that modifies model internal activations at inference time without updating parameters, thereby reducing unsafe responses to harmful prompts. The method estimates the risk for each harm category by comparing the current hidden state with safe and unsafe prototypes, then combines the safety directions of different categories into a single steering direction and determines the intervention strength, and finally rotates the hidden state along that direction with the rotation angle determined by the risk estimates, while preserving the hidden state norm. Experiments on three LLM backbones and seven harm categories show that CAM-Steer outperforms the evaluated baselines in average defense success rate, including in cases where multiple categories co-occur, with negligible inference overhead.

The researchers propose CAM-Steer, a category-adaptive multi-category safety steering framework that modifies model internal activations at inference time without updating parameters, thereby reducing unsafe responses to harmful prompts. The method estimates the risk for each harm category by comparing the current hidden state with safe and unsafe prototypes, then combines the safety directions of different categories into a single steering direction and determines the intervention strength, and finally rotates the hidden state along that direction with the rotation angle determined by the risk estimates, while preserving the hidden state norm. Experiments on three LLM backbones and seven harm categories show that CAM-Steer outperforms the evaluated baselines in average defense success rate, including in cases where multiple categories co-occur, with negligible inference overhead.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    When multiple harm categories coexist in a single prompt, existing activation steering cannot coordinate direction and strength simultaneously.

    A single prompt can trigger multiple harm categories simultaneously, and existing activation steering cannot coordinate safety directions and intervention strengths across categories based on the input.

    • Scenario and importance: The authors believe that LLMs, once deployed, remain vulnerable to jailbreaks that bypass alignment and produce unsafe responses. Activation steering modifies hidden states at inference time without updating parameters; the standard approach is to add the mean difference of contrastive samples as a direction to the hidden state. Recent work can build a direction for each harm category separately.
    • Limitations of existing methods: The authors state that suppressing only one category does not handle the remaining categories. The example in Figure 1 involves both privacy and financial fraud: single-category steering leaves the other category's risk; fixed-weight summation still allows harmful content and disrupts formatting. Adaptive methods (such as CAST's triggering and AdaSteer's strength scaling) still target a single intervention; multi-attribute methods mainly handle predefined static attributes and lack input-dependent adaptation to co-occurring harms in the prompt.
    • Core setup: The authors formulate multi-category safety steering as a category-adaptive problem: at inference time, estimate the risk for each category, then simultaneously adjust the direction and strength.
    • Proposed method: They propose CAM-Steer (Category-Adaptive Multi-category Safety Steering). It estimates the risk for each category using the current hidden state relative to safe/unsafe prototypes, combines the corresponding safety directions into a single direction, determines the rotation angle, and performs a spherical rotation while preserving the hidden state norm.
    • Threat model:
      • Goal: Reduce unsafe responses to harmful prompts while preserving utility on benign prompts as much as possible.
      • Victim system: Inference forward pass of open-source LLMs; intervention is applied to the residual hidden state of the last prompt token at selected transformer layers, followed by normal generation. No parameters are updated.
      • Defender capabilities: Offline, build prototypes, safety directions, and rotation angle budgets for each category using BeaverTails contrastive samples; online, only read the current hidden state. The SafeSteer baseline additionally receives true category labels at inference time, while CAM-Steer does not.
      • Input: A single prompt can fall into a subset of the predefined harm categories. The paper does not characterize the attacker as white-box, black-box, or no-box, nor does it specify whether the attacker can see the directions or adaptively rewrite.
  2. What related research exists?

    Related work covers safety steering, multi-attribute steering, and rotation steering; the authors state that direction coordination under co-occurring harms remains insufficient.

    The paper in Section 2.2 divides related work into three groups and compares with nine activation steering baselines in experiments.

    Safety steering

    • Category directions and SafeSteer (Bhattacharjee et al., 2024; Ghosh et al., 2025): Early work builds safety directions for different harm categories separately; SafeSteer obtains directions by contrasting safe and unsafe hidden states, encouraging safer responses without requiring refusal.
    • CAST (Lee et al., 2025): Uses logical combinations of hidden state patterns and category conditions to decide when to apply refusal directions.
    • AdaSteer (Zhao et al., 2025): Adjusts intervention strength based on the position of hidden states along refusal and harmfulness directions.

    Multi-attribute steering

    • Dynamic Activation Composition (Scalena et al., 2024): Adjusts the strength of each direction during generation to handle interactions between directions.
    • MAT-Steer (Nguyen et al., 2025): Learns when and how strongly to apply each direction, combining single-attribute gating with representation alignment and orthogonality regularization.
    • K-Steering and MSRS (Oozeer et al., 2025; Jiang et al., 2025): K-Steering uses nonlinear classifiers to guide activation updates; MSRS splits representations into shared and separate attribute subspaces before adaptive intervention.

    Rotation steering

    • Angular Steering (Vu & Nguyen, 2025): Rotates activations in a two-dimensional subspace to control behavior.
    • Selective Steering and Spherical Steering (Dang & Ngo, 2026; You et al., 2026): The former explicitly preserves activation norm and selects layers where target behaviors are separable; the latter rotates along spherical paths and uses confidence gates to adjust strength.
    • ORBIT (Ghasemi et al., 2026): Builds a joint steering subspace for multiple attributes, uses adaptive gates to form combined targets, then performs norm-preserving rotation. The corresponding baselines in experiments are ORBIT-R and ORBIT-B.

    Baselines and benchmarks

    • Baseline methods: No Steering, CAA (Rimsky et al., 2024), SafeSteer, CAST, AdaSteer, AlphaSteer (Sheng et al., 2026), MAT-Steer, K-Steering, ORBIT-R, ORBIT-B. SafeSteer uses true harm category labels at inference.
    • Benchmarks/datasets: Safety evaluation uses BeaverTails; utility uses AlpacaEval, XSTest safety prompts, GSM8K, MATH, MMLU, HumanEval. Appendix F additionally evaluates jailbreak defense with directions from seven attack families, with data from JailbreakBench behaviors.

    The authors believe the above methods have not systematically studied safety steering under co-occurring harm categories; how multiple directions coordinate when co-occurring remains insufficient; this paper accordingly adapts both intervention direction and strength while preserving hidden state norm.

  3. How does the paper address this problem?

    CAM-Steer combines tangent space directions with category risk scores, then performs norm-preserving rotation with a risk-gated angle.

    CAM-Steer proceeds in three steps: estimate category risks, synthesize a steering direction based on risks, and use the same risk to determine the rotation angle and perform norm-preserving spherical updates. Prototypes, directions, and angle budgets are built offline; online, only the last prompt token of the selected layer is modified.

    Problem setup

    • Categories and risks: Let a predefined harm set C have M categories. Hidden state h is at the selected layer; dk is the safety direction for category ck. Risk score wk(h) lies in [0,1], with larger values indicating h is more like having risk ck. They form the risk vector w(h).
    • Intervention: The authors write the update as h′ = T(h, {dk}, w(h)), so that both direction combination and overall strength vary with w(h), and avoid unnecessarily perturbing benign representations. M is seven categories in the main experiments.

    Category risk estimation

    • Prototypes and directions: For each category, use the mean hidden states of safe and unsafe samples. dk is the normalized (safe mean minus unsafe mean). Normalized means sk, uk are the safe and unsafe prototypes, respectively. The current state is normalized as z = h / ||h||₂.
    • Margin and calibration: mk = zᵀuk − zᵀsk. The authors state that a larger margin indicates the current representation is closer to the unsafe prototype of that category. Calibrate with held-out samples: ak is the (1−δ) quantile of the safe margin distribution, bk is the η quantile of the unsafe margin; αk = ak, βk = max{bk − ak, εβ}. wk truncates (mk − αk) / βk to [0,1]. Scores below the calibration boundary are 0, then linearly rise to 1.
    • Data and layers: Directions and prototypes come from the BeaverTails training set: 200 shared safe records, 200 unsafe records per category; multi-label records can enter multiple unsafe pools. Calibration and maximum angle selection use a held-out set of 50 unsafe and 200 safe per category, mutually exclusive with the construction set and the formal evaluation set. Layers are fixed to layer 10 of Qwen3-8B, layer 18 of Llama-3.1-8B-Instruct, and layer 20 of Gemma-2-9B-IT.

    Adaptive direction synthesis

    • Tangent space: Project each dk onto the tangent space of the unit sphere at z, removing the radial component, to obtain local directions gk orthogonal to z; gk is 0 if the projection norm does not exceed ε.
    • Weighting: q(h) = Σ wk gk, then normalize to get d(h); d(h) is 0 if ||q(h)||₂ does not exceed ε. The authors state that all gk are in the tangent space of z, so the weighted sum remains orthogonal to z.

    Risk-gated spherical rotation

    • Angle: θ(h) equals the maximum category weight times the weighted average of category angle budgets φk; θ(h) = 0 if ||q(h)||₂ does not exceed ε or all weights are 0, leaving the hidden state unchanged. φk is selected from {0, 10, …, 80} degrees on the validation set by macro-F1; final budgets for the three backbones are in Appendix Table 6.
    • Update: ρ = ||h||₂, h′ = ρ [cos θ(h) z + sin θ(h) d(h)]. When intervention is active, z and d(h) are orthogonal unit vectors, so the norm is preserved. It is applied only once during the prompt prefill phase, on the last prompt token of the selected layer, followed by normal decoding.
    • Implementation values: Main experiments δ=0.95, η=0.05, ε=10⁻⁶, εβ=10⁻³; in ablations, fixed angle is 30°, shared budget is 45°.
  4. What experiments did the paper conduct?

    On three 8–9B backbones, CAM-Steer's average DSR over seven categories is higher than nine steering baselines, and remains high under co-occurrence.

    Experimental setup

    • Models: Qwen3-8B, Llama-3.1-8B-Instruct, Gemma-2-9B-IT.
    • Safety data: BeaverTails. Table 1 is for Llama-3.1-8B-Instruct, 200 per category, seven categories: Hate, Drug, Financial, Privacy, Self-harm, Sexual, Violence. Table 2 is for co-occurring prompts, K is the number of co-occurring categories per prompt; on Qwen3-8B, K=2, 3, 4 each 200, K=5 is 28.
    • Utility: AlpacaEval (instruction following, half-tie win rate), XSTest safety prompts (over-safety), GSM8K and MATH, MMLU, HumanEval. Appendix F evaluates jailbreak defense with directions from seven attack families.
    • Baselines: No Steering, CAA, SafeSteer, CAST, AdaSteer, AlphaSteer, MAT-Steer, K-Steering, ORBIT-R, ORBIT-B. SafeSteer has true category labels at inference.
    • Metrics and review: The main metric is defense success rate (DSR), judged by GPT-4.1-mini. Appendix H.2: response_harmfulness of safe or borderline counts as defense success, unsafe as failure; refusal, helpfulness, coherence do not enter DSR. XSTest expects full compliance. MMLU, GSM8K, MATH, HumanEval use deterministic extraction or execution scoring. The paper does not report agreement with human judgment, nor the number of repetitions.
    • Splits: Construction, calibration/parameter selection, and formal evaluation use mutually exclusive subsets; configurations are frozen before evaluation on the test set. Generation parameters are in Appendix Table 4 (e.g., temperature 0.6, top-p 0.95).

    Main results

    DSR (%) on Llama-3.1-8B-Instruct with 200 per category, from Table 1.

    Swipe horizontally to read the table

    MethodHateDrugFinancialPrivacySelf-harmSexualViolenceAvg
    No Steering71.560.562.577.086.588.560.572.43
    CAA79.085.086.594.089.590.585.587.14
    SafeSteer91.071.579.090.589.075.576.081.79
    CAST70.062.063.074.082.576.056.569.14
    AdaSteer72.575.580.080.085.090.072.579.36
    AlphaSteer79.069.067.081.087.593.063.577.14
    MAT-Steer74.060.064.577.083.590.060.572.79
    K-Steering85.072.574.576.570.085.080.577.71
    ORBIT-R75.065.573.080.587.092.067.577.21
    ORBIT-B77.068.575.585.085.091.069.578.79
    CAM-Steer90.593.091.092.097.098.087.592.71
    • The authors state that CAM-Steer has the highest average DSR across the three backbones; on Table 1 it is 5.57 percentage points higher than the strongest baseline (92.71 vs. CAA's 87.14), and 20.29 percentage points higher than No Steering. On Hate, SafeSteer is 91.0, higher than CAM-Steer's 90.5; on Privacy, CAA is 94.0, higher than 92.0.
    • The authors state that baseline effects vary by model and category, with some interventions below No Steering. In Table 1, CAST averages 69.14, below No Steering's 72.43. The authors give an example: K-Steering improves Llama's average DSR but decreases Qwen3-8B, especially Privacy.
    • The ablation table gives Full average DSR for the other two backbones: Qwen3-8B is 93.79, Gemma-2-9B-IT is 97.50 (Table 3). Full per-category results are in Appendix D.1, not included in this table.

    Multi-category co-occurrence

    • What was tested: Table 2 reports DSR on Qwen3-8B for K=2 to 5. K=2/3/4 each 200, K=5 is 28. Full results for the three backbones are in Table 10.
    • Results: CAM-Steer's Overall is 88.85 (5.57 percentage points higher than No Steering's 83.28). Breakdown: K=2: 86.5, K=3: 91.0, K=4: 88.5, K=5: 92.9. On K=5, No Steering, SafeSteer, CAST, and CAM-Steer are all 92.9, with a change of 0 relative to No Steering.
    • Authors' interpretation: The authors state that CAM-Steer has the highest overall DSR across the three backbones; several baselines make Qwen3-8B and Gemma-2-9B-IT lower than the unsteered model. In Table 2, K-Steering Overall is 78.18, 5.10 percentage points lower than No Steering. The authors attribute CAM-Steer's lack of this decline to dynamically adjusting the synthesized direction and strength with category risks.

    Utility, cases, and jailbreak

    • Utility: Figure 3 shows the average of six utility benchmarks across the three backbones, with legend No Steering and CAM-Steer; the figure text labels 80%, 60%, 40%, 20%, but does not mark specific readings for each benchmark. The authors state that Qwen3-8B's utility inputs do not trigger steering, so performance is unchanged; Llama-3.1-8B-Instruct has only 3.78% of utility inputs triggering and no decline observed; Gemma-2-9B-IT has 16.17% triggering, with generally low strength, reasoning and code benchmarks maintained, and XSTest and AlpacaEval slightly increased. Appendix D.4: On Llama, CAA's XSTest drops to 85.0%, CAM-Steer is 96.0%.
    • Cases: Appendix G discusses requests involving both Self-harm and Violence. The authors state that CAA and AdaSteer first give crisis guidance, then still provide actionable information related to the lethality of gunshot wounds; CAM-Steer handles both categories simultaneously, giving crisis guidance and withholding gun-related details related to Violence. The appendix only gives the full outputs; the original text is not repeated here.
    • Jailbreak: Appendix F builds directions for seven attack families separately, using 100 behaviors from JailbreakBench, one template per family. Table 11 average DSR: On Qwen3-8B, No Steering 85.57, CAM-Steer 95.00; on Llama-3.1-8B-Instruct, 77.00 and 90.57; on Gemma-2-9B-IT, 91.57 and 97.57. The authors state that CAM-Steer has the highest average across the three backbones. Per-family, it is not highest in every cell; for example, on Qwen3-8B's GCG, ORBIT-R is 99, CAM-Steer is 96.

    Other ablations and analysis

    • Table 3: Relative to Full, single detector and single direction reduce DSR by up to 5.79 percentage points (Qwen3-8B: 93.79→88.00); unsafe prototype similarity reduces by up to 5.65; uniform weights reduce by up to 2.64 (Llama: 92.71→90.07); Top-1 reduces by up to 2.14; fixed rotation angle reduces by up to 4.79; shared angle budget on Gemma is 97.50, change 0; additive tangential update reduces by 9.16 on Llama (92.71→83.55).
    • Figure 5a: Average AUROC across three backbones from Hate 0.814, Drug 0.776, Financial 0.739, Privacy 0.857, Self-harm 0.801, Sexual 0.815 to Violence 0.785. The authors state that when the target category is present, the average risk score is higher than when absent. Figure 5b: Coverage of source categories entering top-k increases with k, dashed line is random selection; specific endpoint values are not listed in the main text.
    • Figure 4: On PCA, the authors state that CAM-Steer causes harmful activations to show rotational displacement, while benign samples remain near their original positions; additive tangential updates have different displacement and do not preserve norm. The plot coordinates are approximately −50 to 0, −40 to 60, with no quantitative cluster centers.
    • Figure 6: Prefill and per-token decoding latency. Labels include Qwen prefill approximately 62.66 and 68.80 ms, decoding 27.58 and 27.44 ms, etc. With 512 token input and 128 token output, the median relative change in end-to-end latency across the three backbones is −0.33%. The authors state that under this setting there is no measurable end-to-end latency increase.
    • Appendix C: The authors state that defense performance is stable across full-layer scans, and that as few as 10 direction estimation samples per category achieve strong performance; the main text does not give per-layer or per-sample-size numbers for these two items. Appendix C.3 reports macro-F1 over the angle budget grid, with best configurations Qwen3-8B 90.56, Llama 82.56, Gemma 91.22 (Table 13).
  5. What are some points that can be further explored?

    The authors note that the model scale is limited to 8–9B, the categories are only seven, and effectiveness on unseen harmful forms is not guaranteed.

    Limitations and future directions noted by the authors

    • Model scale: Appendix A states that only three 8–9B open-source LLMs are currently studied. The authors believe that evaluating on much larger models is needed to further assess scalability. (Appendix A)
    • Backbone diversity: The authors suggest extending to other backbone families with different architectures, pretraining recipes, and alignment strategies to understand how broadly this steering mechanism applies. (Appendix A)
    • Category set: The main experiments use seven common unsafe content categories. The authors state that real safety classification can be broader, finer-grained, or more overlapping, and extending CAM-Steer to larger category sets would be useful. (Appendix A)
    • More complex co-occurrence: The authors propose examining combinations where more harm categories appear simultaneously in the same prompt. (Appendix A)
    • Safety guarantees: The ethics statement states that CAM-Steer aims to reduce harmful generations but does not provide full safety guarantees; false rejections may still occur, and it may fail on previously unseen harmful forms. (Ethics Statement)
    • Annotation assumptions: The authors state that safety categories and benchmark annotations may reflect dataset-specific or cultural assumptions. (Ethics Statement)

    Experimental coverage

    • The tested backbones are Qwen3-8B, Llama-3.1-8B-Instruct, and Gemma-2-9B-IT, with parameter counts in the 8–9B range as stated in Appendix A; intervention layers are 10, 18, and 20, respectively (Appendix B.1).
    • The seven categories in the main safety evaluation come from BeaverTails, with 200 samples per category in Table 1; the co-occurrence experiment with K=5 has 28 samples in Table 2. Directions are constructed with 200 shared safe records and 200 unsafe records per category (Appendix B.1).
    • Baselines are No Steering and nine activation steering methods; SafeSteer uses true category labels at inference time (Section 4.1). Utility covers AlpacaEval, XSTest, GSM8K, MATH, MMLU, and HumanEval (Section 4.1).
    • The jailbreak evaluation in Appendix F includes seven attack families: GCG, AutoDAN, DeepInception, ReNeLLM, Multilingual, Cipher, and Jailbroken, with 100 behaviors on JailbreakBench and one template per family (Appendix F).
    • DSR is judged by GPT-4.1-mini (Section 4.1, Appendix H.2). The paper does not report agreement between this judge and human annotations, nor does it report the number of repetitions for safety evaluations.
  6. Summarize the main content of the paper

    CAM-Steer synthesizes directions based on category risk and performs norm-preserving rotation, improving BeaverTails defense success rate across three backbones.

    CAM-Steer is an inference-time, parameter-free multi-category safety steering method: it estimates category risks from the current hidden state, then simultaneously determines direction and rotation strength.

    • Problem: A single prompt can carry multiple harm categories simultaneously. Pushing only one safety direction, or adding multiple directions with fixed weights, leaves other harmful content and may disrupt generation. Existing adaptive steering mainly adjusts a single intervention; multi-attribute methods mainly target predefined static attributes.
    • Method: Offline, obtain per-category safe/unsafe prototypes, safety directions, and angle budgets from BeaverTails contrastive samples. Online, calibrate the difference in similarity between the current hidden state and the two prototypes into a [0,1] risk, synthesize a direction by weighting in the tangent space of the unit sphere, use the maximum risk as a gate, use the weighted angle budget to set the rotation angle, and preserve the hidden state norm. Intervention occurs only on the last prompt token of the selected layer.
    • Main results: On Llama-3.1-8B-Instruct with seven categories, 200 per category, CAM-Steer average DSR is 92.71%, 5.57 percentage points higher than the strongest baseline CAA's 87.14% in Table 1; on Hate and Privacy, SafeSteer 91.0% and CAA 94.0% are higher, respectively. In Table 3, Qwen3-8B and Gemma-2-9B-IT Full average DSR are 93.79% and 97.50%.
    • Co-occurrence and utility: On Qwen3-8B, Overall DSR for K=2 to 5 is 88.85%, higher than No Steering's 83.28%; K=5 (28) is the same as No Steering at 92.9%. On Llama, CAM-Steer's XSTest is 96.0%, CAA is 85.0%. With 512 token input and 128 token output, the median relative change in end-to-end latency across the three backbones is −0.33%.
    • Authors' conclusion: The authors believe that the component design and the informativeness of risk scores are supported by analysis, that strong performance is achieved with few direction estimation samples, and that CAM-Steer is a practical inference-time approach to "multi-headed" harmful prompts. Appendix A and the ethics statement also state: currently limited to 8–9B and seven categories, does not guarantee complete safety, and may still fail on unseen harmful forms.

Related papers

Show 3 more papers
Read originalarxiv.org