We analyse the power of graph neural networks (GNNs) in terms of Boolean circuit complexity and descriptive complexity. We prove that the graph queries that can be computed by a polynomial-size bounded-depth family of GNNs are exactly those definable in the guarded fragment GFO+C of first-order logic with counting and with built-in relations. This puts GNNs in the circuit complexity class TC^0. Remarkably, the GNN families may use arbitrary real weights and a wide class of activation functions that includes the standard ReLU, logistic "sigmod", and hyperbolic tangent functions. If the GNNs are allowed to use random initialisation and global readout (both standard features of GNNs widely used in practice), they can compute exactly the same queries as bounded depth Boolean circuits with threshold gates, that is, exactly the queries in TC^0. Moreover, we show that queries computable by a single GNN with piecewise linear activations and rational weights are definable in GFO+C without built-in relations. Therefore, they are contained in uniform TC^0.
翻译:我们从布尔电路复杂性和描述复杂性的角度分析了图神经网络(GNNs)的能力。我们证明,由多项式大小,有界深度的GNN族可以计算的图形查询正是该具有带计数和内置关系的第一阶逻辑受限片断GFO+C所定义的查询。这将GNNs置于电路复杂性类TC^0中。值得注意的是,GNN族可以使用任意实数权重和包括标准ReLU、逻辑sigmod和双曲正切函数在内的广泛的激活函数类。如果GNN允许使用随机初始化和全局读取(这是GNNs实践中广泛使用的标准特征),则它们可以计算完全相同的查询,就是带有阈值门的有界深度布尔电路中的查询,即正好位于TC^0中的查询。此外,我们还表明,单个具有分段线性激活和有理权重的GNN可在没有内置关系的情况下在GFO+C中定义可计算的查询。因此,它们包含在统一的TC^0中。