Efficient Inference for Untied MLNs

Somdeb Sarkhel, Deepak Venugopal, Nicholas Ruozzi, Vibhav GogateIJCAI 2017

Abstract

We address the problem of scaling up local-search or sampling-based inference in Markov logic networks (MLNs) that have large shared sub-structures but no (or few) tied weights. Such untied MLNs are ubiquitous in practical applications. However, they have very few symmetries, and as a result lifted inference algorithms--the dominant approach for scaling up inference--perform poorly on them. The key idea in our approach is to reduce the hard, time-consuming sub-task in sampling algorithms, computing the sum of weights of features that satisfy a full assignment, to the problem of computing a set of partition functions of graphical models, each defined over the logical variables in a first-order formula. The importance of this reduction is that when the treewidth of all the graphical models is small, it yields an order of magnitude speedup. When the treewidth is large, we propose an over-symmetric approximation and experimentally demonstrate that it is both fast and accurate.

Introduction

Markov Logic Networks (MLNs) provide a powerful framework for combining first-order logic with probabilistic graphical models. Traditionally, MLNs rely on the assumption of "tied weights," where every grounding of a logical formula shares the same weight. This symmetry is exploited by "lifted inference" algorithms to avoid ground-level complexity. However, many real-world applications require untied MLNs, where different groundings (e.g., different word-topic pairs) have distinct weights. In these cases, standard lifted inference fails, and ground networks become prohibitively large for traditional solvers like Gibbs sampling or MaxWalkSAT.

The Computational Bottleneck: #WSG

The primary bottleneck in local-search and sampling-based inference for untied MLNs is the #WSG problem: calculating the sum of weights of all groundings of a formula that are satisfied by a given assignment. In a large network, this must be recomputed frequently, making it the dominant cost. The authors target this specific bottleneck to enable scalable inference in models that lack natural symmetry.

Proposed Methods

Exact dMRF Encoding

The authors propose reducing the #WSG problem to computing the partition function of a dynamic Markov Random Field (dMRF). By treating untied weights as potentials in a temporary graphical model, they can leverage optimized inference techniques like Junction Tree algorithms. This approach ensures that the complexity is tied to the structure of the logical formula rather than the size of the ground network, often yielding order-of-magnitude speedups.

Approximate Encoding via Tensor Quantization

For formulas with high treewidth, exact dMRF inference remains slow. To address this, the authors introduce Tensor Quantization. This technique treats the weights as a multi-dimensional tensor and applies a greedy clustering algorithm to group similar weights.

Tensor quantization clusters similar weights into a smaller domain, reducing the complexity of the underlying graphical model.

By reducing the number of unique weights, the method effectively "shrinks" the variable domains, significantly lowering the treewidth and enabling faster approximate inference. This "over-symmetric" approximation regains the computational benefits of symmetry even when the original model is technically asymmetric.

Experimental Evaluation

The methods were tested on three benchmarks: the synthetic Student MLN, the WebKB dataset, and a Citation Information-Extraction (IE) task.

Key Results

The exact encoding (#WSG) consistently outperformed previous state-of-the-art counting methods (#SG). However, the most significant gains came from the approximate solvers. Specifically, the C-10 configuration—which compresses the parameter space to 10% of its original size—often provided the best balance of speed and accuracy.

Performance comparison on the Student dataset: The C-10 approximation achieves significantly lower costs in less time compared to exact methods.

In MAP inference tasks using MaxWalkSAT, the C-10 approximation allowed the solver to perform many more iterations within the same time limit, exploring the search space more effectively and finding lower-cost solutions than exact methods. Similarly, in Gibbs sampling, the reduced complexity per sample led to faster convergence of marginal probability estimates.

Conclusion

This work demonstrates that treating weights as potentials and employing tensor quantization can unlock scalable inference for untied MLNs. While learning these untied weights remains a challenge, the ability to perform efficient inference is a critical step forward. Future research may explore more robust clustering techniques or the development of new lifted algorithms that utilize artificial symmetries.

Summary updated

BibTeX
@inproceedings{sarkhel2017efficient,
  author = {Somdeb Sarkhel and Deepak Venugopal and Nicholas Ruozzi and Vibhav Gogate},
  title = {{Efficient Inference for Untied MLNs}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2017},
  url = {https://openreview.net/forum?id=SJbkgNGOWr},
}
Figure