betaFeedback

WorksPhysics and Astronomy

Solving combinatorial optimization problems through stochastic Landau-Lifshitz-Gilbert dynamical systems

Abstract

We present a method to approximately solve general instances of combinatorial optimization problems using the physical dynamics of 3d rotors obeying Landau-Lifshitz-Gilbert dynamics. Conventional techniques to solve discrete optimization problems that use simple continuous relaxation of the objective function followed by gradient descent minimization are inherently unable to avoid local optima, thus producing poor-quality solutions. Our method considers the physical dynamics of macrospins capable of escaping from local minima, thus facilitating the discovery of high-quality, nearly optimal solutions, as supported by extensive numerical simulations on a prototypical quadratic unconstrained binary optimization (QUBO) problem. Our method produces solutions that compare favorably with those obtained using state-of-the-art minimization algorithms (such as simulated annealing) while offering the advantage of being physically realizable by means of arrays of stochastic magnetic tunnel junction devices.

Introduction. A compelling idea linking physics and discrete mathematics is to leverage the intrinsic dynamics of real-world physical systems to solve mathematical optimization problem. The idea relies on correspondence between the variables of the mathematical problem and the degrees of freedom of an analogue physical system, where the role of the objective function to be optimized is played by the energy function of the interacting physical system [1, 2, 3, 4]. Once this correspondence has been successfully established, all one has to do is to cool the system down to zero temperature and wait for it to settle in its ground state, i.e., the state with minimal energy, which, in turn, represents the solution to the original optimization problem [5]. In many cases of practical interest, this is easier said than done in that during the cooling process the physical system can get stuck in long-lived metastable states, possibly without ever reaching the ground state on human-life timescales. In such situations, the choice of the analogue physical system becomes the crucial point of the entire methodology. Physical systems that are less prone to getting trapped in the local minima of the energy function will solve the optimization problem better than those that get easily stuck.

Many interesting optimization problems are discrete in nature, meaning that the variables involved are represented by integers, typically taking up only two values, say 0 and 1. A large body of work has thus exploited the idea of using Ising-type physical systems to effectively map integer variables onto binary spins and then use Monte Carlo methods or alike to simulate the physical dynamics of these analogue Ising machines to find their ground state. These techniques have been studied extensively in the literature (see, for example, references [1, 2, 3, 6]).

In this article, we present a new energy-minimization framework to solve combinatorial optimization problems based on the physical dynamics of real macrospins described by the Landau-Lifshitz-Gilbert (LLG) equations. The idea is to use 3-dimensional rotors as the analogue physical dynamical system, rather than up-down Ising spins. The rationale behind our approach is the physical gambit that trajectories away from the zz-axis, in particular, those occurring halfway between the north and south poles of the unit sphere will help the system to escape from local solutions, thus facilitating the discovery of the true ground-state.

We explain our method in two steps: first, we introduce the stochastic LLG dynamical system and discuss its numerical implementation; second, we explain how to apply it to a specific QUBO problem, called the Sherrington–Kirkpatrick model in statistical physics [7, 8], which can be exactly solved in the thermodynamic limit [9], and show that our method extrapolates to this exact value while performing systematically better than discrete methods based on Glauber dynamics of Ising spins [10].

Stochastic-LLG Dynamics

We consider a system consisting of nn single-domain ferromagnets, and apply the macrospin approximation to each domain. The magnetization of the spins in the ithi^{\mathrm{th}} domain are averaged to a single giant magnetic moment m⃗i=mim^i\vec{m}_i = m_i\hat{m}_i, with magnitude mi>0m_i > 0 and direction m^i\hat{m}_i, as illustrated in Figure 1. The micromagnetic energy EE of our nn macrospins system has three terms: the energy from the exchange interaction between each moments EexE_{\mathrm{ex}}, the energy from the magnetic anisotropy determined by the crystallographic structure of the domain, EanisE_{\mathrm{anis}}, and the Zeeman energy from an external magnetic field applied to the system, EZE_Z. Summarizing:

Schematic description of our method

