LPC: A Logits and Parameter Calibration Framework for Continual Learning

Xiaodi Li, Zhuoyi Wang, Dingcheng Li, Latifur Khan, Bhavani ThuraisinghamEMNLP 2022

Abstract

Catastrophic forgetting remains a significant challenge in continual learning, where neural networks tend to overwrite previously learned knowledge when acquiring new tasks. We present the Logits and Parameter Calibration (LPC) framework, a data-free approach that mitigates forgetting by simultaneously calibrating model outputs and internal weights. LPC integrates a novel Cross Entropy with Logits Calibration (CELC) loss and a parameter preservation strategy with an annealing coefficient into the optimization process. Experimental results on the GLUE benchmark demonstrate that LPC significantly outperforms existing regularization-based methods, maintaining high performance across sequential tasks without requiring access to historical training data.

Introduction

In deep learning, models are notoriously "forgetful." When a pre-trained model like BERT is fine-tuned on a sequence of tasks, the weights essential for earlier tasks are often overwritten to accommodate new data—a phenomenon known as catastrophic forgetting. Existing solutions typically rely on replay-based methods, which store old data samples (raising privacy and memory concerns), or regularization-based methods, which penalize weight changes but often fail to bridge the knowledge gap between diverse tasks. LPC aims for a "data-free" approach, preserving old knowledge without ever revisiting previous data samples.

The LPC Framework

The LPC framework introduces a two-pronged calibration strategy integrated directly into a modified Adam optimizer. This dual approach ensures that both the model's external predictions and its internal representations remain stable as new tasks are learned.

1. Logits Calibration (LC)

Instead of training solely on new labels, LPC evaluates how the previous version of the model reacts to the new data. It utilizes a specialized loss function: Cross Entropy with Logits Calibration (CELC). If the old model was highly confident about a certain feature in the new data, the new model is rewarded for maintaining that logic. This effectively uses the old model's output distribution as "ghost data" to preserve its reasoning style.

2. Parameter Calibration (PC)

This component focuses on the internal weights of the encoder through two mechanisms:

  • Previous Parameter Preservation (PPP): It calculates an importance weight ((\Omega)) for every parameter based on gradient sensitivity, shielding vital parameters from large changes.
  • Current Task Training (CTT): This uses an annealing coefficient ((\lambda(t))). At the start of a new task, the model focuses on mimicking old parameters. As training progresses, it gradually shifts focus toward the new task's requirements. This smooth transition prevents the sudden weight shocks that typically cause forgetting.
Figure 1: The LPC Framework architecture, illustrating the dual-calibration of logits and parameters during the training of current tasks.

Experimental Evaluation

The authors evaluated LPC using the GLUE (General Language Understanding Evaluation) benchmark, testing on nine diverse tasks including sentiment analysis (SST-2), linguistic acceptability (CoLA), and various inference and similarity tasks (MNLI, MRPC, etc.). Experiments were conducted using both BERT-base and ALBERT-xxlarge as backbone architectures.

Results and Discussion

LPC demonstrated superior performance across the board compared to baseline optimizers (Adam) and popular continual learning methods like EWC, MAS, SI, and RecAdam.

As shown in the sequential task training results, LPC achieved an average accuracy of 65.9%, significantly higher than the next best competitor, SI (60.8%), and nearly double that of RecAdam (43.4%) in specific sequences. On the CoLA dataset—historically difficult for retention—LPC maintained a Matthew’s Correlation Coefficient (mcc) of 27.1, while RecAdam plummeted to 2.0.

Figure 4: Continual learning performance on GLUE tasks. LPC demonstrates superior accuracy and significantly lower forgetting (fgt) compared to other regularization methods.

Qualitative analysis of parameter distance showed that LPC's weights stayed much closer to the original pre-trained state than standard fine-tuning, proving it successfully resisted overwriting essential features. The use of the sigmoid annealing function was identified as a key factor, allowing the optimizer to find a trajectory in the parameter space that satisfies both old and new task requirements.

Conclusion and Future Work

LPC offers a robust, data-free solution to catastrophic forgetting by calibrating both logits and parameters within the optimization loop. While highly effective, the framework currently relies on labeled data for the current task to perform calibrations. Future research will focus on adapting LPC for unsupervised or semi-supervised online learning environments, where models must learn from unlabeled data streams without explicit human guidance.

Summary updated

BibTeX
@inproceedings{li2022lpc,
  author = {Xiaodi Li and Zhuoyi Wang and Dingcheng Li and Latifur Khan and Bhavani Thuraisingham},
  title = {{LPC: A Logits and Parameter Calibration Framework for Continual Learning}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2022},
  url = {https://openreview.net/forum?id=F1Rfd40NMl},
}
Figure