Abstract
Small Language Models (SLMs) often fail to generalize on reasoning tasks because they learn spurious correlations rather than underlying logic. We present a "Counterfactual Distillation" framework that leverages Large Language Models (LLMs) to generate counterfactual scenarios and multi-view Chain-of-Thought (CoT) rationales. By training SLMs on both positive reasoning (why an answer is correct) and negative reasoning (why alternatives are incorrect) across augmented data, we significantly enhance their reasoning capabilities and out-of-distribution robustness.
Introduction: The Shortcut Learning Problem
While Large Language Models (LLMs) exhibit impressive reasoning abilities, their deployment is often limited by computational costs. Distilling these abilities into Small Language Models (SLMs) typically involves training on LLM-generated Chain-of-Thought (CoT) rationales. However, SLMs are prone to "shortcut learning," where they memorize superficial patterns instead of logical structures. For instance, an SLM might associate the word "egg" with "freezer" simply because they frequently co-occur in training data, failing when the context requires a "barn."
Methodology
To address these limitations, we propose a two-component framework designed to break bad habits in SLMs:
1. Counterfactual Data Augmentation
To break spurious correlations, we disrupt the causal relationships within the training text. The process involves identifying "topic words" and noun phrases in a question, masking them, and using an LLM to generate a new, semantically similar question that leads to a different correct answer. This forces the SLM to attend to the specific linguistic cues that actually determine the logical outcome rather than relying on keyword proximity.
2. Multi-view Chain-of-Thought (CoT)
Standard distillation focuses only on the correct answer. Our "Multi-view CoT" approach provides a more holistic training signal:
- Positive View CoT: Explaining why the correct answer is right.
- Negative View CoT: Systematically refuting each incorrect option.
This dual perspective teaches the SLM a "process of elimination" strategy, mirroring human reasoning and improving decision-making under uncertainty. Training is guided by special tokens like [Direct election] for positive reasoning and [Elimination method] for negative reasoning.
Experimental Results
The framework was evaluated on four knowledge-intensive reasoning benchmarks: CommonsenseQA (CSQA), QuaRel, ARC, and QASC.
- Accuracy Improvements: Across models ranging from 120M to 770M parameters (including GPT-2, OPT, and T5), our method outperformed standard CoT distillation by an average of 11.43%.
- Robustness and Generalization: In Out-of-Distribution (OOD) tests—where models were evaluated on datasets they were not trained on—the counterfactual approach yielded improvements of up to 26.6% over baselines. This suggests the models are learning logic rather than memorizing training sets.
- Efficiency: Smaller models (120M) trained with this method frequently outperformed significantly larger models (350M) trained via traditional distillation.
Conclusion
Counterfactual Distillation effectively mitigates the shortcut problem in SLMs. By exposing models to "what-if" scenarios and teaching them to evaluate all possible choices, we move closer to small-scale models that possess genuine reasoning depth. While the cost of generating high-quality counterfactuals via LLM APIs remains a hurdle, the gains in model robustness and accuracy provide a strong path forward for efficient AI deployment.
Summary updated