Figure 1. Schematic description of our method. First, we encode the solution of the optimization problem into the ground state of the spin system’s Hamiltonian. The parameters JijJ_{ij} model the interactions between pair of macrospins. Here we only show couplings between neighbouring spins for illustration purposes. In general, the connections are not restricted to the nearest neighbours. Anisotropy is set along the zz axis of each spin via a magnetic anisotropy field HAiH_{Ai} favoring the north-south direction. After initializing the macrospins in random directions on the unit sphere, the system is cooled from high to low temperature. At high temperatures, each macrospin experiences large thermal fluctuations with trajectories densely covering the unit sphere. As the system cools to lower temperatures, the fluctuations are reduced and the spins trajectories tend to confine into small regions around the poles of the unit sphere. The dynamical trajectories of a single macrospin during the annealing process is depicted in green on the left-hand side of the illustration. Eventually, the system reaches the end of the annealing schedule and spins stabilize around the north and south poles. The spins’ final states are binarized based on their up or down direction to get a direct readout of the solution to the original problem.

E=Eex+Eanis+EZ.(1)E = E_{\mathrm{ex}} + E_{\mathrm{anis}} + E_Z. \tag*{(1)}

The expression for each term is given by:

Eex=−μ0∑⟨i,j⟩n2JijHexm⃗i⋅m⃗jmi+mj,(2)E_{\mathrm{ex}} = -\mu_0 \sum_{\langle i,j\rangle}^{n} 2J_{ij}H_{\mathrm{ex}}\frac{\vec{m}_i \cdot\vec{m}_j}{m_i + m_j}, \tag*{(2)}
Eanis=−12μ0∑i=1nHAimi(e⃗hi⋅m^i)2,(3)E_{\mathrm{anis}} = -\frac{1}{2}\mu_0 \sum_{i=1}^{n} H_{Ai}m_i(\vec{e}_{hi} \cdot\hat{m}_i)^2, \tag*{(3)}
EZ=−μ0∑i=1nm⃗i⋅H⃗ext,i,(4)E_Z = -\mu_0 \sum_{i=1}^{n} \vec{m}_i \cdot\vec{H}_{\mathrm{ext},i}, \tag*{(4)}

where μ0\mu_0 is the vacuum permeability, HAiH_{Ai} characterizes the magnetic anisotropy of moment ii, and e⃗hi\vec{e}_{hi} is the unit vector characterizing the preferred crystallographic direction of moment ii (which later we take to be along the zz-axis, see Figure 2). The summation over ⟨i,j⟩\langle i,j\rangle is over pairs of connected spins. Vector H⃗ext,i\vec{H}_{\mathrm{ext},i} is an external local magnetic field acting on the ithi^{\mathrm{th}} magnetic moment. HexH_{\mathrm{ex}} has units of field and it characterizes the general scale of the exchange coupling strength. Coupling terms JijJ_{ij} are dimensionless and characterize the exchange interaction between magnetic moments.

Ising Spin and Macrospin; $s_i=-1,1 \Leftrightarrow \hat{m}_i=-\hat{z},+\hat{z}$

Figure 2. Illustration of Ising spin and macrospin. Ising spins can only take two values, si=±1s_i=\pm1. Macrospins, on the other hand, have extra degrees of freedom when rotating on the unit sphere.

Each magnetic moment m⃗i\vec{m}_i evolves according to the Landau-Lifshitz-Gilbert (LLG) equation [11]:

dm⃗idt=γi′m⃗i×H⃗eff,i−αimim⃗i×dm⃗idt,(5)\frac{d\vec{m}_i}{dt} = \gamma_i' \vec{m}_i \times\vec{H}_{\mathrm{eff},i} - \frac{\alpha_i}{m_i}\vec{m}_i \times\frac{d\vec{m}_i}{dt}, \tag*{(5)}

where γi′=μ0γi\gamma_i' = \mu_0\gamma_i, with γi\gamma_i the gyromagnetic ratio of the ithi^{\mathrm{th}} moment, and αi\alpha_i is the damping constant. Vector H⃗eff,i\vec{H}_{\mathrm{eff},i} is the effective field experienced by the ithi^{\mathrm{th}} magnetic moment, given by

