Abstract
While large language models (LLMs) are proficient at question-answering (QA), it is not always clear how (or even if) an answer follows from their latent "beliefs". This lack of interpretability is a growing impediment to widespread use of LLMs. To address this, our goals are to make model beliefs and their inferential relationships explicit, and to resolve inconsistencies that may exist, so that answers are supported by interpretable chains of reasoning drawn from a consistent network of beliefs. Our approach, which we call REFLEX, is to add a rational, self-reflecting layer on top of the LLM. First, given a question, we construct a belief graph using a backward-chaining process to materialize relevant model beliefs (including beliefs about answer candidates) and their inferential relationships. Second, we identify and minimize contradictions in that graph using a formal constraint reasoner. We find that REFLEX significantly improves consistency (by 8%-11% absolute) without harming overall answer accuracy, resulting in answers supported by faithful chains of reasoning drawn from a more consistent belief system. This suggests a new style of system architecture in which an LLM extended with a rational layer can provide an interpretable window into system beliefs, add a systematic reasoning capability, and repair latent inconsistencies present in the LLM.
Introduction
Large Language Models (LLMs) have demonstrated remarkable capabilities in natural language understanding and generation. However, they often function as "black boxes," making it difficult to determine if a response is grounded in a coherent internal logic or is merely a hallucination. A significant challenge is the inherent inconsistency of LLMs; for instance, a model might correctly state that "mammals give live birth" but fail to conclude that "giraffes give live birth" despite knowing a giraffe is a mammal. This lack of logical coherence limits their application in domains requiring high reliability, such as medicine or law.
The REFLEX Architecture
To bridge the gap between raw LLM outputs and logical consistency, we propose REFLEX, a system that adds a self-reflecting rational layer over a frozen LLM. The architecture operates in three distinct phases:
1. Belief Graph Construction
When presented with a question, REFLEX initiates a backward-chaining process. It prompts the LLM to generate potential explanations or premises for candidate answers. This process is recursive, building a complex network of supporting statements and logical rules (e.g., "If S3 and S4 are true, then S1 is true").
2. Self-Verification
Once the graph structure is established, the system queries the LLM for its belief in each individual statement within the graph. The model provides a truth value and a confidence score for each node, effectively mapping out its internal "mental model" regarding the specific topic.
3. Constraint Reasoning
The final step involves a formal logic solver (MaxSAT). The solver analyzes the entire belief graph to identify contradictions—instances where the model's stated beliefs violate the logical rules it also generated. By "flipping" the truth values of the lowest-confidence beliefs to satisfy the maximum number of constraints, the solver produces a globally consistent set of beliefs. The final answer is then derived from this resolved, rationalized graph.
Experimental Results
REFLEX was evaluated on three multi-step reasoning benchmarks: EntailmentBank, OBQA, and QuaRTz. The results demonstrate that the rational layer significantly enhances the model's performance:
- Consistency: Logical consistency improved by 8% to 11% absolute across all datasets.
- Accuracy: Accuracy remained stable or improved slightly (e.g., from 79.4% to 79.9% on EntailmentBank), proving that enforcing rationality does not degrade performance.
- Faithfulness: Unlike standard prompting techniques, the resulting belief graphs provide a faithful explanation of the system's reasoning, as the final answer is a direct product of the resolved graph.
Discussion and Limitations
While REFLEX marks a significant step toward interpretable and rational LLMs, several challenges remain. Approximately 30% of failures occur because the LLM fails to generate the necessary logical rules to connect facts. Another 30% stem from "confident errors," where the model holds a false belief so strongly that the reasoner overrides correct facts to maintain consistency. Furthermore, the current implementation treats beliefs as universal truths, ignoring context-dependency.
Future research will focus on incorporating context into belief statements and "closing the loop" by using the resolved belief graphs to fine-tune the underlying LLM, allowing it to learn from its own rational reflections.
Summary updated