Enhancing Large Language Models through Structured Reasoning

Yubo Dong, Hehe FanarXiv 2025 · OpenReview

Abstract

Recent Large Language Models (LLMs) have significantly advanced natural language processing and automated decision-making. However, these models still encounter difficulties when performing complex reasoning tasks involving logical deduction and systematic planning, primarily due to their reliance on implicit statistical relationships without structured knowledge representation. Inspired by cognitive science and neurosymbolic AI, we introduce a novel approach to enhance LLMs through explicit structured reasoning. First, we convert unstructured data into structured formats by explicitly annotating reasoning steps. We then employ this structured dataset to train LLMs through Supervised Fine-Tuning (SFT). Additionally, we enhance the structured reasoning capabilities of LLMs using Group Relative Policy Optimization (GRPO), incorporating two innovative algorithms—MAX-Flow and Longest Common Subsequence (LCS)—which notably improve reasoning effectiveness and reduce computational complexity. Experimental results from fine-tuning a DeepSeek-R1-Distill-Qwen-1.5B model demonstrate concise reasoning, robust performance across various scenarios, and improved compatibility with optimization techniques, validating the efficacy of structured reasoning integration in LLMs.

Introduction

Despite their impressive text generation capabilities, Large Language Models (LLMs) often struggle with complex logic, mathematics, and planning. This limitation arises because standard LLMs rely on implicit statistical associations learned from unstructured text rather than explicit structured knowledge. When reasoning is presented as a monolithic block of text, it becomes difficult to evaluate which steps are critical and which are redundant. This lack of structure often leads to "length hacking," where models generate excessive tokens to improve the probability of a correct answer through sheer volume rather than logical precision.

Methodology

We propose a two-stage pipeline to transition from unstructured text generation to structured logical reasoning.

1. Structured Supervised Fine-Tuning (SFT)

We converted unstructured data into a structured format using 23 specific reasoning tags, such as <rephrase>, <inference>, <verify>, and <decompose>. A DeepSeek-R1-Distill-Qwen-1.5B model was fine-tuned on a small, high-quality dataset of 500 examples to internalize this structured "language of thought."

2. Reinforcement Learning via GRPO

To further optimize reasoning, we utilized Group Relative Policy Optimization (GRPO) with two novel reward functions:

  • MAX-Flow Reward: Inspired by network flow theory, this treats reasoning steps as nodes in a graph. By analyzing attention matrices, it calculates the "information flow" toward the final answer, allowing the model to prioritize critical logical leaps.
  • Longest Common Subsequence (LCS) Reward: This rewards models for reaching consensus on high-quality reasoning paths while penalizing unnecessary verbosity, promoting more concise and direct logic.
Overview of the Structured Reasoning framework, illustrating the transition from SFT to RL with MAX-FLOW and LCS reward mechanisms.

Key Results and Analysis

Experimental results demonstrate that structured reasoning significantly enhances both performance and efficiency. Our 1.5B model (SR-FLOW) improved its average score across six math benchmarks from 48.4% to 52.6%, rivaling state-of-the-art models trained on much larger datasets.

As shown in the performance metrics below, the LCS reward variant (SR-LCS) achieved a substantial reduction in token count—approximately 20%—while maintaining competitive accuracy. This confirms that models do not need to generate thousands of tokens to be effective if their reasoning is properly structured.

Quantitative comparison of accuracy, reasoning steps, and token efficiency across training steps for different reward strategies (ACC, FLOW, and LCS).

Discussion and Insights

Our analysis yielded several key insights into the nature of structured reasoning in LLMs:

  • Beyond Perplexity: Traditional perplexity metrics are unreliable for evaluating reasoning steps. Our MAX-Flow approach proved superior at identifying steps that actually contribute to the correct answer.
  • Reasoning Loops: Structured models naturally developed "loops" around verification steps, cycling through <verify> and <case_analysis> until reaching high confidence, mimicking human-like double-checking.
  • Robustness: Structured models showed significantly higher stability across different sampling temperatures (0.0 to 0.6) compared to standard SFT models, which often degrade as randomness increases.

Limitations and Future Work

While highly effective for logic and math, the benefits of structured reasoning for creative tasks like story generation remain to be explored. Additionally, the MAX-Flow mechanism introduces some computational overhead during training due to attention matrix processing. Future work will focus on optimizing these mechanisms and exploring "early exit" strategies, where a model stops thinking the moment it reaches a high-confidence logical conclusion within its structured framework.

Summary updated

BibTeX
@misc{dong2025enhancing,
  author = {Yubo Dong and Hehe Fan},
  title = {{Enhancing Large Language Models through Structured Reasoning}},
  year = {2025},
  eprint = {2506.20241},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2506.20241},
}
Figure