TL;DR
Direct Message Approximation (DMA) is a novel framework for approximate inference on factor graphs that eliminates the mathematical instabilities of traditional methods like Expectation Propagation (EP) and Variational Message Passing (VMP). By approximating factor-to-variable messages directly instead of computing marginals and dividing them, DMA completely avoids negative-precision errors and iterative inner loops. This allows for robust Bayesian Neural Network (BNN) training with a single forward-backward pass per example and zero learning-rate tuning.
What Problem Does This Paper Address?
When performing probabilistic inference on factor graphs, exact integration is often intractable for complex models like neural networks. Traditionally, researchers turn to approximate message passing algorithms like EP or VMP. However, both families share a fundamental "marginal-first" design flaw: they approximate the local marginal distribution and then divide out the incoming message to recover the outgoing message.
This division step introduces three major pathologies:
- Iterative Schedules: Outgoing messages depend on incoming ones, forcing a slow, round-robin iterative schedule to reach a fixed point.
- Invalid Messages: If the projected marginal is wider than the incoming message, the division results in a Gaussian with "negative precision" (negative variance), destabilizing the system.
- Dirac-Delta Collapse: In VMP, deterministic factors (like layers in a standard neural network) collapse to point estimates with zero variance, failing to maintain a useful weight posterior.
Methods
The authors introduce Direct Message Approximation (DMA), which bypasses the problematic cavity division step by targeting the factor-to-variable messages directly.
The framework relies on several key components:
- Consistency Condition: DMA introduces a formal axiom requiring the approximate message to be exact whenever all other incoming messages to the factor are point masses (Dirac deltas).
- Moment-Matching Recipe: For deterministic factors ($j = g(x_{-j})$), the algorithm treats inputs as independent Gaussians, computes the first two moments of the function's output, and projects them directly onto a Gaussian family.
- Explicit Non-Gaussian Factor Derivations: The paper provides closed-form DMA updates for the two essential non-conjugate components of a BNN: the leaky-ReLU factor and the product factor ($\delta(z - xy)$). Because the product factor's backward message is inherently improper (lacking a finite mean), they develop a unique log-normal intermediate technique to provide a rigorous $O(1/r^2)$ accuracy guarantee.
- Master Theorem: They prove an edge-local bound on the marginal KL divergence that holds across any graph topology without requiring global contraction conditions.
The structured architecture of a BNN implemented via DMA is illustrated as a factor graph below:
Datasets
The framework is evaluated using synthetic 1D regression datasets where the true data-generating function is drawn directly from a BNN prior. The authors test two primary scenarios:
- Correctly Specified Model: The inference network architecture matches the data-generating network.
- Model Mismatch: The data-generating network is wider (more hidden units) than the inference network, testing how well the model handles structural ignorance.
The experiments scale from a small 83-weight network to a larger 1,932-weight, four-output network.
Key Insights and Ideas
- Bypassing Division Cures Pathologies: Eliminating the subtraction/division of incoming messages from the marginal means that negative-precision states physically cannot arise during message construction.
- No Learning Rate Required: Because DMA relies on structural message passing rather than gradient descent to update weight beliefs, it completely eliminates the gradient learning-rate hyperparameter.
- True Epistemic Uncertainty: DMA naturally propagates residual weight uncertainty through the graph, allowing the model's predictive intervals to widen gracefully in data-sparse regions.
Key Results
- High Efficiency: DMA completely removes EP-style inner loops. BNN training requires only a single forward sweep and a single backward sweep per training example.
- Rapid Convergence: On the 1,932-weight network, DMA successfully converged in just 3 epochs (0.72 seconds total wall-clock time). In comparison, gradient-based Adam required roughly 100 epochs (1.7 seconds) to achieve competitive results.
- Superior Reliability: While state-of-the-art Variational Inference alternatives (like IVON) suffered a 70% divergence/failure rate across hyperparameter seeds, DMA remained stable and finite across every single run.
- Robust Uncertainty Quantification: Under model mismatch, DMA successfully captured residual uncertainty, providing reliable widening confidence intervals outside the training domain, whereas standard optimizers like Adam extrapolated blindly with fixed confidence bands.
The qualitative behavior of DMA's predictive uncertainty and its resulting weight beliefs can be seen here:
Limitations and Future Work
- Improper Message Handling: The master theorem requires proper outgoing messages. Factors that yield inherently improper exact messages (such as the product-backward step) cannot use the general recipe and require custom, mathematically intensive workarounds.
- Fully Factorized Assumptions: DMA currently maintains a fully factorized (diagonal) Gaussian belief structure. Extending this to block-diagonal structures would require deriving new moment formulas under non-diagonal inputs.
- Cyclic Graphs: Bounding the accumulated error after multiple sweeps on loopy, cyclic graphs remains an open theoretical challenge.
- Alternative Message Families: The authors suggest expanding the framework beyond Gaussians to heavier-tailed or multimodal distributions, such as Student-$t$ or Mixtures of Gaussians.
Summary updated