From Nodes to Pixels: Topological and Structural Two-View Graph Imaging
Organizations: Dept of Math. Sciences, University of Texas at Dallas, Richardson, TX 75080, USA · AI Institute, University of Central Florida, Orlando, FL 32816, USA
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.
Figures & tables
| Datasets | #Graphs | 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| Setting | MUTAG | BZR | PTC-MR | COX2 | PROTEINS | IMDB-B | IMDB-M | |
|---|---|---|---|---|---|---|---|---|
| Resolution | 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 | |
| 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 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 | |
Appendix figures & tables5 assets
Supplementary material from the paper’s appendix.
Appendix
| Score functions | MUTAG | PROTEINS | IMDB-B |
|---|---|---|---|
| deg, -core, betweenness, closeness | |||
| HKS, deg, betweenness, closeness | |||
| HKS, betweenness, closeness, PageRank | |||
| eigencentrality, clustering coef., HKS, deg | |||
| GraphGrid (default) |
| Configuration | MUTAG | PROTEINS | IMDB-B |
|---|---|---|---|
| TopoGrid (single view) | |||
| GraphGrid (single view) | |||
| Two-view, within-view only | |||
| G2Image (cross-view) |
| Model | MUTAG | PTC-MR | PROTEINS | IMDB-B | IMDB-M |
|---|---|---|---|---|---|
| Patchy-SAN | |||||
| DGCNN | |||||
| GPGL | – | ||||
| G2Image |
| Dataset | Control | Plain graph-stats | GCN | GAT | G2Image |
|---|---|---|---|---|---|
| MUTAG | size | ||||
| density | |||||
| PTC-MR | size | ||||
| density | |||||
| PROTEINS | size | ||||
| density |
Graph Representation Learning
Graph representation learning develops methods for encoding nodes, edges, and whole graphs for prediction, comparison, and transfer.
See all 320 papers