Density of states for fast embedding node-attributed graphs

Lingxiao Zhao, Saurabh Sawlani, Leman AkogluKnowledge and Information Systems 2023

Abstract

Given a node-attributed graph, how can we efficiently represent it with few numerical features that expressively reflect its topology and attribute information? We propose A-DOGE, for attributed DOS-based graph embedding, based on density of states (DOS, a.k.a. spectral density) to tackle this problem. A-DOGE is designed to fulfill a long desiderata of desirable characteristics. Most notably, it capitalizes on efficient approximation algorithms for DOS, that we extend to blend in node labels and attributes for the first time, making it fast and scalable for large attributed graphs and graph databases. Being based on the entire eigenspectrum of a graph, A-DOGE can capture structural and attribute properties at multiple ("glocal") scales. Moreover, it is unsupervised (i.e., agnostic to any specific objective) and lends itself to various interpretations, which makes it suitable for exploratory graph mining tasks. Finally, it processes each graph independent of others, making it amenable for streaming settings as well as parallelization. Through extensive experiments, we show the efficacy and efficiency of A-DOGE on exploratory graph analysis and graph classification tasks, where it significantly outperforms unsupervised baselines and achieves competitive performance with modern supervised GNNs, while achieving the best trade-off between accuracy and runtime.

Introduction: The Spectral-Attribute Trade-off

In graph machine learning, researchers often face a persistent trade-off between structural expressiveness and computational efficiency. Traditional spectral methods, which rely on eigenvalues, are excellent at capturing global graph structures but historically struggle to incorporate node attributes and are computationally expensive ($O(n^3)$). Conversely, modern Graph Neural Networks (GNNs) excel at handling attributes but often act as "low-pass filters," missing mid-range structural details. Furthermore, GNNs typically require expensive supervised training and do not scale easily to massive databases of independent graphs.

A-DOGE (Attributed DOS-based Graph Embedding) addresses this gap by providing a representation that is unsupervised, flexible, multi-scale, and efficient enough for streaming or massive parallelization.

Methodology: Listening to the Graph's Rhythm

A-DOGE represents node-attributed graphs by approximating their entire spectral "fingerprint." It is built on three main pillars:

  1. Density of States (DOS): Instead of calculating every single eigenvalue, A-DOGE uses the Gauss Quadrature via Lanczos iteration (GQL) algorithm to approximate the distribution of the entire spectrum in roughly linear time ($O(n+m)$).
  2. Local & Coupled DOS (LDOS/cLDOS): To incorporate node attributes, the authors project attribute vectors onto the graph's eigenvectors. This measures how well specific attributes align with specific structural components. cLDOS further captures interactions between pairs of attributes.
  3. Spectral Filterbanks: The resulting spectral histograms are converted into fixed-length feature vectors using Chebyshev polynomials (acting as band-pass filters) and Power functions (related to $k$-step random walks).
Table 1: Comparison of A-DOGE against existing graph embedding methods. A-DOGE is the only method that satisfies the full set of desiderata, including handling node attributes and edge weights while remaining task-agnostic and scalable.

Experimental Results

The authors evaluated A-DOGE on 15 diverse datasets, including social benchmarks (REDDIT, COLLAB), biochemistry (PROTEINS, AIDS), and specialized synthetic tasks.

Efficiency and Accuracy

A-DOGE achieves a superior runtime-accuracy trade-off. For instance, on the REDDIT-5K dataset, it computes embeddings for graphs with nearly 10,000 edges in under one second—roughly twice as fast as the Weisfeiler-Lehman (WL) kernel while providing higher accuracy on attributed tasks. Despite being entirely unsupervised, A-DOGE achieves performance competitive with modern supervised GNNs like GCN and GIN.

Figure 1: Classification accuracy vs. runtime (seconds). The plots demonstrate that A-DOGE (marked with 'A') consistently provides the best trade-off between predictive performance and computational efficiency across multiple datasets compared to both unsupervised and supervised baselines.

The "Glocal" Advantage

Unlike GNNs that often smooth out data, A-DOGE's spectral approach captures mesoscopic structures—like communities or migration clusters—found in the middle of the spectrum. Because A-DOGE processes each graph independently, it is "embarrassingly parallelizable" and ideal for streaming data environments.

Conclusion

A-DOGE offers a powerful, interpretable, and highly efficient framework for graph embedding. By bridging the gap between spectral analysis and node attributes, it provides a "glocal" view of graph data that is both fast and expressive. Future work may explore theoretical characterizations of its expressiveness relative to the graph isomorphism test and extensions to directed graphs.

Summary updated

BibTeX
@article{zhao2023density,
  author = {Lingxiao Zhao and Saurabh Sawlani and Leman Akoglu},
  title = {{Density of states for fast embedding node-attributed graphs}},
  journal = {Knowledge and Information Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=W6TWgcUDcYP},
}
Figure