Abstract
This paper presents a novel approach for detecting Trojan (backdoor) attacks in deep neural networks using Topological Data Analysis (TDA). By analyzing internal activation patterns as a connectivity graph, the researchers identify unique structural "shortcuts" that emerge in Trojaned models. These shortcuts link shallow layers directly to deep layers, providing a robust signature for detection even with minimal clean data. The proposed method, Topo, achieves high AUC scores across multiple benchmarks, significantly outperforming existing state-of-the-art detection techniques.
Introduction
Deep Neural Networks (DNNs) are increasingly vulnerable to Trojan attacks, where malicious triggers are embedded into training data. A Trojaned model functions normally on standard inputs but produces incorrect, attacker-defined outputs when a specific trigger is present. Detecting these backdoors is challenging due to the black-box nature of many models and the scarcity of clean data available to defenders for statistical verification.
Traditional detection methods often rely on reverse-engineering triggers or analyzing input-output distributions, which are computationally expensive and prone to failure in high-dimensional spaces. This research shifts the focus from external behavior to internal structural changes, "opening the hood" to examine how Trojaning alters the network's topological wiring.
Methodology: Topological Data Analysis
The core of the detection method lies in Persistent Homology, a tool from algebraic topology used to characterize the "shape" of data.
- Neuron Connectivity Graph: The network's internal state is modeled as a graph where neurons are nodes. The distance between nodes is determined by the correlation of their activations; neurons that frequently fire together are considered "closer."
- Vietoris-Rips Filtration: The graph is analyzed across varying correlation thresholds. This process tracks the emergence and disappearance of topological features, specifically connected components (0D) and cycles (1D).
- Topological Signatures: These features are summarized into persistence diagrams. The researchers discovered that Trojaned models consistently exhibit 1D cycles that act as "shortcuts," bypassing the standard hierarchical processing logic.
- Data-Limited Detection: To address data scarcity, the method uses pixel-wise perturbations of a few clean images to generate sufficient activation data for accurate correlation estimation.
- The Topo Detector: A simple Multi-Layer Perceptron (MLP) is trained on 12 specific topological features extracted from the persistence diagrams to classify models as clean or Trojaned.
Experimental Setup
The effectiveness of the Topo detector was evaluated on several diverse datasets and architectures:
- MNIST & CIFAR-10: Tested on LeNet5, ResNet18, and DenseNet121.
- NIST TrojAI Competition (Round 1): A large-scale benchmark involving complex traffic sign images and architectures like ResNet50 and InceptionV3.
Key Insights: The "Reflex Arc" Analogy
A primary finding of this work is the "reflex arc" phenomenon. In a clean model, information flows through layers in a structured, hierarchical manner. In contrast, a Trojaned model develops a topological shortcut where neurons sensitive to the trigger become strongly correlated with output neurons. This shortcut allows the trigger to bypass the network's standard logic, much like a biological reflex arc.
While the behavioral output on clean data remains unchanged, the internal structural topology is fundamentally altered. TDA is uniquely capable of identifying these high-order abnormalities that simpler statistical checks might overlook.
Results
The Topo detector demonstrated superior performance compared to baselines like Neural Cleanse (NC) and Universal Litmus Patterns (ULP):
- MNIST (ResNet18): Topo achieved an AUC of 0.97, compared to 0.64 for Neural Cleanse.
- CIFAR-10 (ResNet18): Topo reached an AUC of 0.97, while the best baseline achieved 0.81.
- TrojAI (ResNet): Topo maintained a lead with an AUC of 0.87, significantly higher than ULP's 0.62.
Furthermore, the method is efficient; optimized topological calculations for networks with over 1,400 neurons averaged approximately 28 seconds per model.
Conclusion and Future Work
This research establishes TDA as a powerful tool for model forensics. By identifying structural shortcuts, defenders can detect backdoors with high confidence and minimal data. Future work includes scaling these methods to massive models with millions of neurons and extending the topological approach to other domains such as Natural Language Processing. Additionally, the localization of these topological shortcuts suggests potential for "active defense," where malicious structures could be pruned to sanitize a model without full retraining.
Summary updated