Online Graph Dictionary Learning

Cédric Vincent-Cuaz, Titouan Vayer, Rémi Flamary, Marco Corneli, Nicolas Courty

TL;DR

This paper introduces Online Graph Dictionary Learning (GDL), a framework that represents complex graphs as linear combinations of basic "graph atoms." By leveraging the Gromov-Wasserstein distance, the method handles graphs of different sizes and structures in an online, computationally efficient manner. This enables downstream tasks like real-time subspace tracking and interpretable graph embedding.

What Problem Does This Paper Address?

Dictionary learning is a staple of unsupervised representation learning. It works by finding a set of "atoms" (a dictionary) such that any data point can be approximated as a sparse linear combination of these atoms. While this is straightforward for vectorial data, it is notoriously challenging for graphs.

Graphs are inherently non-vectorial: they have varying numbers of nodes, no natural ordering (unregistered nodes), and their features are often defined by the relationships between nodes rather than the nodes themselves. Previous attempts at graph dictionary learning were either computationally prohibitive or relied on highly non-linear models (like Gromov-Wasserstein barycenters) that made reconstructing or interpreting the graphs difficult. Furthermore, most existing methods are not designed for streaming data, where the underlying structure of the graphs might change over time (non-stationarity).

Methods

The authors propose a linear factorization model where a graph is represented by its pairwise relation matrix (e.g., an adjacency or Laplacian matrix).

  1. Linear Embedding: A target graph is modeled as $\sum w_s C_s$, where $C_s$ are the dictionary atoms (relation matrices) and $w_s$ are the embedding weights.
  2. Gromov-Wasserstein (GW) Loss: To compare graphs of different sizes, the model uses the GW distance as the data-fitting term. This allows it to find correspondences between the nodes of the input graph and the fixed-size atoms.
  3. Online Stochastic Algorithm: Instead of processing the whole dataset at once, the model uses a projected gradient descent approach on minibatches. This makes it scalable to massive datasets and suitable for streaming "online" scenarios.
  4. The Mahalanobis Proxy: The authors introduce a novel upper bound for the GW distance. They prove that in the embedding space, the GW distance is upper-bounded by a specific Mahalanobis distance. This acts as a "fast proxy," allowing for rapid clustering and classification without re-computing expensive optimal transport problems.
  5. Fused GW Extension: The framework naturally extends to labeled graphs (graphs with node attributes) using the Fused Gromov-Wasserstein (FGW) distance.
Overview of the Online Graph Dictionary Learning framework.

Datasets

The authors evaluated GDL on a wide variety of benchmarks:

  • Simulated: Stochastic Block Models (SBM) with varying clusters and node proportions.
  • Social Networks (No attributes): IMDB-B, IMDB-M, and the large-scale TWITCH-EGOS.
  • Bio/Chemical (Discrete attributes): MUTAG, PTC-MR.
  • Bio/Chemical (Real-valued attributes): BZR, COX2, ENZYMES, PROTEIN.
  • Streaming/Synthetic: TRIANGLES (labeled graphs with 10 classes).

Key Insights and Ideas

  • Linearity is a Feature, Not a Bug: By sticking to a linear combination of atoms, the "pre-image" problem (reconstructing a graph from its embedding) becomes trivial. You simply sum the matrices.
  • Interpretability: The atoms themselves are interpretable. In SBM experiments, the learned atoms clearly recovered the underlying community structures (e.g., a "dense" atom vs. a "clustered" atom).
  • The Power of Sparsity: Adding a negative quadratic regularization promotes sparse embeddings. This pushes embeddings toward the corners of the simplex, leading to much cleaner, more discriminant clustering.
Visualizing embeddings on the simplex. Adding sparsity regularization (right) pushes embeddings toward the corners, leading to more discriminant representations.
  • Subspace Tracking: Because the algorithm is online, it can adapt to "concept drift." If a stream of graphs suddenly changes its structural nature, the dictionary updates to follow the new "subspace," effectively tracking the evolution of the data.

Key Results

  • Clustering Performance: GDL achieved state-of-the-art or highly competitive Rand Index (RI) scores across almost all real-world datasets, often outperforming the non-linear GW Factorization (GWF) and Spectral Clustering.
  • Efficiency: The unmixing procedure is fast, taking roughly 44ms per graph for the IMDB-M dataset on a standard CPU.
  • Proxy Accuracy: The Mahalanobis upper bound showed a 0.96 correlation with the actual GW distance between input graphs, proving it is a highly reliable and much faster alternative for downstream tasks.
  • Change Detection: In streaming experiments (TWITCH-EGOS and TRIANGLES), the model successfully detected "events" (changes in the graph class) through visible jumps in the loss function.

Limitations and Future Work

  • Batch Size Sensitivity: On highly heterogeneous datasets like ENZYMES, the model's performance was sensitive to batch size, suggesting that very complex structural diversity requires more careful tuning.
  • Tightness of the Bound: The Mahalanobis proxy is an upper bound and isn't always "tight," especially when graph embeddings are far apart.
  • Future Directions: The authors suggest extending this work to graph denoising (using the dictionary to clean noisy observations) and graph inpainting (predicting missing parts of a graph structure).

Summary updated

BibTeX
@inproceedings{vincentcuaz2021online,
  author = {Cédric Vincent-Cuaz and Titouan Vayer and Rémi Flamary and Marco Corneli and Nicolas Courty},
  title = {{Online Graph Dictionary Learning}},
  booktitle = {International Conference on Machine Learning},
  year = {2021},
  url = {https://openreview.net/forum?id=TlDn7u9WkZK},
}
Figure