Table of Contents
Fetching ...

CoRe-GD: A Hierarchical Framework for Scalable Graph Visualization with GNNs

Florian Grötschla, Joël Mathys, Robert Veres, Roger Wattenhofer

TL;DR

CoRe-GD tackles the scalability challenge of stress-driven graph drawing by introducing a hierarchical coarsening framework and a novel positional rewiring scheme that enables long-range information exchange. It trains a recurrent GNN to minimize a scale-invariant stress objective across a coarsening hierarchy, using a replay buffer to stabilize long sequences of graph convolutions and a closed-form scaling factor $\alpha_{G,\Gamma}$ to preserve stress when rescaling to unit-area layouts. The approach achieves state-of-the-art stress performance on prominent benchmarks (e.g., the Rome dataset) and demonstrates sub-quadratic runtime via coarsening, enabling application to large graphs while maintaining layout quality. Additionally, the latent node embeddings produced by CoRe-GD show promise as powerful positional encodings for downstream tasks beyond graph drawing.

Abstract

Graph Visualization, also known as Graph Drawing, aims to find geometric embeddings of graphs that optimize certain criteria. Stress is a widely used metric; stress is minimized when every pair of nodes is positioned at their shortest path distance. However, stress optimization presents computational challenges due to its inherent complexity and is usually solved using heuristics in practice. We introduce a scalable Graph Neural Network (GNN) based Graph Drawing framework with sub-quadratic runtime that can learn to optimize stress. Inspired by classical stress optimization techniques and force-directed layout algorithms, we create a coarsening hierarchy for the input graph. Beginning at the coarsest level, we iteratively refine and un-coarsen the layout, until we generate an embedding for the original graph. To enhance information propagation within the network, we propose a novel positional rewiring technique based on intermediate node positions. Our empirical evaluation demonstrates that the framework achieves state-of-the-art performance while remaining scalable.

CoRe-GD: A Hierarchical Framework for Scalable Graph Visualization with GNNs

TL;DR

CoRe-GD tackles the scalability challenge of stress-driven graph drawing by introducing a hierarchical coarsening framework and a novel positional rewiring scheme that enables long-range information exchange. It trains a recurrent GNN to minimize a scale-invariant stress objective across a coarsening hierarchy, using a replay buffer to stabilize long sequences of graph convolutions and a closed-form scaling factor to preserve stress when rescaling to unit-area layouts. The approach achieves state-of-the-art stress performance on prominent benchmarks (e.g., the Rome dataset) and demonstrates sub-quadratic runtime via coarsening, enabling application to large graphs while maintaining layout quality. Additionally, the latent node embeddings produced by CoRe-GD show promise as powerful positional encodings for downstream tasks beyond graph drawing.

Abstract

Graph Visualization, also known as Graph Drawing, aims to find geometric embeddings of graphs that optimize certain criteria. Stress is a widely used metric; stress is minimized when every pair of nodes is positioned at their shortest path distance. However, stress optimization presents computational challenges due to its inherent complexity and is usually solved using heuristics in practice. We introduce a scalable Graph Neural Network (GNN) based Graph Drawing framework with sub-quadratic runtime that can learn to optimize stress. Inspired by classical stress optimization techniques and force-directed layout algorithms, we create a coarsening hierarchy for the input graph. Beginning at the coarsest level, we iteratively refine and un-coarsen the layout, until we generate an embedding for the original graph. To enhance information propagation within the network, we propose a novel positional rewiring technique based on intermediate node positions. Our empirical evaluation demonstrates that the framework achieves state-of-the-art performance while remaining scalable.
Paper Structure (39 sections, 3 theorems, 13 equations, 10 figures, 9 tables, 2 algorithms)

This paper contains 39 sections, 3 theorems, 13 equations, 10 figures, 9 tables, 2 algorithms.

Key Result

Lemma 1

To minimize stress for arbitrary graphs, the distinguishability power for nodes has to exceed that of the $k$-WL algorithm for any $k$.

Figures (10)

  • Figure 1: Graph Evolution with CoRe-GD: From coarse to fine. Our hierarchical approach prioritizes global positioning before local optimization. The resulting visualization makes the underlying graph understandable. Graphs were drawn with CoRe-GD model trained for 3 dimensions.
  • Figure 2: Architecture overview of CoRe-GD: On top:(a) An encoder creates initial embeddings for nodes on the coarsest level (see Section \ref{['sec:node_initialization']}). (b) The embeddings are then successively refined in the layout optimization module (depiction below) before the graph is (c) uncontracted and embeddings are projected to the new nodes (see Section \ref{['sec:coarsening']}). After $c-1$ repetitions (with $c$ being the number of coarsening levels), the original graph is recovered, and (d) the layout is optimized one final time before (e) being decoded into the final node positions. On the bottom: Overview of the layout optimization: To refine the latent embeddings of a given graph, we (1) execute a GNN convolution on the original topology. (2) The resulting embeddings are then decoded into node positions that undergo the rewiring procedure (3), resulting in a new set of edges $E'$ for the rewired graph. (4) These edges are then used for another GNN convolution on $E'$ to enhance information exchange between far-away nodes. The two convolutions are alternated, and the rewiring is re-computed $r$ times before (5) one last convolution on the original topology is applied.
  • Figure 3: Part a) shows the best drawing inside a $[0,1]^2$ bounding box and b) one best drawing without restrictions.
  • Figure 4: Visual comparison of Graph Drawings between classical algorithms, learned models, and CoRe-GD. Below each drawing, we report the scale-invariant stress. All neural models were trained on the Rome dataset. CoRe-GD generates good layouts across the board, even for regular graphs.
  • Figure 5: Normalized stress and runtimes on randomly generated sparse graphs (Delaunay triangulations of random point clouds). The green vertical line at 200 marks the train limit of DeepGD, while the blue line at 1,000 marks the limit of CoRe-GD. DeepGD could only be executed for graphs up to size 5,000 before running out of GPU memory. DeepGD becomes unstable under out-of-distribution data, whereas CoRe-GD slightly degrades but still keeps up with the other baselines. The runtimes show that CoRe-GD scales better than most baselines. Further, coarsening aids with scalability for larger graphs, as the initial feature computation, which becomes progressively more expensive, only has to be done for the coarsest graph. See Appendix \ref{['app:scaling_exp']} for more details on the used setup.
  • ...and 5 more figures

Theorems & Definitions (3)

  • Lemma 1
  • Lemma 2
  • Lemma 3