CEM: A Data-Efficient Method for Large Language Models to Continue Evolving From Mistakes

Haokun Zhao, Jinyi Han, Jie Shi, Chengyu Du, Jiaqing Liang, Yanghua Xiao, Weikang Zhou, Zeye Sun, Fei Yu

TL;DR

Large Language Models (LLMs) struggle to keep up with evolving knowledge and can make mistakes. This paper introduces CEM, a novel method that efficiently collects new knowledge by analyzing LLM errors and uses this to continually update the models. CEM significantly improves LLM performance on various tasks, demonstrating a more robust and adaptable approach to LLM evolution.

What Problem Does This Paper Address?

LLMs are powerful, but the world is constantly changing, and new information emerges all the time. This means LLMs can become outdated, leading to incorrect answers or "hallucinations." Furthermore, LLMs can make mistakes due to a lack of specific knowledge or misunderstanding task formats. While Continual Learning (CL) methods like Continual Instruction Tuning (CIT) and Continual Pre-training (CPT) aim to address these issues, they face challenges. CIT is good at teaching LLMs how to follow instructions but less effective at injecting new knowledge. CPT can inject knowledge but requires a lot of data and can be inefficient. Collecting sufficient, relevant CPT data and efficiently bridging knowledge gaps without causing performance degradation or forgetting previous knowledge remains a significant hurdle.

Methods

The core of CEM is inspired by the human learning strategy of "summarizing mistakes." The method involves an iterative process:

  1. Identify Mistakes: The LLM is tested on a Question Answering (QA) dataset, and its incorrect answers are collected.
  2. Gather Supplemental Knowledge: For each mistake, CEM identifies the underlying knowledge gap. It then uses a lightweight LLM to extract relevant knowledge points and searches for this information using search engines (like Bing) and online encyclopedias (like Wikipedia). This creates a targeted "supplemental corpus."
  3. Construct a Novel Training Set: CEM creates a unique training set that combines Continual Pre-training (CPT) data (the supplemental corpus) with Continual Instruction Tuning (CIT) data. This includes:
  4. Normative Instruction: Standard instruction tuning data to maintain task formats.
  5. Extractive Instruction: Data designed to teach the LLM how to extract relevant information from the supplemental corpus.
  6. Review Instruction: Data derived from previously correct answers to reinforce learned knowledge and mitigate forgetting.
  7. General Instruction: Replayed data from existing instruction-following datasets to prevent catastrophic forgetting.
  8. Iterative Fine-tuning: The LLM is then fine-tuned using this combined training set. This process can be repeated, with new mistakes from the updated model feeding into the next round of knowledge collection and training.

Datasets

The paper uses the following datasets for training and evaluation:

  • Xiezhi: Used as an in-domain QA dataset.
  • CMMLU: Used as an out-of-domain (OOD) QA benchmark.
  • C-Eval: Also used as an OOD QA benchmark.
  • HotpotQA: Used to assess reasoning abilities and investigate catastrophic forgetting.
  • GSM8K: Used to assess mathematical abilities and investigate catastrophic forgetting.

The paper does not introduce new benchmarks but focuses on a novel data collection and training strategy.

Key Insights and Ideas

  • Mistakes as Learning Opportunities: The central idea that an LLM's errors are direct indicators of its knowledge deficiencies is a powerful and intuitive approach to targeted learning.
  • Data Efficiency through Targeted Collection: By focusing on mistakes, CEM avoids the need for massive, generic datasets, making the process much more data-efficient.
  • Synergy of CIT and CPT: Combining instruction tuning (for format and style) with pre-training (for knowledge injection) in a parallel training paradigm is crucial for effective continual learning.
  • Extractive and Review Instructions are Key: The paper highlights that specific instruction types, like "Extractive Instruction" (learning to extract information) and "Review Instruction" (reinforcing past correct answers), significantly boost performance and combat forgetting.
  • Robustness Across Data Sources: CEM shows consistent performance improvements regardless of whether the supplemental corpus comes from Wikipedia, Bing, or a combination, indicating its flexibility.

Key Results

CEM demonstrates significant improvements across multiple LLMs and tasks:

  • Accuracy Gains: CEM achieved substantial accuracy increases, with gains of up to 29.63% on the Xiezhi task for the Llama3-8B-Instruct model. It also showed notable improvements on OOD tasks like CMMLU (up to 10.92%) and C-Eval (up to 5.40%).
  • Error Correction: The Extractive Instruction component of CEM improved the W2R (incorrect to correct answers) metric by 1.45% to 3.22% across models, indicating better error correction.
  • Reduced Forgetting: The Review Instruction component significantly reduced the R2W (correct to incorrect answers) metric, with Llama3-8B-Instruct's R2W performance decreasing by 5.61% compared to CEM-P.
  • Stability: Unlike some baselines that showed performance degradation, all CEM variations consistently delivered positive improvements.
  • Iterative Improvement: Even after multiple rounds of CEM training, performance on the target task continued to improve, demonstrating its iterative potential.

Limitations and Future Work

  • Focus on QA: The current study primarily focuses on question-answering tasks. The authors acknowledge that it's uncertain if CEM can consistently enhance performance in other task types.
  • Adverse Effects of Repeated Learning: Future research will investigate if repeated supplemental learning on already mastered corpora could have negative effects.
  • Diverse Data Sources and Strategies: The authors plan to experiment with more diverse data sources and optimize strategies for collecting supplementary corpora to enhance continual evolutionary capabilities.
  • Catastrophic Forgetting Mitigation: While CEM shows promise, further investigation into combining it with advanced replay-based methods and data balancing techniques is suggested to further mitigate catastrophic forgetting.

Summary updated

BibTeX
@inproceedings{zhao2024cem,
  author = {Haokun Zhao and Jinyi Han and Jie Shi and Chengyu Du and Jiaqing Liang and Yanghua Xiao and Weikang Zhou and Zeye Sun and Fei Yu},
  title = {{CEM: A Data-Efficient Method for Large Language Models to Continue Evolving From Mistakes}},
  booktitle = {ACM International Conference on Information and Knowledge Management},
  year = {2024},
}
Figure