H⃗eff,i=−1μ0∂E∂m⃗i.(6)\vec{H}_{\mathrm{eff},i} = -\frac{1}{\mu_0}\frac{\partial E}{\partial\vec{m}_i}. \tag*{(6)}

To incorporate thermal fluctuations into the dynamics we add a thermal field H⃗th,i\vec{H}_{\mathrm{th},i} to H⃗eff,i\vec{H}_{\mathrm{eff},i} by the substitution

H⃗eff,i→H⃗eff,i+H⃗th,i.(7)\vec{H}_{\mathrm{eff},i} \rightarrow\vec{H}_{\mathrm{eff},i} + \vec{H}_{\mathrm{th},i}. \tag*{(7)}

The thermal fields are delta-correlated zero mean random variables in time, with a correlation given by [12, 13]:

⟨H⃗th,i,μ(t)H⃗th,i,ν(t′)⟩=Ciδμνδ(t−t′),(8)\langle\vec{H}_{\mathrm{th},i,\mu}(t)\vec{H}_{\mathrm{th},i,\nu}(t')\rangle= C_i\delta_{\mu\nu}\delta(t-t'), \tag*{(8)}
Ci=2αikBTμ02miγi(1+αi2),(9)C_i = \frac{2\alpha_i k_{\mathrm{B}}T}{\mu_0^2m_i\gamma_i(1+\alpha_i^2)}, \tag*{(9)}

where μ,ν=x,y,z\mu,\nu= x,y,z, kBk_{\mathrm{B}} is the Boltzmann constant, and TT is the temperature. Integrating Eq. (9) over a small time interval Δt\Delta t, we obtain the standard deviation of H⃗th,i\vec{H}_{\mathrm{th},i} as

σi=1μ02αikBTmiγi(1+αi2)Δt.(10)\sigma_i = \frac{1}{\mu_0}\sqrt{\frac{2\alpha_i k_{\mathrm{B}}T}{m_i\gamma_i(1+\alpha_i^2)\Delta t}}. \tag*{(10)}

In practice, for each component of H⃗th,i\vec{H}_{\mathrm{th},i}, we draw a value from a Gaussian distribution with mean μ=0\mu=0 and standard deviation given by σi\sigma_i in Eq. (10). Finally, to integrate the stochastic differential equation we apply Heun’s integration scheme [14].

In our simulation, we assume that each macrospin ii has the same crystallographic structure. All parameters related to the material properties are the same across all nn domains, therefore the index ii of the following quantities are omitted: HAi=HAH_{Ai}=H_A, αi=α\alpha_i=\alpha, γi=γ\gamma_i=\gamma, γi′=γ′\gamma_i'=\gamma', and the crystallographic direction for each spin is set along the zz-axis, e⃗hi=z^\vec{e}_{hi}=\hat{z}. We also assume each magnetic moment has the same magnitude, mi=mm_i=m for all nn macrospins. This simplification models an array of perfectly identical macrospins. The simulation can be further simplified to only consider the evolution of the unit magnetic moment m^i\hat{m}_i. Given the assumptions above, we can think of our model as a system of nn identical dynamical bits. At the end of the simulation, a projection on the zz-axis, given by si≡sign⁡(m^i,z)s_i\equiv\operatorname{sign}(\hat{m}_{i,z}), maps the macrospin onto a binary Ising-like spin si=±1s_i=\pm1, as illustrated in Figure 2.

The values of the parameters used in our simulation are listed in Table I. The values we chose here are within those of the fluctuating, the so-called free layer, of magnetic tunnel junction nanopillars [15].

With these parameters, we implement an annealing schedule to mimic the physical cooling of the system from ambient temperature down to the low-temperature regime. Ideally, the annealing schedule should be performed slowly from Tamb=300T_{\mathrm{amb}}=300 to 00 K. In practice, we choose an annealing schedule with nT=30n_T=30 intermediate temperatures T1>T2>⋯>TnTT_1>T_2>\cdots>T_{n_T} drawn from a distribution P(T)∝1/TδP(T)\propto1/T^\delta, with δ=1.1\delta=1.1, in order to have more values in the low temperature regime.

