Abstract
Generating credible and logically consistent reasoning chains remains a significant challenge for large language models. While models can often arrive at correct conclusions, their intermediate reasoning steps—represented as entailment trees—frequently suffer from logical hallucinations or a failure to generalize across domains. This paper introduces the Logical Pattern Memory Pre-trained Model (LMPM), an architecture designed to decouple logical structure from domain-specific knowledge. By utilizing an external memory module to store abstract logical templates and an entity-abstraction pre-training task, LMPM demonstrates superior performance in generating valid, consistent, and human-verifiable reasoning trees.
Introduction
In the field of Explainable AI (XAI), entailment trees serve as a gold standard for transparency. These trees map the path from a set of supporting facts (premises) through intermediate conclusions to a final hypothesis. However, standard sequence-to-sequence models, such as T5, often struggle with the underlying logic of these trees. They tend to memorize specific factual associations rather than learning the abstract rules of deduction. Consequently, when faced with unfamiliar topics, these models may produce "hallucinated" intermediate steps that do not logically follow from the premises.
To address this, the LMPM framework focuses on learning the rules of reasoning rather than just the vocabulary of the training data. By treating logic as a set of reusable templates, the model can apply consistent reasoning patterns across diverse subject matters, from grade-school science to economics.
The LMPM Framework
The LMPM architecture enhances the standard T5 encoder-decoder framework with two primary innovations: an external memory module and an entity-abstraction pre-training strategy.
1. External Logical Memory (M)
Rather than relying solely on internal weights to store reasoning patterns, LMPM incorporates a dedicated external memory structure. This memory stores latent representations of fundamental logical operations, such as substitution, conjunction, and conditional logic (if-then).
To access these patterns, the model employs an address structure utilizing a Gumbel-softmax mechanism. This allows the model to dynamically "look up" and retrieve the most relevant logical template for a given pair of premises during the generation process. This modular approach ensures that the model has a consistent reference point for deductive steps.
2. Entity Abstraction Pre-training
A core insight of this research is that domain-specific entities (e.g., "photosynthesis," "chlorophyll") can act as noise when a model is trying to learn pure logical structures. To mitigate this, the authors developed an Entity Abstraction task. During pre-training, specific entities are replaced with abstract tokens (e.g., <E1>, <E2>).
This process forces the model to focus on the relationships between variables rather than the variables themselves—much like learning algebra through variables ($x, y$) rather than specific arithmetic. By training on 564,000 patterns derived from a synthetic Wikipedia dataset, the model populates its memory with robust, domain-agnostic logic templates.
Experimental Results
The LMPM was integrated into the state-of-the-art METGEN framework and evaluated against the EntailmentBank benchmark, which consists of nearly 2,000 reasoning trees based on science questions.
Quantitative Performance
LMPM showed consistent improvements over the standard METGEN+T5 baseline across multiple tasks:
- Task 1 (Fixed Premises): The model achieved a 2.04% increase in the "Overall AllCorrect" metric.
- Task 2 (Distractor Premises): The model saw a 1.7% improvement in "Overall AllCorrect."
- Intermediate Consistency: Significant gains were observed in the "Intermediates AllCorrect" score, confirming that the memory module effectively guides the model toward more logical middle steps in the reasoning chain.
Human Evaluation
In a blind study conducted with graduate students, the reasoning trees generated by LMPM were compared against those from the baseline model. LMPM-generated trees were rated significantly higher in two key areas:
- Validity: 52 for LMPM vs. 46 for the baseline.
- Logical Consistency: 3.37 vs. 3.02 on a 5-point scale.
Discussion and Efficiency
The research highlights a "quality over quantity" effect in logical pre-training. The authors found that using only 25% of the abstracted pre-training data yielded performance comparable to using the full dataset. This suggests that abstracting entities makes the underlying logical patterns much easier for the model to identify and internalize, leading to higher data efficiency.
Limitations and Future Work
Despite its success, LMPM faces certain limitations:
- Multi-premise Complexity: The current architecture is optimized for steps involving two premises. Performance tends to degrade when a reasoning step requires the simultaneous fusion of three or more facts.
- Language and Modality: The model is currently restricted to English text. Future research aims to expand these logical patterns into multimodal contexts (e.g., reasoning with both images and text) and to explore cross-lingual logical generalization.
Conclusion
By decoupling logical reasoning from factual knowledge through external memory and entity abstraction, the LMPM framework provides a more reliable path toward truly explainable AI. The model's ability to prioritize structural logic over vocabulary-based memorization results in reasoning trees that are not only more accurate but also more aligned with human logical standards.
Summary updated