What is: Spectral Gap Rewiring Layer?
Source | DiffWire: Inductive Graph Rewiring via the Lovász Bound |
Year | 2000 |
Data Source | CC BY-SA - https://paperswithcode.com |
TL;DR: GAP-Layer is a GNN Layer which is able to rewire a graph in an inductive an parameter-free way optimizing the spectral gap (minimizing or maximizing the bottleneck size), learning a differentiable way to compute the Fiedler vector and the Fiedler value of the graph.
Summary
GAP-Layer is a rewiring layer based on minimizing or maximizing the spectral gap (or graph bottleneck size) in an inductive way. Depending on the mining task we want to perform in our graph, we would like to maximize or minimize the size of the bottleneck, aiming to more connected or more separated communities.
GAP-Layer: Spectral Gap Rewiring
Loss and derivatives using or
For this explanation, we are going to suppose we want to minimize the spectral gap, i.e. make the graph bottleneck size smaller. For minimizing the spectral GAP we minimize this loss:
The gradients of this cost function w.r.t each element of are not trivial. Depending on if we use the Laplacian, , or the normalized Laplacian, , the derivatives are going to be different. For the former case (), we will use the derivatives presented in Kang et al. 2019. In the latter scenario (), we present the Spectral Gradients: derivatives from the spectral gap w.r.t. the Normalized Laplacian. However, whatever option we choose, can seen as a function of and , hence, , the gradient of wrt each component of (how does the bottleneck change with each change in our graph?), comes from the chain rule of the matrix derivative if using the Laplacian or if using the normalized Laplacian. Both of this derivatives, relies on the Fiedler vector (2nd eigenvector: if we use and if using instead). For more details on those derivatives, and for the sake of simplicity in this blog explanation, I suggest go to the original paper.
Differentiable approximation of and
Once we have those derivatives, the problem is still not that trivial. Note that our cost function , relies on an eigenvalue . In addition, the derivatives also depends on the Fiedler vector or , which is the eigenvector corresponding to the aforementioned eigenvalue. However, we DO NOT COMPUTE IT SPECTRALLY, as its computation has a complexity of and would need to be computed in every learning iteration. Instead, we learn an approximation of and use its Dirichlet energy to approximate the .
In addition, if using , since , we first approximate and then approximate from . With this approximation, we can easily compute the node belonging to each cluster with a simple MLP. In addition, such as the Fiedler value must satisfy orthogonality and normality, restrictions must be added to that MLP Clustering.
GAP-Layer
To sum up, GAP-Layer can be defined as the following. Given the matrix encoding the features of the nodes after any message passing (MP) layer, learns the association while is optimized according to the loss:
Then, the is approximated from using equation. Once calculated and we consider the loss:
returning . Then the GAP diffusion results from minimizing
References (Kang et al. 2019) Kang, J., & Tong, H. (2019, November). N2n: Network derivative mining. In Proceedings of the 28th ACM International Conference on Information and Knowledge Management (pp. 861-870).