Abstract
Deep Neural Networks (DNNs) are increasingly vulnerable to Trojan attacks, where malicious backdoors are embedded during training. While early defenses targeted static, input-agnostic triggers, modern attacks employ sophisticated, input-specific triggers that evade detection. This paper introduces a proactive defense framework based on input purification. By leveraging Variational Input Filtering (VIF) and Adversarial Input Filtering (AIF), the proposed methods neutralize triggers at runtime by passing inputs through a controlled latent bottleneck. Experimental results across multiple benchmarks show that these methods reduce attack success rates to near zero while preserving clean data performance.
The Challenge of Modern Trojan Attacks
Trojan (or backdoor) attacks pose a significant threat to the security of DNNs. In these scenarios, an attacker "poisons" a model during training so that it behaves normally on clean data but misclassifies any input containing a specific "trigger" into a target class.
Existing defenses like Neural Cleanse or STRIP often fail against modern threats because they rely on outdated assumptions. Modern attacks, such as InpAwAtk (Input-Aware) and WaNet (Warping-based), use triggers that change based on the image or distort the image globally, making them difficult to detect with static pattern-matching techniques.
Proposed Defense: Input Purification
Rather than attempting to detect the model's backdoor, this research shifts the focus to "purifying" the input before it reaches the classifier. The core idea is to "scrub" the input enough to deactivate any potential trigger while keeping the primary object recognizable.
Variational Input Filtering (VIF)
VIF treats the filter as a Variational Autoencoder (VAE). It relies on the "lossy compression" property of VAEs: by forcing the input through a latent bottleneck, the filter preserves essential class-related information while discarding "noisy" details—including Trojan triggers that the VAE hasn't been trained to reconstruct.
Adversarial Input Filtering (AIF)
To enhance robustness, AIF employs an adversarial training regime. An auxiliary generator (G) is trained to create "hard" synthetic triggers to fool the filter, while the filter (F) learns to remove them. This "cat-and-mouse" game helps the filter recognize and neutralize a wider variety of potential malicious features.
Filtering-then-Contrasting (FtC)
A common downside of filtering is that it can slightly blur clean images, potentially hurting accuracy. FtC acts as a sanity check: it compares the model's prediction on the original image versus the filtered image. If the predictions differ, the input is flagged as a Trojan; if they match, the original prediction is kept, preserving "clean accuracy."
Experimental Evaluation
The defenses were evaluated on four standard benchmarks: MNIST, CIFAR10, GTSRB, and CelebA. They were tested against five advanced attacks, including state-of-the-art (SOTA) methods like WaNet.
Key Results
- Effectiveness: On MNIST and GTSRB, VIF and AIF reduced Trojan accuracy (attack success rate) from nearly 100% down to less than 2% for most attacks.
- Robustness to SOTA: Against the difficult WaNet attack on CIFAR10, AIF achieved a Trojan accuracy of only 1.22%, significantly outperforming baselines like Neural Attention Distillation (NAD).
- Efficiency: The defenses proved robust even when the defender had access to very small amounts of clean training data (as little as 5% of the test set).
- Clean Accuracy: Thanks to the FtC mechanism, the drop in accuracy on clean, non-Trojan images was kept remarkably low, often below 1%.
Conclusion and Future Work
Input purification via VIF and AIF offers a robust and effective defense against both traditional and modern Trojan attacks. By treating triggers as out-of-distribution noise to be filtered, these methods avoid the need for complex model reverse-engineering. Future work will focus on addressing "heavy" triggers that cover large portions of the image and extending these filtering techniques to other domains such as natural language processing and graph-based data.
Summary updated