Mixed-Integer Optimisation of Graph Neural Networks for Computer-Aided Molecular Design

Tom McDonald, Calvin Tsay, Artur M. Schweidtmann, Neil Yorke-Smith · DOI

Abstract

Computer-Aided Molecular Design (CAMD) traditionally relies on manual chemical descriptors or black-box optimization techniques that often converge to local optima. This paper introduces a deterministic framework to embed Graph Neural Networks (GNNs) directly into mixed-integer optimization problems. By translating GNN architectures into linear and bilinear constraints, the authors facilitate the discovery of molecules with globally optimal properties while adhering to physical laws such as chemical valency. The approach is demonstrated on boiling point prediction, highlighting the computational trade-offs between linear (MILP) and non-linear (MINLP) formulations.

Introduction

The search for optimal molecules—whether for cleaner fuels or more effective pharmaceuticals—is a cornerstone of chemical engineering. While modern GNNs excel at predicting molecular properties from structure, their "black-box" nature complicates the inverse problem: finding the structure that maximizes a specific property. Traditionally, this required heuristic methods like Genetic Algorithms, which lack optimality guarantees. This work addresses the challenge of global optimization by mathematically formulating GNNs so that solvers like Gurobi can prove the absolute best molecule exists within a defined search space.

Methodology: From GNNs to Mathematical Programs

The core contribution is the conversion of GNN layers into constraints compatible with standard mathematical programming solvers. This bridges the gap between deep learning and rigorous mathematical optimization.

ReLU and Architecture Formulations

The authors represent the Rectified Linear Unit (ReLU) activation function using "Big-M" formulations, which utilize binary variables to handle the non-linearity. Two primary architectures are explored:

  • GraphSAGE to MILP: The GraphSAGE architecture is formulated as a Mixed-Integer Linear Program (MILP). Its linear nature makes it computationally efficient for solvers.
  • GCN to MINLP: Graph Convolutional Networks (GCN) involve normalization terms based on node degrees. Since node degrees change during the optimization of molecular structure, this results in a Mixed-Integer Non-Linear Program (MINLP) containing bilinear terms.
Illustration of a molecular graph (left) and its corresponding multi-layer computational tree (right) used in the GNN formulation.

Physics-Informed Constraints

To ensure the generation of chemically feasible molecules, the optimization model incorporates constraints for:

  • Valency: Ensuring atoms like Carbon maintain four bonds.
  • Connectivity: Guaranteeing the molecule is a single connected component rather than a collection of floating atoms.
  • Bond Types: Supporting single, double, and triple bonds.

Additionally, the authors adapted Feasibility-Based Bound Tightening (FBBT) to GNNs to prune the search space and improve solver efficiency.

Results and Key Insights

The framework was evaluated on a dataset of organic molecules to optimize for boiling points. The GNNs achieved a mean absolute error (MAE) of approximately 6.65 K on predictions.

Discovery and Scalability

The optimization successfully identified 20 unique molecular structures. Of these, 12 were known compounds, 2 were previously identified in literature as hypothetical stable structures, and 6 were novel candidates.

A key finding was the trade-off between linearity and complexity. Despite having more constraints, the MILP-based GraphSAGE was often faster to solve than the MINLP-based GCN due to the absence of bilinear terms. However, the "curse of dimensionality" remains a challenge; while 4-atom molecules were optimized in seconds, 8-atom molecules required significant computation time, often failing to reach a 0% optimality gap within 10 hours.

Global vs. Heuristic Optimization

In a comparison with Genetic Algorithms (GA), the GA found comparable solutions in 83% of cases. However, for the remaining 17%, the GA got stuck in local optima, highlighting the necessity of the deterministic MILP/MINLP approach for finding true global optima in molecular design.

Conclusion and Future Work

This work provides a foundational step toward integrating deep learning with global optimization for molecular design. Current limitations include scalability to larger molecules and the omission of 3D spatial constraints (steric hindrance). Future research will explore Optimisation-Based Bound Tightening (OBBT) and more complex GNN layers, such as Attention mechanisms, to enhance both predictive accuracy and computational performance.

Summary updated

BibTeX
@article{mcdonald2024mixed,
  author = {Tom McDonald and Calvin Tsay and Artur M. Schweidtmann and Neil Yorke-Smith},
  title = {{Mixed-Integer Optimisation of Graph Neural Networks for Computer-Aided Molecular Design}},
  journal = {Comput. Chem. Eng.},
  year = {2024},
  doi = {10.1016/j.compchemeng.2024.108660},
}
Figure