UniCoTT: A Unified Framework for Structural Chain-of-Thought Distillation

Xianwei Zhuang, Zhihong Zhu, Zhichang Wang, Xuxin Cheng, Yuexian ZouICLR 2025

TL;DR

UniCoTT is a novel distillation framework designed to teach small language models (SLMs) how to reason by mimicking the complex, non-linear thought structures of large language models (LLMs). By representing reasoning as chains, trees, or graphs and utilizing specialized "structural consistency" losses, UniCoTT significantly boosts the performance of models under 1 billion parameters across factual reasoning and Natural Language Understanding (NLU) tasks.

The Problem with Current CoT Distillation

Chain-of-Thought (CoT) prompting—where a model explains its step-by-step reasoning before providing an answer—is a powerful capability typically reserved for massive models with over 100 billion parameters. Researchers frequently attempt to "distill" this ability into smaller, more efficient SLMs by having a large "teacher" model generate explanations for a small "student" model to learn from.

However, two major hurdles remain in standard CoT distillation:

  1. Hallucinations: Teacher models often generate explanations that are logically disconnected from the actual answer. The student model then learns to produce "rationalized" nonsense.
  2. Structural Rigidity: Most distillation methods assume reasoning is a simple linear chain. In reality, human-like reasoning often involves branching paths (trees) or interconnected webs of logic (graphs).
Comparison of Vanilla CoT Distillation and UniCoTT

The UniCoTT Method

To address these limitations, the authors introduce UniCoTT (Unified Framework for Structural Chain-of-Thought Distillation), which treats reasoning as a structural bridge between the teacher and student models.

The UniCoTT Framework Architecture

The framework operates through several key mechanisms:

  • Iterative Construction (The Teacher): Instead of asking an LLM for a single block of text, UniCoTT prompts the teacher to build a "UniCoT" iteratively. It uses the known correct answer as a guide to ensure the reasoning stays on track. The result is a set of "thought nodes" connected in a specific structure (Chain, Tree, or Graph).
  • Unified Representation: Regardless of the shape (tree vs. graph), the reasoning is converted into a Relation Matrix. This matrix quantifies how "close" each reasoning step is to the final answer.
  • Node-level Supervised Contrastive Learning ($L_{nsc}$): The student model is trained to ensure that reasoning nodes leading to the same answer have similar internal representations, while those leading to different answers are pushed apart in the model's latent space.
  • Structural Consistency Learning ($L_{sc}$): To minimize structural error, the authors mathematically derived an upper bound and implemented two specific losses:
  • Decoupling Loss: Ensures the model learns distinct, non-overlapping features for different parts of the reasoning.
  • Entanglement Loss: Reduces correlation between dimensions to make the representation more efficient.

Key Insights and Results

UniCoTT was evaluated across a wide variety of benchmarks, including factual reasoning (CREAK, StrategyQA, CSQA2), multiple-choice QA (CSQA, QASC, OBQA), NLU (CoLA, RTE, MNLI, MRPC), and mathematical reasoning (GSM8K).

Structure Matters

The paper demonstrates that "Tree" and "Graph" reasoning structures often outperform simple "Chains." Complex problems require backtracking and parallel logic, which a linear chain cannot adequately capture.

Massive Gains in SLMs

UniCoTT consistently outperformed standard CoT distillation and state-of-the-art methods like SCOTT. On the CSQA2 dataset, UniCoTT (using a Graph structure) with a BERT-base student achieved an accuracy of 83.8%, compared to just 71.1% for standard CoT distillation.

Architecture Agnostic

While primarily tested on encoder models (BERT, RoBERTa, XLNet), the framework also works for decoder-only models. Using Qwen2.5-3B as a base, UniCoTT improved factual reasoning on CSQA2 by 11.7%.

Rationality Boost

Using the LAS metric—which measures how much an explanation actually helps a model predict an answer—UniCoTT scored significantly higher than competitors. This proves the generated explanations are more logical and less prone to hallucination, largely because the framework uses the gold answer to "anchor" the teacher during prompt construction.

Limitations and Future Work

While highly effective, UniCoTT relies on access to powerful LLM APIs (like GPT-4) to construct the initial reasoning structures, which can be expensive for massive datasets. Additionally, the choice of structure (chain, tree, or graph) is currently pre-defined. Future work will explore models that can dynamically choose the optimal reasoning structure for a specific question and expand the framework's application to even broader domains.

Summary updated

BibTeX
@inproceedings{zhuang2025unicott,
  author = {Xianwei Zhuang and Zhihong Zhu and Zhichang Wang and Xuxin Cheng and Yuexian Zou},
  title = {{UniCoTT: A Unified Framework for Structural Chain-of-Thought Distillation}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=3baOKeI2EU},
}
Figure