LLM Forensics: Where Do Backdoors Hide? Localizing and Controlling Trigger Mechanisms with Sparse Autoencoders
Wissam Antoun, Francis Kulumba, Théo Lasnier, Benoît Sagot, Djamé Seddah
Abstract
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.
Create a lesson
Metadata
- Comments
- Accepted at Findings of EMNLP 2026
Related papers
RouteRelay: Event-Triggered Cross-Layer Route Reuse for Efficient Dynamic Sparse Attention
Shared title terminologycs.CLBin Li, Sisi Liu, Chenyang Hu et al.
JHealthBench-L: Clinician-Reviewed Localization of HealthBench for Rubric-Based Medical LLM Evaluation in Japan
Shared title terminologycs.CLShohei Hisada, Keisuke Orimo, Kenji Igarashi et al.
Residual Cross-Model Narrative Convergence under Shared Prompts: Auditing Prompt Controls and Narrative Measurement
Shared title terminologycs.CLMehdy Sedaghat Payam
Sparse-to-Sparse Feature Learning for Cross-Layer Analysis and Steering
Shared title terminologycs.CLMasahiro Kaneko, Ayana Niwa, Timothy Baldwin
BCP: A Lightweight Boundary-Controlled Framework for Online Sign Language Recognition and Translation
Shared title terminologycs.CLXiao Ma, Lin Li, Shiqing Wu et al.
Localizing Cross-Lingual Generalization in Parameter Space
Shared title terminologycs.CLYeoreum Lee, Jaeseong Lee, Seung-won Hwang