arXiv:2609.06235cs.LOSep 2026

Manuscript Offprint

arXiv:2609.06235

Differentiable Horn Programs: A Constructive Expressivity Theorem for Latent Rule Operators

Aymen Mejri

Abstract

We introduce LATENTGAMMA, a differentiable operator on the unit cube [0,1]M[0,1]^M designed as a smooth surrogate of Tarski's immediate consequence operator TPT_P associated with a definite Horn program PP on MM atoms. The operator is built as a five-stage composition combining sigmoidal gating, softmax routing, and a residual update that enforces monotonicity by construction. We establish four theoretical results. First, the iterated sequence is coordinate-wise non-decreasing and bounded by 1\mathbf{1}, hence converges to a fixed point of LATENTGAMMA; the operator itself is lattice-monotone on [0,1]M[0,1]^M. Second, our constructive expressivity theorem shows that for every definite Horn program PP there exists a closed-form parameter assignment θ∗(P)\theta^*(P) and an explicit time bound Tmax⁡(P)T_{\max}(P) such that the iterated sequence exactly reproduces TP∞(F0)T_P^\infty(F_0) for every initial fact set F0F_0 throughout the window [D(P,F0),Tmax⁡(P)][D(P,F_0), T_{\max}(P)], where D(P,F0)≤MD(P,F_0) \leq M is the derivation depth. The window Tmax⁡T_{\max} is large in practice (≥105\geq 10^5 for sparse programs) and reflects the finite-time nature of computation by smooth sigmoidal gates. Third, the oracle is robust to Gaussian noise on its body and head logits, with explicit non-asymptotic bounds. Fourth, we prove a matching information-theoretic lower bound on the parameter count. We provide a complete numerical validation on programs ranging from M=33M=33 to M=504M=504 atoms: oracle accuracy reaches 1.0000 on 2000 test cases with zero false-positive and false-negative rates, and the empirical noise tolerance σmax⁡\sigma_{\max} scales precisely as the union bound RM⋅Φ(−10/ση)RM \cdot \Phi(-10/\sigma_\eta) predicts.

1 INTRODUCTION

Integrating neural networks with symbolic reasoning is among the oldest open problems in AI (Garcez et al., 2002; Besold et al., 2017). Neural networks excel at pattern recognition and statistical generalization in high-dimensional continuous spaces, but their ability to perform compositional multi-step reasoning over discrete symbolic structures remains contested (Marcus, 2020; Lake et al., 2017). Symbolic systems, conversely, achieve exact finite-time deduction but are brittle and cannot learn from raw observations (Garnelo and Shanahan, 2019). Reconciling these paradigms requires operators that are simultaneously expressive (capable of representing the target symbolic computation) and differentiable (amenable to gradient-based learning).

The simplest non-trivial symbolic computation is forward chaining on a definite Horn program. Given a finite set of atomic propositions A={a1,…,aM}\mathcal{A} = \{a_1, \dots, a_M\}, a Horn program PP is a finite collection of rules b1∧⋯∧bk⇒hb_1 \wedge \cdots \wedge b_k \Rightarrow h, and Tarski's immediate consequence operator TPT_P maps each fact set S⊆AS \subseteq \mathcal{A} to its one-step closure under PP. The Horn closure TP∞(F0)T_P^\infty(F_0) is the least fixed point of TPT_P containing F0F_0, computable in at most MM iterations (Lloyd, 1987; Apt and van Emden, 1982). Despite its conceptual simplicity, no existing differentiable system exactly represents TP∞T_P^\infty for arbitrary Horn programs through a closed-form parameter assignment.

The expressivity question. We ask: does there exist a differentiable parameterized operator TΓ,θ:[0,1]M→[0,1]M\mathcal{T}_{\Gamma,\theta} : [0,1]^M \to [0,1]^M such that, for every definite Horn program PP, an explicit assignment θ∗(P)\theta^*(P) of its parameters makes the iterated sequence s(t+1)=TΓ,θ∗(P)(s(t))\mathbf{s}^{(t+1)} = \mathcal{T}_{\Gamma,\theta^*(P)}(\mathbf{s}^{(t)}) recover TP∞(F0)T_P^\infty(F_0) exactly for every initial state s(0)=1F0\mathbf{s}^{(0)} = \mathbf{1}_{F_0}? Existing neuro-symbolic approaches answer this question only approximately or on restricted program classes (Sec. 2). We prove that such an operator exists and exhibit it constructively.

Contributions. (C1) We define LATENTGAMMA, a parameterized operator TΓ:[0,1]M→[0,1]M\mathcal{T}_{\Gamma}:[0,1]^M \to [0,1]^M obtained as a five-stage differentiable composition. (C2) We prove that the iterated sequence is coordinate-wise non-decreasing and bounded by 11, hence converges to a fixed point; the operator is lattice-monotone on [0,1]M[0,1]^M (Sec. 5). (C3) Main result: for every definite Horn program PP, there exists a closed-form parameter assignment θ∗(P)\theta^*(P) and an explicit time bound Tmax⁡(P)T_{\max}(P) such that, for all F0⊆AF_0 \subseteq \mathcal{A} and all D(P,F0)≤T≤Tmax⁡(P)D(P,F_0) \leq T \leq T_{\max}(P) where D(P,F0)≤MD(P,F_0) \leq M is the derivation depth, {i:si(T)>12}=TP∞(F0)\{i : \mathbf{s}_i^{(T)} > \frac{1}{2}\} = T_P^\infty(F_0) (Theorem 6.1). The finite upper bound Tmax⁡T_{\max} is intrinsic to differentiable sigmoidal gates and is large in practice (≥105\geq 10^5 for ρmax⁡≤10\rho_{\max} \leq 10). (C4) Robustness: the oracle tolerates additive Gaussian noise on its logits with explicit non-asymptotic bounds matching the union bound RM⋅Φ(−10/ση)RM \cdot \Phi(-10/\sigma_\eta) (Theorem 7.2). (C5) Matching information-theoretic lower bound: any operator representing TP∞T_P^\infty for every Horn program of RR rules with body size ≤k\leq k requires Ω(Rklog⁡M)\Omega(Rk \log M) bits; LATENTGAMMA achieves this up to logarithmic factors (Theorem 8.1). (C6) A complete numerical validation (Sec. 7) confirms each theorem on programs of size up to M=504,R=648M=504, R=648. (C7) We delineate explicitly the theory-practice gap: oracle parameters exist, but gradient descent is not guaranteed to find them (Sec. 9).