Optimizing over trained GNNs via symmetry breaking

Shiqiang Zhang, Juan S Campos Salazar, Christian Feldmann, D. Walz, Frederik Sandfort +3 more
2/12/2026

No official code found. Best implementation: cog-imperial/GNN_MIP_CAMD (3 stars, BSD-3-Clause, last commit 2024-05-16).

Abstract

Optimization over trained machine learning models has applications including: verification, minimizing neural acquisition functions, and integrating a trained surrogate into a larger decision-making problem. This paper formulates and solves optimization problems constrained by trained graph neural networks (GNNs). To circumvent the symmetry issue caused by graph isomorphism, we propose two types of symmetry-breaking constraints: one indexing a node 0 and one indexing the remaining nodes by lexicographically ordering their neighbor sets. To guarantee that adding these constraints will not remove all symmetric solutions, we construct a graph indexing algorithm and prove that the resulting graph indexing satisfies the proposed symmetry-breaking constraints. For the classical GNN architectures considered in this paper, optimizing over a GNN with a fixed graph is equivalent to optimizing over a dense neural network. Thus, we study the case where the input graph is not fixed, implying that each edge is a decision variable, and develop two mixed-integer optimization formulations. To test our symmetry-breaking strategies and optimization formulations, we consider an application in molecular design.

View on arXivView PDF

Code Implementations(1)

BSD-3-Clause

Repository for paper: "Optimizing over trained GNNs via symmetry breaking".

31PythonOct 9, 20232 years agoBSD-3-Clause

Similar Papers

Cite this paper

@article{zhang2026optimizing,
  title  = {Optimizing over trained GNNs via symmetry breaking},
  author = {Shiqiang Zhang and Juan S Campos Salazar and Christian Feldmann and D. Walz and Frederik Sandfort and M. Mathea and Calvin Tsay and R. Misener},
  year   = {2026},
  eprint = {2305.09420},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2305.09420},
  journal = {NEURIPS 2023 2023}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2305.09420.svg)](https://codeofpaper.com/paper/2305.09420)

Discussion