Skip to content
AI.info

Research

DICE: Structured Reasoning in LLMs through SLM-Guided Chain-of-Thought Correction

Overview Research area: Natural language processing; specifically large language model (LLM) instruction following, chain-of-thought reasoning, and small language model (SLM)-LLM collaboration. Techni

arXiv
2510.09211
Published
2025-10-10
Authors
Yiqi Li, Yusheng Liao, Zhe Chen, Yanfeng Wang, Yu Wang

AI summary

Overview

Research area: Natural language processing; specifically large language model (LLM) instruction following, chain-of-thought reasoning, and small language model (SLM)-LLM collaboration.

Technical level: Intermediate. Readers will benefit from familiarity with chain-of-thought prompting, supervised fine-tuning, LoRA, and reinforcement-learning-style fine-tuning (GRPO), though the paper's core idea is explained in accessible terms.

Scope: The paper introduces DICE, a framework in which a trained small language model corrects and reformats the natural-language outputs of a much larger LLM into strict structured formats (XML, JSON, YAML) for reasoning tasks, without touching the LLM's parameters.

What This Paper Is About

When LLMs are asked to solve reasoning problems under strict output-format requirements, they often focus on solving the problem at the expense of following the format instructions. The paper reports a counterintuitive trade-off: on MATH with 2-shot prompts, format accuracy peaks at mid-scale models and declines in larger models (the paper cites 32B and 72B parameters), even though those larger models reason better. Since fine-tuning LLMs is costly, risks catastrophic forgetting, and is impossible for API-only models, DICE instead uses a small, trainable model to analyze and refine the LLM's natural-language answer into the required structure.

Key Contributions

  1. Identification of the scale trade-off. The authors state they are the first to identify a negative correlation between instruction-following ability and model scale in reasoning tasks: larger models reason better but adhere to instructions less reliably.

  2. The DICE framework. A lightweight, plug-and-play framework that adapts LLMs to structured reasoning tasks by guiding an SLM to "think with chain-of-thought correction," leaving the LLM's parameters unmodified and thereby avoiding the "alignment tax" of fine-tuning.

  3. A structured chain-of-thought adaptation dataset construction pipeline. A two-stage procedure (described as akin to STaR) that prompts a pretrained SLM to produce rationales for the LLM's natural-language output, filters for rationales that lead to correct predicted answers, and, for the filtered-out hard samples, regenerates rationales with the answer label appended as a contextual hint.

  4. A dual-tuning strategy for the SLM. Supervised fine-tuning with LoRA to acquire format specifications and the analyze-then-answer pattern, followed by GRPO fine-tuning with a reward that scores only format and answer correctness and ignores the rationale.

