Can Graph Neural Networks Learn Colorful $k$-Path?
Many graph dynamic-programming algorithms update the state of each vertex from the states of its neighbors, in the same local form as message passing in graph neural networks. We ask whether this shared local update structure is sufficient for a GNN to learn a dynamic-programming task from final labels alone, without supervision of intermediate DP states. We study this question for the colorful k-path problem. Given a k-colored graph and a vertex v, the goal is to decide whether there is a colorful path on k vertices ending at v. We analyze a Max-GNN initialized with random Gaussian weights, followed by a fixed random ReLU feature map and a trainable linear readout. Our first result shows that, for a sufficiently large hidden dimension, the random Max-GNN assigns different vectors to vertices with different local patterns. We formalize these patterns as Max neighborhood-unfolding types. Our second result shows that, after the random ReLU map, the corresponding vectors of these types become linearly separable under arbitrary binary labels. Consequently, for any $L\ge 1$ and any binary target function on the supported depth-L types, a training sample containing every supported type…
- arXiv
- 2612.05095
- Authors
- Xingzhi Dai, Yaqiao Li, Bingkai Lin, Yuekai Zhai
- Categories
- cs.LG