NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Relaxed Scheduling for Scalable Belief Propagation

Vitaly Aksenov, Dan Alistarh, Janne H. KorhonenarXiv 2020

TL;DR

This paper tackles the challenge of efficiently parallelizing belief propagation (BP), a fundamental algorithm for inference in graphical models. The authors introduce a novel approach using "relaxed schedulers" that allow for controlled out-of-order execution, significantly improving scalability and convergence speed over existing parallel BP methods on various practical applications.

What Problem Does This Paper Address?

Machine learning has seen tremendous progress thanks to hardware parallelism. However, many classic algorithms, like belief propagation (BP), are notoriously difficult to parallelize efficiently without sacrificing convergence. BP is crucial for inference in graphical models, a task that involves computing probabilities of variables given observations. While exact inference is often intractable, heuristics like BP are widely used. The challenge lies in the fact that while synchronous BP is parallelizable, it's often slower than asynchronous or priority-based methods. These priority-based methods, which aim to perform the "most useful" update first, are inherently sequential and thus hard to parallelize. Existing parallel approaches often resort to ad-hoc custom schedules, but this paper proposes a more general solution by relaxing the strict priority order.

Methods

The core of the paper's contribution is the application of relaxed schedulers to parallelize priority-based belief propagation. Instead of a strict priority queue that always returns the absolute highest priority item, a relaxed scheduler (specifically, a q-relaxed scheduler) guarantees to return one of the top q highest priority items. This relaxation allows for more parallelism by reducing contention.

The authors formalize this by:

  • Relaxed Priority-based Belief Propagation: They adapt the standard priority-based BP framework by replacing the exact priority queue with a q-relaxed scheduler. This means tasks (message updates) are selected from the top q priorities, and updates are performed, followed by priority updates.
  • Multiqueue Data Structure: For practical implementation, they use a "Multiqueue," a scalable approximate priority queue composed of multiple independent exact priority queues. This structure provides theoretical guarantees on rank and fairness with a tunable relaxation parameter q.
  • Theoretical Analysis: They provide a theoretical analysis of relaxed BP on trees, identifying both cases where relaxation has negligible overhead and worst-case scenarios where it can lead to significant wasted work.

Datasets

The authors evaluate their approach on four types of Markov random field models:

  • Trees: A full binary tree model, used to mirror the analytical setting and test basic scalability.
  • Ising and Potts Models: Standard models defined on an nxn grid graph, commonly used in statistical physics and known for complex cyclic propagations.
  • LDPC Codes: Markov random fields derived from (3,6)-LDPC code decoding, a successful application of BP. This is used to observe scaling behavior on instances where synchronous BP is guaranteed to converge.

Key Insights and Ideas

  • Relaxation as a Parallelism Enabler: The key insight is that relaxing the strict priority order, a bottleneck in parallelizing priority-based algorithms, can unlock significant performance gains.
  • Trade-off Between Relaxation and Convergence: While relaxed schedulers might introduce some "wasted" updates (updates that don't immediately lead to convergence), the gains in parallelism often outweigh this overhead, leading to faster overall wall-clock times.
  • Multiqueue's Practicality: The Multiqueue data structure provides a practical and scalable implementation of relaxed schedulers, offering good theoretical guarantees with a simple design.
  • Worst-Case vs. Average-Case: While theoretical worst-case scenarios for relaxed BP exist (especially on trees with long paths), experimental results suggest these are unlikely in practice, and the benefits of relaxation are substantial.
  • Generic Applicability: The relaxed scheduling framework is shown to be applicable to various priority-based BP schedules, making it a versatile approach.

Key Results

  • State-of-the-Art Scalability: The proposed relaxed algorithms, particularly "Relaxed Smart Splash," achieve state-of-the-art parallel scalability on multithreaded regimes across various models.
  • Significant Speedups: On moderate input sizes, speedups of up to 2.85x were observed compared to the best non-relaxed alternatives (Table 1).
  • Low Overhead in Updates: Table 3 shows that the number of additional message updates for relaxed residual BP is generally low, often below 10% even with 70 threads.
  • Robustness: Relaxed algorithms, especially "Relaxed Smart Splash," demonstrated robustness, converging on instances where some exact priority-based algorithms failed or performed poorly.
  • Synchronous BP's Performance on Trees and LDPC: For tree-like structures and LDPC decoding, synchronous BP still shows competitive performance due to short propagation chains and inherent parallelism.

Limitations and Future Work

  • Theoretical Worst-Case: The paper acknowledges theoretical worst-case instances where relaxed BP might perform poorly (e.g., on trees with long paths). However, they argue these are unlikely in practice.
  • Extending Theoretical Analysis: The authors suggest extending their theoretical analysis to cover more complex graph structures and types of instances, as the dynamics of BP schedules are generally hard to analyze.
  • Massively-Parallel, Multi-Machine Setting: An important future direction is to empirically study the proposed framework in a massively-parallel, multi-machine setting to assess its scalability beyond shared-memory systems.
  • Constructing Optimal Priority Functions: While the framework is general, constructing optimal priority functions for specific graph structures remains an area for further exploration.

Summary updated

BibTeX
@misc{aksenov2020relaxed,
  author = {Vitaly Aksenov and Dan Alistarh and Janne H. Korhonen},
  title = {{Relaxed Scheduling for Scalable Belief Propagation}},
  year = {2020},
  eprint = {2002.11505},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2002.11505},
}

Loading related content...

Figure