Introduction
Large Language Models (LLMs) have revolutionized natural language processing, yet they frequently falter in high-stakes domains requiring strict logical adherence. In academic environments, where graduation depends on complex, state-dependent rules, "hallucinations" or "post hoc rationalizations" can lead to incorrect advice. This paper introduces MCFR (Model Checking for Formal Reasoning), a neuro-symbolic framework designed to bridge the gap between linguistic flexibility and formal logical rigor.
The Challenge of Faithful Reasoning
While LLMs excel at generating plausible text, they often lack a causal grounding in the rules they describe. In the educational domain, questions like "Can I graduate in 8 semesters?" are not merely retrieval tasks; they are temporal reachability problems. Standard LLMs often ignore sequential constraints—such as prerequisite chains that physically require a minimum number of semesters—leading to logically impossible answers. MCFR addresses this by treating reasoning as a state-aware verification problem rather than a text-completion task.
The MCFR Framework
MCFR utilizes a "NeSy Type 2" sequential neuro-symbolic pipeline that offloads logical execution from the LLM to a formal model checker.
The pipeline consists of four key stages:
- Offline Model Building: Institutional rules are encoded into a formal transition model using UPPAAL, representing the system as a network of timed automata.
- Parsing: An LLM acts as a translator, converting natural language questions into Computation Tree Logic (CTL) specifications.
- Formal Verification: The UPPAAL model checker exhaustively explores the state space to determine if the CTL property holds within the defined model.
- Natural Language Synthesis: The verification results and execution traces are converted back into a human-readable explanation by the LLM.
Benchmarking with EduMC-QA
To evaluate the framework, the authors developed EduMC-QA, a dataset of 129 questions based on real-world academic procedures at the Ho Chi Minh City University of Technology. Questions are categorized into four verification types: Safety (preventing invalid actions), Liveness (ensuring eventual goals), Reachability (pathfinding to specific states), and Fairness (evaluating non-discriminatory blocking).
Key Results and Insights
The study demonstrates that LLMs are far more effective as translators than as logical solvers. MCFR achieved an overall accuracy of 93.85%, significantly outperforming ChatGPT-reason (82.31%) and DeepSeek (76.92%). Notably, Claude-Sonnet struggled on this benchmark, achieving only 40% accuracy.
MCFR showed particular strength in Liveness (97.06%) and Reachability (94.74%) tasks. These areas are typically difficult for LLMs because they require enforcing multi-step policy constraints that are implied by the rules but not explicitly stated in a single document. By exploring the state space, MCFR can answer "What if?" scenarios with mathematical certainty.
Limitations and Future Directions
The primary bottleneck for MCFR is the manual effort required to build the initial formal model (~56 person-hours for one department). Additionally, the system's accuracy is bounded by the LLM's ability to correctly parse natural language into CTL; a mis-translation results in a logically sound answer to the wrong question. Future research will focus on using LLMs to semi-automate model construction from raw policy text and integrating local consistency checks to improve scalability.
Summary updated