Introduction
Chain-of-Thought (CoT) prompting has emerged as a powerful technique for enhancing the reasoning capabilities of Large Language Models (LLMs). By encouraging models to generate intermediate steps, CoT allows LLMs to tackle complex multi-step problems. However, a significant challenge remains: faithfulness. In many instances, an LLM produces a reasoning chain that appears logical but is fundamentally disconnected from the final answer. This phenomenon, where the explanation serves as a post-hoc justification rather than a causal derivation, poses risks in high-stakes domains like medicine or law where transparency is paramount.
To address this, the paper introduces Faithful CoT, a framework that ensures the final answer is a direct consequence of the generated reasoning steps by integrating symbolic execution into the thought process.
The Faithful CoT Framework
Faithful CoT moves away from purely natural language reasoning. Instead, it forces the model to generate a structured, interleaved sequence of natural language (NL) and symbolic language (SL). The framework operates in two distinct stages:
- Translation: The LLM is prompted to translate a natural language query into a reasoning chain where NL comments are paired with executable code. Depending on the problem domain, the symbolic language might be Python (for mathematical tasks), Datalog (for logical inference), or PDDL (for planning).
- Problem Solving: This generated chain is then passed to a deterministic external solver, such as a Python interpreter or a Datalog engine. The solver executes the code to derive the final answer.
By design, the final output is not "guessed" by the LLM but is the result of executing the model's own logic. This guarantees that the reasoning chain is a faithful representation of how the answer was reached.
Experimental Evaluation
The researchers evaluated Faithful CoT across 10 benchmarks spanning four diverse domains:
- Math Word Problems (MWP): Including GSM8K, SVAMP, and AQuA.
- Multi-hop QA: StrategyQA and Date/Sports Understanding.
- Planning: Robotics task planning via SayCan.
- Relational Inference: Inferring family trees using the CLUTRR dataset.
Using models like GPT-4 and Codex, the framework set new few-shot State-of-the-Art (SOTA) records on 7 of these 10 datasets.
Key Insights
1. Faithfulness Drives Accuracy
A common assumption in AI is that interpretability comes at the cost of performance. Faithful CoT challenges this by showing that forcing a model to be "faithful" actually improves its accuracy. The method achieved a relative accuracy gain of 21.4% on Relational Inference and 6.3% on Math Word Problems compared to standard CoT.
2. Offloading Cognitive Load
By utilizing an external solver, the LLM no longer needs to perform mental arithmetic or track complex logical states—tasks where LLMs are notoriously prone to error. Instead, the model can focus its parameters on the high-level task of semantic translation and structural organization.
3. Symbolic Diversity
The framework's success across different domains highlights the importance of symbolic diversity. While Python is ideal for math, Datalog proved more effective for multi-step common-sense questions. This suggests that the choice of symbolic language should be tailored to the specific logic of the problem domain.
Results and Human Evaluation
Beyond raw accuracy, human evaluations confirmed the quality of the reasoning. In domains like Sports and Math, the reasoning chains were judged as "completely correct" over 90% of the time when the final answer was correct. Furthermore, the method proved robust to variations in prompt exemplars, suggesting it is a stable alternative to standard prompting techniques.
Limitations and Future Directions
Despite its success, Faithful CoT has limitations. While the execution is faithful, the translation process remains a "black box" within the LLM. If the model generates incorrect code, the solver will faithfully execute that incorrect logic. Additionally, the study noted that nearly 30% of errors in Datalog tasks were due to syntax hallucinations, as these languages are less prevalent in training data than Python.
Future work may explore how non-programmers can interact with these NL+SL chains to debug model reasoning, potentially creating a collaborative environment where humans and LLMs refine symbolic logic together to reach correct conclusions.
Conclusion
Faithful CoT represents a significant step toward more reliable and transparent AI. By grounding LLM reasoning in deterministic symbolic execution, the framework not only improves performance but also provides a verifiable audit trail for how decisions are made, paving the way for safer deployment of LLMs in complex, real-world scenarios.
Summary updated