NeurIPS 2026QuestionsPapersAreasAboutMarkdown

Do Graph Neural Networks Learn Generalizable Algorithms for Clustering Graphs?

Mitchell Black, Sanjoy Dasgupta, Yusu Wang

NeurIPS page · OpenReview · Open on the map

Category: Graphs, OOD Detection & Medical Imaging › Graph Neural Network Signal Propagation · Type: empirical study · Keywords: graph neural networks, graph clustering, generalization, algorithm discovery, MPNN, PPGN

Areas: Graph Learning › Graph Analysis Methods › Graph Neural Network Expressivity

Summary

This paper investigates whether graph neural networks can learn generalizable clustering algorithms, revealing that different GNN expressivity leads to distinct learned heuristics.

Explained to a 5-year-old

We want computers to group together pieces of a puzzle that are connected to each other. We teach them how to do this on small puzzles, then see if they can also group pieces in bigger puzzles they haven't seen before. We find out that different ways of teaching them make them group things in different ways. This helps us understand how computers can learn to solve problems they haven't practiced before. It also tells us that the way we teach matters a lot.

Explained to a 5-year-old, longer

We want computers to put similar things together when those things are linked like a web. We show them how to do this on small webs so they can learn the pattern. Then we ask them to work on bigger webs they have never seen before. We want to know if the computers can still group the things correctly. We also want to understand what rules the computers are using to make their decisions. We study two different ways of teaching the computers, which we call simple and more powerful methods. The simple method makes the computers group things in one particular way. The more powerful method makes them group things in a different way. Even though the computers were only taught on small webs, they still work well on the big ones. This tells us that computers can learn general strategies, not just memorize examples. It also shows that the way we teach influences what the computers learn. Knowing this helps us build smarter systems that can adapt to new situations.

For a technical reader

The paper evaluates whether graph neural networks (GNNs) can learn clustering algorithms that generalize beyond the training distribution. By training various GNN architectures on a cut-based clustering objective and probing their internal heuristics, the authors show consistent out-of-distribution performance. Theoretical analysis characterizes the space of possible heuristics, revealing that expressive models like PPGNs implement different strategies than simpler MPNNs. Empirical results demonstrate that the approach generalizes across graph families, but the learned algorithms vary significantly with model expressivity. These findings suggest that careful architecture selection and probing are essential when deploying GNNs for clustering tasks.

Problem

It is unclear whether GNNs learn algorithms that generalize to unseen graphs differing from training data, and what algorithms they actually implement.

Method

The authors train various GNN types to minimize a standard cut-based clustering cost on a suite of graphs and evaluate their ability to generalize to larger or different graph families. They also provide theoretical analysis of possible heuristics and use probing techniques to identify the algorithms learned by the networks.

Results

The approach demonstrates generalization across graph families, yet GNNs of varying expressivity learn markedly different algorithms.

Contributions

It provides empirical evidence of GNN generalization, theoretical insights into possible heuristics, and probing analyses that reveal distinct algorithms learned by different GNN types.

Research questions this paper is counted under

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction