Quantum Speedups for Bayesian Network Structure Learning

Juha Harviainen, Kseniya Rychkova, Mikko Koivisto

TL;DR

This paper explores whether quantum computers can accelerate the notoriously difficult problem of learning Bayesian network structures. The authors present two quantum algorithms that offer significant speedups over the best classical methods, achieving polynomial time complexity with bases less than 2, provided certain input assumptions are met. They also prove that classical algorithms likely cannot achieve such speedups, reinforcing the potential of quantum computation for this task.

What Problem Does This Paper Address?

Bayesian Network Structure Learning (BNSL) is the task of finding the best directed acyclic graph (DAG) that represents dependencies in data, based on a scoring function. The "score-and-search" approach, common in this field, involves evaluating various DAGs and selecting the one with the highest score. For networks with $n$ nodes, the fastest known classical algorithms have a worst-case time complexity of $O(2^n n^2)$, a bound that has remained stagnant for two decades. This exponential complexity makes learning structures for even moderately sized networks computationally intractable. The paper investigates whether quantum computing can break this barrier, specifically asking if a "polynomial quantum speedup" is possible, meaning a quantum algorithm could solve BNSL in $O(c^n)$ time where $c < 2$.

Methods

The paper proposes two quantum algorithms for BNSL, both leveraging quantum search (Grover's algorithm) and requiring a Quantum Random Access Memory (QRAM).

  1. Algorithm 1 (based on Theorem 2): This algorithm adapts a known quantum algorithm for finding optimal linear orders. By reformulating BNSL as finding an optimal linear order with specific local score evaluations, they achieve a time complexity of $O(1.817^n \sqrt{F})$, where $F$ is the total number of potential parent sets across all nodes. If $F$ grows subexponentially, this simplifies to $O(1.817^n)$.
  2. Algorithm 2 (based on Theorem 7): This algorithm uses a more sophisticated technique involving "covering by partial orders." It decomposes the BNSL problem into subproblems solved using dynamic programming over partial orders. By cleverly constructing a "cover" of partial orders and applying quantum search to the subproblems, they achieve a time complexity of $O(1.982^n)$, but this requires the total number of potential parent sets $F$ to be bounded by $O(1.453^n)$.

Additionally, the paper provides a theoretical lower bound for classical algorithms. They prove that achieving a classical speedup below $O(2^n)$ would refute the Strong Exponential Time Hypothesis (SETH), suggesting that the quantum speedups presented are likely near-optimal for classical approaches.

Datasets

Not discussed in the paper. The paper focuses on the theoretical complexity of the BNSL problem itself, rather than empirical evaluation on specific datasets. The input is defined abstractly by the number of nodes and the structure of potential parent sets and their associated scores.

Key Insights and Ideas

  • Quantum Advantage for BNSL: The paper demonstrates that quantum computers can indeed offer a polynomial speedup for BNSL, a problem that has resisted classical algorithmic improvements for a long time.
  • Leveraging Quantum Search: The core of the quantum speedup comes from applying quantum search to optimize over a large search space of potential DAG structures or their components.
  • QRAM as a Prerequisite: Both proposed quantum algorithms rely on the availability of a Quantum Random Access Memory (QRAM), which is a significant technological hurdle for practical implementation.
  • SETH as a Barrier for Classical Algorithms: The proof connecting BNSL to SETH provides strong evidence that classical algorithms are unlikely to achieve speedups beyond a certain exponential base, highlighting the fundamental difference quantum computation can make.
  • Trade-offs in Quantum Algorithms: The two algorithms presented show different trade-offs: one offers a better base ($1.817$) but requires subexponential $F$, while the other has a slightly worse base ($1.982$) but can tolerate a larger exponential growth in $F$ ($O(1.453^n)$).

Key Results

  • Algorithm 1: Achieves a quantum algorithm for BNSL with time complexity $O(1.817^n \sqrt{F})$. This simplifies to $O(1.817^n)$ if $F$ is subexponential in $n$.
  • Algorithm 2: Achieves a quantum algorithm for BNSL with time complexity $O(1.982^n)$, provided $F = O(1.453^n)$.
  • Classical Lower Bound: Proves that any classical algorithm solving BNSL in $O(c^n)$ time with $c < 2$ would refute the Strong Exponential Time Hypothesis (SETH).

Limitations and Future Work

  • QRAM Dependency: The most significant limitation is the reliance on QRAM, which is not yet experimentally realized for the required scale. The authors acknowledge this and question whether QRAM is strictly necessary for any polynomial quantum speedup.
  • Input Size Assumptions: The speedups are conditional on assumptions about the size of the input, specifically the number of potential parent sets ($F$). The first algorithm requires $F$ to be subexponential, and the second requires $F = O(1.453^n)$.
  • Practical Value: The authors note that the speedup factors (e.g., $2/1.817 \approx 1.1$) are modest for current network sizes, and hidden subexponential factors might favor classical algorithms in practice.
  • Future Work:
    • Investigating whether significantly faster quantum algorithms exist (e.g., closer to $O(2^{n/2})$).
  • Exploring if quantum speedups are possible without bounding the number of potential parent sets.
  • Determining if QRAM is essential for achieving polynomial quantum speedups in BNSL.
  • Proving conditional lower bounds for classical algorithms under different hypotheses or for restricted problem variants (e.g., bounded maximum in-degree).

Summary updated

BibTeX
@inproceedings{harviainen2025quantum,
  author = {Juha Harviainen and Kseniya Rychkova and Mikko Koivisto},
  title = {{Quantum Speedups for Bayesian Network Structure Learning}},
  booktitle = {Conference on Uncertainty in Artificial Intelligence},
  year = {2025},
  url = {https://openreview.net/forum?id=dF5Jg6ttci},
}
Figure