TraceRouter: Robust Safety for Large Foundation Models via Path-Level Intervention
Chuancheng Shi, Shangze Li, Wenjun Lu, Wenhua Wu, Cong Wang, Zifeng Cheng, Fei Shen, Tat-Seng Chua
TL;DR
TraceRouter tackles the problem of safety in large foundation models by arguing that harmful semantics are distributed across cross-layer circuits rather than localized to single units. The method discovers the sensitive onset layer via attention divergence, disentangles signals with a Top-$K$ sparse autoencoder, traces causal propagation with a back-projection and feature influence score, and performs selective path-level suppression to sever harmful pathways while preserving orthogonal utility. Across diffusion models, LLMs, and multimodal LLMs, TraceRouter achieves state-of-the-art defense performance (high defense success rates against jailbreaks and distributed threats) with minimal degradation to general capabilities, validating the path-level intervention paradigm. The approach provides a practical, architecture-agnostic framework for robust safety that targets topological structures of semantic flow, offering significant implications for deploying safer, scalable foundation models in real-world settings.
Abstract
Despite their capabilities, large foundation models (LFMs) remain susceptible to adversarial manipulation. Current defenses predominantly rely on the "locality hypothesis", suppressing isolated neurons or features. However, harmful semantics act as distributed, cross-layer circuits, rendering such localized interventions brittle and detrimental to utility. To bridge this gap, we propose \textbf{TraceRouter}, a path-level framework that traces and disconnects the causal propagation circuits of illicit semantics. TraceRouter operates in three stages: (1) it pinpoints a sensitive onset layer by analyzing attention divergence; (2) it leverages sparse autoencoders (SAEs) and differential activation analysis to disentangle and isolate malicious features; and (3) it maps these features to downstream causal pathways via feature influence scores (FIS) derived from zero-out interventions. By selectively suppressing these causal chains, TraceRouter physically severs the flow of harmful information while leaving orthogonal computation routes intact. Extensive experiments demonstrate that TraceRouter significantly outperforms state-of-the-art baselines, achieving a superior trade-off between adversarial robustness and general utility. Our code will be publicly released. WARNING: This paper contains unsafe model responses.
