Skip to content
AI.info

Research

Mitigating Negative Flips via Margin Preserving Training

Overview Research area: Image classification / model-update reliability in computer vision, sitting at the intersection of negative-flip reduction, knowledge distillation, and margin-based learning th

arXiv
2511.08322
Published
2025-11-11
Authors
Simone Ricci, Niccolò Biondi, Federico Pernici, Alberto Del Bimbo

AI summary

Overview

Research area: Image classification / model-update reliability in computer vision, sitting at the intersection of negative-flip reduction, knowledge distillation, and margin-based learning theory.

Technical level: Advanced. The paper assumes familiarity with softmax cross-entropy, logits, decision margins, temperature-scaled knowledge distillation, and evaluation protocols for model updates such as Negative Flip Rate.

Scope: The paper introduces Margin Preserving Training (MPT), a training scheme that combines a class-dependent logit bias with double-source focal distillation to reduce negative flips when new classes (and optionally a larger architecture) are added to an image classifier, evaluated on CIFAR100 and ImageNet1K.

What This Paper Is About

When an AI classifier is updated, some images it used to classify correctly become wrong. These are called "negative flips," and they are a form of regression that can break downstream systems even when the new model's average accuracy looks better. The authors argue that this happens largely because adding new classes shrinks the decision margin of the previously learned classes, and they propose a training method that preserves those old margins while still learning the new categories well.

Key Contributions

  1. Margin Preserving Training (MPT): A method that addresses negative flips by explicitly preserving the logit decision margins of previously learned classes through a margin-calibrated softmax cross-entropy loss, which applies a positive logit bias k to newly introduced classes only (bias 0 for old classes).
  2. Double-source focal distillation: A distillation strategy that draws knowledge from two reference models — the previous model φ_old and a new reference model φ_new trained on all classes with standard cross-entropy — to counteract the underfitting of new classes caused by the margin-calibration term.
  3. Two instantiations of the distillation distance: MPT-KL, using temperature-scaled Kullback-Leibler divergence, and MPT-LM, using Euclidean distance directly on logits, both combined with the margin-calibrated loss.
  4. Empirical validation across benchmarks: Consistent reductions in Negative Flip Rate (NFR) and Relative Negative Flip Rate (Rel-NFR) on CIFAR100 and ImageNet1K, including a setting where the new architecture is upgraded from ResNet-18 to ResNet-50, and an experiment on a ViT-B/32 model fine-tuned on CIFAR100.

Main Findings

  • MPT achieves the lowest NFR in the ResNet-18 setting. On CIFAR100, MPT-KL reaches NFR 9.26 and Rel-NFR 40.67, and MPT-LM reaches NFR 9.26 and Rel-NFR 39.57, compared with 10.56 / 41.91 for ELODI, 11.94 / 45.63 for PCT-KL, and 14.04 / 52.39 for "No treatment."
  • MPT also lowers error on old classes. In the same setting, error rate on Y_old for the old model is 33.27%; MPT-KL reports 34.32% and MPT-LM 35.28%, versus 37.98% for ELODI and 40.40% for "No treatment."
  • Advantage holds on ImageNet1K. With ResNet-18, MPT-KL reports ER on Y_old 24.68%, ER on Y_all 32.76%, NFR 6.09 and Rel-NFR 33.15; MPT-LM reports 25.46%, 34.12%, 6.02 and 31.76. The corresponding "No treatment" numbers are 28.40%, 32.88%, 9.15 and 43.30.
  • The method works when the architecture is also upgraded. With ResNet-18 to ResNet-50, MPT-LM on ImageNet1K achieves NFR 3.49 and Rel-NFR 23.64, and MPT-KL achieves NFR 3.79 and Rel-NFR 26.48; ELODI reports 4.27 / 28.07 and "No treatment" 6.14 / 36.92.
  • Both components are necessary. In the ImageNet1K ablation, removing the bias (k = 0) with KL distillation gives NFR 8.09 and Rel-NFR 39.19, while removing distillation (λ = 0) but keeping the bias gives NFR 7.71 and Rel-NFR 39.49; combining both yields NFR 6.09 and Rel-NFR 33.15 (KL).
  • Margin size matters and is dataset-dependent. On CIFAR100, increasing k generally decreases negative flips while maintaining a competitive error rate, with k = 4 giving the best trade-off; for ImageNet1K a smaller margin of k = 1.5 is used.
  • Results transfer to a pretrained ViT-B/32 fine-tuned on CIFAR100. MPT-KL reports ER on Y_old 15.16%, ER on Y_all 19.51%, NFR 3.26 and Rel-NFR 24.09, the best among compared methods (ELODI: 17.13%, 19.54%, 4.97, 30.69; "No treatment": 19.44%, 19.60%, 7.08, 41.86).
  • Qualitative margin shrinkage is visible. In two-dimensional ResNet-18 embeddings trained on CIFAR10, "No treatment" causes clusters to drift outward and cross neighboring sectors, while MPT keeps each point within its own class region; the authors note the new brown class (Dog) interferes with the old red class (Cat) because they are semantically similar.

Methodology in Plain English