Main Findings

  • Overall gains: Compared with the LLM using ICL (2-shot prompting), DICE improves average format accuracy by 35.4% and average content accuracy by 29.4%.

  • Near-perfect format compliance: With an SLM under 3 billion parameters, DICE achieves format accuracy approaching 100% consistently across all evaluated datasets. In Table 1, DICE with the 72B LLM and a 1.5B SLM reaches average F-Acc 99.9 and C-Acc 85.7, versus 98.2 and 81.7 for CoBB.

  • Beats collaboration baselines: DICE's average content accuracy gains over Aligner, BBox-Adapter, and CoBB are 18.4%, 16.1%, and 3.6% respectively.

  • LLM alone is unstable: The Qwen2.5-72B-Instruct-GPTQ-Int4 largely fails to follow formatting with no demonstrations, and under ICL its format accuracy varies widely — on MATH it falls below 5%. A reflection baseline (feeding format-violated outputs back to the LLM) shows little improvement.

  • Works across formats: On MATH with a 1.5B SLM, DICE reaches F-Acc 99.8 / C-Acc 80.0 for JSON and F-Acc 100.0 / C-Acc 79.6 for YAML, the highest in both cases.

  • Cross-model generalization: A 1.5B SLM trained to adapt Qwen2.5-72B-Instruct-GPTQ-Int4 was applied to Qwen2.5-7B-Instruct, Meta-Llama-3-8B-Instruct, and GPT-4.1-mini, achieving average F-Acc exceeding 99.5%. Average C-Acc gains over ICL were 16.3% (Qwen2.5-7B-Instruct), 5.8% (Meta-Llama-3-8B-Instruct), and 0.6% (GPT-4.1-mini).

  • Cross-dataset generalization: In GSM8K-to-MATH and MATH-to-GSM8K transfers, DICE achieves SOTA across all four evaluation dimensions. Applying GSM8K-trained models to MATH, DICE's C-Acc exceeds all baselines by at least 35%.

  • Low mis-correction: Using consistency metrics (Consistent Correct Rate, Correction Rate, Mis-correction Rate, Consistent Error Rate), DICE keeps the Mis-correction Rate below 2% across all datasets. Aligner and CoBB are described as suffering from an "over-correction dilemma": relatively high correction rates but also high mis-correction rates.

  • Modest latency cost: Over 100 MATH test-set samples on two NVIDIA A100 GPUs, DICE averages 1.0999 s/sample versus 0.9191 s/sample for LLM with ICL — roughly 20% additional latency — while raising C-Acc from 4.2 to 79.8. The authors state content accuracy improves by over 70% on MATH and by an average of more than 25% across the five reasoning tasks.

  • Ablation on tuning strategy: For 1.5B SLMs trained for 3 epochs, GRPO alone is weakest (MATH 92.0 F-Acc / 73.2 C-Acc; CSQA 89.2 / 77.2), SFT alone is strong (98.4 / 75.6; 100.0 / 82.8), and SFT+GRPO is best (99.8 / 78.8; 100.0 / 85.6).

  • Ablation on output correctness ratio: Holding the MATH training set at 5,000 samples and varying the proportion of correct LLM outputs (100%, 75%, 50%, 25%) across four 1.5B SLMs, higher correctness ratios make the SLM inherit the LLM's answers (reducing mis-corrections and pairing better with stronger LLMs), while lower ratios strengthen correction ability (better with weaker LLMs). The trend is not linear — 25% was suboptimal across all LLM backbones — and the 50% configuration achieved the best performance and greater stability.

  • Rationale generation coverage: After the two-stage rationale construction, the SLM produces rationales yielding correct predictions for over 90% of the original training split; remaining filtered-out samples are discarded in the second stage.

Methodology in Plain English

