Applying the Logical Three-Dimensional Formalism to AI Hallucination: Validation, the Domain Clause, and an Interpretable Detector
Abstract
AI hallucination — generating content inconsistent with the context or with facts — is usually treated as an engineering problem. This paper studies it as both a test object and an application object of a logical theory. The three-dimensional formalism decomposes any "structure → symbol" generative system into three orthogonal dimensions: determinism H (how strongly the structure constrains the symbol), directionality ΔS (the irreversibility of generation), and anchoring A (cross-system semantic agreement), together with the anchoring-alignment hypothesis H1: high anchoring ⇔ low conditional entropy. This paper accomplishes three things. (I) Testing H1 in the hallucination domain: on two public hallucination-annotated datasets (HaluEval: 10,000 dual-mode QA triples; HaluBench: 14,900 six-source annotated samples). Results: the mixed-mode A–H correlation is sensitive to the symbol taxonomy (flipping from −0.75 to +0.65); the six-source design gives a significantly positive correlation (PASS-only subset ρ = +0.83, p = 0.005) — H1 does not hold in the hallucination domain. (II) The theoretical verdict — the domain clause: H1 constrains only lawful generation (code, DNA, planet formation, asteroid shattering — all negative in four domains); AI output is statistical sampling, not law-governed generation, and hallucination is the breaking of the law. Data support: the determinism loss ΔH = H_hall − H_ground is positive in all 11 structures (breaking is universal); the breaking is directed (ΔS > 0 consistently across four symbol taxonomies; binary: 11/11, p = 0.001, toward verbosity/vagueness); H1's negative direction survives in the unbroken lawful part (A vs H_g: ρ = −0.60, p = 0.051, bootstrap 97.3% negative). Hallucination thus obtains a three-dimensional decomposition: H measures the degree of breaking, ΔS measures its direction, and A aligns with H only where the law still holds. (III) Two engineering artifacts: (i) the single-answer three-dimensional detector v1 — format rarity/length (H), verbosity + hedges + missing precision (ΔS), and context-overlap + number/year consistency (A), fused by logistic regression; in-domain AUC 0.72–0.89 but collapsing to ~0.5 cross-domain (the "look" of hallucination flips with the task: open QA → verbosity, numeric reasoning → precise-looking fabricated numbers); (ii) the multi-sample detector v3 — cross-sample disagreement as the runtime measure of anchoring A (domain-agnostic), validated through a DeepSeek API experiment chain: self-consistency disagreement AUC 0.906, cross-model (chat vs reasoner) 0.730, numeric-domain DROP test 0.928 (fabrication divergence 0.633 vs correct convergence 0.084, a 7.5× gap), and fusion with the single-answer model reaching AUC 0.922 with no collapse across question types (0.80–0.99); the multi-sample H1 reproduces (ρ = −0.764, p = 0.027). Conclusions: AI hallucination is not an exception to the logical theory but the correct prediction of its domain clause — the three dimensions decompose hallucination into three measurable components, and the anchoring-dimension disagreement signal is a domain-agnostic hallucination measure. All scripts, data, models, and three experiment reports accompany this paper. Keywords: AI hallucination; structure–symbol sample space; conditional entropy; directionality; anchoring; H1; domain clause; cross-sample self-consistency; cross-model disagreement; interpretable hallucination detector; HaluEval; HaluBench AI 幻觉(生成与上下文或事实不符的内容)通常被当作工程问题处理;本文将其作为逻辑理论的一个检验对象与一个应用对象来研究。逻辑三维形式体系把任意"结构 → 符号"生成系统分解为三个正交维度:确定性 H(结构对符号的约束强度)、方向性 ΔS(生成过程的不可逆性)、锚定 A(跨系统语义一致性),并有锚定对齐假说 H1:高锚定 ⇔ 低条件熵。 本文完成三件事。(一)H1 的幻觉域检验:在两个公开幻觉标注数据集(HaluEval 10,000 组双模式问答、HaluBench 14,900 条六源域标注)上检验 H1。结果:混合模式下的 A–H 相关对符号分类敏感(−0.75 至 +0.65,符号反转),跨源域设计给出显著为正的相关(PASS-only 子集 ρ=+0.83,p=0.005)——H1 在幻觉域不成立。(二)理论裁决——适用域条款:H1 只约束有法则的生成(代码、DNA、行星形成、小行星碎裂,四域全负);AI 输出是统计采样、不符合逻辑法则,幻觉是法则的破坏。数据支持:确定性损失 ΔH=H_h−H_g 在全部 11 个结构上 >0(破坏普遍);破坏有方向(ΔS>0 于四种符号分类下一致,二元分类 11/11,p=0.001,朝冗长/模糊);H1 的负方向在未被破坏的合法部分残留(A vs H_g:ρ=−0.60,p=0.051,bootstrap 97.3% 为负)。幻觉由此获得三维分解:H 度量破坏程度、ΔS 度量破坏方向、A 只在法则存续处对齐。(三)两个工程产物:(i) 单答案三维探测器 v1——格式稀有度/长度(H 维)、冗长+模糊词+精确标志(ΔS 维)、上下文词覆盖与数字/年份一致性(A 维)融合逻辑回归,域内 AUC 0.72–0.89,但跨域塌缩至 ~0.5(因为幻觉的"表现形式"随任务翻转:开放问答→冗长,数值推理→精确虚构数值);(ii) 多采样探测器 v3——以跨采样分歧度作为锚定 A 的运行时度量(域无关),经 DeepSeek API 实验链验证:自一致性分歧度 AUC 0.906、跨模型(chat vs reasoner)0.730、数值域 DROP 专项 0.928(编造发散 0.633 vs 正确收敛 0.084,7.5 倍),融合单答案模型后 AUC 0.922、题型间 0.80–0.99 无塌缩;多采样版 H1 复现(ρ=−0.764,p=0.027)。 结论:AI 幻觉不是逻辑理论的例外,而是其适用域条款的正确预言——三维度把幻觉分解为三个可测分量,且锚定维的分歧度信号是域无关的幻觉度量。全部脚本、数据、模型与三份实验报告随文发布。 关键词:AI 幻觉;结构–符号样本空间;条件熵;方向性;锚定;H1;适用域条款;跨采样自一致性;跨模型分歧度;可解释幻觉探测器;HaluEval;HaluBench