THEIA: Learning Complete Kleene Three-Valued Logic in a Pure-Neural Modular Architecture

Published: 27 May 2026, Last Modified: 11 Jun 2026CompLearn 2026 PosterEveryoneRevisionsBibTeXCC BY 4.0
Keywords: compositional generalization, uncertainty propagation, modular neural networks, mechanistic interpretability, length generalization, Kleene K3 logic, neural algorithmic reasoning, neuro-symbolic learning
TL;DR: THEIA learns complete Kleene K3 in a pure-neural modular architecture, generalizes from 5 to 500 composition steps, and reveals delayed verdict representations under uncertainty.
Abstract: We present THEIA, a modular neural architecture that learns complete Kleene three-valued logic (K3) end-to-end without any external symbolic inference engine, symbolic runtime, or hand-encoded Kleene gate primitives. THEIA processes four mathematical domains (arithmetic, order, set membership, propositional logic) through dedicated engines converging in a final logic module. Across 5 seeds, THEIA passes 12/12 Unknown-involving K3 rules at >99% per-rule accuracy (39/39 under the full K3 truth table, App. D). K3 learnability itself is not the central finding — a tuned Transformer baseline also passes all 39 rules (App. H); the contributions are instead a reliability spectrum under discretized end-to-end composition and an uncertainty–verdict representation profile, both established on a controlled synthetic substrate. A sequential composition experiment on an absorbing-state-free mod-3 substrate (deliberately distinct from K3 chains, whose absorbing elements trivialize length generalization; Sec. 4.5) generalizes from 5-step training to 500-step evaluation at 99.96% ± 0.04% across 5 THEIA seeds. Replacing the four-engine backbone with flat MLPs collapses to chance under the identical discretized training protocol; a larger-capacity ResMLP grid reaches ≥99% on only 3/20 trials, and a larger-capacity 3.58M Transformer reaches 99.24% ± 0.34% — a four-tier reliability spectrum in which THEIA's cross-seed std is 9×–479× tighter than every comparator (App. G). Mechanistic probing reveals asymmetric propagation of uncertainty and verdict: the network preserves the Has-Unknown signal at every upstream engine boundary, while final-verdict decodability remains at or below a 73.4% U-vs-non-U oracle reference until the Logic boundary (linear and MLP probes). Since both signals traverse the same engines and bridges, the asymmetry reflects a learned representational organization rather than architectural data flow alone. Activation patching further rules out residual-shortcut explanations on matched non-absorbent configurations (Sec. 4.3). The Transformer reaches equivalent correctness through a qualitatively different representational trajectory, indicating that modular and attention-based architectures realize distinct compositional strategies.
Email Sharing: We authorize the sharing of all author emails with Program Chairs.
Data Release: We authorize the release of our submission and author names to the public in the event of acceptance.
Submission Number: 9
Loading