Define the task and metric
Choose a concrete combinatorial problem (Max-Cut, TSP, vertex cover) and decide measurable metrics such as approximation ratio, solution gap or node/edge ranking precision.
GNNs for combinatorial optimisation. Rank candidate solutions.
Combinatorial-optimisation tasks (for example Max-Cut, TSP or vertex cover) map structured instances to discrete solutions or solution quality scores. GNNs can be used to learn heuristics or to predict solution quality from graph structure; common failure modes include overfitting to small graphs, leakage across connected components and mismatch between training objectives and real-world constraints.
Learning concept · Not a validated service
Combinatorial-optimisation tasks (for example Max-Cut, TSP or vertex cover) map structured instances to discrete solutions or solution quality scores. GNNs can be used to learn heuristics or to predict solution quality from graph structure; common failure modes include overfitting to small graphs, leakage across connected components and mismatch between training objectives and real-world constraints.
A proposed application: use a trained GNN to prioritise candidate nodes or edges when running a heuristic solver, so a human operator can inspect high-ranked candidates before committing to expensive optimisation. Any such system should keep a human verifier in the loop and not be used to make unattended operational decisions.
Choose a concrete combinatorial problem (Max-Cut, TSP, vertex cover) and decide measurable metrics such as approximation ratio, solution gap or node/edge ranking precision.
Collect or generate benchmark instances at relevant sizes; split by instance so connected components or similar graphs do not leak across train and test.
Implement a message-passing GNN to predict solution quality or labels on nodes/edges and train it on the chosen objective; log per-instance metrics.
Measure approximation performance and inspect examples where the GNN suggests poor candidate solutions or violates constraints.
The supplied starter builds NetworkX's karate_club_graph, computes per-node degree, clustering coefficient and PageRank, combines their ranked percentiles into a single 'risk_or_class_score' and prints the top-scoring nodes. It does not define or train any graph neural network, nor does it set up a combinatorial optimisation objective or solver.
graph = nx.karate_club_graph()
features = pd.DataFrame(
{
"node": list(graph.nodes()),
"degree": [graph.degree(node) for node in graph.nodes()],
"clustering": [nx.clustering(graph, node) for node in graph.nodes()],The starter uses graph statistics on the small Karate Club graph and combines ranked features into a heuristic score. It contains no GNN architecture, no training loop, no labelled optimisation instances, and therefore cannot demonstrate learned combinatorial-optimisation performance.
A proposed extension: replace the heuristic scoring with a trained message-passing GNN that predicts node- or edge-level labels (for example inclusion in a solution) on benchmark instances such as generated Max-Cut or TSP graphs, and use those predictions to guide a solver.
This is a potential application pathway, not a delivered product. The supplied starter does not implement this service or validate it with real users.
Networkers Home runs this topic inside its AI Engineer Course, with placement support and hands-on labs.