## New Research In

### Physical Sciences

### Social Sciences

#### Featured Portals

#### Articles by Topic

### Biological Sciences

#### Featured Portals

#### Articles by Topic

- Agricultural Sciences
- Anthropology
- Applied Biological Sciences
- Biochemistry
- Biophysics and Computational Biology
- Cell Biology
- Developmental Biology
- Ecology
- Environmental Sciences
- Evolution
- Genetics
- Immunology and Inflammation
- Medical Sciences
- Microbiology
- Neuroscience
- Pharmacology
- Physiology
- Plant Biology
- Population Biology
- Psychological and Cognitive Sciences
- Sustainability Science
- Systems Biology

# Efficiency of quantum vs. classical annealing in nonconvex learning problems

Edited by William Bialek, Princeton University, Princeton, NJ, and approved January 2, 2018 (received for review June 26, 2017)

## Significance

Quantum annealers are physical quantum devices designed to solve optimization problems by finding low-energy configurations of an appropriate energy function by exploiting cooperative tunneling effects to escape local minima. Classical annealers use thermal fluctuations for the same computational purpose, and Markov chains based on this principle are among the most widespread optimization techniques. The fundamental mechanism underlying quantum annealing consists of exploiting a controllable quantum perturbation to generate tunneling processes. The computational potentialities of quantum annealers are still under debate, since few ad hoc positive results are known. Here, we identify a wide class of large-scale nonconvex optimization problems for which quantum annealing is efficient while classical annealing gets stuck. These problems are of central interest to machine learning.

## Abstract

Quantum annealers aim at solving nonconvex optimization problems by exploiting cooperative tunneling effects to escape local minima. The underlying idea consists of designing a classical energy function whose ground states are the sought optimal solutions of the original optimization problem and add a controllable quantum transverse field to generate tunneling processes. A key challenge is to identify classes of nonconvex optimization problems for which quantum annealing remains efficient while thermal annealing fails. We show that this happens for a wide class of problems which are central to machine learning. Their energy landscapes are dominated by local minima that cause exponential slowdown of classical thermal annealers while simulated quantum annealing converges efficiently to rare dense regions of optimal solutions.

Quantum annealing (QA) aims at finding low-energy configurations of nonconvex optimization problems by a controlled quantum adiabatic evolution, where a time-dependent many-body quantum system which encodes for the optimization problem evolves toward its ground states so as to escape local minima through multiple tunneling events (1⇓⇓⇓–5). Classical simulated annealing (SA) uses thermal fluctuations for the same computational purpose, and Markov chains based on this principle are among the most widespread optimization techniques across science (6). Quantum fluctuations are qualitatively different from thermal fluctuations, and in principle, QA algorithms could lead to extremely powerful alternative computational devices.

In the QA approach, a time-dependent quantum transverse field is added to the classical energy function leading to an interpolating Hamiltonian that may take advantage of correlated fluctuations mediated by tunneling. Starting with a high transverse field, the quantum model system can be initialized in its ground state, i.e., all spins aligned in the direction of the field. The adiabatic theorem then ensures that by slowly reducing the transverse field, the system remains in the ground state of the interpolating Hamiltonian. At the end of the process, the transverse field vanishes, and the systems ends up in the sought ground state of the classical energy function. The original optimization problem would then be solved if the overall process could take place in a time bounded by some low-degree polynomial in the size of the problem. Unfortunately, the adiabatic process can become extremely slow. The adiabatic theorem requires the rate of change of the Hamiltonian to be smaller than the square of the gap between the ground state and the first excited state (7⇓–9). For small gaps, the process can thus become inefficient. Exponentially small gaps are not only possible in worst-case scenarios, but have also been found to exist in typical random systems where comparative studies between quantum and classical annealing have so far failed in displaying quantum exponential speed-up, e.g., at first-order phase transition in quantum spin glasses (10, 11) or 2D spin-glass systems (12⇓–14). More positive results have been found for ad hoc energy functions in which global minima are planted in such a way that tunneling cascades can become more efficient than thermal fluctuations (4, 15). As far as the physical implementations of quantum annealers is concerned, studies have been focused on discriminating the presence of quantum effects rather than on their computational effectiveness (16⇓–18).

