Introduction: The Challenge of Negative Flips
In the lifecycle of a production machine learning model, regular updates with new data are essential to maintain relevance and improve performance. However, these updates often introduce "regression bugs." In machine learning, this manifests as "negative flips": instances where a new model, despite having higher overall accuracy, misclassifies a specific input that the previous version handled correctly. For a user of a voice assistant, it is deeply frustrating when a command that worked yesterday suddenly fails today.
Negative flips occur because retraining a model—even on a superset of the old data—leads to a different optimization path. This paper addresses the challenge of achieving backward compatibility: expanding a model's capabilities while ensuring it remains consistent with its previous correct predictions.
Methodology: Backward Compatible Weight Interpolation (BCWI)
The authors propose Backward Compatible Weight Interpolation (BCWI), a simple yet effective method to mitigate regression errors. Instead of deploying the newly trained model ($\theta_{new}$) directly, a hybrid model is created by interpolating its weights with the old model ($\theta_{old}$):
$$\theta_{BCWI} = \alpha\theta_{old} + (1 - \alpha)\theta_{new}$$
Key components of this approach include:
- Initialization: The new model is initialized with the weights of the old model before training. This ensures both models reside within the same "loss basin," making weight averaging mathematically viable.
- FisherBCWI: A variant that uses the diagonal of the Fisher Information Matrix to weight the interpolation, prioritizing weights critical to the old model's performance.
- SoupBCWI: Inspired by "Model Soups," this version averages multiple new models trained with different seeds before interpolation to further stabilize predictions.
- Zero Inference Cost: Unlike ensembling, BCWI results in a single model with the same architecture and inference speed as the original.
Experimental Setup
The researchers evaluated BCWI on three prominent text classification datasets:
- MASSIVE: A multi-lingual NLU dataset with 60 intents.
- Banking77: A fine-grained intent classification dataset for the banking domain.
- AG News: A news topic classification dataset.
Two update scenarios were tested: Add_Data (AD), adding more examples to existing classes, and Add_Classes (AC), expanding the model to support entirely new categories.
Key Results and Discussion
BCWI consistently outperformed traditional backward compatibility methods, such as Knowledge Distillation and parameter-efficient tuning (e.g., BitFit or $IA^3$).
- Drastic Flip Reduction: BCWI reduced negative flips by up to 3x compared to standard retraining while maintaining the target accuracy of the new model.
- Post-hoc Tuning: Unlike methods like Elastic Weight Consolidation (EWC), the interpolation factor $\alpha$ can be tuned after training. This allows practitioners to find the optimal balance between accuracy and consistency on a validation set in seconds.
- Loss Landscape Insights: The effectiveness of simple interpolation stems from the shared initialization. Because the new model is a "descendant" of the old one, interpolating between them moves the model along a path of high accuracy while pulling it closer to the old model's decision boundaries.
Conclusion and Future Work
BCWI provides a production-ready solution for maintaining backward compatibility without additional compute overhead. While highly effective for text classification, future research is needed to determine if these results extend to generative tasks (like LLM summarization) or sequential updates where a model is updated many times over its lifespan.
Summary updated