Log in

Quantum approximate optimization algorithm for Bayesian network structure learning

  • Published:
Quantum Information Processing Aims and scope Submit manuscript

Abstract

Bayesian network structure learning is an NP-hard problem that has been faced by a number of traditional approaches in recent decades. Currently, quantum technologies offer a wide range of advantages that can be exploited to solve optimization tasks that cannot be addressed in an efficient way when utilizing classic computing approaches. In this work, a specific type of variational quantum algorithm, the quantum approximate optimization algorithm, was used to solve the Bayesian network structure learning problem, by employing \(3n(n-1)/2\) qubits, where n is the number of nodes in the Bayesian network to be learned. Our results showed that the quantum approximate optimization algorithm approach offers competitive results with state-of-the-art methods and quantitative resilience to quantum noise. The approach was applied to a cancer benchmark problem, and the results justified the use of variational quantum algorithms for solving the Bayesian network structure learning problem.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Subscribe and save

Springer+ Basic
EUR 32.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or Ebook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10

Similar content being viewed by others

Data availability statement

Different synthetic datasets have been generated using the available benchmarks in https://www.bnlearn.com/bnrepository/discrete-small.html#cancer, using own scripts available in GitHub (https://github.com/VicentePerezSoloviev/QAOA_BNSL_IBM).

Notes

  1. Github repository with implemented code: https://github.com/VicentePerezSoloviev/QAOA_BNSL_IBM

  2. https://www.bnlearn.com/bnrepository/discrete-small.html#cancer