Consequently, a key open question is to identify classes of relevant optimization problems for which QA can be shown to be exponentially faster than its classical thermal counterpart.

Here, we give an answer to this question by providing analytic and simulation evidence of exponential speed-up of quantum vs. classical SA for a representative class of random nonconvex optimization problems of basic interest in machine learning. The simplest example of this class is the problem of training binary neural networks (described in detail below): Very schematically, the variables of the problem are the (binary) connection weights, while the energy measures the training error over a given dataset.

These problems have been very recently found to possess a rather distinctive geometrical structure of ground states (19⇓⇓–22): The free-energy landscape has been shown to be characterized by the existence of an exponentially large number of metastable states and isolated ground states and a few regions where the ground states are dense. These dense regions, which had previously escaped the equilibrium statistical physics analysis (23, 24), are exponentially rare, but still possess a very high local internal entropy: They are composed of ground states that are surrounded, at extensive but relatively small distances, by exponentially many other ground states. Under these circumstances, classical SA (as any Markov chain satisfying detailed balance) gets trapped in the metastable states, suffering ergodicity breaking and exponential slowing down toward the low-energy configurations. These problems have been considered to be intractable for decades and display deep similarities with disordered spin-glass models, which are known to never reach equilibrium.

The large deviation analysis that has unveiled the existence of the rare dense regions has led to several novel algorithms, including a Monte Carlo scheme defined over an appropriate objective function (20) that bears close similarities with a quantum Monte Carlo (QMC) technique based on the Suzuki–Trotter transformation (5). Motivated by this analytical mapping and by the geometrical structure of the dense and degenerate ground states which is expected to favor zero-temperature kinetic processes (25, 26), we have conducted a full analytical and numerical statistical physics study of the QA problem, reaching the conclusion that in the quantum limit, the QMC process, i.e., simulated QA (SQA), can equilibrate efficiently, while the classical SA gets stuck in high-energy metastable states. These results generalize to multilayered networks.

While it is known that other quasioptimal classical algorithms for the same problems exist (20, 27, 28), here, we focus on the physical speed-up that a QA approach could provide in finding rare regions of ground states. We provide physical arguments and numerical results supporting the conjecture that the real-time QA dynamics behaves similarly to SQA.

As far as machine learning is concerned, dense regions of low-energy configurations (i.e., quasiflat minima over macroscopic length scales) are of fundamental interest, as they are particularly well-suited for making predictions given the learned data: On the one hand, these regions are by definition robust with respect to fluctuations in a sizable fraction of the weight configurations and, as such, are less prone to fit the noise. On the other hand, an optimal Bayesian estimate, resulting from a weighted consensus vote on all configurations, would receive a major contribution from one of such regions, compared with a narrow minimum; the centroid of the region (computed according to any reasonable metric which correlates the distance between configurations with the network outcomes) would act as a representative of the region as a whole (29). In this respect, it is worth mentioning that in deep learning (30), all of the learning algorithms which lead to good prediction performance always include effects of a systematically injected noise in the learning phase, a fact that makes the equilibrium Gibbs measure not the stationary measure of the learning protocols and drives the systems toward wide minima. We expect that these results can be generalized to many other classes of nonconvex optimization problems where local entropy plays a role, ranging from robust optimization to physical disordered systems.

Quantum gate-based algorithms for machine learning exist; however, the possibility of a physical implementation remains a critical issue (31).

## Energy Functions

As a working example, we first consider the problem of learning random patterns in single-layer neural network with binary weights, the so-called binary perceptron problem (23). This network maps vectors of

