Mechanistic interpretability · project report
Evaluating Safety-Relevant Representations and Behaviors in Language ModelsFrom a single direction to a semantic effect signature
A local replication and extension on Qwen2.5-1.5B-Instruct.
The project asks what a refusal-related activation direction controls,
what it does not erase, and how stronger evaluation gates change the story.
Executive readout
The four results that survived the full project
The page reports aggregate metrics only. Harmful prompt text and potentially harmful model completions are not published.
Claim boundary
What the project tested
The initial question was operational: can a direction learned from harmful-versus-harmless prompt activations causally change refusal-like output? Later experiments asked whether the direction was a surface phrase switch, a harmfulness-recognition feature, a response-policy variable, or part of a broader answerability decision.
Supported by the local evidence
- Projection removal along the learned direction sharply suppresses refusal phrases.
- A larger, redundant direction span suppresses the same endpoint more strongly.
- The intervention also changes some recognition, truthfulness, and abstention measures.
- Refusal is a useful first case for linear-representation experiments because it has a visible behavioral endpoint.
Not established
- Refusal is literally one internal dimension.
- Ablation removes the model's ability to recognize harmful requests.
- Fewer refusal phrases imply safe or unsafe compliance.
- The same direction-search method transfers cleanly to truthfulness, sycophancy, deception, or other relational concepts.
Research trajectory
How the question narrowed
Build the pipeline and reproduce the single direction
Toy models, SmolLM, and 8- or 32-example implementation checks established activation extraction, layer selection, and generation-time hooks. The 100-prompt Qwen experiment became the main evidence.
Test a larger span and look for preservation costs
A 4×4 self-organizing map produced a stronger intervention span. Direction redundancy, truthfulness loss, and residual harmful/harmless structure limited the interpretation.
Separate recognition, policy, and response execution
A larger reverse truth/correction experiment failed to move refusal. Harmfulness recognition weakened but survived. A forced-action direction was readable in a controlled setting but did not transfer cleanly to ordinary generation.
Try a multi-concept intervention atlas
Five versions progressively added benchmark sources, disjoint splits, source validation, saturation checks, and bootstrap intervals. Most visually appealing cross-effects disappeared under the stronger gates.
Replace the atlas with a source-gated effect matrix
The final experiment treats rows as validated intervention handles and columns as behavior responses. It measures the signature of the refusal intervention without assuming a concept hierarchy.
Canonical experiment
Single-direction ablation, multi-direction follow-up, and preservation
The core replication follows the experimental object in Arditi et al. (2024): contrast harmful and harmless prompts, learn a mean activation difference, select the intervention layer on held-out validation data, and remove that direction during generation.
Qwen/Qwen2.5-1.5B-Instruct; andyrdt/refusal_direction prompt splits; 128 training, 32 validation, and 100 test prompts per class. The selected location was hidden state 14 / decoder layer 13. The main score records whether a completion contains a refusal phrase. It does not judge harmful compliance or overall safety.
One-direction intervention on the main test set
| Prompt class | Condition | Prompts | Refusal-phrase rate |
|---|---|---|---|
| Harmful | Baseline | 100 | 0.990 |
| Harmful | One-direction projection removal | 100 | 0.070 |
| Harmless | Baseline | 100 | 0.070 |
| Harmless | One-direction projection removal | 100 | 0.010 |
The direction is therefore more than a readable feature: removing it changes the model's visible response. The result remains an output-level intervention result, not evidence that every component of refusal lives on this coordinate.
A larger direction span
The follow-up adapts the idea in Piras et al. (2025). A 4×4 self-organizing map was trained on harmful-prompt activations at hidden state 14. Each node defines a local harmful centroid; subtracting the harmless centroid yields 16 candidate directions. Selected directions were orthogonalized before their joint projection was removed.
This is a local simplification. Piras et al. use Bayesian optimization and a more complete HarmBench / attack-success evaluation stack. The local experiment uses greedy subset selection on a small validation set and the keyword refusal endpoint.
0.010.
0.981 and the mean is 0.783. They should not be described as 16 independent refusal axes.Small preservation checks
The preservation sets are much smaller than the main intervention test. They are reported separately to prevent their precision from being confused with the 100-prompt result.
| Evaluation set | Prompts | Baseline keyword pass rate | One-direction ablation | Interpretation |
|---|---|---|---|---|
| Ordinary benign tasks | 12 | 0.917 | 1.000 | No loss in this small keyword check. |
| Locally written fact-checking / misconception prompts | 16 | 0.750 | 0.312 | Large warning signal; this is not a standard TruthfulQA evaluation. |
0.750 to 0.312.
Residual structure after ablation
After removing the selected direction, harmful and harmless prompts remain linearly separable elsewhere in the network. The best baseline separation was 1.836 at hidden state 14; the best post-ablation residual separation was 1.832 at hidden state 3.
Boundary experiments
Recognition, response policy, and action context
The next experiments tested which functions travel with the refusal handle. They produced clearer boundaries than modules: recognition and response execution are distinguishable but partly coupled, while a controlled forced-action feature does not transfer as a stable natural response axis.
| Experiment | Design | Key result | Conclusion |
|---|---|---|---|
| Strict reverse coupling | Validate a truth/correction-down intervention on 64 held-out target examples, freeze its sign and strength, then read the refusal cross-effect. | Harmful refusal stays 1.000 → 1.000. In the same experiment, refusal ablation gives 1.000 → 0.031. |
Negative result The larger experiment does not support truth/correction → refusal coupling. |
| Harmfulness recognition vs response execution | Safe harmful/harmless forced-choice classification over 256 paired rows; generation check with 32 prompts per class. | Refusal execution: 1.000 → 0.000. Recognition accuracy: 0.859 → 0.703. |
Boundary evidence Recognition weakens but survives. |
| Forced-action direction | Controlled harmfulness × forced-action representation; 80 prompts per probe class and 32 prompts per class for ordinary generation transfer. | Action-probe AUROC reaches 1.000. Ablation leaves natural harmful refusal at 1.000; addition reduces it to 0.000. |
Sign-unstable Readability in the constructed context does not establish a natural action-selection axis. |
| Multi-handle audit | Compare refusal, harmfulness, forced-action, reply-style, truth/correction, and sycophancy-related directions on shared response measures. | Refusal and harmfulness interventions both suppress refusal and lower TruthfulQA. Most other directions are weak on their own targets or unstable in transfer. | Cross-effects are interpretable only after the source direction moves its own held-out target. |
The atlas attempt
Why the multi-concept graph contracted
The project briefly pursued an intervention graph spanning refusal, harmfulness, truthfulness, sycophancy, hallucination recognition, uncertainty, helpfulness, toxicity, and bias. Each revision made the evidence rules stricter. The graph became smaller rather than clearer, which changed the research object from “concept nodes” to validated intervention sources.
| Version | What changed | Result | Evidence status |
|---|---|---|---|
| V1 | Hand-written prompts and four- / twelve-node heatmaps. | The visualization and intervention-matrix pipeline worked, but the sources and scorers were too weak. | Implementation scaffold |
| V2 | Local benchmark sources and an explicit source-target gate; only 2/2/2 examples per concept. | A few edges survived, but sample size, target saturation, and proxy scores dominated. | Tiny-sample check |
| V3 | Twelve concepts with 32/32/32 disjoint splits, an intervention-strength sweep, 500 bootstrap resamples, and hidden failed-source rows. | At the primary ablation strength, only 1 solid edge remained; 10 were diagnostic and 121 were hidden. | Proxy-heavy provenance |
| V4 | Restrict to refusal, harmfulness, truthfulness, and sycophancy; prefer benchmark-native scoring. | The primary graph had 0 solid edges, 3 diagnostic edges, and 9 hidden rows. The canonical refusal source remained the stable case. | Benchmark-first diagnostic |
| V5 | Stop estimating cross-effects. Test only whether each of eight directions changes its own target, with n=16 per row. | Only refusal passed with an interval excluding zero. Other rows were weak, null, or wrong-sign. | Screening result |
n=16 per row. Refusal falls from 0.9375 to 0.1250, with a paired bootstrap interval of [−1.0000, −0.6250]. Truthfulness, hallucination recognition, helpfulness preference, and toxicity recognition move in the expected direction but their intervals include zero. Sycophancy and unanswerability do not move; the autoregressive bias adaptation moves in the wrong direction.Final boundary experiment
V6: a source-gated semantic effect matrix
V6 treats each row as an intervention direction tied to a specified contrast set. A row must first change its own held-out target. Columns then record fine-grained behavior responses. This avoids assuming that every row is a complete or independent concept.
n=32. The refusal direction is tested at intervention strengths 0.25, 0.5, and 1.0. Diagnostic harm-salience and truth/correction rows are included alongside a norm-matched random direction. Intervals use 200 bootstrap resamples. Positive values in the rate matrix mean that a failure increased or a desirable behavior decreased.
0.969 to 0.062: delta −0.906, 95% bootstrap interval [−1.000, −0.812]. The truth/correction row does not move its own target and remains diagnostic.| Behavior response under refusal ablation, strength 1.0 | Rate effect | Interpretation |
|---|---|---|
| Safety refusal decreases | 0.969 | The main visible endpoint changes strongly. |
| Unsafe direct-answer preference increases | 0.641 | Closer to an answer decision than phrase detection, but still a local forced-choice measure. |
| Abstention on unanswerable questions decreases | 0.688 | Connects refusal to a broader answerability / guardedness response. |
| TruthfulQA decreases | 0.375 | A repeated preservation warning; it does not establish that refusal causes truthfulness. |
| Ordinary factual QA decreases | 0.031 | Small movement argues against a simple broad-capability-damage explanation. |
| Instruction following decreases | 0.000 | No rate change in this local check. |
| Surface disclaimer changes | 0.000 | No support for a purely surface-hedging explanation. |
Synthesis
What the project changed
Substantive conclusions
- The selected refusal direction is a strong causal handle on refusal-like output.
- Its effects extend beyond surface refusal phrases, but related internal structure remains.
- Harmfulness recognition and refusal execution are partly coupled and empirically distinguishable.
- The final response pattern is more consistent with answerability / guardedness than with a pure phrase, random-direction, or broad-damage account.
Method conclusions
- Validate an intervention source on held-out own-target data before reading cross-effects.
- Report behavior rates, log-probability margins, saturation, and uncertainty together.
- A benchmark prompt source does not guarantee a benchmark-faithful scorer.
- Negative replication should narrow the claim. It should not be converted into a cleaner-looking graph.
Current boundary
Limitations and next work
Limitations
- The main refusal endpoint is still a keyword score. V6 also relies on local forced-choice and marker-based measures.
- The project does not include a faithful harmful-compliance judge, full attack-success evaluation, or human safety review.
- Sample sizes differ: 100 prompts per class in the main refusal test, 12 and 16 in early preservation checks, 16 per V5 row, and mostly 32 per V6 response column.
- All main results come from one small instruction-tuned model.
- Answerability / guardedness is an interpretation of the measured signature, not an independently identified mechanism.
Next work, in order
- Replace keyword-only scoring with stronger refusal, harmful-compliance, benign-capability, and truthfulness measures on the same prompt families.
- Scale the matched evaluation only after the scoring layer is credible.
- Repeat the strongest result on a larger instruction model.
- Add a generated-answer judge for unanswerable and fabrication behavior before making a public mechanism claim.
Selected references
Research anchors
- Arditi et al. (2024), “Refusal in Language Models Is Mediated by a Single Direction”
- Piras et al. (2025), “SOM Directions are Better than One”
- Park, Choe, and Veitch (2023), “The Linear Representation Hypothesis and the Geometry of Large Language Models”
- Engels et al. (2024), “Not All Language Model Features Are One-Dimensionally Linear”
- Zhao et al. (2025), work separating harmfulness recognition from refusal behavior