Abstract
The "Brain" framework addresses the limitations of Large Language Models (LLMs) in solving complex multi-step mathematical word problems by mimicking human cognitive specialization. By decoupling high-level strategic planning (Frontal Lobe) from low-level code execution (Parietal Lobe), the system reduces logical hallucinations and calculation errors. Evaluated on the GSM8K benchmark, the Brain framework achieved a state-of-the-art 74% accuracy for 7B-parameter models, demonstrating the efficacy of specialized reasoning stages and Direct Preference Optimization (DPO) in mathematical problem-solving.
Introduction
While Large Language Models (LLMs) have demonstrated impressive emergent abilities in basic mathematics, they frequently struggle with complex, multi-step word problems. Current fine-tuning methods, such as Supervised Fine-Tuning (SFT), often treat the model as a general-purpose memory unit—akin to the hippocampus—without effectively activating the specialized reasoning centers required for rigorous logic.
A primary challenge is the "cognitive load" of managing high-level strategy (planning) and low-level syntax (calculation) simultaneously. When a model attempts both at once, it is prone to logical hallucinations or execution errors. The "Brain" framework seeks to overcome this by decomposing the problem-solving process into a logical roadmap before attempting a solution.
Methodology: The Brain Framework
The researchers propose a two-stage approach that simulates distinct cognitive functions through specialized models:
- The Frontal Lobe Model (FLM): Serving as the "decision-maker," this model generates a step-by-step natural language plan for a given math problem. To ensure high-quality output, the authors employed Direct Preference Optimization (DPO), allowing the model to learn optimal planning strategies without the computational overhead of traditional Reinforcement Learning from Human Feedback (RLHF).
- The Parietal Lobe Model (PLM): Acting as the "executor," this model translates the FLM's plan into Python code.
- The Executor: A standard Python interpreter runs the generated code to produce a final numerical answer.
The system was built using Code LLaMA 7B as the base model. Training involved a massive synthetic dataset of plans and reasoning paths generated by GPT-3.5-turbo, including 55,000 samples for Frontal Lobe SFT and 90,000 for Parietal Lobe SFT.
Key Results and Insights
The core insight of this research is that LLMs perform significantly better when strategy is separated from syntax. The researchers found that planning is a latent capability within LLMs that can be explicitly extracted to improve performance. There is a strong positive correlation between plan alignment—how well a plan matches the question—and the accuracy of the resulting code.
In empirical evaluations on the GSM8K (Grade School Math 8K) benchmark, the Brain framework achieved 74% accuracy. This represents a state-of-the-art (SOTA) result for 7B-scale models, outperforming other specialized models like ToRA-Code and MAmmoTH-Coder.
Key performance highlights include:
- Two-Stage Superiority: The framework provided a 2.9% absolute improvement over a standard one-stage SFT approach using the same base model.
- DPO Efficiency: Refining the planning stage with DPO resulted in a 7.5% improvement in plan quality compared to standard fine-tuning.
- Scaling Potential: When paired with a more powerful Frontal Lobe (e.g., GPT-4), the system's accuracy on GSM8K rose to 81.8%.
Conclusion and Future Work
The Brain framework demonstrates that mimicking human cognitive division is a viable path toward more reliable mathematical reasoning in LLMs. However, the current iteration lacks a self-verification step to check if code outputs are contextually sensible. Future research will focus on expanding the framework to broader scientific tasks and implementing error-correction mechanisms to allow models to self-correct during the reasoning process.
Summary updated