SteeringSafety: A Systematic Safety Evaluation Framework of Representation Steering in LLMs
4
16 commits
7 linked in READMEs
updated Nov 25, 2025
SteeringSafety is a benchmark suite for evaluating representation steering methods across multiple safety perspectives.
SteeringSafety provides:
Each dataset is split into 40/10/50 for train/val/test.
Harmfulness, bias, and hallucination are explicitly targeted by steering:
To quickly get started with SteeringSafety, you can clone the repository, install dependencies, and run the complete steering pipeline:
# Clone repository
git clone https://github.com/wang-research-lab/SteeringSafety.git
cd SteeringSafety
# Install dependencies
pip install -e .
# Run complete steering pipeline
python scripts/run/run_full_pipeline.py -m qwen25-7b -c refusal_base -M dim
# Run with different entanglement controls
python scripts/run/run_full_pipeline.py -m qwen25-7b -c refusal_base -M dim_nokl # No KL constraint
python scripts/run/run_full_pipeline.py -m qwen25-7b -c refusal_base -M dim_conditional # With CAST
For comprehensive evaluation across multiple models, behaviors, and methods:
python scripts/run/run_parallel_experiments.py \
--skip-metrics \
--concepts explicit_bias implicit_bias hallucination_extrinsic refusal_base hallucination_intrinsic \
--model llama3-1-8b qwen25-7b \
--methods ace_conditional \
--gpu 0 1 2 3
Currently supported models:
All models support chat templates and are compatible with all steering methods in our framework.
We decompose training-free steering methods into three phases:
Extract steering vectors from training data:
DiffInMeans, PCA, LATSteeringFormat.DEFAULT, SteeringFormat.REPE, SteeringFormat.CAAChoose optimal layer and hyperparameters:
Apply steering during inference:
ALL_TOKENS, POST_INSTRUCTION, OUTPUT_ONLYWe implement 5 methods from the literature, each with 3 variants for different effectiveness/entanglement tradeoffs:
All configurations can be found in the configs/ directory with variants: {method}.yaml, {method}_nokl.yaml, {method}_conditional.yaml
| Method | Components | Paper | Implementation Notes |
|---|---|---|---|
| DIM | DiffInMeans + Directional Ablation | Arditi et al. + COSMIC | Original refusal steering method |
| ACE | DiffInMeans + Directional Ablation (affine) | Marshall et al. + COSMIC | Adds reference projection |
| CAA | DiffInMeans + Activation Addition (MC format) | Panickssery et al. | Uses multiple-choice format |
| PCA | PCA + Activation Addition | Zou et al. (RepE) + CAST + AxBench | Principal component analysis |
| LAT | LAT + Activation Addition (cumulative) | Zou et al. (RepE) + AxBench | Linear artificial tomography |
Importantly, the above 5 methods are not exhaustive. Our modular framework allows easy creation of new methods by combining different components!
For example, to create a new method using LAT with CAA format, COSMIC selection, Directional Ablation application, and Conditional steering (CAST), with different layer and component choices than is used in the paper, simply create a new YAML config:
# configs/custom.yaml - LAT + CAA format + COSMIC + Directional Ablation + Conditional
# Override dataset formatting to use CAA templates with LAT:
train_data:
pos:
params:
format: SteeringFormat.CAA # LAT with CAA format
neg:
params:
format: SteeringFormat.CAA
neutral: null
# Phase 1: Direction Generation
direction_generation:
generator:
class: direction_generation.linear.LAT
params: {}
param_grid:
# Change for every middle layer and attn output component
layer_pct_start: [0.3]
layer_pct_end: [0.7]
layer_step: [1]
component: ['attn']
attr: ['output']
pos: [-1]
...
# Phase 2: Direction Selection
direction_selection:
class: direction_selection.cosmic.COSMIC
params:
application_locations: []
include_generation_loc: true
generation_pos: POST_INSTRUCTION # Targeted application
use_kl_divergence_check: false
...
# Phase 3: Direction Application
direction_application:
class: direction_application.unconditional.DirectionalAblation
params:
use_affine: false # Pure directional ablation
...
# Enable conditional steering
conditional:
enabled: true
condition_selection:
class: direction_selection.grid_search.ConditionalGridSearchSelector
params:
condition_thresholds: "auto"
condition_comparators: ["greater"]
...
We also welcome contributions of new datasets, models, and components to further expand what can be evaluated.
SteeringSafety/
βββ configs/ # Experiment configurations
β βββ {method}.yaml # Base configurations
β βββ {method}_nokl.yaml # No KL divergence check
β βββ {method}_conditional.yaml # With CAST
βββ data/ # Dataset loaders
β βββ steering_data.py # Main data interface
β βββ refusal.py # Harmful generation datasets
β βββ bias.py # Demographic bias datasets
β βββ hallucination.py # Hallucination datasets
β βββ secondary_datasets.py # Entanglement evaluation
βββ direction_generation/ # Phase 1 components
β βββ base.py
β βββ linear.py # DiffInMeans, PCA, LAT
βββ direction_selection/ # Phase 2 components
β βββ base.py
β βββ grid_search.py
β βββ cosmic.py
βββ direction_application/ # Phase 3 components
β βββ base.py
β βββ unconditional.py # Standard steering
β βββ conditional.py # CAST implementation
βββ utils/ # Utilities
β βββ intervention_llm.py # Model steering code
β βββ steering_utils.py # Helper functions
β βββ enums.py # Configuration enums
βββ scripts/
βββ run/ # Experiment scripts
βββ analysis/ # Evaluation tools
Our evaluation reveals several critical insights about current steering methods:
Method effectiveness varies significantly: DIM and ACE work best for reducing harmfulness and bias, while PCA and LAT show promise for hallucination reduction, but success depends heavily on the specific method-model-perspective combination being used.
Entanglement affects different capabilities unevenly: Social behaviors (like sycophancy and user retention) and normative judgments are most vulnerable to unintended changes during steering, while reasoning capabilities remain relatively stable.
Counterintuitive cross-perspective effects emerge: Jailbreaking doesn't necessarily increase toxicity, hallucination steering causes opposing political shifts in different models, and improving one type of bias can actually degrade another type, showing complex interdependencies between safety perspectives.
Conditional steering improves tradeoffs: Applying steering selectively (conditional steering) achieves effectiveness comparable to the best settings while significantly reducing entanglement for harmfulness and hallucination, though it performs poorly for bias steering.
Findings generalize across model scales: The relative performance rankings of different steering methods and entanglement patterns remain can consistent across models of different sizes, suggesting insights from smaller models can inform steering larger models.
This represents a major open challenge in AI safety: developing steering methods that can precisely target specific behaviors without unintended side effects. We hope this benchmark will accelerate progress toward more controllable and safer steering methods, and in the future, more generally towards safer AI systems.
The SteeringSafety framework code is released under the MIT License.
This benchmark incorporates multiple existing datasets, each with their own licensing terms. For some datasets (e.g., HalluLens), we also utilize their evaluation code and metrics. Users must respect the individual licenses of constituent datasets:
| Dataset | License | Source |
|---|---|---|
| ARC-C | CC-BY-SA-4.0 | AllenAI |
| Alpaca | CC-BY-NC-4.0 | Stanford |
| BBQ | CC-BY-4.0 | NYU-MLL |
| CMTest | CC-BY-SA-4.0 | AI-Secure |
| DarkBench | MIT | Apart Research |
| FaithEval | See source* | Salesforce |
| GPQA | CC-BY-4.0 | Rein et al. |
| HalluLens | CC-BY-NC** | Meta |
| SALADBench | Apache-2.0 | OpenSafetyLab |
| ToxiGen | See source* | Microsoft |
| TruthfulQA | See source* | Lin et al. |
| TwinViews | CC-BY-4.0 | Fulay et al. |
Datasets marked with asterisk seem to have no explicit dataset license but their associated codebases are licensed (Apache-2.0, MIT, etc.). Please refer to original sources for usage terms. HalluLens is mostly CC-BY-NC but contains some components with other licenses.
We gratefully acknowledge the following for helpful resources and foundational work:
@misc{siu2025SteeringSafety,
title={SteeringSafety: A Systematic Safety Evaluation Framework of Representation Steering in LLMs},
author={Vincent Siu and Nicholas Crispino and David Park and Nathan W. Henry and Zhun Wang and Yang Liu and Dawn Song and Chenguang Wang},
year={2025},
eprint={2509.13450},
archivePrefix={arXiv},
primaryClass={cs.AI},
url={https://arxiv.org/abs/2509.13450},
}
SteeringSafety: A Systematic Safety Evaluation Framework of Representation Steering in LLMs
4
16 commits
7 linked in READMEs
updated Nov 25, 2025
SteeringSafety is a benchmark suite for evaluating representation steering methods across multiple safety perspectives.
SteeringSafety provides:
Each dataset is split into 40/10/50 for train/val/test.
Harmfulness, bias, and hallucination are explicitly targeted by steering:
To quickly get started with SteeringSafety, you can clone the repository, install dependencies, and run the complete steering pipeline:
# Clone repository
git clone https://github.com/wang-research-lab/SteeringSafety.git
cd SteeringSafety
# Install dependencies
pip install -e .
# Run complete steering pipeline
python scripts/run/run_full_pipeline.py -m qwen25-7b -c refusal_base -M dim
# Run with different entanglement controls
python scripts/run/run_full_pipeline.py -m qwen25-7b -c refusal_base -M dim_nokl # No KL constraint
python scripts/run/run_full_pipeline.py -m qwen25-7b -c refusal_base -M dim_conditional # With CAST
For comprehensive evaluation across multiple models, behaviors, and methods:
python scripts/run/run_parallel_experiments.py \
--skip-metrics \
--concepts explicit_bias implicit_bias hallucination_extrinsic refusal_base hallucination_intrinsic \
--model llama3-1-8b qwen25-7b \
--methods ace_conditional \
--gpu 0 1 2 3
Currently supported models:
All models support chat templates and are compatible with all steering methods in our framework.
We decompose training-free steering methods into three phases:
Extract steering vectors from training data:
DiffInMeans, PCA, LATSteeringFormat.DEFAULT, SteeringFormat.REPE, SteeringFormat.CAAChoose optimal layer and hyperparameters:
Apply steering during inference:
ALL_TOKENS, POST_INSTRUCTION, OUTPUT_ONLYWe implement 5 methods from the literature, each with 3 variants for different effectiveness/entanglement tradeoffs:
All configurations can be found in the configs/ directory with variants: {method}.yaml, {method}_nokl.yaml, {method}_conditional.yaml
| Method | Components | Paper | Implementation Notes |
|---|---|---|---|
| DIM | DiffInMeans + Directional Ablation | Arditi et al. + COSMIC | Original refusal steering method |
| ACE | DiffInMeans + Directional Ablation (affine) | Marshall et al. + COSMIC | Adds reference projection |
| CAA | DiffInMeans + Activation Addition (MC format) | Panickssery et al. | Uses multiple-choice format |
| PCA | PCA + Activation Addition | Zou et al. (RepE) + CAST + AxBench | Principal component analysis |
| LAT | LAT + Activation Addition (cumulative) | Zou et al. (RepE) + AxBench | Linear artificial tomography |
Importantly, the above 5 methods are not exhaustive. Our modular framework allows easy creation of new methods by combining different components!
For example, to create a new method using LAT with CAA format, COSMIC selection, Directional Ablation application, and Conditional steering (CAST), with different layer and component choices than is used in the paper, simply create a new YAML config:
# configs/custom.yaml - LAT + CAA format + COSMIC + Directional Ablation + Conditional
# Override dataset formatting to use CAA templates with LAT:
train_data:
pos:
params:
format: SteeringFormat.CAA # LAT with CAA format
neg:
params:
format: SteeringFormat.CAA
neutral: null
# Phase 1: Direction Generation
direction_generation:
generator:
class: direction_generation.linear.LAT
params: {}
param_grid:
# Change for every middle layer and attn output component
layer_pct_start: [0.3]
layer_pct_end: [0.7]
layer_step: [1]
component: ['attn']
attr: ['output']
pos: [-1]
...
# Phase 2: Direction Selection
direction_selection:
class: direction_selection.cosmic.COSMIC
params:
application_locations: []
include_generation_loc: true
generation_pos: POST_INSTRUCTION # Targeted application
use_kl_divergence_check: false
...
# Phase 3: Direction Application
direction_application:
class: direction_application.unconditional.DirectionalAblation
params:
use_affine: false # Pure directional ablation
...
# Enable conditional steering
conditional:
enabled: true
condition_selection:
class: direction_selection.grid_search.ConditionalGridSearchSelector
params:
condition_thresholds: "auto"
condition_comparators: ["greater"]
...
We also welcome contributions of new datasets, models, and components to further expand what can be evaluated.
SteeringSafety/
βββ configs/ # Experiment configurations
β βββ {method}.yaml # Base configurations
β βββ {method}_nokl.yaml # No KL divergence check
β βββ {method}_conditional.yaml # With CAST
βββ data/ # Dataset loaders
β βββ steering_data.py # Main data interface
β βββ refusal.py # Harmful generation datasets
β βββ bias.py # Demographic bias datasets
β βββ hallucination.py # Hallucination datasets
β βββ secondary_datasets.py # Entanglement evaluation
βββ direction_generation/ # Phase 1 components
β βββ base.py
β βββ linear.py # DiffInMeans, PCA, LAT
βββ direction_selection/ # Phase 2 components
β βββ base.py
β βββ grid_search.py
β βββ cosmic.py
βββ direction_application/ # Phase 3 components
β βββ base.py
β βββ unconditional.py # Standard steering
β βββ conditional.py # CAST implementation
βββ utils/ # Utilities
β βββ intervention_llm.py # Model steering code
β βββ steering_utils.py # Helper functions
β βββ enums.py # Configuration enums
βββ scripts/
βββ run/ # Experiment scripts
βββ analysis/ # Evaluation tools
Our evaluation reveals several critical insights about current steering methods:
Method effectiveness varies significantly: DIM and ACE work best for reducing harmfulness and bias, while PCA and LAT show promise for hallucination reduction, but success depends heavily on the specific method-model-perspective combination being used.
Entanglement affects different capabilities unevenly: Social behaviors (like sycophancy and user retention) and normative judgments are most vulnerable to unintended changes during steering, while reasoning capabilities remain relatively stable.
Counterintuitive cross-perspective effects emerge: Jailbreaking doesn't necessarily increase toxicity, hallucination steering causes opposing political shifts in different models, and improving one type of bias can actually degrade another type, showing complex interdependencies between safety perspectives.
Conditional steering improves tradeoffs: Applying steering selectively (conditional steering) achieves effectiveness comparable to the best settings while significantly reducing entanglement for harmfulness and hallucination, though it performs poorly for bias steering.
Findings generalize across model scales: The relative performance rankings of different steering methods and entanglement patterns remain can consistent across models of different sizes, suggesting insights from smaller models can inform steering larger models.
This represents a major open challenge in AI safety: developing steering methods that can precisely target specific behaviors without unintended side effects. We hope this benchmark will accelerate progress toward more controllable and safer steering methods, and in the future, more generally towards safer AI systems.
The SteeringSafety framework code is released under the MIT License.
This benchmark incorporates multiple existing datasets, each with their own licensing terms. For some datasets (e.g., HalluLens), we also utilize their evaluation code and metrics. Users must respect the individual licenses of constituent datasets:
| Dataset | License | Source |
|---|---|---|
| ARC-C | CC-BY-SA-4.0 | AllenAI |
| Alpaca | CC-BY-NC-4.0 | Stanford |
| BBQ | CC-BY-4.0 | NYU-MLL |
| CMTest | CC-BY-SA-4.0 | AI-Secure |
| DarkBench | MIT | Apart Research |
| FaithEval | See source* | Salesforce |
| GPQA | CC-BY-4.0 | Rein et al. |
| HalluLens | CC-BY-NC** | Meta |
| SALADBench | Apache-2.0 | OpenSafetyLab |
| ToxiGen | See source* | Microsoft |
| TruthfulQA | See source* | Lin et al. |
| TwinViews | CC-BY-4.0 | Fulay et al. |
Datasets marked with asterisk seem to have no explicit dataset license but their associated codebases are licensed (Apache-2.0, MIT, etc.). Please refer to original sources for usage terms. HalluLens is mostly CC-BY-NC but contains some components with other licenses.
We gratefully acknowledge the following for helpful resources and foundational work:
@misc{siu2025SteeringSafety,
title={SteeringSafety: A Systematic Safety Evaluation Framework of Representation Steering in LLMs},
author={Vincent Siu and Nicholas Crispino and David Park and Nathan W. Henry and Zhun Wang and Yang Liu and Dawn Song and Chenguang Wang},
year={2025},
eprint={2509.13450},
archivePrefix={arXiv},
primaryClass={cs.AI},
url={https://arxiv.org/abs/2509.13450},
}