What Will My Model Forget? Forecasting Forgotten Examples in Language Model Refinement

Xisen Jin, Xiang Ren

Introduction

Large Language Models (LLMs) are frequently updated post-deployment to correct specific errors or adapt to new information. This process, known as "model refinement," involves fine-tuning the model on a small set of correction instances. However, these updates often trigger "catastrophic forgetting," where the model loses its ability to perform tasks it had previously mastered. For example, a gradient update intended to fix a specific factual error might inadvertently degrade the model's performance on unrelated linguistic tasks.

To mitigate this, practitioners often use "experience replay," mixing original training data with the new refinement data. Yet, standard replay strategies are often inefficient, relying on random sampling that may miss the specific examples most at risk of being forgotten. This paper proposes a novel paradigm: forecasting exactly which upstream examples are likely to be forgotten before the update occurs, enabling a surgical and highly efficient replay strategy.

Methodology: Forecasting Forgetting

The researchers investigated three primary methodologies for predicting forgetting without the computational burden of running full-model inference on the entire upstream dataset.

1. Threshold-based Forecasting

This baseline approach relies on historical data. It predicts that an example will be forgotten based on how frequently it was lost during previous, similar training runs. While simple, it lacks the nuance to account for the specific nature of the new refinement data.

2. Logit-Change Based Forecasting

Inspired by Neural Tangent Kernels (NTK), this "interpretable" method assumes that the change in a model's internal scores (logits) for a new refinement example will transfer to upstream examples based on their similarity. If the forecasted logit for the correct answer in an upstream example drops below a certain threshold, it is flagged for replay. This approach provides a theoretical link between the update's direction and its impact on the broader knowledge base.

3. Representation-based Forecasting

This "black-box" approach utilizes a small, trainable encoder to map examples into a latent vector space. Forgetting is predicted by calculating the inner product (similarity) between the representation of the new error and the upstream examples, combined with a "frequency prior" representing the general likelihood of an example being forgotten. This model proved to be the most robust across different architectures.

Experimental Setup

The researchers evaluated these forecasting methods across several architectures and benchmarks:

  • Models: BART-Large, FLAN-T5-Large, and FLAN-T5-3B.
  • Upstream Data ($D_{PT}$): A balanced sample of 36 tasks from the P3 (Public Pool of Prompts) dataset.
  • Refinement Data ($D_R$): For BART, the test split of P3 was used. For FLAN-T5, the researchers utilized the MMLU (Massive Multitask Language Understanding) benchmark to identify specific errors requiring correction.

Key Insights and Results

Forecasting Accuracy and Efficiency

The Representation-based model emerged as the superior predictor, achieving F1 scores of 79.32 on BART and 67.81 on FLAN-T5. Crucially, these forecasts are computationally efficient. The representation-based model requires approximately 1/6700th of the FLOPs compared to the "ground-truth" method of running full inference to check for forgetting, making it viable for real-time model maintenance.

Surgical Replay Performance

By replaying only the examples forecasted to be forgotten, the researchers significantly reduced the Exact Match (EM) Drop Ratio. On the BART architecture, forgetting was slashed from 9.27% (using vanilla fine-tuning) to just 1.63%. This targeted approach consistently outperformed established continual learning algorithms such as Maximal Interfered Retrieval (MIR) and Online Coreset Selection (OCS).

The Nature of Forgetting

The study revealed that forgetting is not always intuitive. While logit shifts often transfer to similar examples, "similarity" in this context is not always textual or task-based. A model fixing a logic error might forget a seemingly unrelated linguistic task. The forecasting models successfully captured these latent interactions that human intuition often misses.

Limitations and Future Work

Despite the success of the representation-based model, the NTK-inspired logit-change model showed inconsistent performance, working well on BART but failing on T5. This suggests that forgetting dynamics are heavily dependent on specific model architectures. Additionally, the researchers noted a "recall decay" in continual learning scenarios; as a model undergoes multiple successive updates, predicting the next forgetting event becomes increasingly difficult as the model drifts from its original state.

Conclusion

This research represents a shift from "spray and pray" data replay toward a more surgical and predictable approach to LLM maintenance. By forecasting forgetting, developers can maintain model stability and performance with a fraction of the computational overhead required by traditional methods, ensuring that as models learn new things, they don't lose the knowledge that made them useful in the first place.

Summary updated

BibTeX
@inproceedings{jin2024what,
  author = {Xisen Jin and Xiang Ren},
  title = {{What Will My Model Forget? Forecasting Forgotten Examples in Language Model Refinement}},
  booktitle = {International Conference on Machine Learning},
  year = {2024},
  url = {https://openreview.net/forum?id=bzNwexOPWm},
}
Figure