Abstract
Large Language Models (LLMs) require diverse, high-quality reasoning data to excel at complex tasks. Traditional synthetic data generation methods often rely on passive augmentation or random skill mixing, leading to shallow reasoning paths. This paper introduces Reasoning Structure driven data Synthesis (RSS), a framework that proactively generates complex reasoning structures as Directed Acyclic Graphs (DAGs). By leveraging a Hierarchical GFlowNet and a Hierarchical Cognitive Schema (H-Schema), RSS samples diverse logical paths to guide the creation of synthetic training data. Models trained using RSS demonstrate superior performance, with smaller models frequently outperforming much larger counterparts on benchmarks such as GSM8K, MATH, and AlpacaEval2.
Introduction
The advancement of LLMs in reasoning tasks is heavily dependent on the availability of multi-step logical training data. Current synthetic data generation strategies, such as "prompt-based augmentation" (e.g., Self-Instruct) or "tag-based combination," are primarily passive. They modify existing questions or combine skills without a systematic consideration of the underlying logical connections, often resulting in data that lacks depth. While search-based methods like Tree-of-Thoughts (ToT) can generate complex reasoning, they are computationally expensive for large-scale data synthesis.
RSS addresses these limitations by shifting from a passive to a proactive design paradigm. Instead of augmenting questions and hoping for complex reasoning, RSS first designs the logical backbone of a problem as a DAG and then synthesizes the corresponding question and response.
Methodology
The RSS framework consists of three integrated components designed to systematically explore and generate reasoning structures.
Hierarchical Cognitive Schema (H-Schema)
Inspired by the Cattell-Horn-Carroll (CHC) theory of cognitive psychology, the authors organized human problem-solving into a three-level hierarchy. The Abstract-level defines broad cognitive actions (e.g., reasoning), the Competency-level specifies domain-specific skills (e.g., mathematics knowledge), and the Example-level provides concrete tasks (e.g., solving quadratic inequalities). This hierarchy effectively constrains the search space for logical connections.
Hierarchical GFlowNet (H-GFlowNet)
To sample diverse and high-quality reasoning DAGs, RSS employs a Hierarchical GFlowNet. Unlike standard Reinforcement Learning, which optimizes for a single best solution, GFlowNets are designed to sample objects with probabilities proportional to their rewards, ensuring diversity. Three policy networks—one for each schema level—collaboratively "grow" the reasoning DAGs. A large-scale LLM (Qwen2.5-72B) serves as the reward model to evaluate the plausibility of the generated structures.
Structure-Driven Synthesis
The final stage involves transforming the generated DAG into a complete data sample:
- Instruction Generation: A "suggester-editor" workflow iteratively builds a question based on the DAG. The suggester proposes additions to the question that require a new logical step, while the editor refines the text to ensure the step is necessary for the solution.
- Response Generation: The DAG acts as a blueprint for a Plan-and-Solve strategy, ensuring the model's response strictly adheres to the intended reasoning path.
Key Insights and Results
A critical finding of this work is the "Scaling Law of Schemas." Increasing the number of example-level nodes in the H-Schema is more effective for improving model performance than simply increasing the volume of synthetic samples. This suggests that the diversity of the underlying logical structure is a primary driver of reasoning capability.
Empirical evaluation shows that RSS-generated structures have a significantly higher reward density and achieve higher win rates compared to baseline methods like Evol-Instruct or MAGPIE.
The performance gains across various domains are substantial:
- Instruction Following: RSS-IF-8B (LLaMA3-based) achieved a 48.50% win rate on AlpacaEval2, outperforming Magpie-Pro-8B by over 23 points.
- Mathematics: RSS-MATH-13B reached 92.0% on GSM8K and 58.90% on the MATH benchmark, outperforming the 70B-parameter MathGenieLM.
- Coding: RSS-CODE-33B scored 84.40% on HumanEval, surpassing DeepSeek-Coder-Instruct-33B.
Furthermore, using a pre-planned DAG for response generation improved efficiency, saving approximately 0.15 minutes per sample compared to naive prompting methods while maintaining higher quality.
Conclusion
RSS represents a significant step toward proactive data synthesis for LLMs. By prioritizing the generation of diverse, hierarchical reasoning structures, the framework enables smaller models to achieve state-of-the-art performance. Future work will focus on reducing the dependency on expensive reward models and automating the discovery of new cognitive nodes within the H-Schema.
Summary updated