TL;DR
Steering an LLM toward safe behavior usually involves finding "safety switches" inside its internal activations, often using Sparse Autoencoders (SAEs). However, safety isn't a single switch—it's a distributed chorus of neurons firing together. By teaching SAEs to respect the underlying network of which neurons fire together, this paper builds a fast, surgical runtime steering system that blocks jailbreaks while leaving benign, everyday requests unbothered.
What Problem Does This Paper Address?
Keeping LLMs safe is a perpetual tug-of-war: block harmful requests, and you risk creating an overly cautious model that refuses to answer harmless questions; loosen the reins, and adversarial "jailbreaks" slip right through.
External guardrails (like input/output filters) are easy to bolt on, but they sit outside the model's brain, add steep latency, and break easily when prompts look unusual. To go deeper, researchers look inside the model's hidden states using Sparse Autoencoders (SAEs)—neural networks trained to untangle dense, messy brain waves of an LLM into clean, interpretable "feature directions" that can nudge (or steer) the model away from harm at runtime.
Here is the catch: standard SAEs optimize purely for reconstruction and sparsity, treating features like isolated islands. Recent evidence shows that complex behaviors like "refusal" or "harmful compliance" aren't single linear directions; they are distributed across structured, interacting groups of neurons. Standard SAEs ignore this neighborhood topology, leaving safety features fractured across weakly aligned directions that fail to steer reliably.
Methods
The authors introduce Graph-Regularized Sparse Autoencoders (GSAE) alongside a selective runtime steering pipeline, unfolding in three stages:
- Graph-Smoothed Dictionary Learning (New): First, the authors map out a neuron co-activation graph by feeding the LLM safety-labeled prompts (plus benign prompts on sensitive topics, so the graph learns "harm" rather than just "scary words") and connecting neurons whose activations correlate via thresholded cosine similarity. When training the SAE, alongside standard reconstruction, sparsity, and a supervised safety-probe loss, they add a Laplacian smoothness penalty (Dirichlet energy). Intuitively, this forces the SAE's decoded steering directions to vary smoothly across strongly connected neurons rather than jumping erratically.
- Steering Bank Construction (New): Not every learned feature makes a good steering wheel. Candidate directions are scored on three criteria: structural coherence (how smooth it is on the neuron graph), predictive relevance (how well it predicts harm), and intervention efficacy (whether nudging along this direction actually changes model outputs on validation data). These three scores are combined via a geometric mean—acting as a soft
ANDgate—to curate a multi-direction "steering bank" (~5,200 directions across target layers). - Two-Gate Runtime Controller: Steering every single token ruins normal conversation. Instead, an input gate checks the prompt's initial risk: high-risk prompts trigger an immediate template refusal, safe prompts cruise through untouched, and ambiguous prompts enter monitoring. During generation, a continuation gate watches token-by-token risk (using hysteresis to avoid rapid flickering) and subtracts the weighted bank directions from hidden states only when the model drifts toward danger.
Datasets
No new benchmarks are introduced; the authors deliberately keep training and evaluation strictly separated to test out-of-distribution (OOD) generalization:
- Training & Validation: WildJailbreak (used to build the neuron graph, train GSAE, and validate the steering bank/controller).
- Safety & Over-Refusal Evaluation (OOD): JailbreakBench (JBB), HarmBench, and XSTest (which pairs unsafe prompts with tricky, dual-use benign prompts to measure false refusals).
- Benign Utility Evaluation: TriviaQA, GSM8K (math reasoning), TruthfulQA, and IFEval (instruction following).
Key Insights and Ideas
- Standard SAE steering can actually backfire: Remarkably, plugging a standard SAE's directions into the exact same two-gate pipeline performed worse than just using the gates to issue a blunt, fixed refusal without steering at all. Adding the neuron-graph penalty flipped this completely, turning steering from a liability into a major boost.
- True refusal vs. "playing dumb": Does steering genuinely wake up the model's refusal circuitry, or just push activations into a generic, safe-looking fog? Diagnostics show that GSAE preserves the model's internal recognition that a prompt is harmful (0.87 probe retention) while actively shifting token probabilities toward explicit refusals and topic redirections—unlike a naive shift toward safe activation centroids.
- Complementary to weight-tuning: Rather than competing with heavy-duty training defenses like Circuit Breakers, inference-time GSAE stacks neatly on top of them for extra protection without hurting instruction-following utility.
Key Results
The headline metric is selective refusal ($\Delta_s$), defined as the Harmful-Refusal Rate minus the Safe-Refusal Rate (higher means blocking bad stuff while answering good stuff).
- Isolating the Graph Penalty: On
Llama-3-8B-base, swapping a standard SAE for GSAE in an otherwise identical pipeline boosts $\Delta_s$ by +20.1 points on JailbreakBench (from 56.8% to 76.9%), +16.8 on HarmBench (55.3% to 72.1%), and +18.8 on XSTest (56.5% to 75.3%). It also beats the Controller-Only baseline by 12.2, 7.1, and 9.4 points across those three benchmarks. - Speed & Utility: GSAE outperforms external guardrails like Llama Guard (Input+Output) on safety while running nearly 4x faster—170.9 tokens/sec vs. 45.1 tokens/sec on an A100 GPU (unsteered runs at 208.3 TPS), with only an average 4.2-point dip on general utility tasks.
- Cross-Model Generalization: When trained per architecture, GSAE consistently improves selective refusal across
Llama-3 8B,Mistral 7B,Qwen 2.5 14B, andPhi-4 14B, and adds +3.9 safety points when combined with Circuit Breakers onLlama-3.1-8B-Instruct.
Limitations and Future Work
- White-Box Vulnerability: While GSAE holds strong against black-box and gray-box jailbreaks (>71% harmful refusal), if an attacker gains full white-box access to the steering bank, weights, and gate thresholds, refusal drops to 51.9%. Thus, it is best suited for hosted open-weight models where steering internals remain private.
- Requires Internal Access: Because it reads and modifies hidden states, GSAE cannot be wrapped around closed, black-box APIs.
- Static Topology: The neuron co-activation graph is frozen after offline construction and interventions stay locked to their source layers, meaning the bank may not automatically adapt if the base model undergoes later fine-tuning or faces severe distribution shifts. Future directions are not explicitly proposed beyond addressing these static constraints.
Summary updated