Adversarial Robustness of Stabilized Neural ODE Might be from Obfuscated Gradients

Yifei Huang, Yaodong Yu, Hongyang Zhang, Yi Ma, Yuan YaoMSML 2021 · OpenReview

Abstract: In this paper we introduce a provably stable architecture for Neural Ordinary Differential Equations (ODEs) which achieves non-trivial adversarial robustness under white-box adversarial attacks even without adversarial training. However, we demonstrate that this apparent robustness is largely an illusion caused by "obfuscated gradients" stemming from the adaptive step sizes used in numerical ODE solvers.

Introduction

Deep neural networks are notoriously vulnerable to adversarial attacks—tiny, invisible perturbations to inputs that cause catastrophic misclassifications. The standard defense is adversarial training (e.g., TRADES), where networks are trained on adversarial examples. However, adversarial training is computationally expensive, unstable to optimize, and often forces a trade-off between natural and robust accuracy.

This research explores whether adversarial robustness can be achieved purely through architectural design by enforcing mathematical stability (Lyapunov stability) in Neural Ordinary Differential Equations (ODEs). While initial results suggest a breakthrough in "free" robustness, a deeper investigation reveals that the success is primarily due to numerical artifacts in the solvers rather than geometric stability.

Methods: Stabilized ODE Networks

The researchers proposed the Stabilized ODE Network (SONet), designed to act as a continuous version of a ResNet. To ensure robustness to input noise, they enforced Lyapunov stability using a skew-symmetric weight design where the second weight matrix is the negative transpose of the first ($W^{(2)} = -W^{(1)T}$), paired with a strictly increasing activation function.

Comparison of the discrete ResNet block and the continuous ODENet block used in SONet.

The full SONet architecture consists of a sequence of these stabilized ODE blocks ($f_{\text{ODENet-k}}$), followed by pooling and a classification head. The researchers also tested a hybrid SOBlock model, where only the initial convolutional layer of a standard ResNet is replaced by a stabilized ODE block.

The full SONet architecture pipeline, featuring a sequence of ODE blocks.

The Illusion of Robustness

Initial evaluations on the CIFAR-10 dataset were startling. Naturally trained SONet and SOBlock models appeared to shatter baseline TRADES models on Projected Gradient Descent (PGD) attacks. For instance, a naturally trained SOBlock achieved 91.57% natural accuracy and 62.35% robust accuracy, significantly outperforming TRADES (76.29% natural, 45.24% robust).

However, the authors discovered an "Aha!" moment: this robustness only occurred when using adaptive step-size ODE solvers (like DOPRI5). When the solver was swapped for a fixed-step method (like Euler or RK4), the robust accuracy plummeted to 0%.

Obfuscated Gradients

Adaptive ODE solvers use error tolerances to dynamically adjust step sizes. This dynamic adjustment creates highly non-linear, unpredictable gradients during backpropagation. This effectively "masks" or obfuscates the true gradient, causing gradient-reliant attacks like PGD to fail. When subjected to attacks that do not rely on standard cross-entropy gradients—such as the CW attack or the gradient-free SPSA attack—the SOBlock's robust accuracy fell to 0% and 11.68%, respectively. In contrast, TRADES maintained its robustness, proving it had learned true features while SONet had merely hidden its gradients.

Conclusion

The study concludes that the adversarial robustness of ODE-based networks using adaptive solvers is largely a mirage. While skew-symmetric architectures provide mathematical stability, they do not provide a silver bullet for adversarial vulnerability. Researchers must be cautious when evaluating Neural ODEs; a reasonable choice of error tolerance in solvers requires a careful trade-off between fitting accuracy and gradient masking. Future work may involve combining these stable architectures with actual adversarial training or randomized smoothing to achieve genuine robustness.

Summary updated

Abstract

In this paper we introduce a provably stable architecture for Neural Ordinary Differential Equations (ODEs) which achieves non-trivial adversarial robustness under white-box adversarial attacks eve...
BibTeX
@inproceedings{huang2021adversarial,
  author = {Yifei Huang and Yaodong Yu and Hongyang Zhang and Yi Ma and Yuan Yao},
  title = {{Adversarial Robustness of Stabilized Neural ODE Might be from Obfuscated Gradients}},
  booktitle = {MSML},
  year = {2021},
  url = {https://openreview.net/forum?id=u0r3EVEjg74},
}
Figure