DICE separates reasoning from formatting across two models.

  1. The LLM answers in plain language. The large model is prompted simply to solve the question, so it is not distracted by output-format rules.

  2. Build training data for a small model. The pretrained SLM is asked to produce a rationale (its reasoning about the LLM's output) plus a predicted answer. Samples where that prediction matches the ground truth are kept. For the rest, the ground-truth label is added to the input as a hint and the SLM tries again; successful attempts are kept too. The retained rationales are then embedded together with the correct answer into the required template, forming a structured chain-of-thought dataset of the form (question, LLM output, target).

  3. Train the SLM in two stages. Plain supervised fine-tuning would over-weight the rationale, because the rationale is by far the longest part of the target — on MATH with XML output the average token ratio between format tokens, rationale, and answer is about 25:135:1. So the authors first run SFT with LoRA to learn the format and the analyze-then-answer habit, then run GRPO with a simple reward: 2 points if both the format and the answer are correct, 1 if one is, 0 if neither. The rationale receives no reward.

  4. At inference, the LLM produces a natural-language answer and the trained SLM analyzes and reformats it. Because the SLM sees the LLM's reasoning, it can correct errors rather than blindly rewriting.

Evaluation uses five benchmarks covering mathematical reasoning (GSM8K, MATH), commonsense reasoning (CommonsenseQA/CSQA), domain-specific reasoning (MedQA-zh), and implicit reasoning (StrategyQA), with outputs restructured into XML (and additionally JSON and YAML on MATH). Two metrics are reported: Format Accuracy (F-Acc), which checks structural elements and keywords, and Content Accuracy (C-Acc), derived from Exact Match on the extracted final answer, where format compliance is a necessary condition for content accuracy.

Why This Matters

Impact on research. The paper reframes SLM-LLM collaboration away from purely boosting reasoning accuracy and toward instruction-following fidelity, and it argues that prior correction-based methods fail because they insufficiently analyze the LLM's output. The analyze-then-answer pattern and the structured CoT dataset construction offer a reusable recipe, and the consistency metrics (CCR, ECR, CER, EER) give the community a way to measure whether a collaborator helps or harms.

Real-world applications (drawn from the paper's framing and task settings):

  • Producing machine-parseable structured outputs (XML, JSON, YAML) from models that would otherwise emit free text, for downstream parsing and automation.
  • Adapting API-only models such as GPT-4.1-mini, whose parameters cannot be fine-tuned, to user-specific output requirements.
  • Domain-specific question answering with strict formats, as demonstrated on MedQA-zh.
  • Mathematical and multi-step problem solving where the final answer must be extracted reliably from a formatted response.

Industry relevance. Because DICE requires only the LLM's text outputs, it can be layered onto existing API-based deployments without retraining or accessing weights. The measured cost is about 20% extra latency per sample in the reported setup, which the authors present as a favorable trade-off against the accuracy gains and against other collaboration methods (BBox-Adapter, for instance, took 2.2592 s/sample for a C-Acc of 9.6 in Table 4).

Future Directions

  • Complexity-aware routing. The authors' own stated limitation is that every query invokes the LLM first, even when the SLM alone could answer. They propose assessing question difficulty beforehand and calling the LLM only when needed.
  • Choosing the correctness ratio deliberately. Since SLMs trained with 50% correct LLM outputs were best and most stable, while 25% degraded broadly, further work could tune this ratio per deployment target (strong versus weak LLM backbones).
  • Extending beyond the tested formats and tasks. Only XML across five benchmarks plus JSON/YAML on MATH were evaluated; generality to other schemas, tools, and structured-output regimes remains open.
  • Reducing the SLM's capacity ceiling. The paper attributes the poor 25%-correctness result partly to the SLM's inherent capacity limits, suggesting that small-model correction accuracy is itself a bottleneck worth addressing.

Target Audience

Researchers and engineers working on LLM instruction following, structured/constrained output generation, and small-model–large-model collaboration. It is also relevant to practitioners deploying API-only or very large models who need reliable formatted outputs without fine-tuning, and to readers interested in chain-of-thought data construction and reinforcement-learning fine-tuning of small models.

Authors’ abstract

When performing reasoning tasks with user-specific requirements, such as strict output formats, large language models (LLMs) often prioritize reasoning over adherence to detailed instructions. Fine-tuning LLMs on supervised datasets to address this is impractical due to high computational costs and limited parameter access. To tackle this, we propose DICE, a lightweight framework that guides small language models (SLMs) to refine LLMs' outputs through chain-of-thought (CoT) correction. DICE decouples the process by first prompting LLMs to generate natural language responses, then using trained SLMs to analyze and refine these outputs to meet structured output specifications. This framework preserves LLMs' broad knowledge and reasoning capabilities while ensuring the outputs conform to user demands. Specifically, DICE first constructs structured CoT adaptation datasets via a two-stage method and subsequently applies a dual-tuning strategy to fine-tune SLMs for generating structured outputs in an analyze-then-answer pattern. Experiments demonstrate that DICE improves the average format accuracy and content correctness of LLM outputs by 35.4\% and 29.4\%, respectively, achieving state-of-the-art (SOTA) performance over other competitive baselines.

Read the original paper