Abstract
This paper identifies a critical phenomenon in NLP security termed the Illusion of Robustness (IOR). We demonstrate that many models appearing robust to adversarial attacks are actually victims of extreme miscalibration—either overconfidence or underconfidence—which masks gradients and causes attack algorithms to fail. To address this, we propose test-time calibration to reveal true model vulnerability and introduce High-Temperature Training, a simple yet effective defense that creates a genuine logit-space margin, providing verifiable robustness across multiple NLP benchmarks.
Introduction: The Illusion of Robustness
Adversarial attacks, where minor text perturbations like synonym swaps flip model predictions, are a significant hurdle for NLP deployment. While Adversarial Training (AT) is the standard defense, the authors observed that some models appeared remarkably robust without clear justification.
This research identifies obfuscated gradients as the culprit. In NLP, extreme miscalibration creates an output surface so flat (in overconfident models) or noisy (in underconfident models) that gradient-based attackers cannot find a path to a successful perturbation. This creates a dangerous illusion: the model isn't strong; the attacker is simply blind.
Methods: Piercing the Illusion and Building Real Defense
The researchers tackle the problem through two distinct phases: evaluation and defense.
Piercing the Illusion (Evaluation)
To reveal a model's true vulnerability, the authors propose two test-time calibration methods:
- Naive Temperature Calibration: Adjusting the Softmax temperature ($T$) on a validation set to ensure confidence scores reflect actual accuracy.
- Adversarial Temperature Optimization: Using the Brent-Dekker algorithm to find the specific temperature that makes the model most vulnerable. If robustness disappears after this step, it was an illusion.
Building Genuine Robustness (Defense)
The authors introduce High-Temperature Training. By scaling logits by a very high temperature (e.g., $T=200$) during training, the model is forced to push class logits much further apart to minimize loss. This "bakes in" a physical margin in the representation space that provides protection even after the model is calibrated at test time.
Key Results
The study evaluated these findings across six benchmarks, including Rotten Tomatoes (sentiment), Twitter Emotions, and GLUE tasks (CoLA, QNLI, MRPC).
- Exposing the Illusion: Models that initially appeared to have ~60% adversarial accuracy often dropped to ~20% (baseline levels) once simple test-time calibration was applied.
- Genuine Gains: High-temperature training significantly boosted true robustness. For example, on the Rotten Tomatoes dataset, adding temperature scaling ($\oplus T$) to a baseline model increased adversarial accuracy against the "dg" attack from 21.11% to 35.18%.
Discussion and Limitations
A key insight of this work is that certain popular AT implementation details, such as global gradient normalization, unintentionally cause extreme overconfidence, leading to IOR. High-temperature training serves as a complementary defense that works well with existing methods like PGD or ASCC.
While the empirical results are strong for encoder-based Transformers (BERT, RoBERTa), the impact of IOR on decoder-based Large Language Models (LLMs) remains an open question. Future work may explore dynamic temperature schedules to further optimize the balance between clean accuracy and adversarial robustness.
Summary updated