Abstract
LogicLLM is a novel, fully self-supervised framework designed to enhance the logical reasoning capabilities of Large Language Models (LLMs) without the need for expensive human-annotated data. By training models to recognize and generate logically consistent relational paths extracted from raw text, LogicLLM enables models such as LLaMA and FLAN-T5 to achieve reasoning performance comparable to ChatGPT while maintaining their general language understanding. This paper details the methodology of relational consistency, counterfactual data augmentation, and auto-regressive generative training that underpins the LogicLLM framework.
Introduction
While Large Language Models (LLMs) have demonstrated remarkable versatility across various natural language tasks, they frequently struggle with tasks requiring rigorous logical reasoning. Current approaches to bridge this "reasoning gap" typically involve supervised fine-tuning, which is costly and often fails to generalize, or symbolic logic tools, which are difficult to integrate with the nuances of natural language. LogicLLM proposes a task-agnostic, self-supervised alternative that embeds logical reasoning directly into the model's weights without sacrificing general knowledge.
Methodology
The LogicLLM framework pivots away from traditional supervised learning by utilizing three core components to instill logical reasoning through relational consistency:
- Logically Consistent Data Construction: The framework identifies "direct" and "indirect" relations within raw text (e.g., Wikipedia). If a single sentence states a relationship and a separate chain of sentences implies the same relationship, they are treated as a logically consistent pair for training.
- Counterfactual Data Augmentation: To ensure the model learns the structural logic rather than memorizing specific facts, the authors employ "entity replacement." Real-world entities are swapped with random ones from different contexts, forcing the model to focus on the reasoning path's structure.
- Auto-regressive Generative Training: Unlike contrastive methods that use multiple-choice selection, LogicLLM tasks the model with generating the alternative perspective (e.g., generating an indirect relation given a direct one). This alignment with standard LLM usage patterns improves in-context learning capabilities.
To prevent catastrophic forgetting, the framework utilizes a joint training objective that mixes these logic tasks with standard language modeling data.
Experimental Evaluation
The researchers evaluated LogicLLM across several challenging benchmarks:
- Logical Reasoning: ReClor (LSAT-derived questions) and LogiQA-v2 (Chinese civil service exam tasks).
- General Understanding: RACE (reading comprehension), MMLU (multitask benchmark), and Big-Bench-Hard (BBH).
Training was conducted using approximately 800,000 training pairs extracted from Wikipedia.
Results and Analysis
The experimental results demonstrate that LogicLLM significantly boosts the reasoning performance of various base models. Notably, FLAN-T5-11B enhanced with LogicLLM achieved a ReClor test accuracy of 61.1%, nearly matching ChatGPT's 61.2%, and outperformed ChatGPT on the LogiQA-v2 development set.
Key insights from the results include:
- Generative Training Superiority: Auto-regressive training proved more effective than contrastive learning for grasping nuanced logical connections.
- Cross-Domain Benefits: Enhancing logical reasoning also improved performance on reading comprehension tasks (RACE), suggesting that logical skills translate to better text interpretation.
- Robustness: LogicLLM-trained models exhibited greater stability against position bias compared to standard LLMs.
- Preserved Generality: Evaluations on MMLU and BBH confirmed that the logic-specific training did not degrade the models' broad knowledge base.
Conclusion and Future Work
LogicLLM successfully demonstrates that logical reasoning can be taught to LLMs through self-supervised relational consistency. While the framework shows significant promise, limitations remain regarding scaling to 70B+ parameter models due to hardware constraints and a continued sensitivity to prompt wording. Future research will focus on refining data augmentation techniques to reduce factual noise while maintaining the structural integrity of the logic training signals.
Summary updated