Domain-Size Aware Markov Logic Networks

Happy Mittal, Ayush Bhardwaj, Vibhav Gogate, Parag SinglaAISTATS 2019

Abstract: Markov Logic Networks (MLNs) often fail to generalize when the size of the domain changes between training and testing, causing probabilities to "shatter" toward 0 or 1. This paper introduces Domain-Size Aware MLNs (DA-MLNs), which use a novel re-parameterization technique to ensure that learned weights remain meaningful and probabilities stay well-behaved, regardless of domain growth.

1. Introduction

In Statistical Relational AI, Markov Logic Networks (MLNs) provide a powerful framework by assigning weights to first-order logic formulas. However, they suffer from a significant "generalization gap." When a model trained on a small domain is applied to a much larger one, the sheer number of groundings can cause marginal probabilities to converge to extreme values (0 or 1) or constants independent of learned weights. This phenomenon, often called "shattering," makes the model insensitive to the actual data it was trained on.

Probability shattering in standard MLNs vs. stability in DA-MLNs.

As illustrated in Figure 3, as the domain size $|\Delta_x|$ increases, the probability $P(E=1)$ in a standard MLN quickly approaches 1, whereas DA-MLN maintains a stable, weight-dependent probability. This ensures that the logic structure does not override the statistical evidence provided by the weights.

2. Methodology: Domain-Size Aware MLNs

The authors propose DA-MLNs, a principled re-parameterization that scales weights based on the domain's relational structure.

2.1 Characterizing the Issue

The paper proves that for certain predicates, probabilities converge to fixed constants regardless of formula weights as the domain grows. The core problem is not just the total number of objects in the domain, but the degree (number of connections) of the nodes in the resulting Markov Network. As connections increase, the influence of individual weights is diluted or overwhelmed.

2.2 Re-parameterization via Scaling Factors

A "connection-vector" is defined for each formula, counting how many times a ground atom appears in its groundings. Instead of using a fixed weight $w_i$, DA-MLNs scale the weight by a factor $s_i$ (the maximum number of connections any predicate has in that formula). The resulting distribution is defined as:

$$P(Y) \propto \exp\left(\sum \frac{w'_i}{s_i} n_i(x,y)\right)$$

By making the weight inversely proportional to the number of connections, the "influence" of a single formula remains stable even as the domain grows.

3. Experimental Evaluation

The approach was evaluated on three benchmark domains, training on small populations and testing on significantly larger ones:

  • Friends & Smokers (FS): A synthetic dataset modeling social influence and health outcomes.
  • IMDB: Real-world data involving actors, directors, and movies, used to predict "worked under" relationships.
  • WebKB: A dataset of university webpages (student, faculty, project) and the hyperlinks between them.
Performance comparison (AUC and -CLL) across FS, IMDB, and WebKB datasets.

4. Results and Discussion

DA-MLNs significantly outperformed standard MLNs and the previous state-of-the-art Adaptive MLNs (AMLNs) across all benchmarks as domain sizes increased. As shown in Figure 6, DA-MLNs maintain higher AUC and lower (better) negative Conditional Log-Likelihood (-CLL) across all datasets.

Key findings include:

  • Generalization: On the FS dataset, DA-MLNs maintained high AUC while standard MLNs plummeted as the domain size grew from 50 to 1000.
  • Performance Gains: For the largest domain sizes tested, DA-MLNs outperformed standard MLNs by 0.17 AUC points on FS, 0.25 points on IMDB, and 0.08 points on WebKB.
  • Likelihood Accuracy: Improved -CLL scores indicate that DA-MLNs provide more accurate probability estimates, not just better rankings, which is critical for probabilistic reasoning.

5. Conclusion

Standard MLNs can become "deaf" to data because logical structure overrides statistical evidence in large domains. DA-MLNs solve this by introducing domain-size awareness through weight scaling based on node degrees. While this simple scaling works well for many structures, future work includes extending these proofs to more complex, nested formulas and exploring different aggregation functions for the scaling factor.

Summary updated

BibTeX
@inproceedings{mittal2019domain,
  author = {Happy Mittal and Ayush Bhardwaj and Vibhav Gogate and Parag Singla},
  title = {{Domain-Size Aware Markov Logic Networks}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2019},
}
Figure