Loss as the Inconsistency of a Probabilistic Dependency Graph: Choose Your Model, Not Your Loss Function

Oliver E. Richardson

Abstract

In a world blessed with a great diversity of loss functions, we argue that that choice between them is not a matter of taste or pragmatics, but of model. Probabilistic dependency graphs (PDGs) are probabilistic models that come equipped with a measure of "inconsistency". We prove that many standard loss functions arise as the inconsistency of a natural PDG describing the appropriate scenario, and use the same approach to justify a well-known connection between regularizers and priors. We also show that the PDG inconsistency captures a large class of statistical divergences, and detail benefits of thinking of them in this way, including an intuitive visual language for deriving inequalities between them. In variational inference, we find that the ELBO, a somewhat opaque objective for latent variable models, and variants of it arise for free out of uncontroversial modeling assumptions -- as do simple graphical proofs of their corresponding bounds. Finally, we observe that inconsistency becomes the log partition function (free energy) in the setting where PDGs are factor graphs.

Introduction

In modern machine learning, researchers are often faced with a "buffet" of loss functions. The choice between Mean Squared Error (MSE), Cross-Entropy, or more complex objectives like the Evidence Lower Bound (ELBO) is frequently driven by empirical performance or tradition. This paper argues for a paradigm shift: the choice of a loss function should be a direct consequence of articulating one's modeling assumptions. By utilizing Probabilistic Dependency Graphs (PDGs), we demonstrate that standard objectives are not arbitrary equations but measures of "inconsistency" within a specific probabilistic model.

The PDG Framework and Inconsistency

Standard graphical models, such as Bayesian Networks, require a single coherent joint distribution. However, during training, we often encounter contradictory information—for instance, when a model's predictions clash with observed data. PDGs address this by allowing multiple, potentially conflicting conditional probability distributions (CPDs) to be attached to the edges of a graph, each associated with a confidence level ($\beta$).

The core metric in this framework is the Inconsistency Measure ($\langle \langle \mathcal{M} \rangle \rangle$). It is defined as the minimum possible incompatibility of the model $\mathcal{M}$ with any joint distribution $\mu$. Incompatibility measures how much $\mu$ disagrees with the local beliefs on the edges, weighted by the modeler's confidence. In this view, loss is simply the quantitative measure of epistemic conflict between different parts of a model (e.g., the prior vs. the data).

Deriving Standard Loss Functions

Many common machine learning losses emerge naturally as the inconsistency of simple PDGs:

  • Cross-Entropy: Arises as the inconsistency of a model when we have infinite confidence in the empirical data distribution.
  • Mean Squared Error (MSE): Emerges from the assumption of Gaussian noise in the dependency between variables.
  • Regularization: In this framework, the regularization strength ($\lambda$) is no longer an arbitrary hyperparameter; it represents the exact confidence ($\beta$) placed in a prior belief relative to the data.

A Unified Landscape of Divergences

One of the most powerful applications of the PDG framework is its ability to unify disparate statistical divergences. By varying the relative confidence levels between two distributions, the entire map of divergences—including KL, Reverse KL, Chernoff, and Bhattacharyya—can be viewed as a single landscape of PDG inconsistency.

The landscape of statistical divergences as PDG inconsistency.

As shown in the figure above, different divergences occupy specific regions of the $(\beta_p, \beta_q)$ coordinate system. This visualization allows for intuitive graphical proofs of complex inequalities that would otherwise require extensive calculus. For example, the Rényi divergences for $\alpha \in (0, 1)$ and $\alpha \in (1, \infty)$ are shown as continuous paths through this confidence space.

Variational Inference and the ELBO

The framework also provides clarity for latent variable models. The ELBO (Evidence Lower Bound), often viewed as a somewhat opaque objective, arises for free as the inconsistency of a PDG representing a latent variable model combined with a variational encoder. This leads to a simple graphical proof of the ELBO bound: adding a variational encoder (an extra edge in the graph) can only increase the total inconsistency of the system, naturally establishing the lower bound property.

Conclusion

By reframing loss as PDG inconsistency, we move away from "fiddling" with equations toward a principled approach where the model dictates the objective. This framework not only unifies existing losses and divergences but also provides a visual language for understanding the trade-offs and assumptions inherent in machine learning objectives. Future work may extend this to AI alignment, where the choice of objective function is a matter of safety and fundamental principle.

Summary updated

BibTeX
@inproceedings{richardson2022loss,
  author = {Oliver E. Richardson},
  title = {{Loss as the Inconsistency of a Probabilistic Dependency Graph: Choose Your Model, Not Your Loss Function}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2022},
  url = {https://openreview.net/forum?id=DUp9tKDFKL},
}

Loading related content...

Figure