Towards Robust Neural Networks via Orthogonal Diversity

Kun Fang, Qinghua Tao, Yingwen Wu, Tao Li, Jia Cai, Feipeng Cai, Xiaolin Huang, Jie Yang · DOI

TL;DR

Instead of just feeding a model more "broken" data to make it robust, why not change the model itself? This paper introduces DIO (DIversity via Orthogonality), a defense that embeds multiple mutually-orthogonal classification heads into a network to force the shared backbone to learn more resilient, adaptive features.

What Problem Does This Paper Address?

Deep Neural Networks (DNNs) are notoriously fragile. A tiny, human-imperceptible tweak to an image—an adversarial attack—can cause a state-of-the-art model to confidently misclassify a cat as a toaster.

The standard fix is adversarial training: generating these "attack" images during training and telling the model the correct label. While effective, this is essentially a form of data augmentation. It often leads to a "robustness-accuracy trade-off," where the model gets better at handling attacks but worse at classifying normal, clean images. The authors argue that we should focus on the robustness of the model itself by improving how it learns features, rather than just relying on richer training data.

Methods

The authors propose a novel "model augmentation" strategy called DIO. The core idea is to move away from the standard single-path architecture.

  1. Multi-Head Architecture: They embed multiple parallel "heads" (linear classifiers) after a shared backbone.
  2. Orthogonality Constraint ($L_o$): To ensure these heads don't just learn the exact same thing, the authors impose a constraint that forces the weight matrices of the different heads to be mutually orthogonal.
  3. Margin-Maximization Loss ($L_d$): They introduce a distance-based loss that pushes learned features further away from the classification boundaries of these diverse heads.
  4. Backward Correction: Because all these diverse, orthogonal heads share the same backbone, the training process "backward corrects" the backbone. It forces the earlier layers to extract features that are robust enough to be correctly classified by multiple, very different linear classifiers.
Comparison of regular architecture vs. DIO and feature visualization

During training, all heads are active. During inference, the model randomly selects just one head to make a prediction. Crucially, this is not an ensemble method; it's a single-path prediction that benefits from the diverse training regime.

Figure 3: An illustration on the training and inference of the proposed adversarial defense DIO with a 2-head network structure as an example. During training, all the heads are involved into the forward propagation. The orthogonality constraint Lo is calculated on the 2 heads, while the distance constraint Ld is determined based on the 2 heads and the learned features z from the backbone. The cross-entropy loss is omitted here for simplicity. In inference, only one head is randomly selected to give predictions.

Datasets

The researchers evaluated DIO on three standard computer vision benchmarks:

  • CIFAR-10: 60,000 32x32 color images in 10 classes.
  • CIFAR-100: Similar to CIFAR-10 but with 100 classes.
  • TinyImageNet: A subset of the massive ImageNet dataset, featuring 100,000 images across 200 classes.

Key Insights and Ideas

  • Diversity as a Defense: Just as biological diversity makes an ecosystem resilient, architectural diversity makes a neural network robust. By forcing the backbone to satisfy multiple orthogonal classifiers, the model avoids relying on "brittle" features that are easily manipulated by attackers.
  • Separability in Feature Space: Visualizations show that DIO leads to much cleaner clusters in the feature space (the $z$ layer). Even under attack, the features extracted by a DIO-trained backbone remain more separable than those of a standard network.
  • Synergy with Data Augmentation: DIO isn't a replacement for adversarial training; it's a complement. The authors show that plugging DIO into existing SOTA methods like TRADES or using it with DDPM-generated synthetic data leads to even higher robustness gains.
  • Avoiding Gradient Masking: A common failure in defense research is "gradient masking," where a model isn't actually robust but just makes it hard for attackers to find gradients. Through adaptive attacks, the authors demonstrate that DIO's robustness is genuine and not a result of obfuscated gradients.

Key Results

DIO consistently outperformed other non-data-augmented defenses across various architectures (VGG, ResNet, WideResNet).

  • Vanilla Training: On CIFAR-10, DIO achieved 38.57% accuracy against FGSM attacks, compared to just 25.31% for a baseline model, without significantly hurting clean accuracy.
  • SOTA Integration: When combined with GAIRAT (a powerful adversarial training method) on WideResNet-34-10, DIO reached over 67% robust accuracy against PGD-20 attacks.
  • Black-Box Robustness: DIO showed substantial improvements against black-box attacks like SQUARE, achieving nearly 10% higher accuracy than baselines in some configurations.
  • Efficiency: The multi-head structure adds very little overhead. For a ResNet-18 model, adding 10 heads increased the total parameter count by less than 0.5%.

Limitations and Future Work

  • Structural Modifications: DIO requires changing the network topology. While the overhead is small, it's still an extra step compared to standard training.
  • Task Specificity: The current multi-head approach is designed for classification. The authors note that adapting this "orthogonality diversity" to other tasks like object detection or segmentation is an open challenge.
  • Hyperparameter Sensitivity: The defense relies on tuning the balance between the orthogonality and distance losses ($\alpha$ and $\beta$), which may require careful adjustment for different datasets.

Future research could explore ways to induce this orthogonal diversity within standard single-head architectures or apply these principles to more complex vision tasks beyond simple classification.

Summary updated

BibTeX
@article{fang2020towards,
  author = {Kun Fang and Qinghua Tao and Yingwen Wu and Tao Li and Jia Cai and Feipeng Cai and Xiaolin Huang and Jie Yang},
  title = {{Towards Robust Neural Networks via Orthogonal Diversity}},
  journal = {Pattern Recognition},
  year = {2020},
}
Figure