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.
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs11128-022-03769-2/MediaObjects/11128_2022_3769_Fig1_HTML.png)
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs11128-022-03769-2/MediaObjects/11128_2022_3769_Fig2_HTML.png)
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs11128-022-03769-2/MediaObjects/11128_2022_3769_Fig3_HTML.png)
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs11128-022-03769-2/MediaObjects/11128_2022_3769_Fig4_HTML.png)
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs11128-022-03769-2/MediaObjects/11128_2022_3769_Fig5_HTML.png)
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs11128-022-03769-2/MediaObjects/11128_2022_3769_Fig6_HTML.png)
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs11128-022-03769-2/MediaObjects/11128_2022_3769_Fig7_HTML.png)
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs11128-022-03769-2/MediaObjects/11128_2022_3769_Fig8_HTML.png)
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs11128-022-03769-2/MediaObjects/11128_2022_3769_Fig9_HTML.png)
![](http://media.springernature.com/m312/springer-static/image/art%3A10.1007%2Fs11128-022-03769-2/MediaObjects/11128_2022_3769_Fig10_HTML.png)
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
Github repository with implemented code: https://github.com/VicentePerezSoloviev/QAOA_BNSL_IBM
References
Koller, D., Friedman, N.: Probabilistic graphical models: principles and techniques. The MIT Press, Cambridge (2009)
Murphy, K.P.: Machine learning: a probabilistic perspective. The MIT press, Cambridge (2012)
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
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
Chickering, D.M.: Learning bayesian networks is np-complete. Learning from Data, Springer, New York (1996)
Robinson, R.W.: Counting unlabeled acyclic digraphs. combinatorial mathematics. Springer, New York (1977)
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
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
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
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
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
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)
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
Nielsen, M.A., Chuang, I.: Quantum computation and quantum information. American Association of Physics Teachers, Washington DC (2002)
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
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
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
Schuld, M., Petruccione, F.: Supervised learning with quantum computers. Springer, New York (2018)
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
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
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
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
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
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
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
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
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
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
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
Schwarz, G.: Estimating the dimension of a model. Annal. Stat. 25, 461–464 (1978). https://doi.org/10.1214/aos/1176344136
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
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
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
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
ATOS: Quantum learning machine. https://atos.net/en/solutions/quantum-learning-machine. [Online; Accessed 26-January-2022] (2021)
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
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
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
Larrañaga, P., Lozano, J.A.: Estimation of distribution algorithms: a new tool for evolutionary computation, vol. 2. Springer, New York (2001)
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)
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
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
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
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
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
Henrion, M.: Propagating uncertainty in Bayesian networks by probabilistic logic sampling. In: machine intelligence and pattern recognition. Elsevier, Amsterdam (1988)
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
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
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
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
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
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
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
where \(E_1\) and \(E_2\) are defined as
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
where \(E_1\) and \(E_2\) are defined as
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
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],
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:
![](http://media.springernature.com/lw292/springer-static/image/art%3A10.1007%2Fs11128-022-03769-2/MediaObjects/11128_2022_3769_Equ38_HTML.png)
Appendix B: Complementary results for noise simulation
Table 2 shows the detailed mean and standard deviation of the experimental results represented in Fig. 8.
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.
About this article
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
Received:
Accepted:
Published:
DOI: https://doi.org/10.1007/s11128-022-03769-2