Expressivity and generalization are two critical aspects of graph neural networks (GNNs). While significant progress has been made in studying the expressivity of GNNs, much less is known about their generalization capabilities, particularly when dealing with the inherent complexity of graph-structured data. In this work, we address the intricate relationship between expressivity and generalization in GNNs. Theoretical studies conjecture a trade-off between the two: highly expressive models risk overfitting, while those focused on generalization may sacrifice expressivity. However, empirical evidence often contradicts this assumption, with expressive GNNs frequently demonstrating strong generalization. We explore this contradiction by introducing a novel framework that connects GNN generalization to the variance in graph structures they can capture. This leads us to propose a $k$-variance margin-based generalization bound that characterizes the structural properties of graph embeddings in terms of their upper-bounded expressive power. Our analysis does not rely on specific GNN architectures, making it broadly applicable across GNN models. We further uncover a trade-off between intra-class concentration and inter-class separation, both of which are crucial for effective generalization. Through case studies and experiments on real-world datasets, we demonstrate that our theoretical findings align with empirical results, offering a deeper understanding of how expressivity can enhance GNN generalization.
翻译:表达能力与泛化性是图神经网络(GNNs)的两个关键方面。尽管在研究GNN的表达能力方面已取得显著进展,但对其泛化能力,尤其是在处理图结构数据固有复杂性时的表现,所知甚少。本文探讨了GNN中表达能力与泛化性之间复杂的关系。理论研究推测两者之间存在权衡:表达能力强的模型可能面临过拟合风险,而专注于泛化性的模型则可能牺牲表达能力。然而,实证证据常与此假设相悖,表达能力强的GNN往往展现出强大的泛化性能。我们通过引入一个新颖框架来探索这一矛盾,该框架将GNN的泛化性与其所能捕获的图结构方差联系起来。由此,我们提出了一种基于$k$方差间隔的泛化界,该界以表达能力上界的形式刻画了图嵌入的结构特性。我们的分析不依赖于特定的GNN架构,因此广泛适用于各类GNN模型。我们进一步揭示了类内集中度与类间分离度之间的权衡,这两者对于有效泛化都至关重要。通过对真实数据集的案例研究和实验,我们证明了理论发现与实证结果一致,从而为理解表达能力如何增强GNN泛化性提供了更深入的见解。