Introduction
Deep Neural Networks (DNNs) have revolutionized computer vision, yet they remain notoriously fragile. Tiny, human-imperceptible perturbations to an input—known as adversarial examples—can trick a model into making confident, incorrect predictions. Most state-of-the-art attacks, such as Carlini & Wagner (C&W) or Fast Gradient Sign Method (FGSM), rely on the model's gradients to identify which pixels to manipulate. While various "gradient masking" defenses have been proposed, they are often bypassed by attackers who approximate gradients or use transfer attacks. This paper introduces a hybrid defense strategy that fundamentally breaks the gradient chain by incorporating a non-differentiable component: the Random Forest.
Proposed Architecture
The authors propose a two-stage hybrid model designed to leverage the feature-extraction power of DNNs while eliminating the gradient-based vulnerabilities of their final classification layers.
- Feature Extraction: A standard DNN (e.g., AlexNet or VGG-16) is utilized to extract high-level features from raw input data.
- Non-Differentiable Classification: The final layers of the DNN are replaced with a Random Forest (RF).
Because Random Forests are composed of discrete decision trees rather than continuous mathematical functions, they are non-differentiable. This creates a "hard mathematical wall" for attackers; without a gradient, back-propagation-based attacks have no map to follow. A critical part of this method is determining the "split point"—the layer where the DNN ends and the RF begins. The authors suggest placing the RF at the layer where adversarial distortion (measured by relative $\ell_2$ distance) significantly spikes, effectively quarantining noise before it reaches the final output.
Experimental Evaluation
The researchers evaluated the hybrid approach using the MNIST and CIFAR-10 datasets, employing AlexNet and VGG-16 as backbone architectures. They tested the model against several attack vectors, including white-box, black-box, and decision-based attacks.
Key Results
The hybrid model demonstrated remarkable resilience across all testing scenarios:
- White-Box Immunity: Against the powerful C&W attack, the hybrid model achieved a 0% Attack Success Rate (ASR). Even with full knowledge of the model's weights, attackers could not find a gradient path through the Random Forest.
- Accuracy Preservation: The defense maintains high performance, with classification accuracy typically staying within 0.5% to 2.9% of the original, undefended DNN.
- Black-Box Resilience: Against the ZOO (Zeroth Order Optimization) attack, which estimates gradients without direct access, the ASR dropped from approximately 90% on standard DNNs to less than 6% on the hybrid models.
Discussion and Limitations
By monitoring the "distortion signal" across layers, the paper reveals that different layers have varying abilities to amplify adversarial noise. The hybrid approach not only blocks direct attacks but also significantly reduces the transferability of attacks designed on other models.
However, the defense does introduce some trade-offs. Growing large Random Forests (e.g., 300 trees) can increase computational complexity and slow down inference times. Additionally, while the model is currently resilient to "ultra white-box" scenarios, future research is needed to determine if attackers can develop methods to perfectly simulate RF decision boundaries without relying on gradients. Scaling this approach to massive datasets like ImageNet remains a key objective for future work.
Summary updated