🤖 AI Summary
This work addresses the susceptibility of large language models (LLMs) to "late-layer collapse" during deep reasoning, which degrades logical consistency. To mitigate this, the authors propose Algebraic Ontology Projection (AOP), a method that maps hidden states into the binary Galois field $\mathbb{F}_2$ and enforces Liskov substitution principle constraints alongside system prompts as algebraic boundary conditions to stabilize internal logical structures. The study reveals, for the first time, that LLMs possess a formally verifiable algebraic ontology and introduces Semantic Crystallinity (SC) as a metric that effectively predicts zero-shot accuracy. Experimental results demonstrate that logic collapse can be significantly alleviated through prompting alone, achieving 93.33% zero-shot inclusion accuracy on unseen concept pairs and consistently maintaining 86.67% accuracy across diverse model families.
📝 Abstract
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.