Damping Constantα\alpha0.01
Magnetic Momentmm8×10−19 J/T8\times10^{-19}\,\mathrm{J/T}
Ambient TemperatureTambT_{\mathrm{amb}}300 K
Exchange FieldHexH_{\mathrm{ex}}8.24×103 A/m8.24\times10^3\,\mathrm{A/m}
Anisotropy FieldHAH_A8.24×103 A/m8.24\times10^3\,\mathrm{A/m}
Simulation Time StepΔt\Delta t0.01 ns
Iterations at Each Temperature2×1062\times10^6

Table 1. Values of the parameters chosen for simulation.

Having explained how to simulate the general stochastic-LLG dynamical system, we move next to discuss its application to the SK model.

Results

Here we show the simulation results for the SK model using the LLG dynamics described above. We also run a Glauber dynamics for comparison [10]. The Hamiltonian of the SK model for a nn-spin system is given by:

HSK(s)=−∑⟨i,j⟩nJijnsisj,(11)H_{\mathrm{SK}}(s)=-\sum_{\langle i,j\rangle}^{n}\frac{J_{ij}}{\sqrt{n}}s_i s_j, \tag*{(11)}

where si=±1s_i=\pm1 are Ising spins, JijJ_{ij} is the exchange interaction between the ithi^{\mathrm{th}} and jthj^{\mathrm{th}} spins. Couplings JijJ_{ij} are independent and identically distributed random variables drawn from a Gaussian distribution with zero mean and variance σ2=1\sigma^2=1. The summation only counts a pair of {i,j}\{i,j\} once. The ground state energy Emin⁡=min⁡sHSK(s)E_{\min}=\min_s H_{\mathrm{SK}}(s) has been calculated analytically in the limit of infinite system size n→∞n\to\infty [9] and is given by

lim⁡n→∞Emin⁡n=−0.76321….(12)\lim_{n\to\infty}\frac{E_{\min}}{n}=-0.76321\ldots. \tag*{(12)}

We can map the Hamiltonian HSKH_{\mathrm{SK}} onto our LLG model by directly mapping the JijJ_{ij} terms in Eq. (11) to the JijJ_{ij} terms in Eq. (2). The H⃗ext,i\vec{H}_{\mathrm{ext},i} term in Eq. (4) is set to zero since there is no external field applied in the SK model. With the anisotropy term favoring each spin to align along the zz-axis, e⃗hi=z^\vec{e}_{hi}=\hat{z}, the ground state of the SK model is mapped onto the ground state of the LLG system once we binarize the macrospins using their zz-projections as illustrated in Figure 2. Thus, the analogue LLG Hamiltonian reads

HSKLLG=−2μ0Hex∑⟨i,j⟩nJijm⃗i⋅m⃗jmi+mj(13)H_{\mathrm{SK}}^{\mathrm{LLG}}=-2\mu_0H_{\mathrm{ex}}\sum_{\langle i,j\rangle}^{n}J_{ij}\frac{\vec{m}_i\cdot\vec{m}_j}{m_i+m_j} \tag*{(13)}
−12μ0∑inHAimi(z^⋅m^i)2.-\frac{1}{2}\mu_0\sum_i^n H_{Ai}m_i(\hat{z}\cdot\hat{m}_i)^2 .

We solve the SK model for several system sizes, ranging from n=40n=40 to 2000, using both Glauber and LLG dynamics and record the value of the final energy EE obtained with both methods. As shown in Figure 3, our LLG method performs better, i.e., lower energies are consistently found for any value of nn.

Histograms of the final energies

Figure 3. Histograms of the final energies ⟨E⟩/n\langle E\rangle/n obtained from LLG dynamics (orange bars) and Glauber dynamics (blue bars) for n=1200n = 1200, 16001600, and 20002000. The colored vertical dashed lines represent the average values of the corresponding distributions. To make the histograms we used 300 samples for n=1200n = 1200, 103 for n=1600n = 1600, and 112 for n=2000n = 2000.

