Application of Fourier Transform in Graph Neural Networks

       Fourier transform is commonly used in graph neural networks to transform node features from the time domain (or space domain) to the frequency domain, so as to perform convolution operations on node features in the frequency domain. Specifically, the graph signal can be regarded as a time-series signal, and the Fourier transform is applied to the time-series signal to transform the node features into a frequency-domain signal. In this way, in the frequency domain, the convolution operation can be expressed as a simple dot product operation.

       For GNN based on spectral decomposition of Laplacian matrix, such as GCN, Fourier transform can be used to represent the eigenvector of Laplacian matrix as a frequency domain signal, and then the node features are convolved by frequency domain convolution operation. Specifically, let XXX isn × fn\times fn×Node feature matrix of f , AAA n × n n\times n n×Adjacency matrix of n , DDD isn × nn\times nn×The degree matrix of n , then the Laplacian matrixL = D − AL=DAL=DA. _ toLLL performs eigenvalue decomposition to obtain eigenvalues​​λ 0 ≤ λ 1 ≤ . . . ≤ λ n − 1 \lambda_0\leq \lambda_1 \leq ... \leq \lambda_{n-1}l0l1...ln1Summation quantity u 0 , u 1 , . . . , un − 1 u_0,u_1,...,u_{n-1}u0,u1,...,un1. Using the Fourier transform, the eigenvector can be expressed as a Fourier basis function ek ( x ) = 2 ncos ( π kxn ) e_k(x)=\sqrt{\frac{2}{n}}cos(\frac{\pi kx}{n})ek(x)=n2 cos(nπkx) , wherek = 0 , 1 , 2 , . . . , n − 1 k=0,1,2,...,n-1k=0,1,2,...,n1 . Representing the feature vector as a frequency-domain signal, the frequency-domain convolution operation can be performed, thereby realizing the convolution operation on the node features.

        It should be noted that in practical applications, due to the limitation of computational efficiency and other factors, the complete Fourier transform and inverse Fourier transform are usually not used, but methods such as fast Fourier transform based on Chebyshev polynomials or Krylov subspaces are used to perform frequency domain convolution operations to improve computational efficiency.

        The frequency domain convolution operation is a commonly used convolution operation in graph neural networks. Its basic idea is to perform convolution operations on node features in the frequency domain after Fourier transform. Specifically, let XXX isn × fn\times fn×Node feature matrix of f , AAA n × n n\times n n×Adjacency matrix of n , DDD isn × nn\times nn×The degree matrix of n , then the Laplacian matrixL = D − AL=DAL=DA. _ toLLL performs eigenvalue decomposition to obtain eigenvalues​​λ 0 ≤ λ 1 ≤ . . . ≤ λ n − 1 \lambda_0\leq \lambda_1 \leq ... \leq \lambda_{n-1}l0l1...ln1Summation quantity u 0 , u 1 , . . . , un − 1 u_0,u_1,...,u_{n-1}u0,u1,...,un1, then the Fourier transform can express the node feature matrix as:

X ~ = U T X \tilde{X} = U^T X X~=UTX

       任何U = ( u 0 , u 1 , . . . , un − 1 ) U=(u_0,u_1,...,u_{n-1})U=(u0,u1,...,un1) is a matrix composed of eigenvectors of the Laplacian matrix,X ~ \tilde{X}X~ is the frequency domain representation of the node feature matrix after Fourier transform. In the frequency domain, the convolution operation can be expressed as a simple point multiplication operation, so the node features can be convolved in the frequency domain to obtain a new frequency domain feature representationY ~ \tilde{Y}Y~

Y ~ = Θ X ~ \tilde{Y} = \Theta \tilde{X}Y~=ThX~

       Θ \ThetaΘ is the convolution kernel in the frequency domain, usually a set of learnable parameters. In practical applications, in order to improve computational efficiency, some fast Fourier transform methods, such as the method based on Chebyshev polynomials or the method based on Krylov subspace, are usually used to perform frequency domain convolution operations.

       Finally, through the inverse Fourier transform, the frequency domain features can be expressed as Y ~ \tilde{Y}Y~ Convert back to the node feature representation in the spatial domainYYY

Y = U Y ~ Y = U \tilde{Y} Y=UY~

Get a new representation YY        of node featuresY. _ This Fourier transform-based frequency domain convolution operation is widely used in graph neural networks, such as Laplacian matrix-based spectral convolution networks (such as GCN), GraphSAGE, etc.

Guess you like

Origin blog.csdn.net/weixin_44904205/article/details/129053144