Introduction 论文 来自2023 ICLR会议论文。看了三个月GNN相关内容,所看到的GCN的支撑不是从实例性能出发,就是从思想来源,由CNN、图信号等领域自然发展而来, 却没有找到理论上的支撑,所以翻了翻理论方面的相关文献,找到了这篇。
Main body 理论推导过于繁琐,这里只作简要说明。我们知道GCN中有很多依托于注意力的版本,例如GAT,本文并不关注于所谓的注意力,只关注卷积算符的合理性;其次,GCN层一般只有2 ∼ 3层,由于过平滑,本文关注GC层的作用,则不考虑过平滑问题,所以只考虑2层,3层情况下的神经网络;最后,由于GCN在异配图下的表现往往差过同配图,本文关注GC层的作用,在更新过程引入 ξ = s g n ( p − q ) 其中p 为同类连接的概率,q 为异类连接的概率。
Contributions 本文理论层面使用合成数据集,记为XOR data,并研究了在该数据集上执行二分类任务的性能,数据集的节点特征从高斯混合中采样(这样选取的目的是使其非线性可分的),接下来是主要成果:
首先证明了结合图信息的网络表现优于不是用图的方法。事实上,与不使用图的方法相比,单个GC层允许多层神经网络在更宽的范围对节点进行分类,表现在二分类中,GC的网络对两类特征均值之差的需要仅为不使用图的网络的1 n ( p + q ) 4 。进一步,可以证明,在较稠密的图中,这个值可以达到1 n 4 。 证明了对于多次网络来讲,配备多个GC算子是要比配备单个GC算子展现更好的性能,同时,配备相同GC算子的情况下,对其不同的排布产生的神经网络性能相似。 在实例上,使用了真是数据集和大规模数据集验证了本文提出的理论成果,显示了GC在网络多层和同(异)质下的各种组合的性能趋势。 Preliminaries Data model 证明主要依托的数据集。现介绍其设置及符号含义:图基础结构 :n , d 分别表示节点数量和特征维度,取正整。ϵ 1 , … , ϵ n 代表节点的分类,为服从伯努利分布的随机变量。C b = { i ∈ [ n ] | ϵ i = b } for b ∈ { 0 , 1 } 表示属于b 类的点集。点特征 :X 代表节点特征,其中X i 代表节点i 的特征。设置两个量,μ , ν ,X i ∼ N ( ( ( 2 η i − 1 ) ( 1 − ϵ i ) μ + ϵ i ν ) , σ 2 ) 。事实上,可以看到,μ , ν 在此充当了某类点特征集中的均值。记号X i ∼ O R − G M M ( n , d , μ , ν , σ 2 ) 。图信息 :A 代表邻接矩阵,值得一提,这里的图是允许自环存在的,这也是由卷积算子的特点所决定的。使用D 表示度矩阵,记号d e g ( i ) = D i , i ,使用N i 表示点i 的邻居,定义同类点连边概率为p ,不同类点间连边概率为q 。记号( A , X ) ∼ X O R − C S B M ( n , d , μ , ν , σ 2 , p , q ) 。
Network Architecture 本文关注的是使用RELU层的MLP:
H ( 0 ) = X , f ( l ) ( X ) = ( D − 1 A ) k l H ( l − 1 ) W ( l ) + b ( l ) H ( l ) = Re LU ( f ( l ) ( X ) ) } for l ∈ [ L ] , y ^ = φ ( f ( L ) ( X ) ) . 这里,φ ( x ) = s i g m o i d ( x ) = 1 1 + e − x 。网络最终输出y ^ 。注意D − 1 A 为归一化的邻接矩阵,事实上,在通常GCN中归一化使用D − 1 2 A D − 1 2 ,事实上后面的实验可以说明他们具有相似的表现。模型中k l 控制了在第l 层中添加GC的数量,事实上,当该层不使用图信息则令k l = 0 即可。( W ( l ) , b ( l ) ) 是可训练的参数,对于模型的训练使用交叉熵作为损失函数ℓ θ ( A , X ) = − 1 n ∑ i ∈ [ n ] y i log ( y ^ i ) + ( 1 − y i ) log ( 1 − y ^ i ) , ,则
OPT ( A , X ) = min θ ∈ C ℓ θ ( A , X ) , 这里,C 表示参数可选范围,事实上,在这里我们限制| | W ( 1 ) | | 2 ≤ R , | | W ( > 1 ) | | ≤ 1 。理论部分可以看到对参数的限制是很有必要的,否则,若允许R 无限大,那么损失函数的值可以任意的逼近0,不具备研究意义。以后,使用ℓ θ ( X ) 代替ℓ θ ( I n , X ) 。
Theory 这里为了保持严谨性,对于定理的描述使用原文描述即英文版本
Main results Thm1 Theorem 1. L e t X ∈ R n × d ∼ X O R -G M M ( n , d , μ , ν , σ 2 ) and defne γ = ∥ μ − ν ∥ 2 to be the d i s t a n c e between the means. Then we have the following:
Assume that γ ≤ K σ and let h ( x ) : R d → { 0 , 1 } be any binary classifter. Then for any K > 0 and any ϵ ∈ ( 0 , 1 ) , a t least a fraction 2 Φ c ( K / 2 ) 2 − O ( n − ϵ / 2 ) o f a l l data points are m i s c l a s s i f i e d b y h w i t h p r o b a b i l i t y a t l e a s t 1 − exp ( − 2 n 1 − ϵ ) .
For any ϵ > 0 , i f t h e distance between the means is γ = Ω ( σ ( log n ) 1 2 + ϵ ) , t h e n for any c > 0 , with probability at least 1 − O ( n − c ) , t h e r e exist a two-layer and a three-layer network that p e r f e c t l y c l a s s i f y t h e d a t a , a n d o b t a i n a c r o s s − e n t r o p y l o s s g i v e n b y
ℓ θ ( X ) = C exp ( − R 2 γ ( 1 ± c / ( log n ) ϵ ) ) , w h e r e C ∈ [ 1 / 2 , 1 ] is an absolute constant$
首先回忆一下定义,这将有利于我们理解定理含义,γ = ∥ μ − ν ∥ 2 ,X i ∼ N ( ( ( 2 η i − 1 ) ( 1 − ϵ i ) μ + ϵ i ν ) , σ 2 ) ,注意到,比较γ , σ ,我们说,γ σ 的值能够表现不同类别的特征重合程度。 定理一的第一部分是告诉我们,当其分离程度较小的情况下,γ σ ≤ K ,在高概率1 − e x p − 2 n 1 − ϵ 下总会有小部分2 Φ c ( K / 2 ) 2 − O ( n − ϵ / 2 ) 的点被分类错误。注意到,在这种情况下,当K → ∞ 时,可以看到此时错误分类点的比例将趋于0,事实上在第二部分给出了更加准确的界,而如果K → 0 ,及其节点的特征混杂在一起,这时候错误分类的比例将接近1 2 !注意这是二分类任务,此时分类器无任何作用! 定理的第二部分表明,当其不同类特征分散程度较大达到γ = Ω ( σ ( log n ) 1 2 + ϵ ) 时,不使用图信息的网络才能够高概率1 − O ( n − c ) 情况下完美分类。
Thm2 Theorem 2. L e t ( A , X ) ∼ X O R -CSBM( n , d , μ , ν , σ 2 , p , q ) , γ = ∥ μ − ν ∥ 2 , a n d Γ ( p , q ) = ∥ p − g | / ( p + q ) . T h e r e exist a two-layer network and a three-layer network with the following properties:
If the intra-class and inter-class edge probabilities are p , q = Ω ( log 2 n n ) , and it holds that Γ ( p , q ) ζ ( γ / 2 σ ) = ω ( log n n ( p + q ) ) , t h e n f o r a n y c > 0 , w i t h p r o b a b i l i t y a t l e a s t 1 − O ( n − c ) , the networks equipped with a graph convolution in the second or the third layer perfectly c l a s s i f y the data, and obtain the following loss: ℓ θ ( A , X ) = C ′ exp ( − C σ R Γ ( p , q ) ζ ( γ / 2 σ ) ( 1 ± c / log n ) ) , where C > 0 and C ′ ∈ [ 1 / 2 , 1 ] are constants$
I f p , q = Ω ( log n n ) a n d Γ ( p , q ) 2 ζ ( γ / 2 σ ) = ω ( log n n ) , t h e n f o r a n y c > 0 , w i t h p r o b a b i l i t y a t least 1 − O ( n − c ) , the networks with any combination of two graph convolutions in the second andlor the third layers perfectly classify the data, and obtain the following loss:ℓ θ ( A , X ) = C ′ exp ( − C σ R Γ ( p , q ) 2 ζ ( γ / σ ) ( 1 ± c / log n ) ) , where C > 0 and C ′ ∈ [ 1 / 2 , 1 ] are constants.$
定理二的第一部分告诉我们当图在较小密度p , q = Ω ( log 2 n n ) 的条件下如果能够满足Γ ( p , q ) ζ ( γ / 2 σ ) = ω ( log n n ( p + q ) ) 那么一层GC的神经网络能够以高概率1 − O ( n − c ) 的情况下实现完美分类。想要理解这一部分的内容,如果我们限制Γ ( p , q ) = Ω ( 1 ) 可以看到此时选择满足条件Γ ( p , q ) ζ ( γ / 2 σ ) = ω ( log n n ( p + q ) ) 的γ 仅仅定理一中不使用图信息时完美匹配所需要的γ 的1 n ( p + q ) 4 。 定理二的第二部分表明,在较大的图密度p , q = Ω ( log n n ) 下,甚至能够将这个数值改进到1 n 4 。当然这并非表明图的密度越大越好,事实上,当p , q = Ω ( 1 ) 时,多个GC层的性能甚至比不上单个GC层。
Corollary Corollary 2.1. Consider the data model XOR-CSBM( n , d , μ , ν , σ 2 , p , q ) and the network architecture.
Assume that p , q = Ω ( log 2 n / n ) a n d c o n s i d e r t h e t h r e e − l a y e r n e t w o r k c h a r a c t e r i z e d b y part one of Theorem 2, with one graph convolution. For this network, placing the graph c o n v o l u t i o n i n t h e s e c o n d l a y e r ( k 2 = 1 , k 3 = 0 ) o b t a i n s t h e s a m e r e s u l t s a s p l a c i n g i t i n t h e third layer ( k 2 = 0 , k 3 = 1 ) . Assume that p , q = Ω ( log n / n ) , a n d consider the three-layer network characterized by part two of[Theorem 2] with two graph convolutions. For this network, placing both convolutions in the second layer ( k 2 = 2 , k 3 = 0 ) or both of them in the third layer ( k 2 = 0 , k 3 = 2 ) o b t a i n s the same results as placing one convolution in the second layer and one in the third l a y e r ( k 2 = 1 , k 3 = 1 ) . 推论2.1能够直接由定理2推得,推论二事实上描述了多层网络分类能力的提高取决于卷积算子的数量而不取决于其位置。特别的,在XOR-CSBM数据中将相同数量的卷积放在第二层或第三层的任意组合中,其对分类任务的性能是相似的。
Proof 这一部分涉及的定理、引理将非常多,在此只列出,而没有精力去记录详细的证明。
Pre 列出证明使用的工具:
Hoeffding's inequality Chernoff bound Union bound Gaussian concentration 做出基本假设: 为方便计算同时保证能够展示背后思想的前提下,做出如下假设 Assumption 1. F o r the XOR-GMM data model, the means of the Gaussian mixture are such that ⟨ μ , ν ⟩ = 0 a n d ‖ μ ‖ 2 = ‖ ν ‖ 2 . 同时,证明中用到的符号假设:
[ x ] + = R E L U ( x ) φ ( x ) = s i g m o i d ( x ) = 1 1 + e − x v ^ = v | | v | | 2 γ = | | μ − ν | | 2 γ ′ = γ / 2 Γ ( p , q ) = | p − q | p + q ϕ ( x ) 表示标准高斯分布密度函数Φ ( x ) 表示标准高斯分布分布函数Φ c ( x ) = 1 − Φ ( x ) Graph 这一小节主要介绍了关于我们设计的图的一些性质,例如度、共同邻居等的集中分布特性。
Proposition A. 1 ( Concentration of degrees ) . Assume that the graph density is p , q = Ω ( log 2 n n ) . Then deg ( i ) = n 2 ( p + q ) ( 1 ± o n ( 1 ) ) , 1 deg ( i ) = 2 n ( p + q ) ( 1 ± o n ( 1 ) ) , 1 deg ( i ) ( ∑ j ∈ C 1 a i j − ∑ j ∈ C 0 a i j ) = ( 2 ε i − 1 ) p − q p + q ( 1 + o n ( 1 ) ) , where the error term o n ( 1 ) = O ( c log n ) . 性质1表明节点度高概率在n 2 ( p + q ) 附近,同时给出一个点同类点邻居与不同类点邻居数量差的估计。
Proposition A.2 Assume that the graph density is p,q = Ω ( log n n ) . Then for any constant c > 0 , with probability at least 1 − 2 n − c | N i ∩ N j | = n 2 ( p 2 + q 2 ) ( 1 ± o n ( 1 ) ) f o r a l l i ∼ j , | N i ∩ N j | = n p q ( 1 ± o n ( 1 ) ) f o r a l l i ≁ j , where the error term o n ( 1 ) = O ( c log n ) . 性质二给出在相对稠密情况下,同类节点间共同邻居和不同类节点间共同邻居的一个数量估计。
Lemma A.3 (Variance reduction). Denote the event from Proposition A.l to be B. Let { X i } i ∈ [ n ] ∈ R n × d be an iid sample of data. For a graph with adjacency matrix A (including self-loops) and a fixed integer K > 0 , define a K -convolution to be X ~ = ( D − 1 A ) K X . Then we have Cov ( X ~ i ∣ B ) = ρ ( K ) Cov ( X i ) , where ρ ( K ) = ( 1 + o n ( 1 ) Δ ) 2 K ∑ j ∈ [ n ] A K ( i , j ) 2 . Here, A K ( i , j ) is the entry in the ith row and jth column of the exponentiated matrix A K and Δ = E deg = n 2 ( p + q ) 引理3表明了随着引入卷积层数量K 增多,C o v ( X ~ ) 会减小。这表明卷积操作在增加不同节点间特征间的相似性,使其变得难以区分。这也表明了添加更多的卷积层不一定有利于性能提升。
Basic Network 这里假定,由于我们的数据服从高斯分布,贝叶斯方法在该类数据上性能表现最优。
Lemma A.4. L e t h ( x ) =∣ ⟨ x , ν ^ ⟩ ∣ − ∣ ⟨ x , μ ^ ⟩ ∣ for all x ∈ R d and defıne ζ ( t ) = t erf ( t ) − 1 π ( 1 − e − t 2 ) . Then we have l . T h e expectation E h ( X i ) = { − 2 σ ζ ( γ / 2 σ ) i ∈ C 0 2 σ ζ ( γ / 2 σ ) i ∈ C 1 . 2. For any γ , σ > 0 such that γ = Ω n ( σ ) , we have that ζ ( γ σ ) = Ω ( γ σ ) . 3. For any γ , σ > 0 such that γ = o n ( σ ) , we have that ζ ( γ σ ) = Ω ( γ 2 σ 2 ) . 假定贝叶斯分类器形如𝓍 h ∗ ( x ) = a r g m a x b ∈ { 0 , 1 } P r [ y = b | x = x ] ,引理6给出了在XOR-GMM数据集下贝叶斯分类器的准确表达形式
𝟙 Lemma A.6. F o r s o m e f i x e d μ , ν ∈ R d and σ 2 > 0 , the Bayes optimal classiffer, h ∗ ( x ) : R d → { 0 , 1 } for the data model XOR-GMM ( n , d , μ , ν , σ 2 ) is given by h ∗ ( x ) = 1 ( | ⟨ x , μ ⟩ | < | ⟨ x , ν ⟩ | ) = { 0 | ⟨ x , μ ⟩ | ≥ | ⟨ x , ν ⟩ | 1 | ⟨ x , μ ⟩ | < | ⟨ x , ν ⟩ | , where 1 is the indicator function. Proposition A.7. Consider two-layer and three-layer networks of the form described above, without biases (i.e., b ( l ) = 0 f o r a l l l a y e r s l ) , for parameters W ( l ) and some R ∈ R + a s f o l l o w s . l. For the two-laye r network, W ( 1 ) = R ( μ ^ − μ ^ ν ^ − ν ^ ) , W ( 2 ) = ( − 1 − 1 1 1 ) ⊤ . 2. For the three-layer network W ( 1 ) = R ( μ ^ − μ ^ ν ^ − ν ^ ) , W ( 2 ) = ( − 1 1 − 1 1 1 − 1 1 − 1 ) , W ( 3 ) = ( 1 − 1 ) . 性质7给出了2层和3层神经网络框架实现引理6中的贝叶斯分类方法。有必要说明的是,性质7中神经网络给出的输出为取值label = 1的概率,事实上他与引理6里的贝叶斯分类器等效。
Network no graph 到目前为止,使用以上的引理可完成定理一的证明。
Network with GC 通过向引理7提出的模型中加入GC证得以下结论
Х О В С В М Proposition A.8. F ix. a positive integer d > 0 , σ ∈ R + and μ , ν ∈ R d . Let ( A , X ) ∼ ХОВ-СSВМ ( n , d , μ , ν , σ 2 , p , q ) . Defıne X ~ to be the transformed data after applying a graph como- lution on X , i.e., X ~ = D − 1 A X . Then in the regine where p , q = Ω ( log 2 n n ) , with probability at least 1 − 1 / poly ( n ) we have that E X ~ i = { p μ + q ν ′ 2 ( p + q ) ⋅ o n ( 1 ) i ∈ C 0 p ν + q μ 2 ( p + q ) ⋅ o n ( 1 ) i ∈ C 1 . Hence, the distance betwee the means of the convolved data, given by p − q 2 ( p + q ) ‖ μ − ν ‖ 2 ⋅ o n ( 1 ) diminishes to 0 for n → ∞ . 性质8表明在第一层加入GC是有害的,可以发现,当n → ∞ 时,经过第一层卷积作用后,节点特征将收敛到0变得无法区分。
接下来是对定理2的证明,首先通过引理9给出添加一个GC后神经网络输出的表达形式,基于此完成了对定理2第一部分关于添加单个GC的证明。引理10表明添加2个GC 时,对于不同组合,总是有相同的输出形式。基于引理10,可征得定理2第二部分。
Lemma A.9. Let h ( x ) = | ⟨ x , ν ^ ⟩ | − | ⟨ x , μ ^ ⟩ | for any x ∈ R d . Consider the two-layer and three- layer networks in | Proposition A.7 | where the weight parameter of the last layer, W ( L ) , is scaled by a factor of ξ = sgn ( p − q ) . If a graph comvolution is added to these networks in either the second or the t h i r d layer then for a sample ( A , X ) ∼ X O R - C S B M ( n , d , μ , ν , σ 2 , p , q ) , the output of the networks f o r a point i ∈ [ n ] i s y ^ i = φ ( f i ( L ) ( X ) ) = φ ( R sgn ( p − q ) deg ( i ) ∑ j ∈ [ n ] a i j h ( X j ) ) . Lemma A.10. Let h ( x ) : R d → R =∣ ⟨ x , ν ^ ⟩ ∣ − ∣ ⟨ x , μ ^ ⟩ ∣ . Consider the networks constructed in Proposition A. 7 equipped with two graph convolutions in the following combinations: 1. Both convolutions in the second layer of the two-layer network . 2. Both convolutions in the second layer of the three-layer network . 3. One convolution in the second layer and one in the third layer of the three -layer network. 4. Both convolutions in the third layer of the three-layer network . T h e n f o r a s a m p l e ( A , X ) ∼ X O R ⋅ C S B M ( n , d , μ , ν , σ 2 , p , q ) , the output of the netnorks in all the a b o v e d e s c r i b e d c o n b i n a t i o n s f o r a p o i n t i ∈ [ n ] is y ^ i = φ ( f i ( L ) ( X ) ) = φ ( R deg ( i ) ∑ j ∈ [ n ] τ i j h ( X j ) ) , where τ i j = ∑ k ∈ [ n ] a i k a j k deg ( k ) . Experiments 实验部分较为简单,参考原文章即可。