Following the standard SQA approach, we identify the binary variables **1** acting in the longitudinal direction

The replicated system needs to be studied in the limit

## Connection with the Local Entropy Measure

The effective Hamiltonian Eq. **3** can be interpreted as many replicas of the original systems coupled through one-dimensional periodic chains, one for each original spin (Fig. 1*B*). Note that the interaction term *C*).

The Suzuki–Trotter representation and the RE formalism differ in the topology of the interactions between replicas and in the scaling of the interactions, but for both cases, there is a classical limit,

For the sake of clarity, we should remind that in the classical limit and for

## Phase Diagram: Analytical and Numerical Results

Thanks to the mean field nature of the energetic part of the system, Eq. **3**, we can resort to the replica method for calculating analytically the phase diagram. As discussed in *SI Appendix*, this can be done under the so-called static approximation, which consists of using a single-parameter

In Fig. 2, we report the analytical predictions for the average classical component of the energy of the quantum model as a function of the transverse field *Materials and Methods* and *SI Appendix*. The size of the systems, the number of samples, and the number of Trotter replicas are scaled up to large values, so that both finite size effects and the quantum limit are kept under control. A key point is to observe that the results do not degrade with the number of Trotter replicas: The average ground-state energy approaches a limiting value, close to the theoretical prediction, in the large *SI Appendix*).

In the same plot, we display the behavior of classical SA simulated with a standard Metropolis–Hastings scheme, under an annealing protocol in *Materials and Methods* and *SI Appendix*): As expected (34), SA gets trapped at very high energies (increasing with problem size; in the thermodynamic limit, it is expected that SA would remain stuck at the initial value

In Fig. 2 *Inset*, we report the analytical prediction for the transverse overlap parameter

In Fig. 3, we provide the profiles of the classical energy minima found for different values of *Materials and Methods* and *SI Appendix* for details) by evaluating which is the most probable energy found at a normalized Hamming distance

The physical interpretation of these results is that quantum fluctuations lower the energy of a cluster proportionally to its size or, in other words, that quantum fluctuations allow the system to lower its kinetic energy by delocalizing; see refs. 25, 26, and 39 for related results. Along the process of reduction of the transverse field, we do not observe any phase transition which could induce a critical slowing down of the QA process, and we expect SQA and QA to behave similarly (11, 36).

