Learning Convex Inference of Marginals

Justin Domke

Abstract

Graphical models trained using maximum likelihood are a common tool for probabilistic inference of marginal distributions. However, this approach suffers difficulties when either the inference process or the model is approximate. In this paper, the inference process is first defined to be the minimization of a convex function, inspired by free energy approximations. Learning is then done directly in terms of the performance of the inference process at univariate marginal prediction. The main novelty is that this is a direct minimization of empirical risk, where the risk measures the accuracy of predicted marginals.

Introduction: The Disconnect in Graphical Models

In probabilistic modeling, particularly with Markov Random Fields, researchers face two primary challenges: computational intractability and model defects. Calculating exact marginal probabilities for complex graphs is often NP-hard, necessitating approximate algorithms like Loopy Belief Propagation or Mean Field. Furthermore, models are rarely perfect representations of reality, often assuming conditional independencies that do not hold.

Traditionally, Maximum Likelihood Estimation (MLE) is used to find model parameters. However, a significant disconnect exists: parameters optimized via MLE may not be optimal when used alongside approximate inference during prediction. This paper addresses this gap by treating the inference process itself as the model.

Methodology: Inference as Differentiable Optimization

The core proposal is to define marginal inference (beliefs) as the solution to a parametrized convex optimization problem. Instead of fitting a model and then approximating inference, we define a function $F$—a weighted sum of convex functions—and learn the weights $\theta$ that minimize prediction error.

Learning through the Implicit Function Theorem

To train these parameters, one must determine how predicted beliefs change in response to tweaks in $\theta$. By applying the Implicit Function Theorem, the author derives gradients for the optimum of the convex problem. This allows for standard gradient-based optimization to minimize empirical risk (such as Log-loss or Quadratic-loss) directly on the predicted marginals. Ensuring the objective function $F$ remains convex guarantees a unique global minimum, providing a stable and predictable pipeline for "training" the inference algorithm.

Experimental Evaluation: MNIST Denoising

The approach was evaluated on a binary image denoising task using the MNIST dataset. Handwritten digits were binarized and subjected to random noise at levels of 10%, 30%, and 50%. The goal was to predict the original pixel values (hidden variables) from these noisy observations.

Qualitative results of the denoising task. From top to bottom: noisy input, reconstructions from various methods, and ground truth.

Key Results

The proposed "Learning Convex Inference" methods ($L_{log}$ and $L_{quad}$) were compared against standard baselines, including Pseudo-likelihood (trained with Mean Field or Belief Propagation) and standard Belief Propagation.

Quantitative Performance

In the most challenging 50% noise scenario, the $L_{quad}$ method achieved a classification error of 5.6%, significantly outperforming standard Belief Propagation (7.8%) and Mean Field (7.5%). The learned inference was notably better at minimizing the specific loss it was trained for; for instance, the $L_{quad}$ variant achieved the lowest quadratic loss, while the $L_{log}$ variant achieved the lowest log-loss.

Comparison of Classification Error, Regression Error, Log-loss, and Quadratic-loss across different inference methods.

Qualitative Insights

Visual results demonstrate that learned inference produces cleaner and more coherent digit reconstructions than traditional approximate methods. By making the inference step a differentiable layer, the model effectively learns to compensate for its own approximations, leading to superior performance when the underlying model is imperfect.

Conclusion and Future Work

This research highlights that if an approximate inference method is to be used, parameters should be trained specifically for that method. This work serves as an early example of incorporating optimization problems as functional blocks within learning pipelines, a concept now prevalent in "Deep Declarative Networks."

Future research directions include exploring tighter global constraints beyond the current "local consistency" relaxations, extending the framework to MAP inference, and improving the computational efficiency of solving full convex optimization problems during training.

Summary updated

BibTeX
@inproceedings{domke2008learning,
  author = {Justin Domke},
  title = {{Learning Convex Inference of Marginals}},
  booktitle = {Conference on Uncertainty in Artificial Intelligence},
  year = {2008},
  url = {https://openreview.net/forum?id=3Se56GIdvn},
}
Figure