Scalable Deep Metric Learning on Attributed Graphs

Xiang Li, Gagan Agrawal, Ruoming Jin, Rajiv Ramnath

Abstract

This paper presents a novel framework for scalable node embedding on large-scale attributed graphs. By integrating Generalized PageRank (GPR) filtering with a multi-class tuplet loss, the proposed methods—DMT (semi-supervised) and DMAT-i (unsupervised)—circumvent the scalability and over-smoothing issues inherent in traditional deep Graph Convolutional Networks (GCNs). The approach eliminates the need for expensive negative sampling, enabling efficient training on graphs with up to 10 million nodes, a scale where most existing methods fail to operate.

Introduction

Graph representation learning aims to transform nodes into low-dimensional vectors that capture both local features and global network structure. While Graph Convolutional Networks (GCNs) have become the standard for this task, they face two significant hurdles. First is scalability: GCNs often require loading substantial portions of the graph into GPU memory, which is impractical for massive datasets. Second is over-smoothing: as more layers are added to capture distant relationships, node representations tend to converge, becoming indistinguishable.

Furthermore, Deep Metric Learning (DML)—the process of "pulling" similar examples together and "pushing" dissimilar ones apart—is powerful but typically suffers from a "sampling bottleneck." Identifying "hard" negative examples is computationally expensive and significantly slows down the training process.

Methodology

The authors propose a framework that moves away from deep, trainable graph convolution layers in favor of a more efficient pipeline. The methodology rests on three pillars:

  1. Scalable Graph Filtering: Instead of deep GCN layers, the model uses an approximate Generalized PageRank (GPR) filter as a pre-processing step. This smooths node features based on the graph structure without the memory overhead of a deep neural network.
  2. Multi-class Tuplet Loss: The model adapts a loss function from computer vision that handles multiple positive and negative samples simultaneously within a mini-batch. This allows the model to learn from "natural tuplets" created by shuffling batches, eliminating the need for explicit negative sample searching.
  3. Mini-batch Training: Because filtering is performed upfront, the model can be trained using standard stochastic gradient descent, allowing it to scale to graphs far larger than a single GPU's memory.
Architecture of the proposed framework showing the graph filtering and tuplet loss pipeline.

A key insight of this work is that a fixed, scalable filter followed by a simple MLP encoder can be more effective and much faster than deep GCNs. By using a softmax-based tuplet loss, the model naturally prioritizes "hard" negative samples during gradient updates, providing the benefits of hard-negative mining without the computational cost.

Key Results

The researchers evaluated their models on eight real-world datasets, including citation networks (Cora, Citeseer, Pubmed), social networks (ACM, DBLP), and e-commerce data (Amazon Photo). To test the limits of scalability, they used synthetic datasets with up to 10 million nodes.

Massive Scalability and Efficiency

In head-to-head tests, DMAT-i was the only framework capable of handling a graph with 10 million nodes. Most competitive baselines, such as GCA or DGI, reached memory limits at or before 1 million nodes.

Comparison of training time vs. node count, highlighting the scalability of DMAT-i.

As shown in the performance metrics, the model converges significantly faster than its peers. For instance, on the Coauthor PHY dataset, DMAT-i reached peak accuracy in approximately 33 seconds, whereas the competitive AGE method required over 6,700 seconds.

Consistent Performance

Across downstream tasks—including node clustering, classification, and link prediction—the proposed methods demonstrated superior consistency. On the ACM dataset, DMAT-i achieved a clustering accuracy of 91.60%, outperforming several state-of-the-art GCN-based models. The authors also provided a theoretical bridge between Tuplet Loss and Contrastive Learning, proving that their unsupervised loss acts as a lower bound for an ideal unbiased contrastive loss.

Conclusion

This work demonstrates that high-quality graph embeddings do not strictly require deep trainable convolutions. By combining GPR filtering with an efficient tuplet loss, the authors have created a framework that is both highly performant and uniquely scalable to massive real-world graphs. Future work may involve extending this approach to graph-level tasks and further refining augmentation strategies to close the performance gap between unsupervised and semi-supervised settings.

Summary updated

BibTeX
@inproceedings{li2023scalable,
  author = {Xiang Li and Gagan Agrawal and Ruoming Jin and Rajiv Ramnath},
  title = {{Scalable Deep Metric Learning on Attributed Graphs}},
  booktitle = {CSoNet},
  year = {2023},
}
Figure