Robustness-Congruent Adversarial Training for Secure Machine Learning Model Updates

Daniele Angioni, Luca Demetrio, Maura Pintor, Luca Oneto, Davide Anguita, Battista Biggio, Fabio Roli

TL;DR

When we update machine learning models to be "better," they often unexpectedly fail on specific samples they previously handled correctly—a phenomenon known as a negative flip. This paper reveals that these regressions also occur in security, where a new model becomes vulnerable to adversarial attacks that the old model successfully resisted (Robustness Negative Flips, or RNFs). The authors introduce Robustness-Congruent Adversarial Training (RCAT), a theoretically grounded fine-tuning method that uses non-regression constraints to ensure model updates improve performance without sacrificing hard-won security gains on individual samples.

What Problem Does This Paper Address?

In software engineering, a "regression" is when a new update breaks a feature that used to work. In machine learning, we usually measure success by average accuracy. However, even if a new model is 5% more accurate on average, it might still misclassify samples that the old model got right. These are called Negative Flips (NFs).

The authors argue that this problem is even more critical for security. If you update a malware detector to catch new threats, but it suddenly stops catching an old, well-known virus, your system's perceived security drops. They define Robustness Negative Flips (RNFs) as cases where an adversarial attack that failed against the old model now succeeds against the new one.

Fig. 1: Regression modes in machine-learning model updates. Left: Regression of accuracy induced by negative flips (NFs). When updating an old model f old (dashed black line) with a new model f new (solid black line), a test sample x that was correctly classified by f old may be misclassified by f new, causing an NF. Right: Regression of robustness induced by robustness negative flips (RNFs). In a different setting, the test sample x may still be correctly classified by f new. However, while no adversarial examples are found against f old (since the perturbation domain B(x), represented by the dashed gray box around x, never intersects the decision boundary of f old), an adversarial example x′ is found against f new, causing an RNF.

As shown in Figure 1, an NF happens when the decision boundary shifts to misclassify a clean sample $x$. An RNF happens when the boundary shifts such that an adversarial version $x'$ (within a small perturbation budget $\epsilon$) can now cross it, even if the clean sample $x$ is still correctly labeled.

Methods

The authors propose Robustness-Congruent Adversarial Training (RCAT) to mitigate these regressions. RCAT is built on three pillars:

  1. Adversarial Training (AT): The model is trained on "worst-case" adversarial examples to boost overall robustness.
  2. Focal Distillation: Instead of just training on new data, the model is encouraged to mimic the behavior of the old model, but specifically on samples the old model handled correctly.
  3. Non-Regression Constraints: The optimization problem is formulated to minimize a weighted sum of losses. It balances:
  4. Standard adversarial loss on the new data ($\gamma$ term).
  5. Distillation from a high-performing "source" model to maintain state-of-the-art performance ($\alpha$ term).
  6. A specific penalty for deviating from the old model's correct predictions, effectively "locking in" previous successes ($\beta$ term).

Crucially, the authors provide a mathematical proof that adding these non-regression constraints doesn't break the model's ability to learn. They show RCAT is a statistically consistent estimator, meaning it still converges to the "correct" model at the standard rate of $O(1/\sqrt{n})$ as you add more data.

Datasets

The researchers evaluated their method using two standard computer vision benchmarks:

  • CIFAR-10: 60,000 images across 10 classes. They used seven pre-trained robust models from the RobustBench leaderboard to simulate various update scenarios.
  • ImageNet: 50,000 validation images across 1,000 classes, using five robust models from RobustBench.

These models represent different architectures (like ResNets and Transformers) and training strategies, providing a realistic testbed for model replacement.

Key Insights and Ideas

  • The "Better" Model Trap: Even when a new model has significantly lower average robust error, it typically introduces RNFs on 2% to 6% of the test set. Average metrics hide these individual security failures.
  • Accuracy Fixes Can Break Security: Existing methods like Positive-Congruent Training (PCT), which are designed to stop accuracy flips (NFs), actually make robustness flips (RNFs) much worse. In some tests, PCT increased the RNF rate by nearly 35%.
  • RCAT is the "Best of Both Worlds": By explicitly accounting for adversarial robustness in the distillation process, RCAT manages to reduce both NFs and RNFs simultaneously without significantly degrading the final model's average performance.

Key Results

The authors compared RCAT against a "naïve" update (just swapping models) and two baselines: PCT (accuracy-focused) and PCAT (a simple combination of PCT and adversarial training).

  • Superior Trade-offs: In almost all cases, RCAT achieved the lowest combined rate of NFs and RNFs.
  • ImageNet Performance: On ImageNet updates, RCAT improved the RNF rate by +0.66% on average compared to the naïve strategy, while PCT worsened it by a staggering -14.85%.
  • Sequential Stability: When performing a series of updates (Model A $\rightarrow$ B $\rightarrow$ C), RCAT remained stable, whereas other methods saw their robustness metrics deteriorate over time.

Limitations and Future Work

  • Computational Overhead: Like all adversarial training methods, RCAT is more computationally expensive than standard training because it requires generating adversarial examples in every training loop.
  • Hyperparameter Sensitivity: The balance between the three loss terms ($\alpha, \beta, \gamma$) requires careful tuning to find the ideal trade-off for a specific application.
  • Static Data Assumption: The current work assumes the underlying data distribution is constant. The authors suggest that future work should explore non-stationary settings, where both the model and the data distribution (e.g., new types of malware) are evolving simultaneously.

Summary updated

BibTeX
@article{angioni2025robustness,
  author = {Daniele Angioni and Luca Demetrio and Maura Pintor and Luca Oneto and Davide Anguita and Battista Biggio and Fabio Roli},
  title = {{Robustness-Congruent Adversarial Training for Secure Machine Learning Model Updates}},
  journal = {IEEE Trans. Pattern Anal. Mach. Intell.},
  year = {2025},
  doi = {10.1109/tpami.2025.3573237},
}
Figure