Abstract
This paper introduces Quantified Neural Markov Logic Networks (QNMLNs) and Deep-Set MLNs, novel architectures designed to bridge the gap between symbolic logic and deep learning. By incorporating learnable "quantifiers" through Deep Sets, these models capture complex global constraints in structured data—such as molecular graphs—outperforming both standard neural logic models and massive state-of-the-art diffusion models while utilizing significantly fewer parameters.
Introduction
Statistical Relational Learning (SRL) seeks to combine the formal reasoning of logic with the probabilistic handling of uncertainty. A cornerstone of this field is the Markov Logic Network (MLN), which defines probability distributions using weighted logical rules. Recent developments led to Neural MLNs (NMLNs), which replace rigid formulas with neural networks to learn potential functions directly from data. However, NMLNs face a theoretical limitation: they lack the expressivity of logic with quantifiers (e.g., "for all" or "there exists"). Consequently, they struggle to model global constraints, such as identifying a central node in a network. This research introduces architectural upgrades to overcome this "expressivity ceiling" by enabling models to represent quantified distributions.
Methodology
The authors propose two primary enhancements to the NMLN framework:
- Quantified Neural MLNs (QNMLNs): This architecture introduces "Neural Sentence Statistics" that explicitly implement logical quantifiers ($\forall, \exists$, and a statistical "most" $\forall^*$). These are realized through $min$, $max$, and $average$ operations over groups of objects, or "fragments."
- Deep-Set MLNs: To move beyond fixed operations, the authors utilize Deep Sets to learn aggregation functions in a differentiable manner. This allows the model to learn the optimal way to summarize information across a domain rather than relying on hard-coded quantifiers. Essentially, the model treats logic as a learnable component.
To ensure computational efficiency, the models utilize a k-fragmented world tensor. This high-dimensional representation enables massively parallel computation of statistics using standard deep learning frameworks like PyTorch or TensorFlow. This approach allows the model to process relational data as tensors, effectively mapping logical structures onto hardware-optimized operations.
Experimental Evaluation
The models were evaluated on a generative task using ChemIDB, a comprehensive database of molecules. The study focused on three subsets of increasing complexity: molecules with exactly 7, 8, and 9 atoms. The objective was to train the models to generate new, chemically valid, and diverse molecular structures.
Key Results
- Enhanced Coverage: QNMLNs and Deep-Set MLNs consistently achieved higher coverage—a measure of how well a model captures the true underlying distribution—compared to standard NMLNs.
- Competitive Performance: Deep-Set MLNs reached test-set coverage comparable to or exceeding DiGress, a state-of-the-art discrete diffusion model.
- Uniqueness and Novelty: In the most complex task (9-atom molecules), Deep-Set MLNs generated significantly more unique molecules (35.46%) than both DiGress (5.9%) and standard NMLNs (16.43%).
- Parameter Efficiency: The proposed models achieved these results with only 150,000 parameters, a fraction of the 5,000,000 parameters required by competing diffusion models.
- Chemical Validity: Validation against the ChemSpider database showed that for 7 and 8-atom molecules, 53 out of 54 generated structures were real, valid molecules.
Discussion and Conclusion
The success of QNMLNs highlights that architectural expressivity is often more critical than raw capacity (depth or width). By embedding the inductive bias of relational logic into the neural network, the models gain a significant advantage in structured domains. This structural advantage allows for extreme parameter efficiency, suggesting that specialized architectures can significantly outperform general-purpose deep learning models for structured relational data.
While promising, the approach faces scaling challenges for very large graphs (e.g., thousands of nodes) due to the size of the fragments analyzed. Future work will also explore the application of these models to MAP-inference tasks and investigate how these frameworks handle specific, unique entities (constants) in a network. In summary, QNMLNs represent a significant step toward unifying the reasoning capabilities of logic with the learning power of deep neural networks.
Summary updated