Foundation models are at the forefront of artificial intelligence. A tokenizer, converting the raw input into discrete representations that the model can understand, plays an important role to the success of foundation models. Unlike the text tokenizer that is well studied in large language models, graph tokenizer is still at its early stage, facing the challenges of tackling the non-Euclidean structures and capturing the structural semantics. How to design a graph tokenizer for structural knowledge transfer? To this end, we propose a Riemannian Graph Tokenizer (RGT) that bridges the structural knowledge and quantized representations to support cross-domain structural knowledge transfer. The connection is established by Riemannian geometry. Specifically, we first define the geometric vocabulary (trees, cycles and sequences), which captures fundamental structural patterns and reflects the intrinsic geometry of graph. Second, we construct a Riemannian quantizer with Riemannian Straight-Through Estimator to tokenise graph structures across multiple domains into discrete tokens. To ensure consistency and transferability across diverse geometric spaces, RGT further incorporates a geometry-aligned decoder that projects manifold-specific tokens into a unified tangent space. The theoretical analysis and geometric interpretations are provided to support the effectiveness of our proposed method. Extensive experiments across diverse datasets demonstrate that RGT significantly enhances structural knowledge transferability across graph domains.
Figures & tables
Figure 1. Overall architecture of the proposed Riemannian Graph Tokenizer.
Node Classification Results
Method
Pubmed
Github
USA
Europe
ACC
F1
ACC
F1
ACC
F1
ACC
F1
DGI
75.66 ± 0.86
73.66 ± 1.46
74.10 ± 0.15
42.56 ± 0.05
38.90 ± 1.57
33.06 ± 3.98
24.48 ± 0.97
9.83 ± 0.31
GraphMAE
79.47 ± 0.45
78.75 ± 0.40
67.57 ± 2.76
63.14 ± 1.81
32.78 ± 6.63
21.42 ± 5.39
31.28 ± 2.10
20.96 ± 3.47
OFA
52.23 ± 6.45
50.35 ± 3.34
-
-
-
-
-
-
ZeroG
69.12 ± 0.89
68.35 ± 1.23
-
-
-
-
-
-
Table 1. Cross-domain transfer learning performance of node classification on four datasets.
Link Prediction Results
Method
Pubmed
Github
USA
Europe
AUC
AP
AUC
AP
AUC
AP
AUC
AP
DGI
56.19 ± 0.19
61.56 ± 0.35
55.75 ± 8.68
53.66 ± 7.79
56.17 ± 2.31
48.39 ± 1.35
58.82 ± 5.38
51.38 ± 3.30
GraphMAE
84.40 ± 0.38
82.36 ± 0.36
65.94 ± 0.18
67.51 ± 0.14
65.81 ± 6.51
67.36 ± 1.27
45.58 ± 1.73
46.28 ± 0.81
OFA
85.32 ± 1.67
83.28 ± 1.39
-
-
-
-
-
-
OpenGraph
65.04 ± 0.98
64.31 ± 3.98
78.34 ± 0.92
79.76 ± 1.20
77.89 ± 2.34
79.32 ± 1.32
72.34 ± 1.51
70.32 ± 1.22
Table 2. Cross-domain transfer learning performance of link prediction on four datasets.
Node Classification Results
Method
Pubmed
Github
USA
Europe
ACC
F1
ACC
F1
ACC
F1
ACC
F1
DGI
54.09 ± 1.92
45.66 ± 7.34
44.26 ± 0.14
44.72 ± 3.03
26.69 ± 2.94
13.58 ± 4.84
25.62 ± 0.00
10.20 ± 0.00
GraphMAE
47.03 ± 7.27
42.31 ± 9.40
55.25 ± 2.03
46.78 ± 1.74
23.69 ± 1.70
14.73 ± 2.83
27.07 ± 3.20
18.54 ± 2.30
OFA
41.25 ± 0.94
38.45 ± 2.96
-
-
-
-
-
-
ZeroG
74.52 ± 0.52
74.15 ± 0.15
-
-
-
-
-
-
Table 3. One-shot learning performance of node classification on four datasets.
Node Classification Results
Method
Pubmed
Github
USA
Europe
ACC
F1
ACC
F1
ACC
F1
ACC
F1
DGI
64.07 ± 8.43
61.88 ± 4.84
75.56 ± 1.37
51.21 ± 7.40
35.84 ± 1.28
28.02 ± 3.20
25.62 ± 0.00
10.20 ± 0.00
GraphMAE
72.09 ± 1.86
71.62 ± 2.28
57.12 ± 2.16
52.39 ± 1.97
31.42 ± 5.58
21.11 ± 4.59
26.74 ± 1.59
14.20 ± 3.00
OFA
41.26 ± 4.36
39.67 ± 5.35
-
-
-
-
-
-
ZeroG
72.26 ± 3.21
69.48 ± 2.39
-
-
-
-
-
-
Table 4. Five-shot learning performance of node classification on four datasets.
Trees
Cycles
Sequences
Cora
Citeseer
Pubmed
USA
H−132
S132
R032
80.72 ± 0.97
66.40 ± 1.53
76.26 ± 0.73
56.72 ± 2.51
H−132
R032
S132
78.53 ± 0.78
64.98 ± 2.22
74.52 ± 0.81
52.69 ± 1.47
S132
H−132
R032
79.42 ± 0.83
65.77 ± 1.58
74.34 ± 0.82
52.77 ± 1.05
S132
R032
H−132
77.98 ± 1.21
64.58 ± 2.56
73.88 ± 0.89
51.13 ± 1.35
R032
S132
H−132
78.32 ± 0.53
65.64 ± 1.20
75.26 ± 0.63
53.71 ± 1.24
R032
H−132
S132
76.85 ± 1.21
63.69 ± 1.32
74.26 ± 0.93
52.21 ± 1.37
Table 5. Link prediction results of geometric ablation are reported in terms of AUC.
Figure 2. Hyperparameter sensitivity analysis of codebook size.
Figure 3. Heatmap about λ and ϵ and radar plot of p-value.
Seed
RiemannGFM (Acc)
RGT (Acc)
RiemannGFM (F1)
RGT (F1)
Seed 0
73.94 ± 5.66
76.22 ± 0.80
74.25 ± 4.25
76.14 ± 0.77
Seed 1
71.52 ± 5.44
75.94 ± 0.88
72.11 ± 4.01
75.89 ± 0.73
Seed 2
72.03 ± 5.70
76.08 ± 0.79
73.09 ± 4.37
76.07 ± 0.80
Seed 3
74.11 ± 5.61
76.35 ± 0.85
73.64 ± 4.40
76.25 ± 0.82
Seed 4
69.77 ± 5.58
75.71 ± 0.81
72.87 ± 4.16
75.83 ± 0.75
Mean
72.67 ± 5.60
76.06 ± 0.83
73.19 ± 4.24
76.04 ± 0.77
Table 6. Cross-domain transfer learning performance of node classification on Pubmed (Bold: best).
Figure 4. Ablation study on key components.
Pretraining
Method
Citeseer
Cora
USA
Brazil
Flickr
OpenGraph
73.17 ± 0.23
77.46 ± 0.23
53.16 ± 0.98
61.16 ± 0.19
RiemannGFM
98.27 ± 1.38
96.84 ± 0.24
93.40 ± 0.84
84.03 ± 0.26
RGT (Ours)
99.11 ± 0.01
97.81 ± 0.32
93.41 ± 0.02
84.92 ± 0.50
AComp
OpenGraph
72.95 ± 0.28
78.47 ± 0.25
79.79 ± 0.81
68.31 ± 0.14
RiemannGFM
98.50 ± 0.01
96.59 ± 0.00
92.85 ± 0.13
84.32 ± 0.13
RGT (Ours)
98.87 ± 0.03
97.91 ± 0.17
92.90 ± 0.02
84.89 ± 0.11
Table 7. Cross-domain link prediction performance on different pretraining datasets.
Figure 5. Cross-domain Node Classification Performance on Web-Scale Graphs.
Appendix figures & tables7 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 6. Cross-Domain Transfer of Geometric Vocabulary.
Hyperparameter
Pretraining
Fine-tuning
Learning Rate
0.001
0.01
Epochs
3
120
Batch Size
32
64
Dropout
0.1
0.1
Drop Edge Rate
–
0.2
Drop Feature Rate
–
0.3
Appendix
Table 8. Hyperparameters for RGT in pretraining and fine-tuning
Node Classification Results
Method
Cora
Citeseer
Brazil
ACC
F1
ACC
F1
ACC
F1
DGI
80.62 ± 1.63
80.67 ± 1.97
69.67 ± 0.42
62.92 ± 1.81
31.78 ± 1.62
29.15 ± 4.16
GraphMAE
79.77 ± 0.34
79.82 ± 0.23
50.20 ± 7.07
44.97 ± 8.20
32.14 ± 5.83
21.14 ± 7.72
OFA
56.92 ± 3.09
54.21 ± 2.02
49.68 ± 1.36
50.22 ± 2.13
-
-
ZeroG
59.20 ± 1.07
55.32 ± 1.34
52.34 ± 0.89
55.67 ± 1.22
-
-
Appendix
Table 9. Cross-domain transfer learning performance of node classification on three datasets.
Link Prediction Results
Method
Cora
Citeseer
Brazil
AUC
AP
AUC
AP
AUC
AP
DGI
66.06 ± 1.66
65.64 ± 1.91
82.81 ± 1.12
84.72 ± 1.15
64.09 ± 5.91
59.09 ± 7.17
GraphMAE
54.86 ± 0.20
57.87 ± 1.58
79.18 ± 1.02
75.51 ± 0.94
74.00 ± 2.81
71.86 ± 4.04
OFA
70.84 ± 2.01
71.34 ± 1.89
75.61 ± 2.34
76.13 ± 1.26
-
-
OpenGraph
74.03 ± 0.97
73.21 ± 0.84
74.45 ± 0.46
76.32 ± 0.76
65.31 ± 1.54
64.39 ± 1.65
Appendix
Table 10. Cross-domain transfer learning performance of link prediction on three datasets.
Node Classification Results
Method
Cora
Citeseer
Brazil
ACC
F1
ACC
F1
ACC
F1
DGI
39.21 ± 1.70
34.33 ± 2.09
34.13 ± 3.08
31.41 ± 1.11
29.92 ± 3.24
21.75 ± 2.54
GraphMAE
51.86 ± 8.81
50.90 ± 8.49
41.24 ± 8.71
36.07 ± 9.75
26.56 ± 3.41
17.53 ± 3.34
OFA
57.35 ± 3.09
55.92 ± 2.85
36.89 ± 3.98
38.48 ± 5.76
-
-
ZeroG
63.59 ± 1.75
63.24 ± 1.22
60.34 ± 1.21
58.24 ± 1.67
-
-
Appendix
Table 11. One-shot learning performance of node classification on three datasets.
Node Classification Results
Method
Cora
Citeseer
Brazil
ACC
F1
ACC
F1
ACC
F1
DGI
64.54 ± 4.19
65.27 ± 4.90
48.03 ± 3.56
44.73 ± 3.02
30.62 ± 3.24
29.29 ± 2.76
GraphMAE
72.85 ± 1.61
71.80 ± 1.74
47.74 ± 4.99
40.88 ± 6.81
28.57 ± 6.47
20.81 ± 5.85
OFA
65.23 ± 3.19
62.72 ± 2.35
43.25 ± 3.78
40.21 ± 4.78
-
-
ZeroG
63.59 ± 1.75
63.20 ± 1.52
55.92 ± 5.21
52.74 ± 4.16
-
-
Appendix
Table 12. Five-shot learning performance of node classification on three datasets.
Testing Datasets
Pre-training
Method
Citeseer
Cora
USA
Brazil
Flickr
OpenGraph
58.86 ± 0.89
59.43 ± 1.60
25.97 ± 4.98
17.04 ± 4.12
Riemannian
65.74 ± 2.07
77.62 ± 0.78
51.34 ± 1.61
23.85 ± 9.29
RGT (Ours)
66.82 ± 0.75
80.34 ± 0.70
54.20 ± 1.36
28.46 ± 4.62
AComp
OpenGraph
46.53 ± 1.6
50.68 ± 1.29
25.88 ± 3.84
15.56 ± 3.99
Riemannian
66.4 ± 1.76
80.02 ± 0.87
48.66 ± 1.49
30.38 ± 3.28
Appendix
Table 13. Cross-domain node classification performance on different pre-training datasets.