Key-Point-Driven Mathematical Reasoning Distillation of Large Language Model

Xunyu Zhu, Jian Li, Can Ma, Weiping WangarXiv 2024 · DOI

TL;DR

This paper introduces Key-Point-Driven Mathematical Reasoning Distillation (KPDD), a novel method to distill the mathematical reasoning capabilities of large language models (LLMs) into smaller, more efficient models (SLMs). KPDD tackles semantic misunderstanding errors, a key limitation of previous distillation techniques, by breaking down problem-solving into extracting key information and then solving step-by-step, achieving state-of-the-art performance.

What Problem Does This Paper Address?

Large Language Models (LLMs) have become remarkably adept at mathematical reasoning, but their sheer size and computational requirements make them impractical for many real-world applications. Distilling these capabilities into smaller language models (SLMs) is a promising solution, but existing methods often struggle with errors in calculation and, more critically, semantic understanding. While some techniques like Program-of-Thought Distillation (PoTD) address calculation errors by generating Python code, semantic misunderstandings remain a significant hurdle, preventing SLMs from reaching LLM-level reasoning performance. This paper aims to bridge this gap by proposing a method that specifically targets and reduces these semantic errors.

Methods

The core innovation of this paper is the Key-Point-Driven Mathematical Reasoning Distillation (KPDD) method. KPDD operates in two main stages:

  1. Key Point Extraction: An initial SLM is trained to identify and extract crucial information from a given mathematical problem. This includes pinpointing the "core question" and relevant "problem-solving information." This stage is designed to ensure the SLM deeply understands the problem's essence before attempting to solve it.
  2. Step-by-Step Solution: A second SLM then uses the extracted key points to solve the problem. KPDD offers two formats for this stage:
  3. KPDD-CoT (Chain-of-Thought): Generates step-by-step reasoning rationales in a textual format, similar to traditional CoT. This format is particularly useful for error analysis.
  4. KPDD-PoT (Program-of-Thought): Generates Python code that, when executed, provides the solution. This leverages the strengths of PoTD to avoid calculation errors.

The data generation process involves using a teacher LLM (ChatGPT) to produce reasoning processes, which are then filtered to ensure correctness. The fine-tuning process involves training two SLMs: one for key point extraction and another for solving, using the generated datasets.

Datasets

The primary dataset used for generating the distillation data is GSM8K, a collection of grade-school math word problems. The models are then evaluated on GSM8K's test set, as well as several other mathematical reasoning datasets to assess transferability:

  • ASDiv
  • SVAMP
  • MultiArith

The paper also mentions augmenting the GSM8K training set by running data synthesis four times.

Key Insights and Ideas

  • Semantic Misunderstanding is a Major Bottleneck: The paper's error analysis strongly suggests that semantic misunderstanding errors are a primary limiting factor for existing distillation methods like CoTD, even more so than calculation errors in some contexts.
  • Key Points Enhance Comprehension: Extracting key points (core question and relevant information) significantly improves an SLM's understanding of the problem, directly leading to a reduction in semantic errors.
  • KPDD-PoT Achieves SOTA: The Program-of-Thought variant of KPDD not only reduces semantic errors but also leverages code generation to eliminate calculation errors, resulting in state-of-the-art performance.
  • Transferability is Key: The method demonstrates strong transferability, performing well across various mathematical reasoning datasets beyond the one used for training, indicating robust learning.

Key Results

  • KPDD-CoT: Significantly enhances SLMs' reasoning abilities, showing accuracy improvements of up to 18.16% for FlanT5-Large.
  • KPDD-PoT: Achieves state-of-the-art (SOTA) performance. For FlanT5-Large, it boosts accuracy by up to 64.4% on average across datasets.
  • Error Reduction: KPDD-CoT specifically reduces understanding errors. For instance, on GSM8K, KPDD-CoT reduced understanding errors to 30, compared to 36 for vanilla CoTD.
  • Component Analysis: Combining key points (core question and problem-solving information) with CoT reasoning led to an average accuracy of 11.02% under CoT and a remarkable 42.18% under PoT across multiple datasets.

Limitations and Future Work

  • Error Analysis for PoT: The paper notes that error analysis for the PoT format is more challenging due to the nature of code generation. Future work will focus on developing better methods for analyzing PoT-based reasoning.
  • Further Exploration of PoT: While KPDD-PoT shows excellent results, the paper suggests further investigation into its performance and error analysis.

Summary updated

BibTeX
@misc{zhu2024key,
  author = {Xunyu Zhu and Jian Li and Can Ma and Weiping Wang},
  title = {{Key-Point-Driven Mathematical Reasoning Distillation of Large Language Model}},
  year = {2024},
  eprint = {2407.10167},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2407.10167},
}
Figure