用代数方法让大模型逻辑更稳定,仅靠提示词就能提升推理准确率。
Controlling Logical Collapse in LLMs via Algebraic Ontology Projection over F2

- 将模型隐藏状态投影到F2域,用42组关系对作为代数钥匙构建逻辑结构。
- 零样本测试中概念包含准确率达93.33%,跨模型家族保持86.67%一致表现。
- 发现后期层存在逻辑崩溃现象,提示词组合可有效抑制该问题。
大语言模型是否以形式可验证的代数结构编码本体关系?我们提出代数本体投影(AOP),在利斯科夫替换原则约束下,将模型隐藏状态投影至伽罗瓦域F2,仅需42个关系对作为代数密钥。AOP在未见概念对上实现高达93.33%的零样本包含准确率(使用Gemma-2 Instruct优化提示),并在多个模型家族中稳定达到86.67%准确率——无需模型微调,仅通过提示词即可实现。该代数结构具有显著的层依赖性。我们引入语义结晶度(SC)指标,量化F2约束满足程度相对于随机基线的情况,可预测零样本准确率而无需保留数据。系统提示词充当代数边界条件:只有其与指令微调结合才能防止晚期层崩溃——一种在10种条件中7种出现的最终层逻辑一致性系统性退化现象。这些发现将前向计算重新理解为迭代的代数组织过程,为构建逻辑结构不仅被近似、且可形式化访问的大语言模型开辟路径。
原文摘要 · Abstract (English)
Do large language models internally encode ontological relations in a formally verifiable algebraic structure? We introduce Algebraic Ontology Projection (AOP), which projects LLM hidden states into the Galois Field F2 under Liskov Substitution Principle constraints, using only 42 relational pairs as algebraic keys. AOP achieves up to 93.33% zero-shot inclusion accuracy on unseen concept pairs (Gemma-2 Instruct with optimized prompt), with consistent 86.67% accuracy observed across multiple model families -- with no model tuning, but through prompt alone. This algebraic structure is strongly layer-dependent. We introduce Semantic Crystallisation (SC), a metric that quantifies F2 constraint satisfaction relative to a random baseline and predicts zero-shot accuracy without held-out data. System prompts act as algebraic boundary conditions: only their combination with instruction tuning prevents Late-layer Collapse -- a systematic degradation of logical consistency in the final layers, observed in 7 of 10 conditions. These findings reframe forward computation as an iterative process of algebraic organisation, and open a path toward LLMs whose logical structure is not merely approximated, but formally accessible.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。