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 获取。