Inductive Logic Programming (ILP) learns interpretable logical rules from data. Existing methods are transductive: their learned parameters are bound to specific predicates and require retraining for each new task. We introduce Neural Rule Inducer (NRI), a pretrained model for zero-shot rule induction. Rather than encoding literal identities, NRI represents literals using domain-agnostic statistical properties such as class-conditional rates, entropy, and co-occurrence, which generalize across variable identities and counts without retraining. The model consists of a statistical encoder and a parallel slot-based decoder. Parallel decoding preserves the permutation invariance of logical disjunction; an autoregressive decoder would instead impose an arbitrary clause order. Product T-norm relaxation makes rule execution differentiable, allowing end-to-end training on prediction accuracy alone. We evaluate NRI on rule recovery, robustness to label noise and spurious correlations, and zero-shot transfer to real-world benchmarks, and we believe this work opens up the possibility of foundation models for symbolic reasoning. Code and the reference checkpoint are available at https://github.com/phuayj/neural-rule-inducer.
翻译:归纳逻辑编程(ILP)从数据中学习可解释的逻辑规则。现有方法是转导式的:它们学习到的参数绑定到特定谓词,并且需要为每个新任务重新训练。我们引入了神经规则归纳器(NRI),一种用于零样本规则归纳的预训练模型。NRI不编码字面量的具体身份,而是使用领域无关的统计属性(例如类别条件概率、熵和共现性)来表示字面量,这些属性能够跨不同变量身份和计数进行泛化而无需重新训练。该模型由一个统计编码器和一个基于并行槽的解码器组成。并行解码保持了逻辑析取的置换不变性;而自回归解码器则会施加任意子句顺序。乘积T-范数松弛使规则执行变为可微,从而允许仅基于预测精度的端到端训练。我们在规则恢复、对标签噪声和虚假相关性的鲁棒性以及零样本迁移到真实基准任务上评估了NRI,并相信这项工作为符号推理的基础模型开辟了可能性。代码和参考检查点可在 https://github.com/phuayj/neural-rule-inducer 获取。