References

  1. Koller, D., Friedman, N.: Probabilistic graphical models: principles and techniques. The MIT Press, Cambridge (2009)

    MATH  Google Scholar 

  2. Murphy, K.P.: Machine learning: a probabilistic perspective. The MIT press, Cambridge (2012)

    MATH  Google Scholar 

  3. Bielza, C., Larrañaga, P.: Bayesian networks in neuroscience: a survey. Front. Comput. Neurosci. 8, 131 (2014). https://doi.org/10.3389/fncom.2014.00131

    Article  MATH  Google Scholar 

  4. Puerto-Santana, C., Larrañaga, P., Bielza, C.: Autoregressive asymmetric linear Gaussian hidden Markov models. IEEE Trans. Pattern Anal. Mach. Intell. (2021). https://doi.org/10.1109/TPAMI.2021.3068799

    Article  Google Scholar 

  5. Chickering, D.M.: Learning bayesian networks is np-complete. Learning from Data, Springer, New York (1996)

    Book  Google Scholar 

  6. Robinson, R.W.: Counting unlabeled acyclic digraphs. combinatorial mathematics. Springer, New York (1977)

    MATH  Google Scholar 

  7. Aouay, S., Jamoussi, S., Ayed, Y.B.: Particle swarm optimization based method for Bayesian network structure learning. In: 2013 5th International Conference on Modeling, Simulation and Applied Optimization, pp. 1–6 (2013). https://doi.org/10.1109/ICMSAO.2013.6552569. IEEE

  8. Quesada, D., Bielza, C., Larrañaga, P.: Structure learning of high-order dynamic Bayesian networks via particle swarm optimization with order invariant encoding. In: International Conference on Hybrid Artificial Intelligence Systems, pp. 158–171 (2021). https://doi.org/10.1007/978-3-030-86271-8_14. Springer

  9. Blanco, R., Inza, I., Larrañaga, P.: Learning Bayesian networks in the space of structures by estimation of distribution algorithms. Int. J. Intell. Syst. 18(2), 205–220 (2003). https://doi.org/10.1002/int.10084

    Article  MATH  Google Scholar 

  10. Larrañaga, P., Poza, M., Yurramendi, Y., Murga, R.H., Kuijpers, C.M.H.: Structure learning of Bayesian networks by genetic algorithms: a performance analysis of control parameters. IEEE Trans. Pattern Anal. Mach. Intell. 18(9), 912–926 (1996). https://doi.org/10.1109/34.537345

    Article  Google Scholar 

  11. Lee, S., Kim, S.B.: Parallel simulated annealing with a greedy algorithm for Bayesian network structure learning. IEEE Trans. Knowl. Data Eng. 32(6), 1157–1166 (2019). https://doi.org/10.1109/TKDE.2019.2899096

    Article  Google Scholar 

  12. Ji, J.-Z., Zhang, H.-X., Hu, R.-B., Liu, C.-N.: A tabu-search based Bayesian network structure learning algorithm. J. Bei**g Univ. Technol. 37, 1274–1280 (2011)

    Google Scholar 

  13. Scanagatta, M., Salmerón, A., Stella, F.: A survey on Bayesian network structure learning from data. Progr. Artif. Intell. 8(4), 425–439 (2019). https://doi.org/10.1007/s13748-019-00194-y

    Article  Google Scholar 

  14. Nielsen, M.A., Chuang, I.: Quantum computation and quantum information. American Association of Physics Teachers, Washington DC (2002)

    MATH  Google Scholar 

  15. Hauke, P., Katzgraber, H.G., Lechner, W., Nishimori, H., Oliver, W.D.: Perspectives of quantum annealing: methods and implementations. Rep. Progr. Phys. 83(5), 054401 (2020). https://doi.org/10.1088/1361-6633/ab85b8

    Article  ADS  Google Scholar 

  16. O’Gorman, B., Babbush, R., Perdomo-Ortiz, A., Aspuru-Guzik, A., Smelyanskiy, V.: Bayesian network structure learning using quantum annealing. Eur. Phys. J. Special Topics 224(1), 163–188 (2015). https://doi.org/10.1140/epjst/e2015-02349-9

    Article  ADS  Google Scholar 

  17. Shikuri, Y.: Efficient conversion of Bayesian network learning into quadratic unconstrained binary optimization. http://arxiv.org/abs/2006.06926 (2020). https://doi.org/10.48550/ar**v.2006.06926

  18. Schuld, M., Petruccione, F.: Supervised learning with quantum computers. Springer, New York (2018)

    Book  MATH  Google Scholar 

  19. McClean, J.R., Romero, J., Babbush, R., Aspuru-Guzik, A.: The theory of variational hybrid quantum-classical algorithms. J. Phys. 18(2), 023023 (2016). https://doi.org/10.1088/1367-2630/18/2/023023

    Article  MATH  Google Scholar 

  20. Peruzzo, A., McClean, J., Shadbolt, P., Yung, M.-H., Zhou, X.-Q., Love, P.J., Aspuru-Guzik, A., O’Brien, J.L.: A variational eigenvalue solver on a photonic quantum processor. Nat. Commun. 5(1), 1–7 (2014). https://doi.org/10.1038/ncomms5213

    Article  Google Scholar 

  21. Farhi, E., Goldstone, J., Gutmann, S.: A quantum approximate optimization algorithm. http://arxiv.org/abs/1411.4028 (2014). https://doi.org/10.48550/ar**v.1411.4028

  22. Utkarsh, Behera, B.K., Panigrahi, P.K.: Solving vehicle routing problem using quantum approximate optimization algorithm. http://arxiv.org/abs/2002.01351 (2020). https://doi.org/10.48550/ar**v.2002.01351

  23. Choi, J., Kim, J.: A tutorial on quantum approximate optimization algorithm (QAOA): Fundamentals and Applications. In: 2019 International Conference on Information and Communication Technology Convergence, pp. 138–142 (2019). https://doi.org/10.1109/ICTC46691.2019.8939749. IEEE

  24. Shaydulin, R., Alexeev, Y.: Evaluating quantum approximate optimization algorithm: A case study. In: 2019 Tenth International Green and Sustainable Computing Conference, pp. 1–6 (2019). https://doi.org/10.1109/IGSC48788.2019.8957201. IEEE

  25. Fontana, E., Fitzpatrick, N., Ramo, D.M., Duncan, R., Rungger, I.: Evaluating the noise resilience of variational quantum algorithms. Phys. Rev. A 104(2), 022403 (2021). https://doi.org/10.1103/PhysRevA.104.022403

    Article  ADS  MathSciNet  Google Scholar 

  26. Verdon, G., Broughton, M., Biamonte, J.: A quantum algorithm to train neural networks using low-depth circuits. http://arxiv.org/abs/1712.05304 (2017). https://doi.org/10.48550/ar**v.1712.05304

  27. Streif, M., Leib, M.: Comparison of QAOA with quantum and simulated annealing. http://arxiv.org/abs/1901.01903 (2019). https://doi.org/10.48550/ar**v.1901.01903

  28. Xue, C., Chen, Z.-Y., Wu, Y.-C., Guo, G.-P.: Effects of quantum noise on quantum approximate optimization algorithm. Chin. Phys. Lett. 38(3), 030302 (2021). https://doi.org/10.1088/0256-307X/38/3/030302

    Article  ADS  Google Scholar 

  29. Sharma, K., Khatri, S., Cerezo, M., Coles, P.J.: Noise resilience of variational quantum compiling. New J. Phys. 22(4), 043006 (2020). https://doi.org/10.1088/1367-2630/ab784c

    Article  ADS  MathSciNet  Google Scholar 

  30. Schwarz, G.: Estimating the dimension of a model. Annal. Stat. 25, 461–464 (1978). https://doi.org/10.1214/aos/1176344136

    Article  MathSciNet  MATH  Google Scholar 

  31. Cooper, G.F., Herskovits, E.: A Bayesian method for the induction of probabilistic networks from data. Mach. Learn. 9(4), 309–347 (1992). https://doi.org/10.1007/BF00994110

    Article  MATH  Google Scholar 

  32. Heckerman, D., Geiger, D., Chickering, D.M.: Learning Bayesian networks: the combination of knowledge and statistical data. Mach. Learn. 20(3), 197–243 (1995). https://doi.org/10.1023/A:1022623210503

    Article  MATH  Google Scholar 

  33. Farhi, E., Goldstone, J., Gutmann, S.: Quantum adiabatic evolution algorithms with different paths. quant-ph/0208135 (2002). https://doi.org/10.48550/ar**v.quant-ph/0208135

  34. Aleksandrowicz, G., Alexander, T., Barkoutsos, P., Bello, L., Ben-Haim, Y., Bucher, D., Cabrera-Hernández, F.J., Carballo-Franquis, J., Chen, A., Chen, C.-F., et al.: Qiskit: An open-source framework for quantum computing (2021). https://doi.org/10.5281/zenodo.2573505

  35. ATOS: Quantum learning machine. https://atos.net/en/solutions/quantum-learning-machine. [Online; Accessed 26-January-2022] (2021)

  36. Acerbi, C., Tasche, D.: On the coherence of expected shortfall. J. Bank. Financ. 26(7), 1487–1503 (2002). https://doi.org/10.1016/S0378-4266(02)00283-2

    Article  Google Scholar 

  37. Barkoutsos, P.K., Nannicini, G., Robert, A., Tavernelli, I., Woerner, S.: Improving variational quantum optimization using CVaR. Quantum 4, 256 (2020). https://doi.org/10.22331/q-2020-04-20-256

    Article  Google Scholar 

  38. De Jong, K.: Evolutionary computation: A unified approach. In: Proceedings of the 2016 Genetic and Evolutionary Computation Conference Companion, pp. 185–199. The MIT Press, Cambridge (2016). https://doi.org/10.1007/s10710-007-9035-9

  39. Larrañaga, P., Lozano, J.A.: Estimation of distribution algorithms: a new tool for evolutionary computation, vol. 2. Springer, New York (2001)

    MATH  Google Scholar 

  40. Powell, M.J.: A direct search optimization method that models the objective and constraint functions by linear interpolation. in: advances in optimization and numerical analysis. Springer, New York (1994)

    Book  MATH  Google Scholar 

  41. Bonet-Monroig, X., Wang, H., Vermetten, D., Senjean, B., Moussa, C., Bäck, T., Dunjko, V., O’Brien, T.E.: Performance comparison of optimization methods on variational quantum algorithms. http://arxiv.org/abs/2111.13454 (2021). https://doi.org/10.48550/ar**v.2111.13454

  42. Urbanek, M., Nachman, B., Pascuzzi, V.R., He, A., Bauer, C.W., de Jong, W.A.: Mitigating depolarizing noise on quantum computers with noise-estimation circuits. http://arxiv.org/abs/2103.08591 (2021). https://doi.org/10.1103/PhysRevLett.127.270502

  43. Kandala, A., Temme, K., Córcoles, A.D., Mezzacapo, A., Chow, J.M., Gambetta, J.M.: Error mitigation extends the computational reach of a noisy quantum processor. Nature 567(7749), 491–495 (2019). https://doi.org/10.1038/s41586-019-1040-7

    Article  ADS  Google Scholar 

  44. Sun, J., Yuan, X., Tsunoda, T., Vedral, V., Benjamin, S.C., Endo, S.: Mitigating realistic noise in practical noisy intermediate-scale quantum devices. Phys. Rev. Appl. 15(3), 034026 (2021). https://doi.org/10.1103/PhysRevApplied.15.034026

    Article  ADS  Google Scholar 

  45. Vovrosh, J., Khosla, K.E., Greenaway, S., Self, C., Kim, M., Knolle, J.: Simple mitigation of global depolarizing errors in quantum simulations. Phys. Rev. E 104(3), 035309 (2021). https://doi.org/10.1103/PhysRevE.104.035309

    Article  ADS  Google Scholar 

  46. Henrion, M.: Propagating uncertainty in Bayesian networks by probabilistic logic sampling. In: machine intelligence and pattern recognition. Elsevier, Amsterdam (1988)

    Book  MATH  Google Scholar 

  47. Gámez, J.A., Mateo, J., Puerta, J.M.: Learning Bayesian networks by hill climbing: Efficient methods based on progressive restriction of the neighborhood. Data Min. Knowl. Discov. 22, 106–148 (2011). https://doi.org/10.1007/s10618-010-0178-6

    Article  MathSciNet  MATH  Google Scholar 

  48. Tsamardinos, I., Brown, L.E., Aliferis, C.F.: The max-min hill-climbing Bayesian network structure learning algorithm. Mach. Learn. 65(1), 31–78 (2006). https://doi.org/10.1007/s10994-006-6889-7

    Article  MATH  Google Scholar 

  49. Egger, D.J., Mareček, J., Woerner, S.: Warm-starting quantum optimization. Quantum 5, 479 (2021). https://doi.org/10.22331/q-2021-06-17-479

    Article  Google Scholar 

