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
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, which performs mean-field variational inference over a Markov Logic Network (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 greatly 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 images, graphs, and text show that LogicMP outperforms advanced competitors in both performance and efficiency.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 50ace820-8313-4379-9ce1-7c06455afb28Cited by top-tier papers1
Ask how each one uses itBuilds on8
- LayoutLM: Pre-training of Text and Layout for Document Image UnderstandingYiheng Xu, Minghao Li, Lei Cui, Shaohan Huang et al.KDD 2020 · 575 citations
- Semantic Probabilistic Layers for Neuro-Symbolic LearningKareem Ahmed, Stefano Teso, Kai-Wei Chang, Guy Van den Broeck et al.NeurIPS 2022 · 133 citations
- Efficient Probabilistic Logic Reasoning with Graph Neural NetworksYuyu Zhang, Xinshi Chen, Yuan Yang, Arun Ramamurthy et al.ICLR 2020 · 119 citations
- Scallop: From Probabilistic Deductive Databases to Scalable Differentiable ReasoningJiani Huang, Ziyang Li, Binghong Chen, Karan Samel et al.NeurIPS 2021 · 101 citations
- MultiplexNet: Towards Fully Satisfied Logical Constraints in Neural NetworksNick Hoernle, Rafael-Michael Karampatsis, Vaishak Belle, Kobi GalAAAI 2022 · 73 citations
Related papers
- Improving Out-of-Distribution Detection with Markov Logic NetworksKonstantin Kirchheim, Frank OrtmeierICML 2025
- MLN4KB: an efficient Markov logic network engine for large-scale knowledge bases and structured logic rulesHuang Fang, Yang Liu, Yunfeng Cai, Mingming SunWWW 2023 · 10 citations
- LP-SparseMAP: Differentiable Relaxed Optimization for Sparse Structured PredictionVlad Niculae, André F. T. MartinsICML 2020 · 22 citations
- KLay: Accelerating Arithmetic Circuits for Neurosymbolic AIJaron Maene, Vincent Derkinderen, Pedro Zuidberg Dos MartiresICLR 2025
- LogicSeg: Parsing Visual Semantics with Neural Logic Learning and ReasoningLiulei Li, Wenguan Wang, Yang YiICCV 2023 · 52 citations
