Mechanistic Anomaly Detection via Functional Attribution
Hugo Lyons Keenan , Christopher Leckie , Sarah Erfani
Published on arXiv
2604.18970
Model Poisoning
OWASP ML Top 10 — ML10
Input Manipulation Attack
OWASP ML Top 10 — ML01
Key Finding
Achieves average Defense Effectiveness Rating of 0.93 on BackdoorBench across seven backdoor attacks and four datasets, outperforming next-best baseline at 0.83
Mechanistic Anomaly Detection via Functional Attribution (MAD)
Novel technique introduced
We can often verify the correctness of neural network outputs using ground truth labels, but we cannot reliably determine whether the output was produced by normal or anomalous internal mechanisms. Mechanistic anomaly detection (MAD) aims to flag these cases, but existing methods either depend on latent space analysis, which is vulnerable to obfuscation, or are specific to particular architectures and modalities. We reframe MAD as a functional attribution problem: asking to what extent samples from a trusted set can explain the model's output, where attribution failure signals anomalous behavior. We operationalize this using influence functions, measuring functional coupling between test samples and a small reference set via parameter-space sampling. We evaluate across multiple anomaly types and modalities. For backdoors in vision models, our method achieves state-of-the-art detection on BackdoorBench, with an average Defense Effectiveness Rating (DER) of 0.93 across seven attacks and four datasets (next best 0.83). For LLMs, we similarly achieve a significant improvement over baselines for several backdoor types, including on explicitly obfuscated models. Beyond backdoors, our method can detect adversarial and out-of-distribution samples, and distinguishes multiple anomalous mechanisms within a single model. Our results establish functional attribution as an effective, modality-agnostic tool for detecting anomalous behavior in deployed models.
Key Contributions
- Reframes mechanistic anomaly detection as functional attribution problem using influence functions via parameter-space sampling
- Achieves SOTA backdoor detection on BackdoorBench with DER 0.93 across 7 attacks and 4 datasets (next best 0.83)
- Demonstrates modality-agnostic detection of backdoors, adversarial examples, and OOD samples across vision and LLM models
🛡️ Threat Analysis
Secondary capability: method also detects adversarial examples at inference time, demonstrating broader anomaly detection beyond backdoors.
Primary contribution is a backdoor detection method achieving SOTA on BackdoorBench (DER 0.93 vs 0.83) across vision and LLM models, including obfuscated backdoors.