DATUM: A System of Syntactic Kernel and Semantic Wrapper for Trustworthy LLM Spatial Reasoning
Organizations: School of Computing and Information Science, University of Maine, Orono, ME, USA
Abstract
AI-generated mathematical proofs can be trusted because formal kernels such as Lean verify them, but spatial reasoning has no such kernel. We present DATUM, which verifies large language model (LLM) spatial reasoning formally as a typed graph. A semantic wrapper transcribes plain-language question and reasoning into typed spatial statements and splits vague wording such as ``north of'' into explicit interpretation branches. A syntactic kernel checks each statement by fixed rules grounded in GIScience principles and, like a compiler, reports error stacktraces as typed exception reports. DATUM provides automated, reliable and human-readable verification tools of LLM generated spatial reasoning. On 585 spatial QA tasks, DATUM detects wrong conclusions with F1 0.95 at 85--87% coverage, against 0.44--0.81 for existing LLM-as-judge baselines. DATUM's exception reports also enables LLM self-correction, fixing 103 out of 124 reasoning errors, against 72--84 for baselines.
Figures & tables
Appendix figures & tables1 asset
Supplementary material from the paper’s appendix.