COFFEQA: Counterfactual-Guided Few-Shot Distillation for LLM Question Answering
cs.CL, cs.AI, cs.LG
Submitted: 2026-10-09
Updated: 2026-10-09
License: http://creativecommons.org/licenses/by/4.0/
The gist: Knowledge distillation aims to train a smaller student model to mimic a larger teacher model for resource-constrained environments.
Terminology
Abstract
Knowledge distillation aims to train a smaller student model to mimic a larger teacher model for resource-constrained environments. However, the process of distillation is typically data-intensive and computationally expensive, particularly for generative tasks. Few-shot distillation offers an alternative by transferring teacher knowledge using limited training samples. However, we observe that few-shot distillation performance is heavily dependent on the choice of these training samples. In fact, we demonstrate that using more uncertain samples near the teacher's decision boundary can significantly deteriorate distillation performance. Motivated by this observation, we propose Counterfactual-guided Few-shot Distillation in Open-book Question Answering (COFFEQA), a novel strategy that aptly uses counterfactuals to provide additional supervision around challenging factual samples. In the generative QA setting, we define a counterfactual as a minimally modified context that induces the teacher to change its response to an alternative answer. We provide geometric insights on how factual-counterfactual pairs can constrain the deviation between the teacher's and student's decision boundaries. We further introduce a new metric, Context Following Difficulty (CFD) that further validates counterfactuals prior to distillation based on agreement with the intended alternative answer and dependence on the modified context. COFFEQA uses CFD-validated factual-counterfactual pairs for few-shot distillation. Experiments across five in-domain and three out-of-domain QA benchmarks using T5 and Qwen2.5 families show that COFFEQA outperforms factual-only distillation baselines under the same few-shot budget. For instance, on TriviaQA, COFFEQA improves over the factual-only baseline by 8.77 average EM points and 9.98 average F1 points under the T5 setting with 32 few-shot pairs.
Sources
- GPT-4 Technical Report
- Qwen Technical Report
- TabDistill: Distilling Transformers into Neural Nets for Few-Shot Tabular Classification
- Quantifying Knowledge Distillation Using Partial Information Decomposition
- Few-Shot Knowledge Distillation of LLMs With Counterfactual Explanations
- Distilling the Knowledge in a Neural Network
- Training Compute-Optimal Large Language Models
- The Curious Case of Neural Text Degeneration
- Scaling Laws for Neural Language Models
- Learning the Difference that Makes a Difference with Counterfactually-Augmented Data
- Explaining The Efficacy of Counterfactually Augmented Data
- Hallucination Augmented Recitations for Language Models
- A Comparative Analysis of Counterfactual Explanation Methods for Text Classifiers
- A Survey on the Robustness of Feature Importance and Counterfactual Explanations
- Counterfactual Explanations for Model Ensembles Using Entropic Risk Measures
- Counterfactual Data Augmentation improves Factuality of Abstractive Summarization
- DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lighter
- Gemma 2: Improving Open Language Models at a Practical Size
- Resolving Knowledge Conflicts in Large Language Models
- Cofca: A Step-Wise Counterfactual Multi-hop QA benchmark
Related papers
- Exploring Solution Divergence and Its Effect on Large Language Model Problem Solving
- Ishigaki-IDS-Bench: A Benchmark for Generating Information Delivery Specification from BIM Information Requirements
- Subliminal Steering: Stronger Encoding of Hidden Signals
- MedStruct-S: A Benchmark for Key Discovery, Key-Conditioned QA and Semi-Structured Extraction from OCR Clinical Reports
- The End of Transformers? On Challenging Attention and the Rise of Sub-Quadratic Architectures
- Untangling the Mechanisms of Misleading Context in Medical Question Answering