Unsupervised Inductive Whole-Graph Embedding by Preserving Graph Proximity

Yunsheng Bai, Hao Ding, Yang Qiao, Agustin Marinovic, Ken Gu, Ting Chen, Yizhou Sun, Wei WangarXiv 2019

Introduction

Learning effective representations for entire graphs is a fundamental challenge in graph-based machine learning. While node-level embeddings have seen significant progress, graph-level tasks—such as molecular property prediction or community detection—require a holistic representation of the entire structure. Existing methods often struggle with two main limitations: a heavy reliance on labeled data (supervision) and an inability to generalize to unseen graphs (transductivity).

UGRAPHEMB addresses these challenges by introducing a completely unsupervised and inductive framework. By training a neural network to preserve "inter-graph" proximity, it creates a universal embedding space where similar graphs are positioned closely, enabling the model to generalize to entirely new, unseen graphs.

Methodology: The UGRAPHEMB Framework

The core innovation of UGRAPHEMB lies in its ability to capture both internal structural features and external relationships between graphs.

The UGRAPHEMB framework overview, illustrating the transition from a graph dataset to a proximity-preserving embedding space.

The framework consists of two primary components:

  1. Multi-Scale Node Attention (MSNA): Traditional Graph Neural Networks (GNNs) typically use node embeddings from the final layer to compute a graph-level vector. UGRAPHEMB argues that this approach loses valuable multi-scale information. MSNA aggregates node embeddings across all layers, capturing structural features ranging from local neighborhoods to global topology.
  2. Proximity-Preserving Loss: Inspired by Multidimensional Scaling (MDS), the model is trained to minimize the difference between the distance of graph embeddings in the vector space and their "true" structural proximity (e.g., Graph Edit Distance or Maximum Common Subgraph). This allows the model to learn a domain-agnostic mapping function $h_{\mathcal{G}} = f(\mathcal{G})$.

Experimental Setup

The authors evaluated UGRAPHEMB across five diverse real-world datasets:

  • Bioinformatics: PTC and NCI109 (chemical compounds).
  • Social Networks: IMDBM (actor networks) and REDDIT12K (discussion threads).
  • Text Analysis: WEB (documents represented as graphs).

Key Results and Visualizations

UGRAPHEMB demonstrates strong performance in both unsupervised and semi-supervised settings. In graph classification, it achieved top-2 accuracy on the majority of datasets even without labels. When fine-tuned with a small amount of supervised data, it outperformed state-of-the-art baselines on 4 out of 5 datasets.

t-SNE visualizations comparing UGRAPHEMB against baseline methods, highlighting its ability to cluster structurally similar graphs.

Beyond classification, the model excels at similarity ranking. It significantly outperforms traditional graph kernels and other unsupervised embeddings, matching the accuracy of computationally expensive Graph Edit Distance (GED) solvers. As shown in the t-SNE visualizations, UGRAPHEMB naturally clusters graphs with similar sub-structures (such as specific molecular rings) without explicit supervision.

Discussion and Insights

  • The Power of Inter-graph Information: The relationship between graphs serves as a robust signal for unsupervised training, often proving more effective than looking at internal structure alone.
  • Inductive Advantage: Unlike transductive methods like graph2vec, UGRAPHEMB learns a generalizable function. This allows for real-time embedding of new graphs in a single forward pass, which is critical for large-scale database applications.
  • Multi-Scale Importance: Aggregating information from multiple GNN layers is essential for distinguishing subtle structural differences that "smoothed" final-layer embeddings might miss.

Limitations

Despite its strengths, UGRAPHEMB faces challenges regarding the computational cost of generating ground-truth proximity metrics (like GED) for training, which are often NP-hard. Additionally, the current model's reliance on one-hot encoding for node labels can struggle with datasets containing a very high diversity of unique labels. Future work may explore more sophisticated node encoding techniques and applications to even larger "hyper-level" graph structures.

Summary updated

BibTeX
@misc{bai2019unsupervised,
  author = {Yunsheng Bai and Hao Ding and Yang Qiao and Agustin Marinovic and Ken Gu and Ting Chen and Yizhou Sun and Wei Wang},
  title = {{Unsupervised Inductive Whole-Graph Embedding by Preserving Graph Proximity}},
  year = {2019},
  eprint = {1904.01098},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1904.01098},
}
Figure