NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Improving Adversarial Robustness via Guided Complement Entropy

Hao-Yun Chen, Jhao-Hong Liang, Shih-Chieh Chang, Jia-Yu Pan, Yu-Ting Chen, Wei Wei, Da-Cheng Juan

Abstract

Deep neural networks are notoriously brittle, often failing under human-imperceptible adversarial perturbations. Traditional defenses, such as adversarial training, are computationally expensive and frequently degrade performance on clean data. This work presents Guided Complement Entropy (GCE), a novel training objective that provides a "defense for free." By neutralizing the probability distribution of incorrect classes and incorporating a confidence-based guiding term, GCE encourages the model to learn more robust feature representations. We demonstrate that GCE consistently outperforms standard cross-entropy and existing complement objectives across various benchmarks, including CIFAR-10 and Tiny ImageNet, while maintaining or even improving natural accuracy.

Introduction

The susceptibility of state-of-the-art models to adversarial attacks remains a significant barrier to their deployment in safety-critical applications. Most existing defense mechanisms fall into two categories: adversarial training, which involves training on millions of perturbed examples, and defensive distillation. Both approaches introduce significant complexity or performance trade-offs. Guided Complement Entropy (GCE) addresses these issues by serving as a drop-in replacement for the standard Cross-Entropy (XE) loss, building robustness directly into the training process without additional computational overhead.

Methods: Beyond Cross-Entropy

Standard training typically relies on Cross-Entropy loss, which focuses exclusively on maximizing the probability of the ground-truth class. This approach often ignores how the remaining probability mass is distributed among incorrect classes.

Complement Entropy and the Guided Factor

Complement Entropy suggests that a model should not only be correct but also "neutral" regarding incorrect classes, pushing their predicted probabilities toward a uniform distribution. However, standard complement entropy can be difficult to optimize.

The proposed GCE loss introduces a "Guided" factor ($y_{ig}^\alpha$) that scales with the model's confidence in the correct class. When the model is uncertain, it prioritizes learning the correct label. As confidence grows, the GCE loss aggressively flattens the incorrect class distribution, effectively widening the safety margin between decision boundaries.

The behavior of Guided Complement Entropy loss across different values of the hyperparameter alpha.

Key Insights

Latent Space Geometry

A critical finding of this work is the impact of GCE on the model's latent space. Visualizations using t-SNE reveal that while XE-trained models often have classes that "bleed" into one another at the boundaries, GCE forces the model to learn tighter, more distinct clusters. This creates a "no-man's land" between classes, significantly increasing the perturbation required for an attacker to successfully push an input across a decision boundary.

t-SNE visualizations comparing standard Cross-Entropy (left) with Guided Complement Entropy (right), showing more distinct class separation.

Optimization and the "Valley" Problem

Using synthetic data, the authors identified that standard Complement Entropy often creates a flat "valley" in the loss landscape, which can trap optimizers in sub-optimal regions. The "Guided" factor in GCE tilts this landscape, providing a clear gradient that guides the optimizer toward the ideal solution.

Experimental Results

The authors evaluated GCE on MNIST, CIFAR-10, CIFAR-100, and Tiny ImageNet. Key results include:

  • Natural Accuracy: On Tiny ImageNet, GCE achieved a 38.56% error rate, surpassing the 39.54% error rate of the XE baseline. This refutes the common wisdom that robustness must come at the cost of accuracy.
  • Adversarial Robustness: Under the Momentum Iterative Method (MIM) attack on CIFAR-10, the GCE model maintained approximately 15% accuracy, whereas the XE model's accuracy dropped to 0%.
  • Superiority to COT: GCE consistently outperformed Complement Objective Training (COT), the previous state-of-the-art for complement-based losses, across various attack types (FGSM, PGD, C&W).

Conclusion and Limitations

Guided Complement Entropy offers a computationally efficient way to improve model robustness without sacrificing natural accuracy. While the hyperparameter $\alpha$ requires tuning (with $1/3$ suggested as a default) and the method is not a total shield against extremely strong multi-step attacks, it represents a significant step toward "robustness for free." Future work may apply this neutralizing logic to improve model generalization and out-of-distribution detection.

Summary updated

BibTeX
@inproceedings{chen2019improving,
  author = {Hao-Yun Chen and Jhao-Hong Liang and Shih-Chieh Chang and Jia-Yu Pan and Yu-Ting Chen and Wei Wei and Da-Cheng Juan},
  title = {{Improving Adversarial Robustness via Guided Complement Entropy}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2019},
  doi = {10.1109/iccv.2019.00498},
}
Figure