Download references

Acknowledgements

The authors would like to thank A. Gomez from Centro de Supercomputacion de Galicia (CESGA) for helpful discussions. We would like to thank Centro Singular de Investigación en Tecnoloxías Intelixentes (CITIUS) and CESGA for access to the computers where the experiments were carried out. We acknowledge the access to advanced services provided by the IBM Quantum Researchers Program. This work has been partially supported by the Spanish Ministry of Science and Innovation through the PID2019-109247GB-I00 and RTC2019-006871-7 projects, and by the BBVA Foundation (2019 Call) through the “Score-based nonstationary temporal Bayesian networks. Applications in climate and neuroscience” (BAYES-CLIMA-NEURO) project. Vicente P. Soloviev has been supported by the FPI PRE2020-094828 PhD grant from the Spanish Ministry of Science and Innovation.

Author information

Authors and Affiliations

Authors

Contributions

VPS involved in conceptualization, investigation, software, and writing—original draft. PL involved in writing—review and editing. CB involved in writing—review and editing.

Corresponding author

Correspondence to Vicente P. Soloviev.

Ethics declarations

Conflict of interest

The authors declare no competing financial or non-financial interests.

Code availability

All the code used for implementing the approach and generating the results is available in https://github.com/VicentePerezSoloviev/QAOA_BNSL_IBM.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Appendices

