CDS: Knowledge Component-Driven Data Synthesis Guided by Cognitive Diagnosis Theory

Haokun Zhao, Jinyi Han, Jiaqing Liang, Yanghua Xiao, Xiaojun Meng, Jiansheng WeiarXiv 2025

TL;DR

The Cognitive Diagnostic Synthesis (CDS) framework applies educational Cognitive Diagnosis Theory to treat LLMs like students, identifying their fine-grained skill deficiencies at the "Knowledge Component" level. By diagnosing these specific gaps rather than relying on coarse binary accuracy, CDS guides a stronger teacher model to synthesize highly targeted training data, yielding substantial performance boosts across math, coding, and academic benchmarks.

What Problem Does This Paper Address?

When evaluating Large Language Models (LLMs), standard practices rely heavily on coarse-grained metrics like overall accuracy. If a model gets a complex math problem wrong, it receives a zero for that sample. However, this binary view hides the root cause of the failure. A model might have flawless geometric reasoning but fail a problem solely due to a minor arithmetic or percentage calculation error.

Figure 1: The math problem assesses Geometry, Mixed Operations, and Percentage Calculations. The model performs well overall but makes an error in percentage calculation. Conventional metrics lack the granularity to capture these deficiencies, whereas fine-grained metrics can identify specific strengths and weaknesses at the knowledge level.

As shown in Figure 1, conventional metrics lack the granularity to capture these nuances. This creates a major bottleneck for synthetic data generation: if we don't know exactly why a model is failing, we cannot generate data targeted at fixing its specific weaknesses. Current error-driven synthesis methods often just replay or slightly rephrase failed questions, leading to superficial corrections rather than fundamental skill mastery.

Methods

The authors introduce Cognitive Diagnostic Synthesis (CDS), a pipeline that systematically maps, diagnoses, and remediates model deficiencies.

Figure 2: The pipeline of CDS method.

The pipeline consists of four core stages:

  1. Knowledge Component (KC) Annotation: An advanced "teacher" LLM ($M_a$) annotates benchmark questions with fine-grained KCs (e.g., Dynamic Programming, Probability, Unit Conversion).
  2. Diagnosis and Data Synthesis: CDS employs two complementary strategies to generate targeted data:
  3. Global Strategy: Aggregates performance across the dataset using the Deterministic Input, Noise And (DINA) educational framework to calculate KC-specific accuracy. It identifies weakly mastered KCs and prompts the teacher LLM to generate entirely new, independent questions covering those concepts.
  4. Fine-grained Strategy: Diagnoses specific erroneous cases at the question level. The teacher LLM analyzes the student's wrong answer, identifies the failed sub-skill, and embeds this analysis into a long Chain-of-Thought (CoT) prompt to synthesize high-quality corrective data.
  5. Data Augmentation: Synthetic data is expanded via KC-Constrained Rewriting (altering questions while keeping the target skills intact) and Multi-KC Fusion (combining multiple weak KCs into harder, composite questions).
  6. Data Selection: A two-stage filter ensures quality. Stage 1 uses the teacher LLM to drop incorrect data. Stage 2 ranks data using a novel metric, $CDS_{score}$, which prioritizes complex questions that contain low-frequency and low-accuracy KCs.

Datasets

The framework was evaluated across three distinct domains using both In-Domain (ID) and Out-of-Domain (OOD) test sets:

  • Mathematical Reasoning: GSM8k (ID) and GSM8k-PLUS (OOD).
  • Code Generation: MBPP (ID) and HumanEval (OOD).
  • Academic Examinations: GAOKAO-Bench (ID) and GAOKAO-Bench-Updates (OOD), spanning subjects like biology, chemistry, physics, history, and geography.

Key Insights and Ideas

  • Abstracting Questions to Skills Prevents Overfitting: Traditional example-based synthesis causes LLMs to simply paraphrase the seed questions. By abstracting questions into explicit Knowledge Components (KCs), the synthesizer generates truly novel problems, preventing the student model from overfitting.
  • Long CoTs Drive Better Synthesis: Integrating the diagnostic process ($p_{diag}$) directly into the synthesis prompt naturally extends the Chain-of-Thought length, which significantly boosts the reasoning quality of the generated data.
  • Efficiency via Cognitive Scoring: Instead of using computationally heavy embedding generation and clustering algorithms (like CBS or CoreSet) to select diverse data, the $CDS_{score}$ relies on simple mathematical formulations of KC frequency and accuracy. This reduces selection time from hundreds of seconds to near-zero (millisecond-level), requiring no GPU resources for the final selection stage.

Key Results

The authors evaluated CDS by fine-tuning two open-source student models: Qwen1.5-7B-Chat and Llama3-8B-Instruct, using Qwen2-72B-Instruct as the advanced teacher model.

Main experimental results across various tasks

As detailed in Table 1, CDS consistently outperformed competitive baselines (like LLM2LLM and MUSTARD):

  • Math: Llama3-8B saw a massive 11.12% absolute improvement on GSM8k and a 13.10% boost on the OOD GSMPlus dataset.
  • Coding: Qwen1.5-7B improved by 6.00% on MBPP and 4.27% on HumanEval.
  • Generalization: CDS demonstrated robust out-of-domain generalization, whereas unguided baseline methods like AugGPT occasionally caused performance degradation due to the introduction of unchecked, low-quality data.

Limitations and Future Work

  • Teacher Model Constraints: Due to budget limits, the authors used the open-source Qwen2-72B-Instruct rather than commercial state-of-the-art models like GPT-4 or DeepSeek-V3, meaning the full potential of the framework with a stronger teacher remains unexplored.
  • Subjectivity in KC Mapping: The initial identification and tagging of Knowledge Components still rely on LLM prompting, which introduces a degree of randomness and subjectivity. The authors suggest exploring pseudo-labels as a more stable substitute for explicit labels in future iterations.

Summary updated

Abstract

Large Language Models (LLMs) have achieved significant advancements, but the increasing complexity of tasks and higher performance demands highlight the need for continuous improvement. Some approaches utilize synthetic data generated by advanced LLMs based on evaluation results to train models. However, conventional evaluation methods fail to provide detailed, fine-grained profiles of LLMs, limiting their guidance for data synthesis. In this paper, we introduce the Cognitive Diagnostic Synthesis (CDS) method, which incorporates a diagnostic process inspired by Cognitive Diagnosis Theory (CDT) to refine evaluation results and characterize model profiles at the knowledge component level. Based on these diagnostics, we propose two diagnosis-synthesis strategies for weakness-targeted data synthesis. Additionally, we present an enhanced data augmentation and selection pipeline to improve the quality and diversity of synthesized data. Our experiments with several open-source models show significant improvements across multiple benchmarks, achieving up to 6.00% improvement in code generation, 13.10% in mathematical reasoning, and 5.43% in academic exams. Code and data are available on GitHub.
BibTeX
@misc{zhao2025cds,
  author = {Haokun Zhao and Jinyi Han and Jiaqing Liang and Yanghua Xiao and Xiaojun Meng and Jiansheng Wei},
  title = {{CDS: Knowledge Component-Driven Data Synthesis Guided by Cognitive Diagnosis Theory}},
  year = {2025},
  eprint = {2501.07674},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2501.07674},
}
Figure