This is in agreement with the results of a direct comparison between the real-time quantum dynamics and the SQA on small systems (*SI Appendix*, we have performed extensive numerical studies of properly selected small instances of the binary perceptron problem, comparing the results of SQA and QA and analyzing the results of the QA process and the properties of the Hamiltonian. To reproduce the conditions that are known to exist at large values of

As concluding remarks, we report that the models with

For the sake of completeness, we have checked that the performance of SQA in the *SI Appendix*.

## Conclusions

We conclude by noticing that, at variance with other studies on spin-glass models in which the evidence for QA outperforming classical annealing was limited to finite values of

Our results provide further evidence that learning can be achieved through different types of correlated fluctuations, among which quantum tunneling could be a relevant example for physical devices.

## Materials and Methods

### Simulated QA Protocol.

All SQA simulations were performed by using the RRR Monte Carlo method (37). We fixed the total number of spin flip attempts at

### Classical SA Protocol.

The results for SA presented in Fig. 2 used an annealing protocol in *SI Appendix*, Fig. S1. The SA protocol thus consisted of setting

Other more standard annealing protocols (e.g., linear, exponential, or logarithmic) yielded very similar qualitative results, as expected from the analysis of ref. 34.

### Estimation of the Local Energy and Entropy Landscapes.

To compute the local landscapes of the energy and the entropy around a reference configuration, Fig. 3, we used the belief propagation algorithm. We added an external field in the direction of the configuration of interest to focus on regions surrounding that configuration. The strength of the field allowed us to control the size of the region (parameter *SI Appendix*.

### Real-Time QA Simulations on Small Instances.

The real-time quantum dynamics simulations on small systems were performed by solving the time-dependent Schrödinger equation for the Hamiltonian of Eq. **2** by using the short iterative Lanczos method (45), which consists of computing the evolution with the Lanczos algorithm, at fixed

## Acknowledgments

We thank G. Santoro, B. Kappen, and F. Becca for discussions. This work was supported by Office of Naval Research Grant N00014-17-1-2569.

## Footnotes

↵

^{1}C.B. and R.Z. contributed equally to this work.- ↵
^{2}To whom correspondence may be addressed. Email: carlo.baldassi{at}unibocconi.it or riccardo.zecchina{at}unibocconi.it.

Author contributions: C.B. and R.Z. designed research, performed research, contributed new reagents/analytic tools, analyzed data, and wrote the paper.

The authors declare no conflict of interest.

This article is a PNAS Direct Submission.

This article contains supporting information online at www.pnas.org/lookup/suppl/doi:10.1073/pnas.1711456115/-/DCSupplemental.

- Copyright © 2018 the Author(s). Published by PNAS.

This open access article is distributed under Creative Commons Attribution-NonCommercial-NoDerivatives License 4.0 (CC BY-NC-ND).

## References

- ↵.
- Ray P,
- Chakrabarti BK,
- Chakrabarti A

- ↵
- ↵.
- Kadowaki T,
- Nishimori H

- ↵.
- Farhi E, et al.

- ↵
- ↵.
- Moore C,
- Mertens S

- ↵.
- Born M,
- Fock V

- ↵.
- Landau L

- ↵.
- Zener C

- ↵.
- Altshuler B,
- Krovi H,
- Roland J

- ↵.
- Bapst V,
- Foini L,
- Krzakala F,
- Semerjian G,
- Zamponi F

- ↵.
- Santoro GE,
- Martoňák R,
- Tosatti E,
- Car R

- ↵.
- Martoňák R,
- Santoro GE,
- Tosatti E

- ↵.
- Heim B,
- Rønnow TF,
- Isakov SV,
- Troyer M

- ↵.
- Rønnow TF, et al.

- ↵
- ↵
- ↵.
- Langbein W, et al.

- ↵.
- Baldassi C,
- Ingrosso A,
- Lucibello C,
- Saglietti L,
- Zecchina R

- ↵.
- Baldassi C, et al.

- ↵.
- Baldassi C,
- Ingrosso A,
- Lucibello C,
- Saglietti L,
- Zecchina R

- ↵.
- Baldassi C,
- Gerace F,
- Lucibello C,
- Saglietti L,
- Zecchina R

- ↵.
- Krauth W,
- Mézard M

- ↵
- ↵
- ↵.
- Biroli G,
- Zamponi F

- ↵.
- Hubara I,
- Courbariaux M,
- Soudry D,
- El-Yaniv R,
- Bengio Y

- ↵.
- Courbariaux M,
- Bengio Y,
- David JP

- ↵.
- MacKay DJ

- ↵
- ↵.
- Aaronson S

- ↵
- ↵.
- Huang H,
- Kabashima Y

- ↵.
- Horner H

- ↵.
- Bapst V,
- Semerjian G

- ↵.
- Bapst V,
- Semerjian G

- ↵.
- Baldassi C

- ↵.
- Baldassi C,
- Braunstein A,
- Brunel N,
- Zecchina R

- ↵
- ↵.
- Keskar NS,
- Mudigere D,
- Nocedal J,
- Smelyanskiy M,
- Tang PTP

- ↵.
- Bottou L,
- Curtis FE,
- Nocedal J

- ↵
- ↵.
- Baldassi C

- ↵.
- Baldassi C,
- Braunstein A

- ↵.
- Schneider BI,
- Guan X,
- Bartschat K

## Citation Manager Formats

### More Articles of This Classification

### Physical Sciences

### Related Content

- No related articles found.

### Cited by...

- No citing articles found.