Introduction
Logical reasoning remains a significant hurdle for Large Language Models (LLMs). Despite their proficiency in pattern recognition, current models often suffer from logical inconsistency and structure blindness. Inconsistency occurs when a model provides different answers to the same logical problem due to minor phrasing changes, such as swapping "not...unless" for "only if." Structure blindness refers to the tendency of pre-trained models to prioritize factual keywords while ignoring the logical connectives—like "if," "then," and "because"—that define the argument's validity.
Furthermore, the scarcity of logical reasoning datasets makes it difficult for models to learn the underlying "rules of the game." To address these challenges, we introduce PathReasoner, a framework that treats logical question answering as a structured reasoning path modeling problem.
Methodology
PathReasoner addresses logical reasoning through both data augmentation and a specialized model architecture designed to elevate logical structure to a primary feature.
Symbolic Representation and Equivalent Path Extension (EPE)
The framework first transforms natural language sentences into symbolic "atoms" consisting of function symbols (connectives) and variables (facts). For example, "A will happen only if B happens" becomes OnlyIf(A, B). To overcome data sparsity, the Equivalent Path Extension (EPE) module uses external logical rules (e.g., contrapositives) to generate new, semantically equivalent reasoning paths from existing data. A "Path Filter" ensures these generated samples are both logically sound and grammatically coherent.
Reasoning Path Modeling (RPM)
The core of the system is the Reasoning Path Modeling (RPM) architecture. Instead of a standard Transformer, PathReasoner utilizes a stack of specialized blocks featuring a Path-Attention Module.
As shown in the architecture, the model explicitly handles:
- In-atom relations: Modeling how variables relate within a single logical unit.
- Cross-atom relations: Capturing interactions between different units, such as shared variables across sentences.
- High-order Diffusion: A strategy to propagate information across long-distance logical dependencies, preventing the model from losing the logical thread in complex arguments.
Experimental Results
PathReasoner was evaluated on challenging benchmarks like ReClor (sourced from graduate admission exams) and LogiQA.
- Surpassing Human Performance: On the ReClor test set, PathReasoner achieved 64.10% accuracy, outperforming the human baseline of 63.00% and the previous state-of-the-art model, Logiformer (63.50%).
- Outperforming LLMs: Despite its smaller size (RoBERTa-large backbone), PathReasoner significantly outperformed much larger models like GPT-3.5 and text-davinci-003 on logical tasks.
- Logical Sensitivity: In probing tests, PathReasoner showed 71.95% sensitivity to changes in logical connectives, whereas standard models like BERT and RoBERTa hovered between 21% and 29%.
- Efficiency: The model achieves faster convergence (up to 1.66x faster than previous SOTA) due to its structured representation.
Conclusion
PathReasoner demonstrates that decoupling logic from text and explicitly modeling reasoning paths can overcome the inherent limitations of standard language models. By treating connectives as primary function symbols and leveraging logical equivalence for data augmentation, PathReasoner achieves superior accuracy, consistency, and efficiency in logical question answering. Future work will focus on automating atom extraction and extending the framework to multi-modal reasoning tasks.
Summary updated