Graph neural networks (GNN) are deep learning architectures for graphs. Essentially, a GNN is a distributed message passing algorithm, which is controlled by parameters learned from data. It operates on the vertices of a graph: in each iteration, vertices receive a message on each incoming edge, aggregate these messages, and then update their state based on their current state and the aggregated messages. The expressivity of GNNs can be characterised in terms of certain fragments of first-order logic with counting and the Weisfeiler-Lehman algorithm. The core GNN architecture comes in two different versions. In the first version, a message only depends on the state of the source vertex, whereas in the second version it depends on the states of the source and target vertices. In practice, both of these versions are used, but the theory of GNNs so far mostly focused on the first one. On the logical side, the two versions correspond to two fragments of first-order logic with counting that we call modal and guarded. The question whether the two versions differ in their expressivity has been mostly overlooked in the GNN literature and has only been asked recently (Grohe, LICS'23). We answer this question here. It turns out that the answer is not as straightforward as one might expect. By proving that the modal and guarded fragment of first-order logic with counting have the same expressivity over labelled undirected graphs, we show that in a non-uniform setting the two GNN versions have the same expressivity. However, we also prove that in a uniform setting the second version is strictly more expressive.
翻译:图神经网络(GNN)是面向图的深度学习架构。本质上,GNN是一种分布式消息传递算法,其行为由数据学习的参数控制。该算法在图顶点上运行:每次迭代中,顶点接收每条入边上的消息,聚合这些消息,然后根据当前状态与聚合后的消息更新自身状态。GNN的表达能力可通过带计数的一阶逻辑的特定片段与Weisfeiler-Lehman算法进行刻画。核心GNN架构存在两种不同版本:在第一种版本中,消息仅依赖于源顶点状态;而在第二种版本中,消息同时依赖于源顶点和目标顶点状态。实际应用中这两种版本均有使用,但现有GNN理论主要聚焦于前者。从逻辑视角看,这两个版本分别对应带计数的一阶逻辑的两个片段,我们称之为模态片段和守护片段。关于两种版本表达能力的差异问题,在GNN文献中长期被忽视,直至近期才由Grohe(LICS'23)提出。本文回答了这一问题。结果表明,答案并非如预期般直接。通过证明带计数的一阶逻辑的模态片段和守护片段在标记无向图上具有相同表达能力,我们展示了在非均匀设置下两种GNN版本具有相同的表达能力。然而,我们也证明了在均匀设置下第二种版本具有严格更强的表达能力。