Appendix A: Kraus operators for noise simulation

Following the formalism of Kraus operators [14], each quantum channel \(\varepsilon \) is defined given a set of matrices \(E_i\), which are applied to a quantum state, where i runs through all the operators considered for a given channel and k is the number f operators that define the noise channel. Thus, given a state \(\psi \), the resulting state after applying a quantum channel is

$$\begin{aligned} \varepsilon (\psi ) = \sum _k E_i \psi E_i^\dagger , \end{aligned}$$
(14)

where the Kraus operators must meet the restriction \(\sum _k E_i E_i^\dagger = 1\). Note that all the operators defined in this section are one-qubit operations (\(E_i^{(1)}\)), and that all the channels are parameterized by \(\omega \in [0, 1]\), which regulates the probability of occurrence of the respective noise.

1.1 A.1 Amplitude dam** channel

This quantum operation describes the energy dissipation of the quantum states. The operation over a one-qubit system is defined as

$$\begin{aligned} \varepsilon _{AD}(\psi ) = E_1 \psi E_1^\dagger + E_2 \psi E_2^\dagger , \end{aligned}$$

where \(E_1\) and \(E_2\) are defined as

$$\begin{aligned} E_1^{(1)} = \begin{pmatrix} 1 &{} 0\\ 0 &{} \sqrt{1-\omega } \end{pmatrix},\quad E_2^{(1)} = \begin{pmatrix} 0 &{} \sqrt{\omega }\\ 0 &{} 0 \end{pmatrix}. \end{aligned}$$

