Graph-Regularized Sparse Autoencoders for LLM Safety Steering
Abstract
Sparse autoencoders (SAEs) are increasingly used to extract activation directions for inference-time steering, but their standard sparsity objective does not explicitly incorporate neuron co-activation structure. This omission can be poorly matched to high-level safety behaviors, where refusal and harmful compliance appear to depend on distributed structure in activation space. We introduce Graph-Regularized Sparse Autoencoders (GSAE), a dictionary-learning method that learns safety-steering directions by smoothing SAE decoder vectors over a neuron co-activation graph and applying the resulting direction bank through a two-gate runtime controller. Empirically, GSAE improves selective refusal across JailbreakBench, HarmBench, and XSTest, increasing harmful-request refusal while keeping benign-prompt refusals low. On Llama-3-8B, replacing the standard SAE with GSAE in an otherwise identical pipeline improves the selective-refusal score Δs by 20.1 points on JailbreakBench and 16.8 points on HarmBench. GSAE also beats a controller-only baseline, which keeps the gates and fixed refusal but does not steer, by 12.2, 7.1, and 9.4 points on JailbreakBench, HarmBench, and XSTest. On Llama-3.1-8B-Instruct, the gains over the matched SAE pipeline are smaller, at 8.1 and 6.9 points. GSAE outperforms recent activation-steering baselines, retains most benign-task performance, and improves selective refusal on Llama-3, Mistral, Qwen 2.5, and Phi-4 when trained separately for each model.