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, Zhe Chen, Yuchen Tian, Lijun Wu, Conghui He, Sirui Han, Yike Guo · OpenReview

TL;DR

This paper introduces a novel framework that interleaves formal logic verification directly into the reasoning process of Large Language Models (LLMs). By dynamically checking and correcting logical steps, their approach significantly boosts LLM performance on complex reasoning tasks, outperforming state-of-the-art models by up to 14.2%. This work bridges the gap between the fluency of LLMs and the rigor of formal systems, paving the way for more reliable and trustworthy AI reasoning.

What Problem Does This Paper Address?

Large Language Models (LLMs) are incredibly capable at generating human-like text and performing various tasks, including reasoning. However, their core mechanism of predicting the next token probabilistically leads to a significant problem: logical inconsistencies. Even when LLMs arrive at a correct final answer, the intermediate reasoning steps can be flawed, a phenomenon known as "reward hacking." This makes them prone to hallucinations, safety issues, and unreliable outputs, especially in complex, multi-step reasoning scenarios. Traditional methods often rely on post-hoc validation or are limited to specific domains like mathematics. This paper aims to bridge this gap by creating a framework that integrates formal logic verification during the reasoning process, ensuring logical soundness across diverse domains.

Methods

The authors propose a two-stage training framework:

  1. Formal Logic Verification-Guided Supervised Fine-Tuning (FLV-SFT): This stage focuses on generating high-quality training data. It involves:
  2. Hierarchical Data Synthesis: Generating reasoning chains, decomposing them into formal logic modules, and synthesizing corresponding formal proofs.
  3. Execution-Based Validation: Crucially, these formal proofs are executed, and their outputs are compared against expected results. This ensures alignment between natural language reasoning, formal proofs, and actual execution, filtering out errors that might arise from autoformalization.
  4. This process creates a dataset of interleaved natural language reasoning and verified formal logic steps.
  5. Formal Logic Verification-Guided Policy Optimization (FLV-RL): This stage uses reinforcement learning to further refine the model.
  6. Interleaved Reasoning Loop: The model generates natural language reasoning steps, which are then translated into formal logic specifications. A formal verifier checks these specifications.
  7. Hierarchical Reward Function: A multi-dimensional reward function is employed, prioritizing structural compliance, then logical correctness, and finally efficiency. This function penalizes fatal errors and format violations while incentivizing correct reasoning.
  8. Symbolic Verifiers: The framework leverages tools like Z3 (for logic) and Python interpreters (for computation) to perform verification and execution.

Datasets

  • Training Data: The authors utilize a combination of existing datasets: WebInstruct-Verified, K&K, and NuminaMath-TIR. They also employ DeepSeek-R1 for data distillation and difficulty assessment. Claude Sonnet 4.5 is used for synthesizing formal logic steps.
  • Evaluation Benchmarks: The models are evaluated on six benchmarks across three domains:
  • Logical Reasoning: KOR-Bench, BBH
    • Mathematical Reasoning: MATH-500, AIME 2024
    • General Reasoning: GPQA-Diamond, TheoremQA

Key Insights and Ideas

  • Formal Verification as a "Debugger" for LLMs: The core insight is that formal logic verification isn't just for proving theorems; it acts as a powerful mechanism to detect and correct logical flaws in LLM reasoning as they happen. This is crucial because LLMs' next-token prediction can lead to compounding errors where a small mistake early on derails the entire reasoning chain.
  • Bridging the Gap Between Fluency and Rigor: LLMs excel at fluent, human-like reasoning, but often lack logical rigor. Formal systems provide rigor but can be brittle and domain-specific. This work shows how to combine the strengths of both, creating models that are both fluent and logically sound.
  • Dynamic Interleaving is Key: Unlike passive post-hoc validation, dynamically interleaving formal verification into the generation process allows for real-time feedback and correction, preventing errors from propagating.
  • Data Synthesis with Execution is Crucial: Simply translating natural language to formal logic isn't enough. The authors emphasize the importance of execution-based validation to ensure the synthesized formal proofs are not only syntactically correct but also semantically aligned with actual computational outcomes.
  • Shift from "Compute-Heavy" to "Reasoning-Heavy": The analysis of package usage shows that their FLV-RL model relies more on symbolic and logic libraries, indicating a shift from brute-force computation to abstract reasoning and deduction.

Key Results

  • Significant Performance Gains: The proposed FLV-SFT and FLV-RL models achieve substantial improvements over state-of-the-art baselines.
  • On average, the 7B model shows a 10.4% improvement, and the 14B model shows a 14.2% improvement.
  • Specific gains include a 49.3% improvement on the Mathematical domain for FLV-SFT (7B model) and strong performance on challenging benchmarks like AIME 2024 (30.2% for FLV-RL 14B).
  • Improved Logical Consistency: The framework significantly reduces logical inconsistencies, with formal verification effectively addressing the "reward hacking" problem.
  • Data Efficiency: The approach achieves SOTA performance with a more concise training set compared to some baselines, suggesting better data efficiency.
  • Generalization: The framework demonstrates generalization across logical, mathematical, and general reasoning domains, including legal reasoning tasks.

Limitations and Future Work

  • Computational Overhead: Integrating real-time formal verification introduces computational overhead, approximately doubling RL training time. However, the authors argue this is justified by the performance gains and data efficiency.
  • Formalization Challenges: Translating ambiguous natural language into verifiable formal representations can be challenging, especially for commonsense-heavy descriptions. This can lead to incorrect verification feedback and limit generalizability.
  • Future Work: The authors suggest exploring more robust auto-formalization techniques to address the challenges in translating natural language to formal representations. They also highlight the need for further research into handling ambiguous or commonsense-heavy descriptions. The flexible verification strategy, which decouples calculation from validation, is also a promising direction for improving performance on tasks dominated by direct computation.

Summary updated

BibTeX
@inproceedings{cao2026pushing,
  author = {Chuxue Cao and Jinluan Yang and Haoran Li and Kunhao Pan and Zijian Zhao and Zhe 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