TL;DR
Chain-of-Thought (CoT) prompting unlocks impressive reasoning in language models, but generating explanations token-by-token at test time craters serving throughput. Dual-Head Reasoning Distillation (DHRD) solves this by training a decoder-only model with two heads: an auxiliary language modeling head supervised by teacher-generated rationales (used only during training), and a lightweight pooled classification head (used at inference). This gives classifiers the accuracy boost of multi-step reasoning while running 96–142× faster than test-time CoT decoding.
What Problem Does This Paper Address?
When practitioners adapt modern decoder-only language models (LLMs) for classification, the standard approach is straightforward: pass the sequence through the model, pool the final hidden state (e.g., via HuggingFace's AutoModelForSequenceClassification), and project it to class logits using a small classification head.
While fast, simple pooling rarely leverages the deep multi-step reasoning capabilities LLMs develop during pretraining. Prompting models to "think step by step" (Chain-of-Thought) surfaces these reasoning abilities and substantially improves accuracy on complex tasks. However, generating rationales autoregressively at inference introduces huge latency and computational costs, making CoT impractical for latency-critical or high-throughput production environments (such as real-time content moderation or high-volume retrieval filters).
Methods
DHRD resolves this dilemma by confining rationale generation strictly to training time:
- Dual-Head Architecture: The backbone decoder-only transformer is adapted using PEFT-LoRA and equipped with two heads:
- Classification Head: A 2-layer Multi-Layer Perceptron (MLP) attached to the pooled hidden state of the last input token.
- Reasoning Head: Reuses the model's base language modeling head to predict rationale tokens autoregressively.
- Guarded Teacher Supervision: Training sequences are formatted as
[Input, <REASON>, Rationale, <ANS>, Gold Label]. Rationales are distilled from a teacher model (Gemini 2.5 Flash) prompted with zero-shot CoT. To avoid label leakage into the reasoning trace, the teacher prompt enforces a strict rule: explain why the label is correct without stating the label words (e.g., "Yes/No") directly. - Joint Weighted Objective: The training loss balances standard classification cross-entropy ($\mathcal{L}_{\text{cls}}$) and token-level causal LM cross-entropy ($\mathcal{L}_{\text{reason}}$): $$\mathcal{L}_{\text{total}} = \beta \mathcal{L}_{\text{cls}} + \alpha \mathcal{L}_{\text{reason}}$$
- Inference Without Reasoning: At test time, the reasoning head and rationales are discarded. The model executes a single forward pass directly through the pooled classification head—yielding zero token-decoding overhead.
Training: [Input Text] ──► [Pooled State] ──────► Classification Head ──► Class Loss (β)
│
└─────────► [Teacher Rationale] ─► Reasoning Head ──► LM Loss (α)
Inference: [Input Text] ──► [Pooled State] ──────► Classification Head ──► Prediction (1 forward pass)
Datasets
The authors evaluate on seven SuperGLUE tasks:
- BoolQ, MultiRC, COPA (Question Answering & Causal Reasoning)
- CB, RTE (Natural Language Inference)
- WiC (Word-in-Context / Disambiguation)
- WSC (Winograd Schema / Coreference Resolution)
(ReCoRD is omitted because it is an extractive QA task.) All datasets are converted into a standardized, unified QA prompt format (UnifiedQA-style). No new benchmarks were introduced.
Key Insights and Ideas
- Reasoning can be distilled into static representations: The model does not need to verbalize intermediate tokens at inference to benefit from reasoning. Forcing the representation to predict intermediate reasoning steps during training conditions the encoder's pooled states with structured deductive paths.
- Semantic alignment is required (not just LM regularization): To test whether the gains were just a generic regularization side-effect of auxiliary language modeling, the authors ablated the setup by shuffling rationales and labels. Misaligning rationales dropped performance drastically (macro-average accuracy plummeted by over 45%), proving that the model specifically benefits from semantically coherent input–explanation–label pairs.
- Disproportionate gains on deductive tasks: The largest improvements occur on entailment and cause-and-effect datasets (CB, RTE, COPA). By contrast, tasks like WiC (word sense) and WSC (coreference) show minimal variation, indicating that train-time rationale distillation is particularly potent for tasks that fundamentally require multi-step logical chains.
Key Results
- Higher Accuracy: Across 3B and 8B backbones (Llama-3.1-8B, Llama-3.2-3B, Qwen-3-8B, Qwen-3-4B), DHRD delivers +0.65% to +5.47% relative macro-average gains over baseline pooled classifiers. Llama-3.2-3B achieved a massive +23.5% accuracy jump on COPA.
- Rivaling the Teacher: Both 8B student models trained with DHRD (Llama-3.1-8B at 87.52, Qwen-3-8B at 87.23) surpassed the zero-shot CoT SuperGLUE average of their teacher model, Gemini 2.5 Flash (86.40).
- Massive Throughput Gains: Because it avoids autoregressive generation entirely, DHRD delivers 96× to 142× higher QPS (queries per second) at inference compared to standard CoT decoding on identical hardware (e.g., on Llama-3.2-3B: 631 QPS vs. 4.4 QPS).
Limitations and Future Work
- Rationale Quality Dependence: Gains rely entirely on high-quality, guardrailed teacher rationales; corrupt or unaligned traces degrade model accuracy.
- Hyperparameter Sensitivity: Performance is sensitive to the loss weight $\alpha$. While 8B models handled $\alpha=1.0$, smaller 4B models suffered degradation unless a gentler weight ($\alpha=0.5$) was applied.
- Scope: Experiments only evaluated English text, last-token pooling, and models up to 8B parameters. Generalization to larger models, multilingual contexts, or other modalities remains unverified.
- Future Directions: The authors suggest exploring dynamic loss annealing schedules, soft-label distillation over rationale tokens, span-level auxiliary objectives, and direct comparisons against rationale-compression approaches (e.g., HiddenCoT, CCoT).
Summary updated