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 Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
1 top-tier paper has cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
Cited by top-tier papers1
Builds on10
- 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
- Spatial Dependency Parsing for Semi-Structured Document Information ExtractionWonseok Hwang, Jinyeong Yim, Seunghyun Park, Sohee Yang et al.ACL Findings 2021 · 84 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
