Search papers, labs, and topics across Lattice.
To mechanistically unpack how backdoors operate inside transformer architectures, the authors trained sparse autoencoders (SAEs) across layers, attention heads, MLPs, and residual streams of 1B and 8B language models implanted with trigger-based language-switching trojans. They discovered a stark functional dissociation: while attention and MLP features serve as near-perfect passive detectors of the trigger, they exert negligible causal control over model output. Causal execution instead localizes to specific residual stream features whose ablation suppresses the backdoor and whose activation can induce the trojan payload entirely in the absence of the trigger.
Detecting a backdoor trigger does not mean you can stop it: SAE features in attention and MLPs reliably flag trojan inputs but lack causal control, whereas sparse directions in the residual stream hold full steering power over backdoor execution.
Even though backdoors in LLMs have been a growing concern, their inner workings are still under heavy scrutiny. Trigger-based backdoors are easy to define behaviorally, a rare input that makes the model switch to a chosen response pattern, but the mechanism between triggers and their responses is less clear. We study this mechanism in a controlled, harmless language-switching setting, where fixed trigger sequences make 1B and 8B language models continue English prompts in French or German. For this, we train sparse autoencoders (SAEs) across layers and transformer components, then compare triggered prompts with translation and pretraining controls to identify trigger-relevant feature directions. We show how SAE features separate triggered prompts from controls with near-perfect F1, but features that detect the trigger do not necessarily control the behavior. In intervention tests, attention and MLP features often fire reliably on triggered prompts, making them good detectors, but ablating them rarely suppresses the language switch and activating them rarely induces it. In contrast, residual-stream features can suppress triggered generation when ablated, and some selected features can induce target-language continuations without the trigger. In short, these token-trigger mechanisms decompose into distinct SAE feature directions, with separate features for trigger detection, residual-stream propagation, and later language tracking. This role-level decomposition is the part most likely to transfer to other trigger-based backdoors, even when the payload, layers, or circuit locations differ.