In Figure 4 we plot the average ground state energy per spin, ⟨E⟩/n\langle E\rangle/n, obtained from Glauber and LLG as a function of n−2/3n^{-2/3} [16]. We observe that the LLG dynamics results extrapolate to ⟨E⟩/n=−0.762(1)\langle E\rangle/n = -0.762(1) as n→∞n \to\infty, which is very close to the exact optimal value Eq. (12), while the Glauber dynamics results intercept the yy axis at a higher sub-optimal asymptotic value ⟨E⟩/n=−0.755(2)\langle E\rangle/n = -0.755(2).

Average ground state energy per spin

Figure 4. Average ground state energy per spin ⟨E⟩/n\langle E\rangle/n as a function of n−2/3n^{-2/3} [16] for Glauber (blue line) and LLG (orange line) dynamics. The horizontal dashed line represents the asymptotic n→∞n \to\infty exact ground state energy given by Eq. (12). Data points from the LLG dynamics plausibly extrapolate to the true optimal value. Error bars indicate the standard error of the mean energy per spin.

Recently it is has been shown, assuming a widely believed conjecture about the SK model, that there is a polynomial time algorithm for finding (with high probability) a string whose energy is between the lowest energy and (1−ϵ)(1-\epsilon) of the lowest energy of the problem [17]. Our results suggest we can achieve similar performance.

As a point of reference, if the algorithm would get stuck at the critical point of the SK model (at T=1T = 1) the typical energy per spin would be ⟨E⟩/n=−0.5\langle E\rangle/n = -0.5. However, even greedy spin flip dynamics, in which one only accepts flips if they lower the energy, results in a energy of around ⟨E⟩/n≈−0.71\langle E\rangle/n \approx-0.71 and this algorithm terminates in a time of O(n)O(n). In contrast, spectral relaxation in which one binarizes the lowest energy eigenvector of JijJ_{ij} only achieves an energy of ⟨E⟩/n≈−0.637\langle E\rangle/n \approx-0.637 while being computationally more costly [18]. Finally, quantum methods have been proposed to solve the SK problem [20] [19]. In particular, rigorous analysis of the Quantum Approximate Optimization Algorithm (QAOA) in Ref. [20] shows that at p=11p = 11 (with pp being the number of layers in the quantum circuit) one can outperform the spectral relaxation result. Although the limit of p→∞p \to\infty is not established, the results in [20] indicate convergence to the Parisi value like 1/pα1/p^\alpha where α=O(1)\alpha= O(1). However, the cost of evaluating the circuit parameters is of O(16p)O(16^p) such that one incurs an exponential cost in 1/ϵ1/\epsilon in order to get ϵ\epsilon close to the ground state. While this cost might be brought down, it would currently be prohibitively expensive to reach the LLG results as pp would have to be about p∼40p \sim40. Interestingly, the LLG dynamics is simply the semi-classical approximation of the real quantum dynamics of these spins, suggesting that we still have much to learn about these quantum algorithms.

As in the case of quantum annealing, our method is important because it offers the possibility of being realized experimentally in the lab by means of arrays of magnetic tunnel junction devices, whose physical dynamics is governed precisely by the LLG equations. These devices operate at nanosecond timescales and consume little power. Interesting future research directions would be to understand the statistical limits of the robustness of our method across different choices of the system’s parameters, as well as the inclusion of 3-spin interactions to solve 3-SAT problems, which are of central importance in the vast context that stretches from artificial intelligence, to cryptography, and operations research.

Acknowledgements. We thank Jonathan Z. Sun and Daniel L. Stein for helpful discussions. This work was supported in part through the NYU IT High Performance Computing resources, services, and staff expertise. This research was supported by the Office of Naval Research (ONR) under Award No. N00014-23-1-2771. The Flatiron Institute is a division of the Simons Foundation. We acknowledge support from Air Force Office of Scientific Research(AFOSR): Grant FA9550-21-1-0236.

