The Problem with Standard Cross-Entropy
In standard classification tasks across deep learning, Softmax Cross-Entropy is the dominant primary objective. However, this loss function is inherently "greedy": it pushes the model to maximize the likelihood of the ground-truth class while largely ignoring the distribution of the remaining "incorrect" classes.
This neglect represents a missed opportunity. When a model is forced to be right but isn't taught how to handle the wrong answers, it often assigns disproportionately high probabilities to specific incorrect classes that happen to share features with the target. This creates "messy" decision boundaries and leaves the model highly vulnerable to adversarial perturbations—tiny, calculated changes to an input that can easily tip the model's prediction into a high-confidence incorrect class.
Introducing Complement Objective Training
Complement Objective Training (COT) is a novel training paradigm designed to address this flaw by focusing on what the model shouldn't be sure about.
The authors introduce Complement Entropy, a secondary objective designed to "neutralize" the complement (incorrect) classes. While the primary Cross-Entropy objective maximizes the probability of the correct class, the Complement Objective maximizes the entropy of the remaining classes. In simpler terms, it forces the model to be equally uncertain about all incorrect options. If the model isn't picking the right answer, it should have no strong "runner-up" preference.
How It Works
- Normalization: To ensure the loss remains balanced across datasets with varying numbers of classes ($K$), the complement entropy is normalized by dividing the loss by $(K-1)$.
- The Algorithm: Training proceeds by alternating between two steps in every iteration:
- Step 1: Update parameters to minimize standard Cross-Entropy (maximize the correct answer).
- Step 2: Update parameters to maximize Complement Entropy (flatten the incorrect answers).
Because this approach requires an extra forward and backward pass per iteration, the total training time is approximately 1.6x longer than standard training.
Key Insights: Flattening for Robustness
By preventing any single incorrect class from gaining a high probability, COT creates cleaner and more separable boundaries in the latent space.
As seen in t-SNE visualizations, COT clusters are significantly "narrower" with more distinct gaps between classes compared to standard training. This structural change in the latent space yields two major benefits:
- Adversarial Defense: Because the model is explicitly trained to suppress runner-up classes, an adversarial attacker has to work much harder to push a sample across a decision boundary. The "gap" between the correct class and the next best guess is substantially wider.
- Generalization: Neutralizing complement classes helps the model generalize better to unseen data, as it reduces the likelihood of the model "challenging" the ground truth with a high-probability incorrect class during inference.
Empirical Results
The authors validated COT across a wide array of benchmarks in both Computer Vision (CV) and Natural Language Processing (NLP), including CIFAR-10, CIFAR-100, SVHN, Tiny ImageNet, ImageNet-2012, IWSLT 2015, and the Google Commands Dataset. COT consistently outperformed state-of-the-art baselines:
- CIFAR-10: ResNet-110 error dropped from 7.56% to 6.84%.
- SVHN: ResNet-110 error dropped from 4.94% to 4.36%.
- ImageNet: ResNet-50 Top-1 error improved from 24.7% to 24.4%.
- Machine Translation: On the IWSLT 2015 dataset, BLEU scores improved (e.g., from 26.1 to 26.4 using beam search).
The most dramatic result, however, was in adversarial robustness. Under a white-box FGSM attack on CIFAR-10, a standard ResNet-110 suffered a 62.23% error rate. The COT-trained version dropped that error rate significantly to 52.72%.
Limitations and Future Directions
While COT offers clear benefits for generalization and robustness, the primary drawback is the computational overhead. The 1.6x increase in training time is a fair trade for many applications, but it may present a hurdle for extremely large-scale models.
Furthermore, the paper primarily focuses on single-step adversarial attacks like FGSM. The behavior of COT under more sophisticated, multi-step iterative attacks deserves further investigation. Finally, while the authors chose entropy as the "complement" function, they suggest that exploring other non-entropy-based objectives, as well as applying COT to generative models (like GANs) or object detection, remain exciting open research questions.
Summary updated