TL;DR
This paper introduces CoTD-PO, a novel reinforcement learning framework for distilling Chain-of-Thought (CoT) reasoning from large "teacher" language models to smaller "student" models. CoTD-PO overcomes limitations of prior methods by enabling students to explore their own reasoning paths and using preference scores instead of direct probability matching, allowing distillation from black-box teachers and improving robustness and diversity.
What Problem Does This Paper Address?
Large language models (LLMs) have shown impressive reasoning capabilities, especially with Chain-of-Thought (CoT) prompting. However, these gains are often tied to model size, making it difficult for smaller models to achieve similar performance. CoT distillation aims to transfer this reasoning ability to smaller models by having them mimic the teacher's step-by-step reasoning.
Existing CoT distillation methods face two main challenges:
- Distribution Mismatch & Exposure Bias: Students are trained to imitate teacher outputs (teacher forcing), but during inference, they must generate outputs autoregressively based on their own previous predictions. This mismatch leads to "exposure bias," where early errors compound, and can cause "mode collapse" or "mode averaging," reducing the diversity and robustness of the student's generated reasoning.
- Black-Box Teacher Limitation: Many powerful teacher models are not open-source, meaning their internal workings and output distributions are inaccessible. This prevents direct probability matching, a common technique in distillation.
Methods
CoTD-PO tackles these issues with a reinforcement learning (RL) approach that shifts from passive imitation to active exploration:
- Active Trajectory Exploration: Instead of strictly imitating teacher-generated CoT steps, the student model is empowered to generate its own reasoning trajectories. The teacher's CoT is used as high-level guidance, aligning the training process with the autoregressive nature of inference and mitigating exposure bias.
- Black-Box Preference Alignment: To distill from black-box teachers, CoTD-PO uses a preference-based scoring mechanism. A reward model (or the teacher itself, if capable) provides scalar "preference scores" for different student-generated answers. These scores are then used to construct a target distribution, effectively approximating the teacher's preferences without needing direct access to its probability distributions. This replaces explicit probability matching with reward-based relative quality scoring.
- Entropy-Regularized Optimization: To further encourage diversity and prevent mode collapse, the training objective includes entropy regularization. This balances the need to align with teacher preferences with the desire for the student to explore a wider range of outputs.
- Iterative Offline Training: The framework employs an iterative offline training procedure for stability and efficiency, involving student answer sampling, teacher preference scoring, and distribution alignment updates.
Datasets
- Training: The UltraFeedback dataset is used, which is described as a large-scale, fine-grained, diverse preference dataset collected from various sources. For training, 8,000 Ultra-Feedback prompts were randomly sampled per iteration.
- Evaluation: Experiments are conducted on instruction-following tasks using three benchmarks:
- AlpacaEval 2.0: Measures real-world task fidelity using user queries and GPT-4-turbo for automated win rate calculation.
- MT-Bench: Provides fine-grained analysis across seven categories using multi-turn prompts and GPT-4-based rubric scoring.
- Arena-Hard-Auto: A benchmark of 500 challenging prompts curated by BenchBuilder.
Key Insights and Ideas
- Student-Led Exploration is Key: Forcing students to perfectly mimic teacher distributions leads to problems when their generative capabilities differ. Allowing students to explore their own paths, guided by teacher preferences, is more robust and leads to better generalization.
- Preferences Over Probabilities: Using preference scores from a reward model or teacher is a viable and effective way to distill knowledge from black-box models, bypassing the need for direct access to their internal probability distributions.
- Balancing Quality and Diversity: Entropy regularization is crucial for preventing mode collapse and ensuring that the student model not only generates high-quality answers but also maintains diverse outputs, which is essential for robust performance on open-ended tasks.
- CoT Guidance is Necessary: Ablation studies show that removing explicit teacher CoT guidance significantly degrades performance, highlighting the importance of this implicit reasoning signal.
Key Results
CoTD-PO consistently outperforms standard CoT distillation baselines across multiple benchmarks and student models.
- Generation Performance: CoTD-PO achieves a peak win rate of 53.80% on AlpacaEval 2.0 LC, surpassing GPT-4-mini by +3.1%. On Arena-Hard, it outperforms all distillation-based approaches and even GPT-4 (0613). On MT-Bench, it narrows the gap with GPT-4 (0613) significantly, achieving 8.54 compared to 9.18.
- Diversity: The method significantly improves lexical diversity (Distinct-1/2) and inter-prompt diversity. While semantic diversity (NLI Diversity) shows a slight reduction compared to some methods, it is still preserved better than methods that suffer from mode collapse.
- Mitigation of Issues: CoTD-PO effectively mitigates distribution mismatch and mode collapse, leading to more robust and diverse generation.
Limitations and Future Work
- Teacher Model Limitations: The study uses general-purpose LLMs like GPT-4 as teachers. These models might not possess the same logical rigor as specialized CoT optimizers, potentially imposing a theoretical upper limit on performance. It's unclear if CoTD-PO would be as effective in distilling highly specialized CoT models.
- Reasoning Chain Validity: The current implementation lacks formal verification of the generated reasoning chains. This means logical missteps (e.g., arithmetic errors) might go undetected during distillation.
- Future Directions: The authors suggest exploring whether their distillation method is effective for distilling models akin to specialized CoT optimizers. Further research could also focus on formal verification of reasoning chain validity.
Summary updated