- Home
- Image Attacks Lab
- Data Poisoning Lab
- Evasion Attacks Lab
- Defense Lab
- LLM Red Teaming Lab
- Model Privacy Lab
- Backdoor / Trojan Lab
- Robustness Evaluation Lab
- My experiments
- Scientific references
- Glossary and FAQ
Detection with Neural Cleanse
Backdoor / Trojan Lab · backdoor
Level 1: idea and analogy
The idea
Reverse-engineers, for each class, the smallest trigger that turns any image into it; a class with a much smaller trigger is suspect.
Analogy
Searching for the smallest key that opens each door; a door opened by a tiny key is suspicious.
Level 2: how it works and when to use it
Steps
1) For each class optimise a mask and pattern. 2) Measure ‖m‖₁. 3) Compute the MAD anomaly index. 4) Flag above a threshold (e.g. 2).
When to use it
Checking an imported model before deployment.
Strengths
Does not need the poisoned training data.
Level 3: mathematics, assumptions, limits
Mathematical form
\min_{m,\Delta}\ \ell\big(y_t,f((1-m)\odot x+m\odot\Delta)\big)+\lambda\|m\|_1;\quad \text{anomaly index}=\frac{|\,\|m_t\|_1-\mathrm{med}|}{1.4826\cdot \mathrm{MAD}}Assumptions
Access to the model and clean samples; a roughly input-independent trigger.
Limitations
Affected by trigger size and shape; may fail on large or dynamic triggers.
Metrics
True detection rate (TDR) and false detection rate (FDR) on poisoned and clean models.
Defenses
Combine with pruning, fine-tuning and supply-chain review.
Level 4: pitfalls and references for researchers
Common pitfalls
Evaluating the detector on a single model; not including clean models.
References
- Wang, B. et al. (2019). Neural Cleanse: Identifying and Mitigating Backdoor Attacks in Neural Networks. IEEE Symposium on Security and Privacy (SP) 2019. Link
