arXiv:2609.07456cond-mat.dis-nnSep 2026

Manuscript Offprint

arXiv:2609.07456

Graph neural networks and the energetic cavity method for combinatorial optimization

Joe Bacchus George, George T. Cantwell

Joe Bacchus George* and George T. Cantwell†

Department of Engineering, University of Cambridge, CB2 1PZ, United Kingdom

We study the use of graph neural networks (GNNs) for finding approximate ground states of Ising models. Efficiently finding these ground states is of broad significance because many combinatorial optimization problems can be formulated as an Ising model with the appropriate choice of couplings and fields. Exactly solving these problems is hard but there are many good heuristic methods. A lineage of these heuristics build from mean-field approximations: one approach uses the leading eigenvector of an appropriately defined matrix, another is the min-sum algorithm, also known as the energetic cavity method. Without modification, GNNs perform worse than both of these methods. We consider small modifications to the GNN to incorporate these heuristics and find that this considerably improves performance. While the modified approach is competitive against other deep learning approaches, we still find that simulated annealing is reliably at least as good as deep learning methods for the same computational cost.

I. INTRODUCTION

Combinatorial optimization problems seek a best solution from a finite set of options. They occur across virtually all areas of science and industry [1]. Perhaps surprisingly, a finite domain does not make these problems any easier, so the development of practical algorithms for these problems is an important and active field of research. Often, combinatorial optimization can be recast as finding the ground state of an appropriately defined Ising model [1–3].

It is unlikely that any efficient and general purpose algorithm can truly solve combinatorial problems at least as rich as the Ising model. However, efficient heuristics that find good (but not optimal) solutions certainly do exist and often provide powerful approximations to these problems, e.g., Refs. [4–6]. Heuristic methods build on the intuitions of researchers and often on physical analogies. Statistical physics has proved particularly relevant for optimization [1].

Neural networks have been applied to combinatorial optimization tasks [7–12]. The efficacy of these approaches remains unclear: neural network methods may find worse solutions than very simple conventional methods and often require considerably more computing resources to achieve this [13–15].

Nothing fundamental places conventional methods in opposition to neural networks or deep learning. Indeed, to improve the latter may require thinking carefully about how to incorporate the strengths of the former. For example, the development of convolutional neural networks follows this pattern—the approach built on the understanding that images should be analyzed with local filters, but replaced pre-specified filters with more flexible neural networks [16].

In this work we incorporate graph neural networks into the min-sum algorithm [17–19]. The min-sum algorithm—also known as the energetic cavity method—is an effective heuristic for combinatorial optimization. We construct a neural network so that before training it implements the min-sum algorithm. Starting from this initialization the training procedure should only improve performance.

There is considerable precedent for this approach. Most relevant are prior studies that incorporated neural networks into the belief propagation (BP) algorithm, which is very closely related to min-sum: where min-sum attempts to find minima, belief propagation attempts to find marginals in a probabilistic model. (In the statistical physics setting one can think of the min-sum algorithm as the zero-temperature limit of the belief propagation algorithm, where all probability mass moves to the ground states.) Several prior studies have considered hybrid neural-network and belief propagation approaches.

At one end of the spectrum, belief propagation is a structural motivation but the equations are entirely replaced by neural networks [20, 21]. At the other end, belief propagation equations are largely unchanged but a neural network dictates how the between-round updates are computed [22]. Somewhere in the middle, and most similar to our own approach, the belief propagation equations are retained but augmented with a graph neural network operating on the factor graph [23]. We follow a similar philosophy, although we build from the min-sum algorithm for optimization and we study problems larger by orders of magnitude.

We draw two conclusions from this work. First, incorporating well-understood heuristics into the neural network architecture considerably improves their performance. The combined min-sum neural network method is effective on some optimization problems and handily better than the already effective heuristic from which it was built. Second, despite this improvement Monte Carlo methods are reliably better even for very large problems. While Monte Carlo algorithms may have a reputation for

scaling poorly, we find that even fairly aggressive limits on their runtime, e.g., O(nlog⁡n)\mathcal{O}(n \log n), lead to better solutions than neural networks find.