← Latest papers
🤖 machine learning

Composing Non-Conjugate Factor Graphs with Closed-Form Variational Inference

This paper demonstrates that closed-form variational inference can be preserved in deep probabilistic architectures by composing five specific factor-graph primitives, enabling the construction of universal function approximators like decision trees and Bayesian mixture of experts with calibrated uncertainty without requiring learned gating parameters.

Original authors: Mykola Lukashchuk, Kyrylo Yemets, Wouter M. Kouw, Dmitry Bagaev, żsmail Şenöz, Jeff Beck, Bert de Vries

Published 2026-05-29
📖 5 min read🧠 Deep dive

Original authors: Mykola Lukashchuk, Kyrylo Yemets, Wouter M. Kouw, Dmitry Bagaev, żsmail Şenöz, Jeff Beck, Bert de Vries

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are trying to predict the weather. You have a team of seven different forecasters: one is great at spotting rain, another is a wizard at predicting heatwaves, and a third is excellent at guessing wind speeds.

In the old way of doing this (standard machine learning), you would ask all seven for their opinions, give them fixed weights (e.g., "Rain Guy gets 20% of the vote, Heat Guy gets 10%"), and average their answers. The problem? Sometimes "Rain Guy" is actually terrible at predicting heatwaves, but the system doesn't know to stop listening to him. It treats his confidence as a fixed fact, not a feeling that changes with the situation.

This paper proposes a new way to build a "super-forecaster" team that is smarter, more flexible, and—most importantly—knows when it is guessing.

The Problem: The "Black Box" Trap

Usually, when you stack layers of smart components to make a deeper, more complex system, you break the math. The equations become so messy that computers can't solve them exactly. They have to guess the answer using trial-and-error methods (like sampling or black-box optimization). This is fast but often inaccurate, and it doesn't tell you how sure the system is about its answer.

The Solution: A Lego Set for Probabilistic Models

The authors discovered a special set of five Lego bricks (mathematical building blocks) that can be snapped together in any order to build deep, complex models. The magic trick is that no matter how you stack them, the math stays simple enough to solve exactly.

Here are the five bricks:

  1. The Softdot: A basic calculator that mixes inputs (like mixing ingredients).
  2. The Exponential Link: A switch that turns a number into a "confidence score" (it ensures the score is always positive).
  3. The Gamma Prior: A rule that says, "We expect this confidence score to be somewhere in this range."
  4. The Gaussian Likelihood: A standard bell-curve rule for how likely an observation is.
  5. The Equality Node: A glue that says, "These two different wires must carry the exact same value."

How It Works: The "Smart Gating" System

The paper shows how to use these bricks to build a system that acts like a traffic controller.

  • Depth 0 (Static): Imagine a committee where everyone has a fixed seat. The system learns who is generally good, but it doesn't change based on the weather.
  • Depth 1 (Dynamic): Now, the system looks at the current input (e.g., "It's raining heavily"). It has a "gate" that says, "Okay, for this specific situation, let's trust the Rain Guy 90% and ignore the others." Crucially, the system doesn't just pick a winner; it calculates a probability distribution for who should be trusted. It knows how sure it is about that decision.
  • Depth 2 (Split-Branch Routing): This is the deep magic. The system builds a decision tree. It asks, "Is it raining?" If yes, go left. "Is it windy?" If yes, go right. It can create complex, branching paths to handle tricky situations (like an "XOR" problem, where the answer depends on a specific combination of factors).

The "Compiler" Analogy

Think of this framework like a programming language:

  • The Alphabet: The five Lego bricks.
  • The Grammar: The rules for how you can snap them together.
  • The Runtime: The computer engine that automatically figures out the math.

In most probabilistic programming, if you write a complex model, you have to manually derive the math equations for how to solve it. It's like writing a program and then having to hand-write the compiler for it every time.

In this paper, the authors built a universal compiler. You just snap the bricks together, and the "Bethe Free Energy" (a fancy mathematical objective function) automatically generates the exact equations needed to solve the model. You don't need to be a math genius to derive the updates; the system does it for you.

The Result: Calibrated Uncertainty

The biggest win is uncertainty.

  • Old Way: A neural network might say, "I predict 25°C," but it doesn't know if it's guessing or if it's 100% sure.
  • This Way: The system says, "I predict 25°C, but I'm only 60% sure because the data is weird." It gives you a "confidence interval" that is mathematically guaranteed to be correct based on the model structure.

Real-World Test: Time Series Forecasting

The authors tested this on predicting time-series data (like electricity usage or stock exchange rates). They combined seven different AI models (some good at trends, some at seasonality).

  • Their system learned to dynamically switch between experts based on the data.
  • It provided better accuracy than standard "Mixture of Experts" models.
  • Most importantly, it provided reliable uncertainty estimates. While standard models often became "overconfident" (claiming to be sure when they were wrong), this system correctly signaled when it was unsure.

Summary

This paper gives us a new way to build deep, complex AI models that are:

  1. Composable: You can stack them as high as you want.
  2. Exact: The math is solved exactly, not guessed.
  3. Self-Aware: The model knows when it is uncertain, providing a "calibrated" sense of confidence.

It's like upgrading from a rigid, rule-based robot to a flexible, self-reflecting team of experts that knows exactly when to trust whom.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →