From Nodes to Pixels: Topological and Structural Two-View Graph Imaging
Authors: Md Joshem Uddin, Soham Changani, Sai Karthik Navuluru, Cuneyt Gurcan Akcora, Baris Coskunuzer
Organizations: Dept of Math. Sciences, University of Texas at Dallas, Richardson, TX 75080, USA · AI Institute, University of Central Florida, Orlando, FL 32816, USA
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.
Figures & tables
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.
Datasets
#Graphs
∣V∣
∣E∣
Classes
TU Benchmarks
MUTAG
188
17.93
19.79
2
BZR
405
35.75
38.36
2
PTC-MR
344
14.29
14.69
2
COX2
467
41.22
43.45
2
PROTEINS
1113
39.06
72.82
2
Table 1: Graph classification datasets.
Dataset
TopoGrid
GraphGrid
SupCon
Total
MUTAG
130.8
0.2
80.5
212.7
PROTEINS
538.1
3.0
594.1
1154.4
IMDB-B
1066.3
1.3
287.5
1362.8
Table 2: Runtime Analysis (in seconds)
Method
MUTAG
BZR
PTC-MR
COX2
PROTEINS
IMDB-B
IMDB-M
AvgRank ↓
GCN Kipf and Welling (2017)
87.89 ± 5.29
86.83 ± 4.25
62.57 ± 4.13
84.26 ± 2.89
74.11 ± 1.79
60.60 ± 3.44
50.47 ± 4.38
10.00
GAT Veličković et al. (2018)
87.37 ± 4.21
83.66 ± 4.09
63.14 ± 5.92
85.11 ± 2.13
74.38 ± 1.33
61.70 ± 1.49
49.93 ± 3.09
9.71
GIN Xu et al. (2018)
83.68 ± 8.95
82.68 ± 3.53
54.86 ± 7.86
80.85 ± 5.47
72.05 ± 3.57
61.30 ± 1.85
47.93 ± 2.99
13.93
GSAGE Hamilton et al. (2017)
83.60 ± 9.60
77.53 ± 3.73
60.10 ± 4.70
79.01 ± 2.42
73.00 ± 4.50
68.80 ± 4.50
47.60 ± 3.50
13.86
DiffPool Ying et al. (2018)
87.50 ± 3.35
51.83 ± 2.17
45.75 ± 5.25
59.67 ± 3.32
70.60 ± 2.74
58.71 ± 1.48
42.08 ± 1.93
16.29
DropGIN Papp et al. (2021)
85.79 ± 9.72
77.80 ± 2.55
55.14 ± 8.86
78.72 ± 0.95
55.14 ± 8.86
55.00 ± 3.71
37.33 ± 3.16
16.36
Table 3: G2Image vs. SOTA. Graph classification accuracy comparing G2Image to state-of-the-art baselines across seven benchmarks. We also report AvgRank (lower is better), computed by ranking methods per dataset (excluding missing entries) and averaging ranks across datasets. Results are highlighted as best , second-best , and third-best .
Method
SIDER
ClinTox
BACE
BBBP
TOXCAST
TOX21
HIV
AvgRank ↓
AvgGap ↓
# Graphs
1427
1478
1513
2039
8575
7831
41127
GCN
58.20 ± 2.59
75.56 ± 3.12
71.90 ± 4.04
65.60 ± 1.43
56.78 ± 3.04
74.68 ± 1.09
72.90 ± 1.12
5.57
5.01
GIN
57.73 ± 3.46
76.10 ± 3.00
72.43 ± 4.36
65.76 ± 1.91
60.33 ± 2.00
75.63 ± 1.94
76.75 ± 1.36
4.14
3.71
GSAGE
58.95 ± 1.97
81.90 ± 5.47
72.21 ± 4.04
64.00 ± 2.16
66.64 ± 1.92
75.17 ± 1.94
73.05 ± 1.47
3.86
2.68
GAT
59.67 ± 2.34
84.07 ± 4.52
72.89 ± 4.00
66.29 ± 3.06
64.71 ± 1.49
76.03 ± 1.72
75.41 ± 3.55
2.00
1.66
GPS
59.55 ± 1.53
76.14 ± 4.68
67.47 ± 3.86
65.06 ± 1.52
58.66 ± 0.69
70.97 ± 0.43
70.44 ± 1.08
5.71
6.34
Table 4: OGBG-MOL Benchmarks. Performance comparison across multiple OGB molecular graph classification datasets. G2Image * is chemistry-aware instantiation incorporating OGB atom and bond features; see Appendix D . AvgRank is computed per column (lower is better). AvgGap is the mean difference to the best result per dataset (lower is better).
Dataset
MP-Kernel
MP-Land
MP-Im
GRIL
MP-Hil
MP-Euler
MP-SB
EMP
MPTOP
GraphCode
TopoGrid
COX2
79.9 ± 1.8
79.0 ± 3.3
77.9 ± 2.7
79.8 ± 2.9
78.2 ± 1.7
77.3 ± 1.1
78.4 ± 0.7
79.9 ± 0.8
NA
78.7 ± 4.9
82.9 ± 5.8
IMDB-B
68.2 ± 1.2
71.2 ± 2.0
71.1 ± 2.1
65.2 ± 2.6
72.0 ± 1.9
73.0 ± 4.5
75.1 ± 3.4
74.4 ± 0.5
78.4 ± 5.1
65.4 ± 2.7
76.6 ± 2.6
IMDB-M
46.9 ± 2.6
46.2 ± 2.3
46.7 ± 2.7
NA
49.1 ± 1.6
50.0 ± 0.8
51.1 ± 1.3
48.0 ± 0.4
51.2 ± 4.4
NA
51.0 ± 2.9
MUTAG
86.1 ± 5.2
84.0 ± 6.8
85.6 ± 7.3
87.8 ± 4.2
87.2 ± 5.8
87.2 ± 4.3
89.9 ± 4.3
88.8 ± 0.6
92.6 ± 5.1
86.4 ± 6.1
92.6 ± 2.9
PROTEINS
67.5 ± 3.1
65.8 ± 3.3
67.3 ± 3.5
70.9 ± 3.1
70.2 ± 2.1
70.7 ± 1.9
73.9 ± 1.7
72.8 ± 0.5
NA
73.6 ± 2.6
77.7 ± 3.7
Table 5: TopoGrid vs. multipersistence baselines for graph classification. Accuracy results comparing TopoGrid to recent MP models across benchmark datasets. The best , second , and third performances are highlighted.
Method
MUTAG
BZR
PTC-MR
COX2
PROTEINS
IMDB-B
IMDB-M
Avg.
Av.Rank ↓
TopoGrid
92.60 ± 6.73
92.82 ± 3.61
68.58 ± 4.64
82.91 ± 5.81
77.72 ± 3.66
76.60 ± 2.58
51.00 ± 2.86
77.46
3.86
GraphGrid
93.63 ± 4.64
90.37 ± 2.82
70.93 ± 5.53
84.83 ± 5.69
76.19 ± 2.24
75.20 ± 2.99
52.07 ± 4.29
77.60
4.14
5 channels
93.10 ± 5.77
91.84 ± 3.54
69.15 ± 4.39
82.48 ± 6.46
77.63 ± 3.78
76.70 ± 2.90
51.53 ± 3.77
77.49
4.07
Concat
94.18 ± 6.84
92.32 ± 3.96
69.75 ± 4.68
82.70 ± 6.65
77.53 ± 4.08
76.30 ± 1.73
51.60 ± 3.06
77.77
3.36
Late fusion
94.15 ± 6.47
90.85 ± 3.56
70.03 ± 5.37
85.68 ± 4.41
76.64 ± 2.31
76.00 ± 2.37
52.53 ± 3.60
77.98
3.29
SupCon
94.18 ± 5.98
91.84 ± 2.98
72.38 ± 4.17
84.62 ± 5.15
76.46 ± 3.15
77.30 ± 1.55
52.73 ± 3.57
78.50
2.29
Table 6: Standalone and Fusion Models. Standalone and fusion results when combining TopoGrid and GraphGrid . Best , second , and third performances are highlighted. SupCon row represent our fusion model for G2Image .
Method
MUTAG
BZR
PTC-MR
COX2
PROTEINS
IMDB-B
IMDB-M
SP-HKS + MLP
91.49 ± 5.38
84.95 ± 7.19
65.71 ± 4.78
79.20 ± 5.13
76.82 ± 3.65
73.70 ± 3.03
49.13 ± 2.91
SP-DC + MLP
87.22 ± 7.17
83.70 ± 7.89
62.54 ± 11.20
78.99 ± 5.51
76.92 ± 3.29
72.70 ± 3.72
49.73 ± 3.77
MP + MLP
89.39 ± 7.79
88.90 ± 6.34
63.97 ± 6.13
82.86 ± 4.34
77.10 ± 3.03
75.50 ± 2.33
49.80 ± 3.77
MP + CNN ( TopoGrid )
92.60 ± 6.73
92.82 ± 3.61
68.58 ± 4.64
82.91 ± 5.81
77.72 ± 3.66
76.60 ± 2.58
51.00 ± 2.86
Table 7: TopoGrid vs. topological variants. Accuracy comparison of single-persistence variants (SP-HKS, SP-Degree Centrality) and multipersistence (HKS + Degree Centrality) variants across seven benchmarks.
Method
MUTAG
BZR
PTC-MR
COX2
PROTEINS
IMDB-B
IMDB-M
Betti only (2 channels)
90.96 ± 6.68
91.85 ± 2.21
66.28 ± 4.72
83.13 ± 6.14
75.20 ± 3.41
72.20 ± 2.44
47.20 ± 2.76
Nodes+Edges (2 channels)
91.02 ± 7.81
91.60 ± 2.02
68.62 ± 3.93
81.42 ± 6.03
76.10 ± 3.29
75.70 ± 2.15
50.60 ± 1.75
All (4 channels)
92.60 ± 6.73
92.82 ± 3.61
68.58 ± 4.64
82.91 ± 5.81
77.72 ± 3.66
76.60 ± 2.58
51.00 ± 2.86
Table 8: TopoGrid channel ablation. CNN performance using Betti-only channels, node/edge-count channels, and all four channels of the 4×10×10 TopoGrid tensor.
Setting
MUTAG
BZR
PTC-MR
COX2
PROTEINS
IMDB-B
IMDB-M
Resolution
28×28
89.91 ± 7.60
85.94 ± 3.60
69.46 ± 3.12
82.48 ± 5.28
76.64 ± 3.01
74.30 ± 3.26
51.40 ± 3.68
64×64
90.96 ± 6.25
85.69 ± 3.60
67.71 ± 4.79
78.22 ± 7.01
75.47 ± 3.48
74.20 ± 2.48
52.60 ± 3.81
Binning
No bins
90.44 ± 7.36
88.13 ± 2.73
66.54 ± 5.12
83.13 ± 5.28
76.64 ± 2.87
76.60 ± 2.94
50.07 ± 3.05
5 bins
90.96 ± 5.79
86.41 ± 3.73
68.86 ± 5.71
81.85 ± 6.33
75.56 ± 2.65
73.10 ± 3.33
51.47 ± 3.22
20 bins
92.54 ± 6.85
88.88 ± 3.00
68.89 ± 3.49
81.20 ± 6.22
76.01 ± 2.26
74.00 ± 2.32
50.87 ± 3.18
Default ( 10×10 , 10 bins)
93.63 ± 4.64
90.37 ± 2.82
70.93 ± 5.53
84.83 ± 5.69
76.19 ± 2.24
75.20 ± 2.99
52.07 ± 4.29
Table 9: GraphGrid sensitivity analysis. Resolution ablation (top): binning fixed at B=10 , grid resolution varied. Binning ablation (bottom): resolution fixed at 10×10 , number of bins varied. The default configuration ( 10×10 , B=10 ) is shown in the last row. All values are accuracy (%, mean ± std).
Appendix figures & tables5 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 2: Multiparameter persistence. In the two-parameter setting, the filtration index set is a poset rather than a total order. Each grid cell (i,j) corresponds to the subgraph induced by nodes satisfying both threshold conditions. This prevents a direct barcode-style decomposition and motivates fixed-grid summaries such as TopoGrid .
Score functions
MUTAG
PROTEINS
IMDB-B
deg, k -core, betweenness, closeness
91.55±0.67
75.47±3.26
76.10±3.51
HKS, deg, betweenness, closeness
93.63±5.21
75.74±2.18
75.60±3.29
HKS, betweenness, closeness, PageRank
94.15±6.47
76.19±2.51
74.80±2.18
eigencentrality, clustering coef., HKS, deg
93.10±5.27
76.64±3.24
76.10±2.62
GraphGrid (default)
93.63±4.64
76.19±2.24
75.20±2.99
Appendix
Table 10: Sensitivity of GraphGrid to the choice of score functions. Mean ± standard deviation of classification accuracy (%). The default configuration uses PageRank, HKS, k -core, and degree.
Configuration
MUTAG
PROTEINS
IMDB-B
TopoGrid (single view)
89.91±9.24
76.73±3.84
75.30±2.41
GraphGrid (single view)
89.88±6.90
74.75±2.08
74.00±2.76
Two-view, within-view only
91.52±7.16
75.29±2.84
75.90±2.07
G2Image (cross-view)
94.18±5.98
76.46±3.15
77.30±1.55
Appendix
Table 11: Ablation of the supervised contrastive objective (accuracy %, mean ± std). All rows use SupCon. Best per dataset in bold.
Model
MUTAG
PTC-MR
PROTEINS
IMDB-B
IMDB-M
Patchy-SAN
88.95±4.37
62.29±5.68
75.00±2.51
71.00±2.29
45.23±2.84
DGCNN
85.83±1.66
58.59±2.47
75.54±0.94
70.03±0.86
47.83±0.85
GPGL
92.48±5.53
–
76.44±1.56
74.90±4.01
51.99±2.36
G2Image
94.18±5.98
72.38±4.17
76.46±3.15
77.30±1.55
52.73±3.57
Appendix
Table 12: Comparison with graph-to-grid and graph-as-image methods (accuracy %, mean ± std, 10-fold cross-validation). Baseline results are taken from the respective papers. Best per dataset in bold. “–” indicates that the result was not reported.
Dataset
Control
Plain graph-stats
GCN
GAT
G2Image
MUTAG
size
84.64±0.87
68.21±0.91
66.79±2.90
86.07±1.34
density
82.55±8.90
65.82±1.67
70.91±2.57
84.73±2.18
PTC-MR
size
58.10±1.20
56.00±3.43
57.71±2.45
61.14±1.85
density
57.86±2.35
57.67±3.17
59.61±1.69
62.14±3.07
PROTEINS
size
65.27±1.45
69.82±0.58
67.01±0.91
75.03±1.59
density
65.69±9.80
69.88±3.03
70.42±5.20
74.25±0.73
Appendix
Table 13: Accuracy (%, mean ± std) under size- and density-controlled splits. Graphs are sorted by the controlled attribute and the top 30% are held out for testing. Best per row in bold.
We introduce Topoformer, a lightweight and scalable framework for graph representation learning that encodes topological structure into attention-friendly sequences. At the core of our method is Topo-Scan, a novel module that decomposes a graph into a short, ordered sequence of topological tokens by slicing over node or edge filtrations. These sequences capture multi-scale structural patterns, from local motifs to global organization, and are processed by a Transformer to produce expressive graph-level embeddings. Unlike traditional persistent homology pipelines, Topo-Scan is parallelizable, avoids costly diagram computations, and integrates seamlessly with standard deep learning architectures. We provide theoretical guarantees on the stability of our topological encodings and demonstrate state-of-the-art performance across graph classification and molecular property prediction benchmarks. Our results show that Topoformer matches or exceeds strong GNN and topology-based baselines while offering predictable and efficient compute. This work opens a new path for parallelizable and unifying approaches to graph representation learning that integrate topological inductive biases into attention frameworks.
Department of Mathematical Science The University of Texas at Dallas Richardson, TX 75080, USA · Department of Mathematics Florida State University Tallahassee, FL 32306, USA · AI Initiative University of Central Florida Orlando, FL 32816, USA
Graphs are a fundamental data structure underlying many problems in the natural and social sciences. Over the past decade, Graph Neural Networks (GNNs) have dominated graph machine learning, supported by solid theoretical foundations. Yet scientists often understand graph structure through vision: chemists read molecular diagrams and social scientists inspect network visualizations. Despite decades of work on graph visualization, most graph learning pipelines still treat graphs purely as symbolic structures, rarely leveraging the visual form of graphs. We argue that this gap deserves renewed attention in the era of powerful vision and vision-language models. This survey provides a first systematic overview of the emerging area we term vision meets graphs, which treats visual depictions of graphs as first-class inputs for reasoning and learning. We organize existing work into three threads. Vision for Graph Reasoning studies how models can use visual depictions of graphs to understand structure and carry out multi-step reasoning. Vision for Graph Learning explores how visual features can complement or augment graph encoders beyond known limitations of message passing. Scientific Graphs examines domains where standardized depiction conventions support both reasoning and learning. Our goal is to clarify what current methods can and cannot do, and to outline a path toward foundation models that perceive and reason about graphs as scientists do.
Xinjian Zhao, Wei Pang, Zhixuan Yu +8
The Chinese University of Hong Kong, Shenzhen · University of Waterloo · Institute of Automation, Chinese Academy of Sciences +1
Graph classification benchmarks vary widely in difficulty: some are solved by simple pooled baselines, while others remain challenging for GNNs and graph transformers. We take a data-centric view and ask whether benchmark success is driven by genuine structure--feature reasoning or by label signal already accessible from restricted marginal views. We introduce graph label alignment, a lightweight diagnostic that measures label accessibility through two supervised probes computed without training a graph encoder: structural label alignment (SLA), based on permutation-invariant topological and spectral summaries, and feature label alignment (FLA), based on pooled node features with edges removed. Across real graph classification benchmarks and multiple pooled backbones, the resulting SLA--FLA plane strongly organizes test accuracy, with low-alignment datasets forming a consistent regime where standard pooled pipelines struggle. To probe what lies beyond marginal accessibility, we introduce controlled interaction-dominated stress tests, including heterophilic ego-graphs and synthetic Twins tasks whose structural and feature marginals are matched across classes but whose role--feature couplings differ. These results show that high alignment explains much of easy benchmark performance, while low alignment reveals regimes where success requires preserving structure--feature correspondence beyond standard pooled representations.
Neelam Akula, Varun Shiralkar, Murat Kantarcioglu +1
Department of Mathematical Sciences, University of Texas at Dallas, Richardson, TX 75080 · Department of Computer Science, University of Texas at Dallas, Richardson, TX 75080 · Department of Computer Science, Virginia Tech, Blacksburg, VA 24061