Efficient Combinatorial Optimization via Heat Diffusion
Hengyuan Ma1,
Wenlian Lu1,2,3,4,5,6,
Jianfeng Feng1,2,3,4,7
1 Institute of Science and Technology for Brain-inspired Intelligence, Fudan University, Shanghai 200433, China
2 Key Laboratory of Computational Neuroscience and Brain-Inspired Intelligence (Fudan University), Ministry of Education, China
3 School of Mathematical Sciences, Fudan University, No. 220 Handan Road, Shanghai, 200433, Shanghai, China
4 Shanghai Center for Mathematical Sciences, No. 220 Handan Road, Shanghai, 200433, Shanghai, China
5 Shanghai Key Laboratory for Contemporary Applied Mathematics, No. 220 Handan Road, Shanghai, 200433, Shanghai, China
6 Key Laboratory of Mathematics for Nonlinear Science, No. 220 Handan Road, Shanghai, 200433, Shanghai, China
7 Department of Computer Science, University of Warwick, Coventry, CV4 7AL, UK
[email protected]
Abstract
Combinatorial optimization problems are widespread but inherently challenging due to their discrete nature. The primary limitation of existing methods is that they can only access a small fraction of the solution space at each iteration, resulting in limited efficiency for searching the global optimal. To overcome this challenge, diverging from conventional efforts of expanding the solver’s search scope, we focus on enabling information to actively propagate to the solver through heat diffusion. By transforming the target function while preserving its optima, heat diffusion facilitates information flow from distant regions to the solver, providing more efficient navigation. Utilizing heat diffusion, we propose a framework for solving general combinatorial optimization problems. The proposed methodology demonstrates superior performance across a range of the most challenging and widely encountered combinatorial optimizations. Echoing recent advancements in harnessing thermodynamics for generative artificial intelligence, our study further reveals its significant potential in advancing combinatorial optimization. The codebase of our study is available in https://github.com/AwakerMhy/HeO.
1 Introduction
Combinatorial optimization problems are prevalent in various applications, encompassing circuit design [1], machine learning [2], computer vision [3], molecular dynamics simulation [4], traffic flow optimization [5], and financial risk analysis [6]. This widespread application creates a significant demand for accelerated solutions to these problems. Alongside classical algorithms, which encompass both exact solvers and metaheuristics [7], recent years have seen remarkable advancements in addressing combinatorial optimization. These include quantum adiabatic approaches [8, 9, 10], simulated bifurcation [11, 12, 13], coherent Ising machine [14, 15], high-order Ising machine [16], and deep learning techniques [17, 18]. However, due to the exponential growth of the solution number, finding the optima within a limited computational budget remains a daunting challenge.
Our primary focus is on iterative approximation solvers, which constitute a significant class of combinatorial optimization methods. An iterative approximation solvers typically begin with an initial solution and iteratively improve it by finding better solutions within the neighborhood of the current solution, known as the search scope or more vividly, receptive field. However, due to combinatorial explosion, as the scope of the receptive field increases, the number of solutions to be assessed grows exponentially, making a thorough evaluation of all these solutions expensive. As a result, current approaches are limited to a narrow receptive field, rendering them blind to distant regions in the solution space and heightening the risk of getting trapped in local minimas or areas with bumpy landscapes. Although methods like large neighborhood search [19], variable neighborhood search [20] and path auxiliary sampling [21] are designed to broaden the search scope, they can only gather a modest increment of information from the expanded search scope. Consequently, the current solvers’ receptive field remains significantly constrained, impeding their efficiency.
In this study, we approach the prevalent limitation stated above from a unique perspective. Instead of expanding the solver’s receptive field to acquire more information from the solution space, we concentrate on propagating information from distant areas of the solution space to the solver via heat diffusion [22]. To illustrate, imagine a solver searching for the optima in the solution space akin to a person searching for a key in a dark room, as depicted in Fig. 1. Without light, the person is compelled to rely solely on touching his surrounding space. The tactile provides only localized information, leading to inefficient navigation. This mirrors the current situation in combinatorial optimization, wherein the receptive field is predominantly confined to local information. However, if the key were to emit heat, its radiating warmth would be perceptible from a distance, acting as a directional beacon. This would significantly enhance navigational efficiency for finding the key.
Motivated by the above metaphor, we propose a simple but efficient framework utilizing heat diffusion to solve various combinatorial optimization problems. Heat diffusion transforms the target function into different versions, within which the information from distant regions actively flow toward the solver. Crucially, the backward uniqueness of the heat equation [23] guarantees that the original problem’s optima are unchanged under these transformations. Therefore, information of target functions under different heat diffusion transformations can be cooperatively employed for optimize the original problem (Fig. 1). Empirically, our framework demonstrates superior performance compared to advanced algorithms across a diverse range of combinatorial optimization instances, spanning quadratic to polynomial, binary to ternary, unconstrained to constrained, and discrete to mixed-variable scenarios. Mirroring the recent breakthroughs in generative artificial intelligence through diffusion processes [24], our research further reveals the potential of heat diffusion, a related thermodynamic phenomenon, in enhancing combinatorial optimization.
2 Failure of gradient-based combinatorial optimization
We will first formulate the general combinatorial optimization problem and then reframe it in a gradient descent-based manner. This reformulation allows us to utilize heat diffusion later. Various combinatorial optimization problems can be naturally formalized as a pseudo-Boolean optimization (PBO) problem [25], in which we aim to find the minima of a real-value target function subjecting to a binary constraints
(1) |
where is binary configuration (bits), and is the target function. Through the transformation , our definition aligns with that in [26], where elements of take or . Given the advanced development of gradient-based algorithms, we are interested in converting the discrete optimization problem into a differentiable one, thereby enabling gradient descent. To achieve this purpose, we encode the bits , as independent Bernoulli variables with . In this way, we convert the original combinatorial optimization problem into
(2) |
where , and . The minima of Eq. (2) is , given that is a minima of the original problem Eq. (1). Here, is the element-wise sign function. Now Eq. (2) can be solved through gradient descent starting from a given initial
(3) |
where is the learning rate and is the iteration number. Unfortunately, this yields a probability distribution over the configuration space , instead of a deterministic binary configuration as desired. Although we can manually binarize through to get the binary configuration which maximizes probability , the outcome may be much higher than , resulting in significant performance degradation [27]. This suggests that a good gradient-based optimizer should efficiently diminish the uncertainty in the output distribution , which can be measured by its total variance
(4) |
2.1 Monte Carlo gradient estimation
Conventionally, we can solve the problem Eq. (2) by approximating the gradient of via Monte Carlo gradient estimation (MCGE) [28] (Alg. 2, Appendix), in which we estimate the gradient in Eq. (3) as
(5) |
where . However, it turns out that MCGE performs poorly even equipped with momentum, compared to existing solvers such as simulated annealing and Hopfield neural network, as shown in Fig. 2. We interpret this result as follows. Although MCGE turns the combinatorial optimization problem into a differentiable one, it does not reduce any inherent complexity of the original problem, which may contains a convoluted landscape. As gradient only provides local information, MCGE is susceptible to be trapped in local minimas.
3 Heat diffusion optimization
The inferior performance of the MCGE is attributed to the narrow receptive field of the gradient descent. To overcome this drawback, we manage to provide more efficient navigation to the solver by employing heat diffusion [29], which propagates information from distant region to the solver. Intuitively, consider the parameter space as a thermodynamic system, where each parameter is referred to as a location and is associated with an initial temperature value , as shown in Fig. 1. Then the optimization procedure can be described as the process that the solver is walking around the parameter space to find the location with the highest temperature (or equivalently, the global minima of ). As time progresses, heat flows obeying the Newton’s law of cooling, leading to an evolution of the temperature distribution across time. The heat at flows towards surrounding areas, ultimately reaching the solver’s location. This provides valuable information for the solver, as it can trace the direction of heat flow to locate the .
3.1 Heat diffusion on the parameter space
Now we introduce heat diffusion for combinatorial optimization. We extent the parameter space of from to with . To keep the probabilistic distribution meaningful for , we now redefine , where the clamp function is calculated as . Denote the temperature at location and time as , which is the solution to the following unbounded heat equation [29]
(6) |
where is the Laplacian operator: . For , we define , where is a sequence in converged to . Heat equation in the combinatorial optimization exhibits two beneficial characteristics. Firstly, the propagation speed of heat is infinite [22], implying that the information can reach the solver instantaneously. Secondly, the location of the global minima does not change across time , as demonstrated in the following theorem.
Theorem 1.
For any , the function and has the same global minima in
(7) |
Consequentially, we can generalize the gradient descent approach Eq. (3) by substituting the function with for different at different iteration step in Eq. (3), as follows
(8) |
where the subscript ’t’ in means that can vary across different steps. In this way, the solver can receive the gradient information about distant region of the landscape that is propagated by the heat diffusion, resulting in a more efficient navigation. However, Eq. (8) will converge to , since are unbounded. To make the procedure Eq. (8) practicable, we project the back to after gradient descent at each iteration
(9) |
so that always holds, where we define the projection as for and for . Eq. (9) is a reasonable update rule for finding the minimum within for the following two reasons: (1) The projection of the is the minimum of in , i.e., ; (2) Due to the property of the projection, if the solver moves towards , it also gets closer to . More importantly, since the coordinates of are all infinite, the convergent point of Eq. (9) must be one of the vertices of , i.e., . This suggests that Eq. (9) tends to give an output that diminishes the uncertainty (Eq. (4)).
3.2 Solving the heat equation
To develop an algorithm for solving the combinatorial optimization problem from Eq. (9), we must solve the heat equation Eq. (6), which seems a significant challenge when the dimension is high. Fortunately, the solution has a closed form if the target function can be written as a multi-linear polynomial of
(10) |
a condition met by a wide range of combinatorial optimization problems [16].
Theorem 2.
Supposed that is a multilinear polynomial of , then the solution to Eq. (6) is
(11) |
where is the error function.
For more general cases, we still use the approximation Eq. (11).
3.3 Proposed algorithm
Based on Eq. (9) and Thm. 2, we proposed Heat diffusion optimization (HeO), a gradient-based algorithm for combinatorial optimization, as illustrated in Alg. 1, where we estimate Eq. (11) with one sample , and we denote for short. Our HeO can be equipped with momentum, which is shown in Alg. 3 in Appendix. In contrast to those methods designed for solving special class of PBO (Eq. (1)) such as quadratic unconstrained binary optimization (QUBO), our HeO can directly solve PBO problems with general form. Although PBO can be represented as QUBO [30], this necessitates the introduction of auxiliary variables, which may consequently increase the problem size and leading to additional computational overhead [31]. Compared to other algorithms, our HeO has relatively low complexity. The most computationally intensive operation at each step is gradient calculation, which can be explicitly expressed or efficiently computed with tools like PyTorch’s autograd, and can be accelerated using GPUs. As shown in Fig. S1 of the in Appendix, the time cost per iteration of our methods increases linearly with the problem dimension, with a small constant coefficient. Since the overall computational time mainly depends on the number of iterations times the time cost per iteration, our HeO is efficient even in high-dimensional cases.
One counter-intuitive thing is that to minimize the target function , the HeO actually are minimizing different functions at different step . We interpret this by providing an upper bound for the target optimization loss .
Theorem 3.
Denote . Given and , there exists , such that
(12) |
Accordingly, minimizing for each cooperatively aids in minimizing the original target function . Thus, we refer to HeO as a cooperative optimization paradigm, as illustrated in Fig. 1.
4 Experiments
We apply our HeO to a variety of NP-hard combinatorial optimization problems to demonstrate its broad applicability. Unless explicitly stated otherwise, we employ the schedule as for HeO throughout this work. The sensitivity of other parameter settings including the step size and iterations are shown in Fig. S2 This choice is motivated by the idea that the reversed direction of heat flow guides the solver towards the original of its source, i.e., the global minima. Noticed that this choice is not theoretically necessary, as elaborated in Discussion.
Toy example. We consider the following target function
(13) |
where , and the elements of the network parameters , , are uniformly sampled from and fixed during optimizing. According to the universal approximation theory [32], can approximate any continuous function with sufficiently large , thereby representing a general target function. We compare the performance of our HeO with momentum (Alg. 3) against several representative methods: the conventional gradient-based solver MCGE [28] (with or without momentum), the simulated annealing [33], and the Hopfield neural network [34]. As shown in Fig. 2, our HeO demonstrates exceptional superiority over all other methods, and efficiently reduces its uncertainty compared to MCGE.
Quadratic unconstrained binary optimization (QUBO). QUBO is the combinatorial optimization problem with quadratic form target function ( is a symmetric matrix with zero diagonals)
(14) |
This corresponds to the case where in Eq. (10). A well-known class of QUBO is max-cut problem [27], in which we divide the vertices of a graph into two distinct subsets and aim to maximize the number of edges between them. Its target function is expressed as Eq. (14), where is determined by the adjacency matrix of the graph.
We compare our HeO with representative iterative approximation methods especially developed for solving QUBO including LQA [10], aSB [12], bSB [13], dSB [13], CIM [35], and SIM-CIM [15] on max-cut problems in the Biq Mac Library [36]111https://biqmac.aau.at/biqmaclib.html. We report the relative loss averaged over all instances and the count of the instances where each algorithm gives the bottom-2 worse result among the 7 algorithms. As shown in Fig. 3, our HeO is superior to other methods in terms of two metrics.
Polynomial unconstrained binary optimization (PUBO). PUBO is a class of combinatorial optimization problems, in which higher-order interactions between bits appears in the target function. Existing methods for solving PUBO fall into two categories: the first approach involves transforming PUBO into QUBO by adding auxiliary variables through a quadratization process, and then solving it as a QUBO problem [38], and the one directly solves PUBO [16]. Quadratization may dramatically increases the dimension of the problem, hence brings heavier computational overhead, while our HeO can be directly used for solving PUBO. A well-known class of PUBO is the Boolean -satisfiability (-SAT) problem [27], which involves determining the satisfiability of a Boolean formula over Boolean variables where . The Boolean formula is structured in Conjunctive Normal Form (CNF) consisting of conjunction () of clauses, and each clause is a disjunction () of exactly three literals (either a Boolean variable or its negation). An algorithm of -SAT aims to find the Boolean variables that makes as many as clauses satisfied.
To apply our HeO to the 3-SAT, we encode each Boolean variable as , which is assigned with value if , otherwise . For a literal, we define a value , which is if the literal is the negation of the corresponding Boolean variable, otherwise it is . Then finding the Boolean variables that satisfies as many as clauses is equivalent to minimize the target function
(15) |
This corresponds to the case where in Eq. (10). We compared our HeO (Alg. 4, Appendix) with the second-order oscillator Ising machines (OIM) solver that using quadratization and the state-of-art 3-order OIM proposed in [16] on 3-SAT instance in SATLIB 222https://www.cs.ubc.ca/~hoos/SATLIB/benchm.html. As shown in Fig. 4, our HeO is superior to other methods in attaining higher quality of solutions and finding more the complete satisfiable solution (solutions that satisfying all clauses). Notably, for the cases of 175-250 variables, our HeO is able to find more complete satisfiable solutions, compared to the 3-order OIM, while the 2-order OIM fails to find any complete solutions [16].
Ternary optimization. Neural networks excel in learning and modeling complex functions, but they also bring about considerable computational demands due to their vast number of parameters. A promising strategy to mitigate this issue is quantization, which converts network parameters into discrete values [39]. However, directly training networks with discrete parameters introduces a significant challenge due to the high-dimensional combinatorial optimization problem it presents.
We apply our HeO and MCGE to directly train neural networks with ternary value (). Supposed that we have an input-output dataset generated by a ground-truth ternary single-layer perceptron , where , is the ground-truth ternary weight parameter, is the input, and is the model output. We aim to find the ternary configuration minimizing the loss . We generalize our HeO from the binary to the ternary case by representing a ternary variable with two bits, where each element of can be represented as a function of (see Alg. 5, Appendix for details), and the target function is defined as
(16) |
As shown in Fig. 5, HeO robustly exceeds MCGE under different dataset size and output size .
Mixed combinatorial optimization. In high-dimensional linear regression, usually only a small fraction of the variables significantly contribute to prediction. Identifying and selecting a subset of variables with strong predictive power—a process known as variable selection—is crucial, as it improves the generalizability and interpretability of the regression model [42]. However, direct variable selection is an NP-hard combinatorial optimization mixed with continuous variables [43]. As a practical alternative, regularization methods like Lasso algorithm are commonly employed [40].
Supposed a dataset is generated from a linear model, in which the relation between input and output is , where is the ground-truth linear coefficient and is independent Gaussian noise with standard deviation . Suppose that only a small proportion (denoted as ) of coordinates in are non-zero. Our goal is to identify these coordinates through an indicator vector ( for selection and for non-selection) and estimate these non-zero coefficients. The target function of the problem is ( is the all-one vector)
(17) |
We solve the problem through HeO (Alg. 6, Appendix), where we minimize the loss relative to while slowing varying via its error gradient. After obtaining the indicator , we conduct an ordinary least squares regression on the variables selected by the to estimate their coefficients, and treat other variables’ coefficients as zero. As shown in Fig.6, our HeO outperforms both Lasso regression and the more advanced regression [41] in terms of producing more accurate indicators and achieving lower test prediction errors across various and settings. Importantly, to give the variable selection prediction, our HeO does not need to know the level of and in advance.
Graph name | Vertex number | Edge number | FastVC | HeO |
---|---|---|---|---|
tech-RL-caida | 190914 | 607610 | 78306 | 77372 (17) |
soc-youtube | 495957 | 1936748 | 149458 | 148875 (25) |
inf-roadNet-PA | 1087562 | 1541514 | 588306 | 587401 (104) |
inf-roadNet-CA | 1957027 | 2760388 | 1063352 | 1061339 (32) |
socfb-B-anon | 2937612 | 20959854 | 338724 | 312531 (194) |
socfb-A-anon | 3097165 | 23667394 | 421123 | 387730 (355) |
socfb-uci-uni | 58790782 | 92208195 | 869457 | 867863 (36) |
Constrained binary optimization.
Minimum vertex cover (MVC) is a class of the constrained combinatorial optimization which has wide applications [44], as illustrated in Fig. 7. Given an undirected graph with vertex set and edge set , the MVC is to find the minimum subset , so that for each edge , at least one of its endpoints belongs to . The target function and the constrains are expressed as
(18) |
We combine the HeO with penalty function (Alg. 7, Appendix) for solving MVC. We compare our HeO with FastVC [45], a powerful MVC heuristic algorithm, on massive real world graph datasets 333http://networkrepository.com/. For a fair comparison, we keep the run time of two algorithms as the same for each dataset. As shown in Tab. 1, our HeO can find smaller cover sets than that of FastVC.
5 Discussion
Existing model-based combinatorial optimization approaches encode the solution space via a parameterized distribution with iterative parameter updates [46]. In contrast to HeO, which requires only one sample per iteration, they necessitate a large number of samples per iteration. The Gibbs-With-Gradient algorithm [47] uses gradient information for combinatorial optimization but searches in the discrete solution space instead of the continuous one, as did HeO. Denoising diffusion model (DDM) [24] has been applied for solving combinatorial optimization problems [48]. Although the diffusion process in DDMs akin to the heat diffusion in our HeO, DDMs require a substantial data for training and necessitate reversing the diffusion process to generate data that from the target distribution. In contrast, HeO needs no training, and it is unnecessary to strictly adhering to the reverse time sequence in the optimization process, as under different , the function shares the same optima with that of the original problem . This claim is empirically corroborated in Fig. S3, Appendix, where HeO applying non-monotonic schedules of still demonstrates superior performance.
Our HeO can be viewed as a stochastic Gaussian continuation (GC) method [49] with projection, which has been applied for non-convex optimization, though it has not yet been used for combinatorial optimization. The optimal convexification of GC [50] underpins potentially theoretical advantages of HeO. One key distinction is that GC typically optimizes each sub-problem (corresponding to ) at each up to some criteria, whereas HeO merely performs a single-step gradient descent. Also, Eq. (8) corresponds to a variation of the evolution strategy (ES), a robust optimizer for non-differentiable function [51], while HeO use a different gradient estimation (Eq. (11)), see Appendix for details. Additionally, our HeO is related to randomized smoothing, which has been applied to non-smooth optimization [52] or neural network regularization [53]. The distinctive feature of our HeO is that, across different , the smoothed function retains the optima of the original function (Thm. 1). This distinguishes our HeO from methods based on quantum adiabatic theory [9], bifurcation theory [12] and other relaxation strategies [54], in which the optima of the smoothed function can be different from the original one [27, 55]. This is empirically verified in Fig. S3, Appendix.
The heat equation in our HeO can be naturally extended to general parabolic differential equations, given that a broad spectrum of them obey the backward uniqueness [56]. For example, we can use to replace the Eq. (6), where is a real positive definite matrix. Prior researches have demonstrated that the optimization procedure can be significantly accelerated by preconditioning [57] or Fisher information matrix [58], implying that choosing a proper matrix could substantially improve the efficacy of the HeO. Additionally, since does not necessarily have to be monotonic due to the cooperative optimization property of HeO, it is feasible to explore various schedules (possibly non-monotonic) to further enhance performance. Moreover, our HeO can be integrated with other existing techniques for combinatorial optimization problems with constraints, such as Augmented Lagrangian methods, to achieve better performance [59].
Despite the effectiveness of HeO on the combinatorial optimization problems from different domains we have considered, it has limitations. First, current HeO is inefficient for integer linear programming and routing problems, primarily due to that it is cumbersome to encode integer variables through the Bernoulli distribution in our framework. Nevertheless, integrating HeO with other techniques such as advanced Metropolis-Hastings algorithm [60] may path to broaden the applicability of our methodology to a wider range of combinatorial optimization problems. Besides, our HeO allows for further customization by incorporating additional terms that integrate problem-specific prior knowledge or by hybridizing with other metaheuristic algorithms, allowing for more effective exploration of the configuration space. Second, our HeO can not be theoretically guaranteed for converging to the global minimum. In general, finding the global minimum is not theoretically guaranteed for non-convex optimization problems [61], such as the combinatorial optimization problems studied in this paper. However, it can be demonstrated that the gradient of the target function under heat diffusion satisfies the inequality [22]:
where the constant depends on the dimension. This implies that the target function becomes weakly convex, enabling the finding of global minima and faster convergence under certain conditions [62].
6 Conclusion
In conclusion, grounded in the heat diffusion, we present a framework called Heat diffusion optimization (HeO) to solve various combinatorial optimization problems. The heat diffusion facilitates the propagation of information from distant regions to the solver, expanding its receptive field, which in turn enhances its ability to search for global optima. Demonstrating exceptional performance across various scenarios, our HeO highlights the potential of utilizing heat diffusion to address challenges associated with navigating the solution space of combinatorial optimization.
References
- [1] Francisco Barahona, Martin Grötschel, Michael Jünger, and Gerhard Reinelt. An application of combinatorial optimization to statistical physics and circuit layout design. Operations Research, 36(3):493–513, 1988.
- [2] Jun Wang, Tony Jebara, and Shih-Fu Chang. Semi-supervised learning using greedy max-cut. The Journal of Machine Learning Research, 14(1):771–800, 2013.
- [3] Chetan Arora, Subhashis Banerjee, Prem Kalra, and SN Maheshwari. An efficient graph cut algorithm for computer vision problems. In Computer Vision–ECCV 2010: 11th European Conference on Computer Vision, Heraklion, Crete, Greece, September 5-11, 2010, Proceedings, Part III 11, pages 552–565. Springer, 2010.
- [4] Hayato Ushijima-Mwesigwa, Christian FA Negre, and Susan M Mniszewski. Graph partitioning using quantum annealing on the d-wave system. In Proceedings of the Second International Workshop on Post Moores Era Supercomputing, pages 22–29, 2017.
- [5] Florian Neukart, Gabriele Compostella, Christian Seidel, David Von Dollen, Sheir Yarkoni, and Bob Parney. Traffic flow optimization using a quantum annealer. Frontiers in ICT, 4:29, 2017.
- [6] Román Orús, Samuel Mugel, and Enrique Lizaso. Quantum computing for finance: Overview and prospects. Reviews in Physics, 4:100028, 2019.
- [7] Rafael Marti and Gerhard Reinelt. Exact and Heuristic Methods in Combinatorial Optimization, volume 175. Springer, 2022.
- [8] Edward Farhi, Jeffrey Goldstone, Sam Gutmann, Joshua Lapan, Andrew Lundgren, and Daniel Preda. A quantum adiabatic evolution algorithm applied to random instances of an np-complete problem. Science, 292(5516):472–475, 2001.
- [9] John A Smolin and Graeme Smith. Classical signature of quantum annealing. Frontiers in physics, 2:52, 2014.
- [10] Joseph Bowles, Alexandre Dauphin, Patrick Huembeli, José Martinez, and Antonio Acín. Quadratic unconstrained binary optimization via quantum-inspired annealing. Physical Review Applied, 18(3):034016, 2022.
- [11] Mária Ercsey-Ravasz and Zoltán Toroczkai. Optimization hardness as transient chaos in an analog approach to constraint satisfaction. Nature Physics, 7(12):966–970, 2011.
- [12] Hayato Goto, Kosuke Tatsumura, and Alexander R Dixon. Combinatorial optimization by simulating adiabatic bifurcations in nonlinear hamiltonian systems. Science advances, 5(4):eaav2372, 2019.
- [13] Hayato Goto, Kotaro Endo, Masaru Suzuki, Yoshisato Sakai, Taro Kanao, Yohei Hamakawa, Ryo Hidaka, Masaya Yamasaki, and Kosuke Tatsumura. High-performance combinatorial optimization based on classical mechanics. Science Advances, 7(6):eabe7953, 2021.
- [14] Takahiro Inagaki, Yoshitaka Haribara, Koji Igarashi, Tomohiro Sonobe, Shuhei Tamate, Toshimori Honjo, Alireza Marandi, Peter L McMahon, Takeshi Umeki, Koji Enbutsu, et al. A coherent ising machine for 2000-node optimization problems. Science, 354(6312):603–606, 2016.
- [15] Egor S Tiunov, Alexander E Ulanov, and AI Lvovsky. Annealing by simulating the coherent ising machine. Optics express, 27(7):10288–10295, 2019.
- [16] Connor Bybee, Denis Kleyko, Dmitri E Nikonov, Amir Khosrowshahi, Bruno A Olshausen, and Friedrich T Sommer. Efficient optimization with higher-order ising machines. Nature Communications, 14(1):6033, 2023.
- [17] Martin JA Schuetz, J Kyle Brubaker, and Helmut G Katzgraber. Combinatorial optimization with physics-inspired graph neural networks. Nature Machine Intelligence, 4(4):367–377, 2022.
- [18] Bernardino Romera-Paredes, Mohammadamin Barekatain, Alexander Novikov, Matej Balog, M Pawan Kumar, Emilien Dupont, Francisco JR Ruiz, Jordan S Ellenberg, Pengming Wang, Omar Fawzi, et al. Mathematical discoveries from program search with large language models. Nature, pages 1–3, 2023.
- [19] David Pisinger and Stefan Ropke. Large neighborhood search. Handbook of metaheuristics, pages 99–127, 2019.
- [20] Pierre Hansen, Nenad Mladenović, and Jose A Moreno Perez. Variable neighbourhood search: methods and applications. Annals of Operations Research, 175:367–407, 2010.
- [21] Haoran Sun, Hanjun Dai, Wei Xia, and Arun Ramamurthy. Path auxiliary proposal for mcmc in discrete space. In International Conference on Learning Representations, 2021.
- [22] Lawrence C Evans. Partial differential equations, volume 19. American Mathematical Society, 2022.
- [23] Jean-Michel Ghidaglia. Some backward uniqueness results. Nonlinear Analysis: Theory, Methods & Applications, 10(8):777–790, 1986.
- [24] Ling Yang, Zhilong Zhang, Yang Song, Shenda Hong, Runsheng Xu, Yue Zhao, Wentao Zhang, Bin Cui, and Ming-Hsuan Yang. Diffusion models: A comprehensive survey of methods and applications. ACM Computing Surveys, 56(4):1–39, 2023.
- [25] Endre Boros and Peter L Hammer. Pseudo-boolean optimization. Discrete applied mathematics, 123(1-3):155–225, 2002.
- [26] Yves Crama and Peter L Hammer. Boolean functions: Theory, algorithms, and applications. Cambridge University Press, 2011.
- [27] Bernhard H Korte, Jens Vygen, B Korte, and J Vygen. Combinatorial optimization, volume 1. Springer, 2011.
- [28] Shakir Mohamed, Mihaela Rosca, Michael Figurnov, and Andriy Mnih. Monte carlo gradient estimation in machine learning. The Journal of Machine Learning Research, 21(1):5183–5244, 2020.
- [29] David Vernon Widder. The heat equation, volume 67. Academic Press, 1976.
- [30] Avradip Mandal, Arnab Roy, Sarvagya Upadhyay, and Hayato Ushijima-Mwesigwa. Compressed quadratization of higher order binary optimization problems. In Proceedings of the 17th ACM International Conference on Computing Frontiers, pages 126–131, 2020.
- [31] Martin Anthony, Endre Boros, Yves Crama, and Aritanan Gruber. Quadratic reformulations of nonlinear binary optimization problems. Mathematical Programming, 162:115–144, 2017.
- [32] George Cybenko. Approximation by superpositions of a sigmoidal function. Mathematics of control, signals and systems, 2(4):303–314, 1989.
- [33] Michel Gendreau, Jean-Yves Potvin, et al. Handbook of metaheuristics, volume 2. Springer, 2010.
- [34] John J Hopfield and David W Tank. “neural” computation of decisions in optimization problems. Biological cybernetics, 52(3):141–152, 1985.
- [35] Zhe Wang, Alireza Marandi, Kai Wen, Robert L Byer, and Yoshihisa Yamamoto. Coherent ising machine based on degenerate optical parametric oscillators. Physical Review A, 88(6):063853, 2013.
- [36] Angelika Wiegele. Biq mac library—a collection of max-cut and quadratic 0-1 programming instances of medium size. Preprint, 51, 2007.
- [37] Holger H Hoos and Thomas Stützle. Satlib: An online resource for research on sat. Sat, 2000:283–292, 2000.
- [38] Andrew Lucas. Ising formulations of many np problems. Frontiers in physics, 2:5, 2014.
- [39] Amir Gholami, Sehoon Kim, Zhen Dong, Zhewei Yao, Michael W Mahoney, and Kurt Keutzer. A survey of quantization methods for efficient neural network inference. In Low-Power Computer Vision, pages 291–326. Chapman and Hall/CRC, 2022.
- [40] Robert Tibshirani. Regression shrinkage and selection via the lasso. Journal of the Royal Statistical Society Series B: Statistical Methodology, 58(1):267–288, 1996.
- [41] Zongben Xu, Hai Zhang, Yao Wang, XiangYu Chang, and Yong Liang. L 1/2 regularization. Science China Information Sciences, 53:1159–1169, 2010.
- [42] Trevor Hastie, Robert Tibshirani, Jerome H Friedman, and Jerome H Friedman. The elements of statistical learning: data mining, inference, and prediction, volume 2. Springer, 2009.
- [43] Xiaoping Li, Yadi Wang, and Rubén Ruiz. A survey on sparse learning models for feature selection. IEEE transactions on cybernetics, 52(3):1642–1660, 2020.
- [44] Alexander C Reis, Sean M Halper, Grace E Vezeau, Daniel P Cetnar, Ayaan Hossain, Phillip R Clauer, and Howard M Salis. Simultaneous repression of multiple bacterial genes using nonrepetitive extra-long sgrna arrays. Nature biotechnology, 37(11):1294–1301, 2019.
- [45] Shaowei Cai, Jinkun Lin, and Chuan Luo. Finding a small vertex cover in massive sparse graphs: Construct, local search, and preprocess. Journal of Artificial Intelligence Research, 59:463–494, 2017.
- [46] Enlu Zhou and Jiaqiao Hu. Gradient-based adaptive stochastic search for non-differentiable optimization. IEEE Transactions on Automatic Control, 59(7):1818–1832, 2014.
- [47] Will Grathwohl, Kevin Swersky, Milad Hashemi, David Duvenaud, and Chris Maddison. Oops i took a gradient: Scalable sampling for discrete distributions. In International Conference on Machine Learning, pages 3831–3841. PMLR, 2021.
- [48] Zhiqing Sun and Yiming Yang. Difusco: Graph-based diffusion solvers for combinatorial optimization. Advances in neural information processing systems, 2023.
- [49] Hossein Mobahi and John Fisher III. A theoretical analysis of optimization by gaussian continuation. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 29, 2015.
- [50] Hossein Mobahi and John W Fisher. On the link between gaussian homotopy continuation and convex envelopes. In Energy Minimization Methods in Computer Vision and Pattern Recognition: 10th International Conference, EMMCVPR 2015, Hong Kong, China, January 13-16, 2015. Proceedings 10, pages 43–56. Springer, 2015.
- [51] Daan Wierstra, Tom Schaul, Tobias Glasmachers, Yi Sun, Jan Peters, and Jürgen Schmidhuber. Natural evolution strategies. Journal of Machine Learning Research, 15(27):949–980, 2014.
- [52] John C Duchi, Peter L Bartlett, and Martin J Wainwright. Randomized smoothing for stochastic optimization. SIAM Journal on Optimization, 22(2):674–701, 2012.
- [53] Mo Zhou, Tianyi Liu, Yan Li, Dachao Lin, Enlu Zhou, and Tuo Zhao. Toward understanding the importance of noise in training neural networks. In International Conference on Machine Learning, pages 7594–7602. PMLR, 2019.
- [54] Nikolaos Karalias and Andreas Loukas. Erdos goes neural: an unsupervised learning framework for combinatorial optimization on graphs. Advances in Neural Information Processing Systems, 33:6659–6672, 2020.
- [55] Haoyu Peter Wang, Nan Wu, Hang Yang, Cong Hao, and Pan Li. Unsupervised learning for combinatorial optimization with principled objective relaxation. Advances in Neural Information Processing Systems, 35:31444–31458, 2022.
- [56] Jie Wu and Liqun Zhang. Backward uniqueness for general parabolic operators in the whole space. Calculus of Variations and Partial Differential Equations, 58:1–19, 2019.
- [57] Hengyuan Ma, Li Zhang, Xiatian Zhu, and Jianfeng Feng. Accelerating score-based generative models with preconditioned diffusion sampling. In European Conference on Computer Vision, pages 1–16. Springer, 2022.
- [58] Daan Wierstra, Tom Schaul, Tobias Glasmachers, Yi Sun, Jan Peters, and Jürgen Schmidhuber. Natural evolution strategies. The Journal of Machine Learning Research, 15(1):949–980, 2014.
- [59] Ernesto G Birgin and José Mario Martínez. Practical augmented Lagrangian methods for constrained optimization. SIAM, 2014.
- [60] Haoran Sun, Katayoon Goshvadi, Azade Nova, Dale Schuurmans, and Hanjun Dai. Revisiting sampling for combinatorial optimization. In International Conference on Machine Learning, pages 32859–32874. PMLR, 2023.
- [61] Feng-Yi Liao, Lijun Ding, and Yang Zheng. Error bounds, pl condition, and quadratic growth for weakly convex functions, and linear convergences of proximal point methods. In 6th Annual Learning for Dynamics & Control Conference, pages 993–1005. PMLR, 2024.
- [62] Felipe Atenas, Claudia Sagastizábal, Paulo JS Silva, and Mikhail Solodov. A unified analysis of descent sequences in weakly convex optimization, including convergence rates for bundle methods. SIAM Journal on Optimization, 33(1):89–115, 2023.
- [63] Paul Bertens and Seong-Whan Lee. Network of evolvable neural units: Evolving to learn at a synaptic level. arXiv preprint, 2019.
- [64] Juntao Wang, Daniel Ebler, KY Michael Wong, David Shui Wing Hui, and Jie Sun. Bifurcation behaviors shape how continuous physical dynamics solves discrete ising optimization. Nature Communications, 14(1):2510, 2023.
Supplementary Information
1 Proof of theorems
1.1 Proof of Thm. 1
To prove the Thm. 1, we recall the backward uniqueness of the heat equation [23], which asserts that the initial state of a heat equation can be uniquely determined by its state at a time point under mild conditions, as shown in the following theorem.
Theorem S4.
Given two bounded function with domain on . Denote and as the solutions to the heat equation (Eq. (6)) with initial condition and respectively. If there exists a , such that
(S1) |
we have .
Proof of the Thm. 1.
Proof.
We first show that the global minima of is also the global minima of . The cornerstone of the proof is Thm. S4. To utilize the backward uniqueness, we consider a reparameterization of by introducing a random variable . It is easy to see that obeys Bernoulli distribution with probability to be and to be . Replacing by in Eq. (2), we have a new expression of
(S2) |
Since the solution to the heat equation can be represented by the heat kernel, we have [22]
(S3) |
Therefore, we have
(S4) |
Denote , . Noticed that is the solution of the following unbounded heat equation respect to the time and location restricted on the region
(S5) |
hence the latter can be considered as an extension of the former. Since is analytic respect to for , this extension is unique. Therefore, the value of on , uniquely determines the solution of Eq. (S5). Denote as
(S6) |
Then , for any and , and we have
(S7) |
Noticed that for , we have
(S8) |
and the equality is true if and only if is true for . Therefore, if is the one of the minimas of , and we have . Similarly, since
(S9) |
we also have , hence
(S10) |
Due to the backward uniqueness of the heat equation, we have
(S11) |
that is
(S12) |
As a result, is the one of minimas of . Conversely, using Eq. (S7), it is obviously to see that if is one of minimas of , it is also one of minimas of . ∎
1.2 Proof of Thm. 2
Recall Eq. (S3) and use the definition of (see Sec. 2 of the main paper), we have
(S13) |
To construct a low-variance estimation, instead of directly using the Monte Carlo gradient estimation by sampling from and for gradient estimation, we manage to integrate out the stochasticity respect to . Use the reparameterization Eq. (S2) and Eq. (S3), we have
(S14) |
Now we can calculate the inner term . Due to the assumption, the target function can be written as a -order multilinear polynomial of
(S15) |
Integrating respect to each dimension of the Gaussian integral, we have [50]
(S16) |
where
(S17) |
where is the error function. Therefore, we have
(S18) |
where is the element-wise error function.
1.3 Proof of Thm. 3
Proof.
Define the square loss of as
(S19) |
According to the definition of , we have
(S20) |
Define the error function
(S21) |
Then the error function satisfies the following heat equation
(S22) |
Define the energy function of the error function as
(S23) |
Then applying the heat equation and the integration by parts, we have
(S24) |
Hence we have for
(S25) |
Use the Harnack’s inequality [22], we have
(S26) |
combine with Eq. (S25), we have
(S27) |
Using the Minkowski inequality on the measure , we have
(S28) |
Recall the continuity of the heat equation:
(S29) |
Therefore, given , there exists a , such that
(S30) |
Recall Eq. (S27), we then have the error control for :
(S31) |
Noticed that
(S32) |
where , and we prove the theorem. ∎
2 Complexity analysis
We empirically estimate the time cost per iteration of our HeO for problems of different dimension in Fig. S1.
3 Parameter sensitivity analysis
We report the performance of our HeO on a wide range of parameter settings in Fig. S2.
4 Relation to evolution strategy
We show that the update in Eq. (8) is equivalent to a variation of the evolution strategy (ES) which is a robust and powerful algorithm for solving black-box optimization problem [51]. In fact, we have
(S33) |
The random vector corresponds to the stochastic mutation and corresponds to the fitness in Alg. 1 in [63]. In ES, the standard deviation is fixed in general, while in our HeO is varying across time. As shown in Thm. 3, the varying in our HeO offers a theoretical benefit that it controls the upper bound of the optimization result. In contrast, a constant in ES does not provide this benefit. Another difference between our HeO and ES is that we integral out and using Eq. (11) to estimate the gradient, while in ES the gradient is estimated based on sampling .
5 Relation to denoising diffusion models
Our approach, while bearing similarities to the DDM—a highly regarded and extensively utilized artificial generative model [24] that relies on the reverse diffusion process for data generation—differs in key aspects. The DDM necessitates reversing the diffusion process to generate data that from the target distribution. In contrast, it is unnecessary for our HeO to strictly adhering to the reverse time sequence in the optimization process, as under different , the function shares the same optima with that of the original problem . This claim is corroborated in Fig. S3. as shown below, where HeO applying non-monotonic schedules of still demonstrates superior performance. Hence, it is possible to explore diverse schedules to further performance enhancement.
6 Cooperative optimization
Our study suggests that HeO exhibits a distinct cooperative optimization mechanism, setting it apart from current methodologies. Specifically, HeO benefits from the fact that target functions share the same optima as the original problem for any . This characteristic allows the solver to transition between different values during the optimization process, eliminating the necessity for a monotonic schedule. In contrast, traditional methods such as those based on quantum adiabatic theory or bifurcation theory require a linear increase of a control parameter from 0 to 1. This parameter is analogous to in the HeO framework.
To empirically verify the above claim, we introduce a random perturbation to the schedule in Alg. 1, rendering it non-monotonic: , where is uniformly distributed on with controlling the amplitude of the perturbation. For other methods based on quantum adiabatic theory or bifurcation theory, we correspondingly introduce the perturbation as . If an algorithm contains cooperative optimization mechanism, it still works well even when the control parameter is not monotonic, as optimizing the transformed problems under different control parameters cooperatively contributes to optimizing the original problem. As shown in Fig. S3, the performance of other methods are all dramatically deteriorated. In contrast, HeO shows no substantial decline in performance, corroborating that HeO employs a cooperative optimization mechanism.
7 Implementation details
All the experiments are conducted on a single NVIDIA RTX-3090 GPU (24GB) and an Intel(R) Xeon(R) Gold 6226R CPU (2.90GHz). For convenience, we denote .
Monte Carlo gradient estimation for combinatorial optimization. Based on Eq. (5), we construct a combinatorial optimization algorithm using the Monte Carlo gradient estimation (MCGE), as shown in Alg. 2. Noticed that we clamp the parameter in the for numerical stability; additionally, we binarize the to obtain the optimized binary configuration in the end.
Gradient descent with momentum. We provide HeO with momentum in Alg. 3.
Toy example. We set the momentum , learning rate and iteration number for HeO (Alg. 3). For MCGE without momentum, we set , we set 1e-6, momentum , and . For MCGE with momentum, we set momentum as .
Max-cut problem. For solving the max-cut problems from the Biq Mac Library [36], we set the steps for all the algorithms. For HeO, we set and linearly decreases from to for HeO, and we set momentum as zero. For LQA and SIM-CIM, we use the setting in [10]. For bSB, dSB, aSB, and CIM, we apply the settings in [64]. To reduce the fluctuations of the results, for each algorithm and instant , the relative loss is calculated as , where is the lowest output of the algorithm on the instance over 10 tries, and is the lowest output of all 7 the algorithm on the instance . For each test, we estimate the mean and std from 10 runs.
3-SAT problem. For Boolean 3-satisfiability (3-SAT) problem, we set the momentum , , , and linearly decreases from to for HeO. According to the empirical finding that high-order loss function leads to better results [16], we include higher order terms in the target function. However, since
(S34) |
for any , directly introducing higher order term in the is useless. Instead, we adjust the gradient from
(S35) |
to
(S36) |
We consider the 3-SAT problems with various number of variables from the SATLIB [37]. For each number of variables in the dataset, we consider the first 100 instance. We apply the same configuration of that in [16] for both 3-order solver and 2-order oscillation Ising machine solver. The energy gap of the 2-order solver is set as 1. For each test, we estimate the mean and std from 100 runs.
Ternary-value neural network learning. We represent a ternary variable as with two bits . In this way, each element of can be represented as a function of . We denote this relation as a matrix-value function
(S37) |
Based on the above encoding procedure, we design the training algorithm for based on HeO in Alg. 5. The input of the dataset is generated from the uniform distribution on . For HeO, we set , , , and linearly decreasing from to . For MCGE, we set , , , and . We empirically find that MCGE need high sampling number () and low learning rate () for stability, while this is not the case for HeO. For each test, we estimate the mean and std from 10 runs.
Variable selection problem. We construct an algorithm for variable selection problem based on HeO as shown in Alg. 6, where the function is defined in Eq. (17).
We randomly generate -dimensional datasets with training samples. The input is sampled from a standard Gaussian distribution. The element of the ground-truth coefficient is uniformly distributed on , and each element haves probability of being set as zero and thus should be ignored for the prediction. We apply a five-fold cross-validation for all of methods. For our HeO, we set and , . We generate an ensemble of indicators of size 100. For each in the ensemble, we fit a linear model by implementing an OLS on the non-zero variables indicated by and calculate the average MSE loss of the linear model on the cross-validation sets. We then select the linear model with lowest MSE on the validate sets as the output linear model. For Lasso and regression, we follow the implementation in [41] with 10 iterations. the regularization parameter is selected by cross-validation from . For each test, we estimate the mean and std from 10 runs.
graph name | ||||||
---|---|---|---|---|---|---|
tech-RL-caida | 190914 | 607610 | 200 | 2.5 | linearly from 0 to 2.5 | linearly from to 0 |
soc-youtube | 495957 | 1936748 | 200 | 2.5 | linearly from 0 to 2.5 | |
inf-roadNet-PA | 1087562 | 1541514 | 200 | 2.5 | linearly from 0 to 7.5 | |
inf-roadNet-CA | 1957027 | 2760388 | 200 | 5 | linearly from 0 to 7.5 | |
socfb-B-anon | 2937612 | 20959854 | 50 | 2.5 | linearly from 0 to 5 | |
socfb-A-anon | 3097165 | 23667394 | 50 | 2.5 | linearly from 0 to 5 | |
socfb-uci-uni | 58790782 | 92208195 | 50 | 2.5 | linearly from 0 to 5 |
Minimum vertex cover problem. For constrained binary optimization
(S38) | |||
(S39) |
we put the constrains as the penalty function with coefficient into the target function
(S40) |
and the corresponding algorithm is shown in Alg. 7.
We implement the HeO on a single NVIDIA RTX 3090 GPU for all the minimum vertex cover (MVC) experiments. Let be the configuration to be optimized, in which is if we select -th vertex into , otherwise we do not select -vertex into . The target function to be minimize is the size of : , and the constrains are
(S41) |
where represent the edge connecting the and -th vertices. We construct the target function . The term with the positive factor penalizes vector when there are uncovered edges. After the HeO outputs the result , we empirically find that its subset may also form a vertex cover for the graph , so we implement the following refinement on the result , as shown in Alg. 8. We report the vertex number, edge number and settings of HeO in Tab. S2. For FastVC, we follow the settings in [45] and use its codebase, and set the cut-off time as the same as the time cost of HeO. For each test, we estimate the mean and std from 10 runs.