References

  1. [1]M. Mezard and A. Montanari, Information, Physics, and Computation (Oxford University Press, Inc., USA, 2009).DOI
  2. [2]F. Krzakala, F. Ricci-Tersenghi, L. Zdeborova, R. Zecchina, E. W. Tramel, and L. F. Cugliandolo, Statistical Physics, Optimization, Inference, and Message-Passing Algorithms: Lecture Notes of the Les Houches School of Physics: Special Issue, October 2013 (Oxford University Press, 2015).DOI
  3. [3]C. Moore and S. Mertens, The Nature of Computation (Oxford University Press, 2011).DOI
  4. [4]Y. Fu and P. W. Anderson, Application of statistical mechanics to np-complete problems in combinatorial optimization, Journal of Physics A: Mathematical and General 19, 1605 (1986).DOI
  5. [5]S. Kirkpatrick, C. D. Gelatt, and M. P. Vecchi, Optimization by simulated annealing, Science 220, 671 (1983).
  6. [6]N. Mohseni, P. L. McMahon, and T. Byrnes, Ising machines as hardware solvers of combinatorial optimization problems, Nature Rev. Phys. 4, 363 (2022).arxiv.org/abs/2204.00276
  7. [7]D. Sherrington and S. Kirkpatrick, Solvable model of a spin-glass, Phys. Rev. Lett. 35, 1792 (1975).
  8. [8]S. Arora, E. Berger, E. Hazan, G. Kindler, and M. Safra, On non-approximability for quadratic programs, in Proceedings - 46th Annual IEEE Symposium on Foundations of Computer Science, FOCS 2005, Proceedings - Annual IEEE Symposium on Foundations of Computer Science, FOCS (2005) pp. 206–215, 46th Annual IEEE Symposium on Foundations of Computer Science, FOCS 2005 ; Conference date: 23-10-2005 Through 25-10-2005.
  9. [9]G. Parisi, The order parameter for spin glasses: a function on the interval 0-1, Journal of Physics A: Mathematical and General 13, 1101 (1980).
  10. [10]R. J. Glauber, Time-Dependent Statistics of the Ising Model, Journal of Mathematical Physics 4, 294 (1963).DOI
  11. [11]E. M. Lifshitz and L. P. Pitaevskii, Statistical physics part 2, (1980).
  12. [12]W. F. Brown, Thermal Fluctuations of a Single-Domain Particle, Physical Review 130, 1677 (1963).
  13. [13]J. L. García-Palacios and F. J. Lázaro, Langevin-dynamics study of the dynamical properties of small magnetic particles, Phys. Rev. B 58, 14937 (1998).
  14. [14]S. Ament, N. Rangarajan, A. Parthasarathy, and S. Rakheja, Solving the stochastic Landau-Lifshitz-Gilbert-Slonczewski equation for monodomain nano-magnets : A survey and analysis of numerical techniques, arXiv: Computational Engineering, Finance, and Science (2016).
  15. [15]A. D. Kent and D. C. Worledge, A new spin on magnetic memories, Nature Nanotechnology 10, 187 (2015).DOI
  16. [16]G. Parisi, F. Ritort, and F. Slanina, Several results on the finite-size corrections in the sherrington-kirkpatrick spin-glass model, Journal of Physics A: Mathematical and General 26, 3775 (1993).
  17. [17]A. Montanari, Optimization of the sherrington-kirkpatrick hamiltonian, in 2019 IEEE 60th Annual Symposium on Foundations of Computer Science (FOCS 2019) pp. 1417–1433.arxiv.org/abs/1812.10897
  18. [18]M. Aizenman, J. L. Lebowitz, and D. Ruelle, Some rigorous results on the sherrington-kirkpatrick spin glass model, Communications in Mathematical Physics 112, 3 (1987). H. Putterman, C. Quintana, P. Roushan, N. C. Rubin, D. Sank, A. Skolik, V. Smelyanskiy, D. Strain, M. Streif, M. Szalay, A. Vainsencher, T. White, Z. J. Yao, P. Yeh, A. Zalcman, L. Zhou, H. Neven, D. Bacon, E. Lucero, E. Farhi, and R. Babbush, Quantum approximate optimization of non-planar graph problems on a planar superconducting processor, Nature Physics 17, 332 (2021).
  19. [20]E. Farhi, J. Goldstone, S. Gutmann, and L. Zhou, The Quantum Approximate Optimization Algorithm and the Sherrington-Kirkpatrick Model at Infinite Size, Quantum 6, 759 (2022).DOI

Paper details

vlnc:W_xs7easaq
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 11

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Physics and Astronomy

Not recorded for this paper

View statement
Looking for related papers…
Contents