From Nodes to Pixels: Topological and Structural Two-View Graph Imaging

Md Joshem Uddin, Soham Changani, Sai Karthik Navuluru, Cuneyt Gurcan Akcora, Baris CoskunuzerarXiv 2026 · arXiv

TL;DR

G2IMAGE is a framework that converts irregular, variable-sized graphs into fixed-budget, image-like tensors, allowing researchers to use standard 2D vision backbones for graph learning. By combining stable topological summaries with high-bandwidth structural grids and aligning them via contrastive learning, it achieves state-of-the-art performance on major graph classification benchmarks.

What Problem Does This Paper Address?

In computer vision, we have "patches." In natural language processing, we have "tokens." These standardized inputs allow for powerful, reusable architectures like Transformers to be applied across diverse tasks. Graph learning, however, still lacks such a "universal" interface.

Graphs are inherently messy: they vary wildly in size and density, and their structure is invariant under node relabeling (permutation invariance). Consequently, most graph neural networks (GNNs) are tied to the specific combinatorial structure of the input, requiring complex message-passing schemes, specialized pooling layers, and dataset-specific preprocessing. The authors of this paper ask: Can we turn graphs into images? If we can represent a graph as a fixed-size tensor without losing its essential structural and topological properties, we can decouple graph representation from model design and leverage the massive progress made in 2D deep learning.

Methods

The authors introduce G2IMAGE, a framework that maps a graph to two complementary "views" represented as image-like tensors.

  1. TopoGrid (The Topological View): This view uses tools from Topological Data Analysis (TDA). It constructs a "bifiltration"—a way of looking at the graph's connectivity as two different properties (like node degree and heat kernel signatures) vary. It records Betti numbers (counts of connected components and cycles) and vertex/edge counts across a grid. This provides a stable, compressed summary of the graph's "shape."
  2. GraphGrid (The Structural View): This view captures higher-bandwidth relational data. It groups nodes based on intrinsic scores (like PageRank or k-core) and aggregates the edge densities between these groups into a $k \times k$ pixelated grid.
Figure 1: G2IMAGE overview. From an input graph G, TOPOGRID builds a 4 × M × N multipersistence surface tensor and GRAPHGRID builds a k × k structural density grid. Two lightweight 2D encoders (2D CNN extracts local features, which are flattened into tokens and processed by a Transformer encoder) produce embeddings that are aligned with a supervised cross-view contrastive loss and trained with cross-entropy for graph classification.

Both views are permutation-invariant by design. To process these "images," G2IMAGE uses lightweight 2D encoders (a mix of CNNs and Transformers). Crucially, the two views are not just concatenated; they are aligned using a supervised cross-view contrastive objective (SupCon). This forces the model to find a representation where the topological and structural views of the same graph (and graphs with the same label) are close together in embedding space.

Datasets

The framework was evaluated on two major benchmark suites:

  • TU Benchmarks: Seven classic datasets including MUTAG, PROTEINS, and IMDB-BINARY, covering molecular, biological, and social networks.
  • OGB Molecular Benchmarks: Seven large-scale datasets from the Open Graph Benchmark (e.g., HIV, BACE, Tox21) which include rich atom and bond attributes.
Table 1: Graph classification datasets.

Key Insights and Ideas

  • Fixed-Budget Representation: By mapping graphs to a fixed $10 \times 10$ grid, the computational cost of the neural backbone becomes independent of the graph's size ($|V|$) or density ($|E|$). This makes the approach highly scalable for inference.
  • Complementarity is Key: Topology is great for stability but can be too "blurry." Structural grids provide the missing detail. The paper shows that neither view dominates; they work better together.
  • Alignment > Fusion: Simply stacking the channels (early fusion) or concatenating embeddings (late fusion) is less effective than using contrastive learning to align the views. The alignment objective acts as a powerful regularizer that helps the model ignore noise.
  • Stability Guarantees: The authors provide mathematical proofs showing that their imaging process is stable. Small perturbations in the graph (like adding an edge) result in predictable, localized changes in the resulting image, rather than catastrophic shifts in the representation.

Key Results

G2IMAGE consistently outperformed or matched state-of-the-art GNNs and graph transformers.

  • TU Benchmarks: G2IMAGE achieved the best overall average rank (2.29) across seven datasets, outperforming 16 other methods including GCN, GIN, and specialized topological models.
  • OGB Benchmarks: An attribute-aware version, G2IMAGE-CHEM, achieved the best overall performance on molecular tasks, winning outright on five of seven datasets. This demonstrates that the "imaging" approach generalizes well to graphs with complex node and edge features.
  • Efficiency: While the one-time graph-to-tensor conversion has some overhead, the subsequent training is very fast. For example, on the MUTAG dataset, the total processing time is significantly lower than many complex GNN variants.
Table 3: Performance comparison on TU benchmarks, showing G2IMAGE's superior average rank.

Limitations and Future Work

The authors acknowledge that G2IMAGE is non-injective. Because it compresses a graph into a fixed-size grid, some fine-grained combinatorial detail is inevitably lost. At a fixed resolution, two non-isomorphic graphs could theoretically produce the same image.

Future work includes:

  • Extending the framework to graph regression and node-level tasks.
  • Exploring pretraining and transfer learning, where a model trained on a massive "image" dataset of graphs could be fine-tuned for specific downstream tasks, similar to how ImageNet-pretrained models are used in vision.
  • Testing on larger, long-range benchmarks to see if the 2D encoders can capture even more distant dependencies than standard message-passing.

Summary updated

Abstract

Graph learning still lacks a broadly reusable input interface comparable to patches in vision or tokens in language. Unlike images or text, graphs are irregular, vary in size and density, and are invariant under many equivalent node labelings, making it difficult to standardize inputs across tasks and architectures. We introduce G2Image, a fixed-budget graph imaging framework that converts each graph into two complementary image-like views. TopoGrid provides a stable topological view by encoding an intrinsic bifiltration as a compact multipersistence surface grid, while GraphGrid provides a higher-bandwidth structural view by aggregating edge densities between groups defined by intrinsic node scores. Both views are permutation-invariant and come with resolution-controlled stability guarantees. Because the resulting representations are fixed-size tensors, they can be processed by lightweight 2D encoders and aligned through a supervised cross-view contrastive objective. Across graph classification and molecular prediction benchmarks, G2Image achieves strong average performance among the compared methods, improves over single-view and standard fusion variants, and extends to attribute-rich molecular graphs without changing the overall architecture. These results suggest that fixed-budget graph images offer a practical and reusable interface for graph representation learning.
BibTeX
@misc{uddin2026from,
  author = {Md Joshem Uddin and Soham Changani and Sai Karthik Navuluru and Cuneyt Gurcan Akcora and Baris Coskunuzer},
  title = {{From Nodes to Pixels: Topological and Structural Two-View Graph Imaging}},
  year = {2026},
  eprint = {2611.14750},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.14750},
}
Figure