Distributionally Robust Graphical Models

Rizal Fathony, Ashkan Rezaei, Mohammad Ali Bashiri, Xinhua Zhang, Brian D. Ziebart

In the world of structured prediction—where models must predict complex, correlated outputs like the sequence of words in a sentence or the parts of an image—researchers have long been forced to choose between two powerful but flawed paradigms. On one hand, Conditional Random Fields (CRFs) offer beautiful statistical guarantees (Fisher consistency) but are "loss-oblivious" during training. On the other, Structured Support Vector Machines (SSVMs) let you plug in any custom loss metric you care about but lack those same theoretical guarantees.

Introduced at NeurIPS 2018, Adversarial Graphical Models (AGM) provide a new framework that finally offers the best of both worlds: the flexibility to optimize for custom losses and the theoretical rigor of Fisher consistency.

The Problem: Consistency vs. Customization

The core challenge in structured prediction is that the "cost" of a mistake isn't always uniform. In a sequence of medical labels, misidentifying a "critical" state is much worse than misidentifying a "stable" one.

Standard CRFs optimize for "log-loss." While mathematically convenient and ensuring the model converges to the true distribution given enough data (Fisher consistency), log-loss doesn't allow the model to prioritize specific types of errors during training. SSVMs were designed to fix this by allowing "loss-augmented" training. However, they are known to be inconsistent in multiclass settings—meaning even with infinite data and perfect features, they might never learn the optimal predictor.

The authors sought a method that is loss-aware (like SSVMs) but statistically consistent (like CRFs).

The AGM Approach: A Minimax Game

The authors frame the learning problem as distributionally robust optimization. Instead of just minimizing error on the training set, they set up a minimax game:

  1. The Predictor tries to minimize the expected loss.
  2. The Adversary tries to maximize that loss by choosing a "worst-case" evaluation distribution.

To keep the game fair, the adversary is constrained: the distribution it chooses must match the "moments" (statistical summaries) of the actual training data. This technique is known as moment matching. Because the model optimizes against a class of distributions that match training statistics rather than just the training points themselves, it is inherently more robust to noise and outliers in the labels.

Tractable Inference and Theoretical Guarantees

Directly solving this minimax problem is computationally explosive because the number of possible label configurations grows exponentially. The authors use Lagrange multipliers to derive a dual optimization problem that is much more manageable.

Tree-structured graphical models used for tractable exact inference in AGM.

For graphical structures with low treewidth (like the trees or chains shown above), they provide exact algorithms. They demonstrate that their learning and prediction algorithms have a time complexity similar to existing graphical models, making them practical for real-world use. Furthermore, the paper provides a formal proof that AGM is Fisher consistent for all additive loss metrics, successfully bridging probabilistic modeling and decision theory.

Experimental Validation

The authors evaluated AGM on two distinct structured prediction tasks:

  1. Facial Emotion Intensity Prediction: Predicting the intensity of emotions (neutral < increasing < apex) from image sequences. This involved ordinal categories and required handling temporal dependencies.
  2. Semantic Role Labeling (SRL): Identifying the semantic roles of constituents in a sentence relative to a verb using the CoNLL 2005 dataset.

Key Results

AGM consistently demonstrated its versatility. While a CRF might win on one specific metric and an SSVM on another, AGM remained consistently at the top regardless of the evaluation metric.

Performance comparison of AGM, CRF, and SSVM across various loss metrics.

As seen in the emotion prediction results above, AGM outperformed or tied with both CRFs and SSVMs across most metrics. Notably, it was significantly better on "weighted" loss metrics where certain parts of the sequence were deemed more important. In the Semantic Role Labeling task under a cost-sensitive setting, AGM achieved an average loss of 0.14, matching the SSVM and significantly outperforming the CRF (0.19).

Limitations and Future Work

While AGM represents a significant step forward, its current exact algorithms rely on the graph having low treewidth. For highly connected or "loopy" graphs (like dense grids in computer vision), the exact approach becomes computationally intractable. Future work will likely focus on developing approximation algorithms—similar to loopy belief propagation or variational inference—to extend AGM to more complex graphical structures, as well as exploring non-additive loss metrics.

Summary updated

BibTeX
@inproceedings{fathony2018distributionally,
  author = {Rizal Fathony and Ashkan Rezaei and Mohammad Ali Bashiri and Xinhua Zhang and Brian D. Ziebart},
  title = {{Distributionally Robust Graphical Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2018},
  url = {https://openreview.net/forum?id=H1-45_Zu-H},
}
Figure