Abstract
Deep neural networks are notoriously vulnerable to adversarial examples—small, calculated perturbations that induce misclassification. This paper presents a dual-action defense strategy that integrates a novel stochastic regularization term, NsLoss, with Jacobian regularization. NsLoss flattens the loss landscape by penalizing neural activation sensitivity to random noise, while Jacobian regularization increases the margin to decision boundaries. Experimental results on MNIST and CIFAR-10 demonstrate that this combined approach provides significant resilience against both white-box and black-box attacks, including sophisticated adaptive strategies.
Introduction
Adversarial examples remain a critical challenge for the deployment of machine learning in security-sensitive applications. Current defenses generally follow two paths: obfuscating gradients to hinder optimization-based attacks or increasing the distance between data points and decision boundaries. However, defenses focusing on a single aspect are often bypassed by adaptive attackers who switch between gradient-free boundary attacks or use techniques to circumvent gradient masking. This research addresses the need for a holistic defense that simultaneously flattens the loss surface and pushes decision boundaries further away.
Methodology
The proposed training objective incorporates three distinct components to achieve robust classification:
- Standard Cross-Entropy Loss: Maintains high accuracy on clean data.
- Jacobian Regularization: Penalizes large output changes relative to small input changes, effectively widening the safety margin around data points.
- Neural Sensitivity Loss (NsLoss): The core innovation of this work. NsLoss is a stochastic regularization term that measures the sensitivity of individual neuron activations to random noise.
The NsLoss calculation involves sampling $N$ random perturbations for each training sample within a defined $L_2$ radius ($NsEps$). The activations for both clean and perturbed inputs are recorded across specified layers. The loss is then computed as the normalized difference between these activations, ensuring that the model's internal state remains stable under input noise. By minimizing NsLoss, the model is encouraged to develop a "flat" loss landscape where gradients are minimized in the vicinity of training samples.
Experimental Setup
The defense was evaluated using VGG19 on the CIFAR-10 dataset and a standard CNN on MNIST. The researchers tested the "Combined" model (NsLoss + Jacobian) against various attack vectors:
- White-Box Attacks: Carlini & Wagner (C&W) $L_2$ attacks.
- Black-Box Attacks: HopSkipJump boundary-based attacks.
- Adaptive Attacks: Random restarts and Gradient Expectation (GE) to test the stability of the loss surface.
Key Results
The "Combined" model consistently outperformed single-method baselines. On MNIST, the model maintained approximately 96% accuracy under C&W attacks, compared to near 0% for undefended models. On CIFAR-10, accuracy remained between 70-74% even under significant perturbations. In black-box scenarios using the HopSkipJump attack, the Combined model forced attackers to use much larger perturbations to achieve misclassification, resulting in 89-97% accuracy on MNIST.
Crucially, the model demonstrated high resilience to adaptive attacks. As shown in the results, increasing the number of random restarts or using gradient expectation did not significantly degrade performance, indicating that the loss landscape is truly flat rather than merely noisy.
Conclusion
This work demonstrates that combining gradient flattening via NsLoss with boundary pushing via Jacobian regularization creates a robust defense against a wide array of adversarial threats. While the computational cost of calculating NsLoss (requiring multiple forward passes per sample) and the need for careful hyperparameter tuning are notable limitations, the resulting "structural" robustness provides a promising path forward. Future research will focus on scaling these techniques to larger datasets and more diverse architectures.
Summary updated