The \(E_2\) operation converts a \(|{1}\rangle \) to a \(|{0}\rangle \), representing the physical process of the environment energy lost. \(E_1\) leaves \(|{0}\rangle \) unaltered but decreases the amplitude of a \(|{1}\rangle \) state. Physically, this occurs because some energy was not lost to the environment, and thus the quantum state is more likely to be in the \(|{0}\rangle \) state, rather than in the \(|{1}\rangle \) state.

1.2 A.2 Phase dam** channel

This quantum operation describes the loss of quantum information without loss of energy. The operation over a one-qubit system is defined as

$$\begin{aligned} \varepsilon _{PD}(\psi ) = E_1 \psi E_1^\dagger + E_2 \psi E_2^\dagger , \end{aligned}$$

where \(E_1\) and \(E_2\) are defined as

$$\begin{aligned} E_1^{(1)} = \begin{pmatrix} 1 &{} 0\\ 0 &{} \sqrt{1-\omega } \end{pmatrix},\quad E_2^{(1)} = \begin{pmatrix} 0 &{} 0\\ 0 &{} \sqrt{\omega } \end{pmatrix}. \end{aligned}$$

In this case, the \(E_1\) operator acts in the same way as in the case of the amplitude dam** noise channel, leaving \(|{0}\rangle \) unchanged, but reducing the amplitude of \(|{1}\rangle \). However, in this case, \(E_2\) also reduces the amplitude of the \(|{1}\rangle \) state, but does not change it to \(|{0}\rangle \).

1.3 A.3 Depolarizing channel

This quantum operation describes the depolarization of a qubit. That is, with certain probability \(\omega \) a quantum state is replaced by the mixed state I/2. The operation over a one-qubit system is defined as

$$\begin{aligned} \varepsilon _D(\psi ) = \omega \frac{I}{2} + (1-\omega )\psi . \end{aligned}$$
(15)

Despite the fact that Eq. (15) does not involve any Kraus operators, it is possible to define the depolarizing channel with the following Kraus operators: [14],

$$\begin{aligned} \begin{aligned} E_1^{(1)}&= \sqrt{1-\frac{3\omega }{4}} I_2,\quad E_2^{(1)} = \sqrt{\frac{\omega }{4}} \sigma ^{x}, \\ E_3^{(1)}&= \sqrt{\frac{\omega }{4}} \sigma ^{y},\quad \quad \quad E_4^{(1)} = \sqrt{\frac{\omega }{4}} \sigma ^{z}, \end{aligned} \end{aligned}$$
(16)

where \(\sigma ^{x}\), \(\sigma ^{y}\) and \(\sigma ^{z}\) are the Pauli operators, and \(\omega = 1\) implies the output state \(\varepsilon _D(\psi )\) to be the mixed state I/2.

The application of the Kraus operators defined in Eq. (16) for two-qubits quantum system is defined as:

Appendix B: Complementary results for noise simulation

Table 2 shows the detailed mean and standard deviation of the experimental results represented in Fig. 8.

Table 2 Mean best costs (\(\mu \)) and standard deviations (\(\sigma \)) found for different values of the \(\omega \) parameter over 50 executions of the QAOA approach for the BNSL problem, and the mean number of iterations (\(\mu \)) and standard deviations (\(\sigma \)) until convergence for 50 executions. AD, PD and DE represent amplitude dam**, phase dam**, and depolarizing simulated errors, respectively

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Soloviev, V.P., Bielza, C. & Larrañaga, P. Quantum approximate optimization algorithm for Bayesian network structure learning. Quantum Inf Process 22, 19 (2023). https://doi.org/10.1007/s11128-022-03769-2

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s11128-022-03769-2

Keywords

Navigation