Teaching-Assistant-in-the-Loop: Improving Knowledge Distillation from Imperfect Teacher Models in Low-Budget Scenarios

Yuhang Zhou, Wei AiACL 2024

Introduction

Knowledge Distillation (KD) is the standard technique for transferring the capabilities of massive Large Language Models (LLMs), such as GPT-4, into smaller, more deployable student models. However, real-world implementation faces two significant hurdles: the high cost of querying proprietary teacher APIs and the "noise" introduced by imperfect teacher outputs. If a student is fine-tuned on incorrect demonstrations, its performance suffers—a classic "garbage in, garbage out" scenario. This paper introduces a "Teaching Assistant" (TA) model to mediate the distillation process, optimizing budget usage and filtering out unreliable teacher demonstrations.

The TA-in-the-Loop Framework

The authors propose a three-component framework that inserts a mid-sized TA model (e.g., Vicuna-13B) between the Teacher and the Student. The TA acts as an intelligent gatekeeper, using three distinct signals to manage the flow of information:

  1. Student Internal Signal ($s_i$): Uses "self-consistency" to measure student uncertainty. If the student generates widely varying answers to a question, it is prioritized for teacher annotation.
  2. TA-Student Signal ($s_t$): The TA assesses the student’s output to identify questions in the student's "learning zone"—tasks that are challenging but not impossible.
  3. TA-Teacher Signal ($s_e$): Crucially, the TA also vets the Teacher. If the teacher provides a response that the TA deems low-confidence or likely wrong, that example is discarded and never reaches the student's training set.
The TA-in-the-loop framework utilizes three distinct signals to filter data for the annotation and fine-tuning buckets.

To maximize the reliability of these signals, the researchers employ a Two-Stage Training schema. An initial 10% of the budget is used for a "warm-up" phase, providing the student with a baseline understanding that makes its subsequent uncertainty signals ($s_i$) far more accurate during the remaining 90% of the process.

Experimental Evaluation

The framework was evaluated on four complex reasoning benchmarks: HotpotQA (multi-hop QA), GSM8K (math), Aqua (algebra), and CSQA (commonsense). The experimental setup utilized GPT-3.5-turbo as the teacher, Vicuna (13B/65B) as the TA, and GPT-J-6B or Vicuna-13B as the students.

Key Results and Insights

The TA-in-the-loop approach yielded substantial performance improvements, achieving relative gains of up to 20.79% over standard random-sampling distillation.

Performance comparison across datasets showing the impact of different TA model sizes on student accuracy.
  • Vetting the Teacher is Vital: On the Aqua dataset, where the teacher's zero-shot accuracy was only ~52%, the TA-Teacher signal was a primary driver of success. By refusing to learn from the teacher's mistakes, student accuracy improved from a 13.93% baseline to 25.51%.
  • Efficiency and Scale: The framework proved highly efficient; on HotpotQA, a GPT-J-6B student enhanced by a TA outperformed a much larger Vicuna-13B model that had been fine-tuned on 70k ChatGPT conversations. While larger TAs (65B) generally performed better, even 13B models provided substantial benefits, making the framework viable for users with moderate local compute.

Conclusion

By intelligently selecting which questions to ask and which teacher answers to trust, the TA-in-the-loop framework makes high-quality knowledge distillation accessible even under tight budget constraints. Future work will explore more granular confidence signals and the application of this strategy to even smaller student models (under 1B parameters) to test the limits of this compression strategy.

Summary updated

BibTeX
@inproceedings{zhou2024teaching,
  author = {Yuhang Zhou and Wei Ai},
  title = {{Teaching-Assistant-in-the-Loop: Improving Knowledge Distillation from Imperfect Teacher Models in Low-Budget Scenarios}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2024},
  doi = {10.18653/v1/2024.findings-acl.17},
}
Figure