Abstract
Representing a graph as a vector is a challenging task; ideally, the representation should be easily computable and conducive to efficient comparisons among graphs, tailored to the particular data and analytical task at hand. Unfortunately, a "one-size-fits-all" solution is unattainable, as different analytical tasks may require different attention to global or local graph features. We develop SGR, the first, to our knowledge, method for learning graph representations in a self-supervised manner. Grounded on spectral graph analysis, SGR seamlessly combines all aforementioned desirable properties. In extensive experiments, we show how our approach works on large graph collections, facilitates self-supervised representation learning across a variety of application domains, and performs competitively to state-of-the-art methods without re-training.
Introduction
Graph representation learning is a cornerstone of modern data analysis, with applications ranging from drug discovery to social network modeling. The primary objective is to map graphs of varying sizes and topologies into a fixed-dimensional vector space where standard machine learning algorithms can be applied. However, achieving a representation that is both expressive and computationally efficient remains a significant hurdle.
Existing methodologies typically fall into two categories, each with distinct limitations. Kernel methods measure similarity between graph pairs but are often computationally prohibitive, scaling quadratically with the number of graphs. Furthermore, they are "rigid" and difficult to adapt to specific analytical tasks. Conversely, supervised neural networks are powerful but require extensive labeled datasets, which are often costly or unavailable. They also frequently struggle to scale to graphs containing thousands of nodes. SGR (Self-Supervised Spectral Graph Representation) bridges this gap by offering a self-supervised approach that is both computationally efficient and requires no human-labeled data for training.
Methods
The SGR framework is grounded in Spectral Graph Theory, utilizing the eigenvalues of a graph's normalized Laplacian matrix as a structural "fingerprint." The methodology consists of three primary stages:
- Spectral Interpolation: To handle graphs of varying sizes, SGR employs cubic splines to interpolate eigenvalues into a fixed-size vector (e.g., 256 dimensions), ensuring size-invariance.
- Self-Supervised Training: SGR utilizes synthetic data for training. Instead of relying on real-world labels, a single-layer perceptron (SLP) is trained to differentiate between purely random graphs (Erdős-Rényi model) and those with community structures (Stochastic Block Model).
- Feature Extraction: Post-training, the classifier is discarded, and the learned weights serve as a universal feature extractor. This allows SGR to be applied to real-world datasets (like proteins or social networks) without further training or domain-specific labels.
As illustrated in the comparison table above, SGR is unique in being simultaneously learned, unsupervised, and multi-scale, while maintaining linear comparison complexity $O(d)$.
Results and Evaluation
The authors evaluated SGR on nine benchmark datasets, spanning bio-chemical domains (D&D, ENZYMES, MUTAG, PROTEINS) and social networks (COLLAB, IMDB, REDDIT).
SGR demonstrated superior performance across several key metrics:
- Accuracy: SGR achieved the highest classification accuracy on 6 out of 9 datasets, outperforming both traditional kernels and fixed representations on large-scale collections like D&D and REDDIT-Binary.
- Scalability: SGR processes large datasets in minutes, whereas traditional kernels like Shortest-Path (SP) can exceed 24 hours.
- Generalization: The self-supervised nature of SGR allows it to remain robust across diverse domains without task-specific re-training.
Discussion and Conclusion
While SGR is highly effective for structural analysis, it currently focuses purely on topology. Future iterations could incorporate node or edge attributes (e.g., atomic types in molecules) to improve performance on chemical tasks. Additionally, while a simple single-layer perceptron proved effective, deeper architectures might yield even richer representations. SGR's performance on very small, dense graphs (like the IMDB datasets) suggests that specialized kernels like Weisfeiler-Lehman still maintain a niche advantage in those specific contexts. Overall, SGR represents a significant step forward in efficient, unsupervised graph representation learning.
Summary updated