LLMs often give contradictory answers to semantically equivalent queries even when the facts are known. We formalize consistency as semantic invariance over query equivalence classes and prove that invariance under arbitrary meaning‑preserving transformations is undecidable. This motivates scoped semantic invariance, where model behavior is evaluated within bounded semantic domains. Knowledge graphs (KGs) serve as explicit semantic control structures that define local constraints and provide grounding contexts. Experiments on the MITRE D3FEND ontology and eight Wikidata‑derived domains reveal that inconsistencies are not random but concentrate in localized hotspot subgraphs exhibiting three stable patterns: TREE, STAR, and CYCLE. These patterns persist across models and domains. Selective graph grounding improves answer correctness and cross‑model consistency, whereas indiscriminate grounding causes regressions. A layered grounding strategy yields the strongest monotonicity profile, preserving correct knowledge while reducing inconsistency. Finally, hotspot structures identified by simple consistency probes transfer to more realistic compositional reasoning tasks, still serving as reliable indicators.
Review