Recently, many works studied the expressive power of graph neural networks (GNNs) by linking it to the $1$-dimensional Weisfeiler--Leman algorithm ($1\text{-}\mathsf{WL}$). Here, the $1\text{-}\mathsf{WL}$ is a well-studied heuristic for the graph isomorphism problem, which iteratively colors or partitions a graph's vertex set. While this connection has led to significant advances in understanding and enhancing GNNs' expressive power, it does not provide insights into their generalization performance, i.e., their ability to make meaningful predictions beyond the training set. In this paper, we study GNNs' generalization ability through the lens of Vapnik--Chervonenkis (VC) dimension theory in two settings, focusing on graph-level predictions. First, when no upper bound on the graphs' order is known, we show that the bitlength of GNNs' weights tightly bounds their VC dimension. Further, we derive an upper bound for GNNs' VC dimension using the number of colors produced by the $1\text{-}\mathsf{WL}$. Secondly, when an upper bound on the graphs' order is known, we show a tight connection between the number of graphs distinguishable by the $1\text{-}\mathsf{WL}$ and GNNs' VC dimension. Our empirical study confirms the validity of our theoretical findings.
翻译:摘要:近期,大量研究通过将图神经网络(GNN)的表达能力与一维Weisfeiler-Leman算法($1\text{-}\mathsf{WL}$)建立联系,来探讨其表现力。其中,$1\text{-}\mathsf{WL}$是一种针对图同构问题经过充分研究的启发式方法,通过迭代方式对图的顶点集进行着色或划分。尽管这种关联显著推动了GNN表达能力的理解与增强,但并未揭示其泛化性能——即模型在训练集之外做出有意义预测的能力。本文从Vapnik-Chervonenkis(VC)维度理论的视角,在两种场景下研究GNN在图表征层面的泛化能力。首先,当图的阶数无上界约束时,我们证明GNN权重的比特长度紧密限制其VC维数,并进一步基于$1\text{-}\mathsf{WL}$生成的着色数量推导出GNN VC维数的上界。其次,当图的阶数已知上界时,我们揭示出$1\text{-}\mathsf{WL}$可区分的图数量与GNN VC维数之间的紧密关联。实验研究验证了我们理论发现的有效性。