The starting point is a base model trained on a set of classes, which is then replaced by an updated model trained on a larger set that includes new categories. The authors observed that adding classes squeezes the gap (margin) between the correct class score and the next-highest score, making previously correct predictions fragile.

Their fix has two parts. First, during training they add a fixed positive number to the logits of the new classes only. This makes the new classes look artificially confident, so the model does not need to build very distinctive features for them, and consequently it learns and keeps wider margins for the old classes. The bias is removed at inference time, which reveals how well the old classes are actually represented.

Second, because the bias can cause the new classes to be learned poorly, they supervise the model with two teachers at once: the previous model, which knows the old classes well, and a separately trained reference model that was trained on all classes with ordinary cross-entropy and therefore knows the new classes well. The supervision uses a focal distillation loss that up-weights samples the teacher got right, so that correct behavior is reinforced rather than suppressed. Distillation can be done either by matching softened probability distributions (KL divergence with a temperature) or by matching raw logits (Euclidean distance). The final objective sums the margin-calibrated cross-entropy and both distillation terms, weighted by a single coefficient λ (0.4 for the logit-matching variant and 1.0 for the KL variant).

Experiments follow the protocol of prior work: 50% of the classes are used to train the old model and all classes to train the updated model, every model is trained from scratch (described as the most challenging setting and the one producing the highest NFR), and performance is measured with error rate on old classes, overall error rate, Negative Flip Rate, and Relative Negative Flip Rate.

Why This Matters

Impact on research. The paper claims to be the first to systematically study decision-margin preservation in the context of negative-flip reduction. It reframes an instance-level instability problem as a geometric margin problem, and its results suggest that a two-model distillation setup (MPT) can match or beat an ensemble-based method (ELODI, which distills from an ensemble of eight independently trained new models plus one old model) while avoiding ensemble inference cost. It also connects to streams of work on continual learning, incremental learning, sequential learning, and class-imbalanced margin calibration.

Real-world applications.

  • Production model refresh in ML platforms: safely swapping a deployed classifier for a retrained one without breaking downstream post-processing workflows that depend on previously correct outputs.
  • Continuously expanding taxonomies: systems where new categories are added over time, such as product catalogs, content moderation labels, or wildlife/species recognition systems.
  • Assistive and diagnostic tooling: settings where an update that suddenly disagrees with earlier confident predictions can confuse or undermine trust with human users, a risk the paper links to unexpected system behaviors.
  • Architecture upgrades without regressions: as demonstrated by the ResNet-18 to ResNet-50 experiment, teams that adopt a more expressive backbone when retraining can measure and limit the resulting prediction instability.

Industry relevance. The paper's framing — frequent deployment of updated models in production systems — is directly aligned with engineering practice, where average accuracy improvements are traded against regression risk. The reported reduction in negative flips at competitive or better overall error rates is the kind of trade-off that matters for staged rollouts.

Future Directions

  • Removing the extra reference model. The authors list as a limitation that MPT requires training an additional reference model on all classes, which modestly increases computational demands. Finding a way to derive that guidance without the extra training run is an open problem.
  • Reducing dependence on hyperparameter tuning. The paper states that MPT's performance depends on tuning the margin bias, with k = 4 used for CIFAR100 and k = 1.5 for ImageNet1K, and that these sweep experiments were not repeated on ImageNet-1K due to computational constraints. Automatic or adaptive selection of k across datasets and scenarios remains unresolved.
  • Extension to other data types and settings. The introduction notes that regression is observed in both visual and natural language tasks; the paper only evaluates image classification, so transferring MPT to language and other modalities is untested here.
  • Broader margin-preservation theory. Since margins are linked to k, dataset size, and the number of newly added classes, a principled account of how these quantities should relate could replace the empirical search used in this work.

Target Audience

This paper is most useful for machine learning engineers and researchers responsible for deploying updated classification models, particularly those working on model maintenance, continuous retraining, or continuously expanding label sets. It also suits researchers in knowledge distillation and continual/incremental learning who are interested in margins as a tool for prediction stability, and readers familiar with the NFR and Rel-NFR evaluation framework introduced in prior negative-flip work. It is not beginner material: understanding Equation 2 and the ablation requires comfort with logits, softmax, and distillation losses.

Authors’ abstract

Minimizing inconsistencies across successive versions of an AI system is as crucial as reducing the overall error. In image classification, such inconsistencies manifest as negative flips, where an updated model misclassifies test samples that were previously classified correctly. This issue becomes increasingly pronounced as the number of training classes grows over time, since adding new categories reduces the margin of each class and may introduce conflicting patterns that undermine their learning process, thereby degrading performance on the original subset. To mitigate negative flips, we propose a novel approach that preserves the margins of the original model while learning an improved one. Our method encourages a larger relative margin between the previously learned and newly introduced classes by introducing an explicit margin-calibration term on the logits. However, overly constraining the logit margin for the new classes can significantly degrade their accuracy compared to a new independently trained model. To address this, we integrate a double-source focal distillation loss with the previous model and a new independently trained model, learning an appropriate decision margin from both old and new data, even under a logit margin calibration. Extensive experiments on image classification benchmarks demonstrate that our approach consistently reduces the negative flip rate with high overall accuracy.

Read the original paper