NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Pushing the Boundaries of Natural Reasoning: Interleaved Bonus from Formal-Logic Verification

Chuxue Cao, Jinluan Yang, Haoran Li, Kunhao Pan, Zijian Zhao, Zhengyu Chen, Yuchen Tian, Lijun Wu, Conghui He, Sirui Han, Yike Guo

TL;DR

This paper introduces a framework that dynamically interleaves formal symbolic logic verification directly into a Large Language Model's (LLM) natural language generation process. By providing real-time feedback from symbolic solvers during the reasoning chain, the method eliminates intermediate logical fallacies and "reward hacking." This approach yields substantial performance gains, outperforming state-of-the-art baselines by an average of 10.4% on 7B models and 14.2% on 14B models across multiple reasoning benchmarks.

What Problem Does This Paper Address?

While LLMs excel at generating fluent text, their underlying autoregressive mechanism—predicting the next token probabilistically—lacks inherent logical guarantees. This often leads to logical inconsistencies, hallucinations, and "reward hacking," where a model stumbles upon the correct final answer through a completely flawed chain of thought (CoT).

Previous attempts to fix this rely on model-based verifiers or post-hoc code execution. However, neural verifiers are themselves prone to probabilistic errors, and post-hoc validation acts too late, failing to stop errors from compounding early in the reasoning chain. Furthermore, existing formal methods are typically restricted to narrow domains like mathematical theorem proving. The authors address this gap by creating a domain-agnostic framework that embeds real-time, machine-checkable symbolic verification directly into the generation loop.

Figure 1. Comparison between natural language reasoning and formal logic verification-guided reasoning. Formal verification detects logical errors in natural language reasoning and provides corrected reasoning paths. “NL” means Natural Language.

Methods

The authors introduce Formal Logic Verification-Guided Reasoning (FLV), operationalized through a two-stage training pipeline:

  1. Formal Logic Verification-Guided SFT: Because datasets containing interleaved natural language and formal proofs are scarce, the authors built a hierarchical data synthesis pipeline. A teacher model generates candidate reasoning chains, which are then decomposed into discrete logical modules. For each module, an LLM synthesizes a formal proof (e.g., Z3 solver constraints or SymPy code) and predicts an expected execution output. These proofs are validated in a sandbox using a three-stage check (Exact Match, Semantic Equivalence, and Proof Rewriting) to ensure perfect alignment between the natural language and the formal code.
  2. Formal Verification-Guided Policy Optimization: To refine the model further, they apply reinforcement learning via Group Relative Policy Optimization (GRPO). They design a hierarchical reward function that prioritizes format integrity and structural compliance over final answer correctness. This strictly penalizes fatal execution errors (like infinite loops or malformed code) and rewards concise, accurate tool usage.

Crucially, the authors implement a Flexible Verification Strategy. Early iterations forced rigid verification steps after every single module, which inadvertently suppressed direct arithmetic calculation (e.g., the model would write a complex Z3 script to prove $A + B = C$ instead of just adding the numbers). The flexible strategy decouples calculation from validation, allowing the model to use numerical tools directly while reserving formal logic for abstract deductive steps.

Figure 3. Overview of the formal logic verification-guided training framework. The framework operates in two stages: (1) SFT: A teacher model synthesizes formal logic verification traces, which are validated by a verifier. A subset of verified samples is used to fine-tune the model, while challenging samples are reserved for RL training. (2) RL: The policy model generates natural language reasoning followed by formal reasoning. A formal interpreter verifies the formal reasoning and provides feedback, enabling iterative refinement until the model produces a final answer or reaches the maximum number of interpreter calls. Rewards computed from verification outcomes are used to calculate advantages and update the policy model via reinforcement learning.

Datasets

The training corpus was curated from three primary sources:

  • WebInstruct-Verified
  • K&K
  • NuminaMath-TIR

For evaluation, the framework was tested across six rigorous benchmarks spanning three domains:

  • Logical Reasoning: KOR-Bench and Big-Bench Hard (BBH).
  • Mathematical Reasoning: MATH-500 and AIME 2024.
  • General Reasoning: GPQA-Diamond and TheoremQA.
  • Cross-Domain Generalization: LegalBench-SARA (evaluating multi-step deductive inference over US tax law).

Key Insights and Ideas

  • A Shift from Calculation to Symbolic Reasoning: When analyzing the types of Python packages the RL model invoked, the authors noticed a massive behavioral shift. Compared to standard tool-use baselines (like SimpleTIR) which rely heavily on generic utility loops, the FLV-RL model increased its usage of symbolic and logic libraries (like z3-solver and sympy) to 62.5% of all calls. The model transitions from a "compute-heavy" brute-force search approach to a "reasoning-heavy" symbolic approach.
  • Circuit-Breaking Compounding Errors: In standard autoregressive generation, a single flawed intermediate step acts as a false premise that poisons all subsequent tokens. Forcing the model to translate its thoughts into formal constraints allows the symbolic solver to act as a circuit breaker—returning Unsat or a counterexample to halt error propagation immediately.
  • SFT Cold Start is Mandatory: Running reinforcement learning directly from a base model without the formal-logic SFT stage (the FLV-ZeroRL baseline) yielded virtually no benefits. This proves that the "Tool-as-Verifier" paradigm is a newly learned capability that must be seeded via structured data, rather than a simple elicitation of pre-existing coding skills.

Key Results

The FLV framework achieved state-of-the-art results for models of comparable size:

  • 7B Scale: FLV-RL achieved an average improvement of 10.4% over baselines. Remarkably, the SFT stage alone (FLV-SFT) outperformed all competitive RL baselines.
  • 14B Scale: FLV-RL pushed the average performance up by 14.2%.
  • Olympiad-Level Math: On the highly challenging AIME 2024 benchmark, the FLV-RL 14B model achieved 30.2%, nearly doubling the performance of the General-Reasoner baseline (17.5%) and obliterating the base model's score of 3.6%.
  • Logic & Law: On KOR-Bench, the 14B model saw a 15.7% absolute improvement over General-Reasoner. It also achieved a top score of 64.7% on LegalBench-SARA, proving the framework generalizes well beyond pure mathematics.

Limitations and Future Work

  • Computational Overhead: Integrating real-time formal verification effectively doubles the reinforcement learning training time compared to tool-free baselines. However, the authors note that this is offset by superior data efficiency, requiring far fewer training samples to reach high accuracy.
  • The Auto-Formalization Bottleneck: Translating ambiguous, commonsense, or open-ended natural language descriptions into rigid, verifiable symbolic representations remains a major challenge. If the initial translation is flawed, the solver provides incorrect feedback. The authors emphasize the need for more robust auto-formalization techniques to expand this framework to less structured domains.

Summary updated

BibTeX
@inproceedings{cao2026pushing,
  author = {Chuxue Cao and Jinluan Yang and Haoran Li and Kunhao Pan and Zijian Zhao and Zhengyu Chen and Yuchen Tian and Lijun Wu and Conghui He and Sirui Han and Yike Guo},
  title = {{Pushing the Boundaries of Natural Reasoning: Interleaved Bonus from Formal-Logic Verification}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=uzVlKB1C5E},
}
Figure