LogicMP: A Neuro-symbolic Approach for Encoding First-order Logic Constraints
Weidi Xu, Jingwei Wang, Lele Xie, Jianshan He, Hongting Zhou, Taifeng Wang, Xiaopei Wan, Jingdong Chen, Chao Qu, Wei Chu

TL;DR
LogicMP introduces a neural layer that efficiently encodes first-order logic constraints into neural networks, enabling better performance across diverse tasks by leveraging mean-field inference over Markov Logic Networks.
Contribution
The paper presents a novel neural layer, LogicMP, that performs mean-field variational inference over MLNs, integrating FOL constraints into neural networks with improved efficiency and modularity.
Findings
Outperforms competitors in graph, image, and text tasks.
Reduces inference complexity from sequential to parallel tensor operations.
Demonstrates theoretical mitigation of MLN inference difficulty.
Abstract
Integrating first-order logic constraints (FOLCs) with neural networks is a crucial but challenging problem since it involves modeling intricate correlations to satisfy the constraints. This paper proposes a novel neural layer, LogicMP, whose layers perform mean-field variational inference over an MLN. It can be plugged into any off-the-shelf neural network to encode FOLCs while retaining modularity and efficiency. By exploiting the structure and symmetries in MLNs, we theoretically demonstrate that our well-designed, efficient mean-field iterations effectively mitigate the difficulty of MLN inference, reducing the inference from sequential calculation to a series of parallel tensor operations. Empirical results in three kinds of tasks over graphs, images, and text show that LogicMP outperforms advanced competitors in both performance and efficiency.
Peer Reviews
Decision·ICLR 2024 poster
Relevance: The paper deals with a very important problem that is of interest to the larger AI community. Novelty: The paper introduces a novel layer. However, it fails to acknowledge other works that have integrated logical constraints into a neural network layer. Among the most relevant we find: - Nicholas Hoernle, Rafael-Michael Karampatsis, Vaishak Belle, and Kobi Gal. MultiplexNet: Towards fully satisfied logical constraints in neural networks. In Proc. of AAAI, 2022. - Eleonora Giunc
Clarity: Overall, I found the paper not very readable, and I think the authors should try to give more intuitions. See below for some questions I had while reading the paper. - While the authors included an overview of Markic Logic Networks there are still some concepts that look a bit obscure. What does the weight associated with each formula represent? Is it a way of representing the importance assigned to the formula? Why do the authors need the open-world assumption? When explaining the
- The use of Einsum to aggregate and parallelize ground MLN messages in MF seems to be a novel and interesting idea for scaling up inference through neural computations. - The experiments seem extensive and are performed on a variety of different problems showing generality of the approach
- In terms of significance, there has been a long history of work in lifted inference with the same underlying principle of using symmetries to scale-up inference in MLNs. One of the key takeaways from such work (e.g. Broeck & Darwiche 2013) is that evidence can destroy symmetries in which case lifted inference reduces to ground inference (if guarantees on the inference results are required). Here, while the approach is scalable, would the same problem be encountered. In the related work section
The technique is sound and the paper is generally well-written. Experiments are diverse.
The novelty of the paper is limited and cannot be assessed from the current paper. This is a major weakness, The paper fails in positioning in the wider field of neuro-symbolic AI. The paper claims to be the first method capable of encoding FOLC (pag. 2, “Contributions”). This is not true. The authors themselves cite ExpressGNN. However, there are many other papers attempting at this. I will cite some here, but many more can be found following the corresponding citations: Deep Logic Models, M
Code & Models
Videos
Taxonomy
TopicsNatural Language Processing Techniques · Topic Modeling · Machine Learning and Data Classification
MethodsVariational Inference
