Organizations: Department of Data Science and Artificial Intelligence, Hong Kong Polytechnic University, Hong Kong SAR, China · National Super Computing Center, Tianjin, China · School of Computer Science and Engineering, Central South University, Hunan, China · School of Information and Communication Technology, Griffith University, Queensland, Australia
In recent advances, to enable a fully data-driven learning paradigm on relational databases (RDB), relational deep learning (RDL) is proposed to structure the RDB as a heterogeneous entity graph and adopt the graph neural network (GNN) as the predictive model. However, existing RDL methods neglect the imbalance problem of relational data in RDBs and risk under-representing the minority entities, leading to an unusable model in practice. In this work, we investigate, for the first time, class imbalance problem in RDB entity classification and design the relation-centric minority synthetic over-sampling GNN (Rel-MOSS), in order to fill a critical void in the current literature. Specifically, to mitigate the issue of minority-related information being submerged by majority counterparts, we design the relation-wise gating controller to modulate neighborhood messages from each individual relation type. Based on the relational-gated representations, we further propose the relation-guided minority synthesizer for over-sampling, which integrates the entity relational signatures to maintain relational consistency. Extensive experiments on 12 entity classification datasets provide compelling evidence for the superiority of Rel-MOSS, yielding an average improvement of up to 2.46% and 4.00% in terms of Balanced Accuracy and G-Mean, compared with SOTA RDL methods and classic methods for handling class imbalance.
Figures & tables
Figure 1: Illustration of a) . Aggregation with equal importance leads to indistinguishable representations and b) Decisive information resides in local relational structures.
Figure 2: Illustrative example of a) . Relational database schema, and b) . Tables within the relational database.
Figure 3: Overview of Rel-MOSS. Beginning with the entity feature encoding , the original entity features with diverse modalities is converted into unified representations by modality-specific feature encoder. For entity e , the relation-wise gating controller modulates the neighborhood message from each relation according to the gating factors {Ψe,r} . Subsequently, based on the gated representations, the relation-guided minority synthesizer integrates entity relational signatures into over-sampling process. Finally, the optimization of Rel-MOSS consists of the entity classification and relational signature reconstruction.
Dataset
f1-driver-top3
f1-driver-dnf
avito-user-clicks
avito-user-visits
Metric
B-Acc
G-Mean
B-Acc
G-Mean
B-Acc
G-Mean
B-Acc
G-Mean
RDL
0.5000
0.0000
0.6274 ±0.0692
0.5835 ±0.0995
0.5000
0.0000
0.5000
0.0000
RDL-HGT
0.5124 ±0.0175
0.1179 ±0.1670
0.5497 ±0.0324
0.3647 ±0.1116
0.5000
0.0000
0.5000
0.0000
RelGNN
0.4976 ±0.0034
0.0927 ±0.1311
0.5272 ±0.0066
0.2973 ±0.0332
0.5000
0.0000
0.5000
0.0000
RDL-Focal
0.5000
0.0000
0.5871 ±0.0094
0.4940 ±0.0485
0.5491 ±0.0080
0.3465 ±0.0294
0.6086 ±0.0098
0.5376 ±0.0265
SMOTE
0.7509 ±0.0307
0.7349 ±0.0242
0.6304 ±0.0321
0.5857 ±0.0636
0.5984 ±0.0142
0.5105 ±0.0415
0.6255 ±0.0063
0.5947 ±0.0216
Table 1: Evaluation results of Rel-MOSS and baselines on 12 RDB entity classification datasets, in the form of mean ± std . For both Balanced Accuracy (B-Acc) and G-Mean , higher values indicate better performance. Underline marks the best baseline, and bold indicates that Rel-MOSS or Rel-MOSS variants outperform the best baseline. Improvement is defined as (Rel-MOSS−Best-Baseline)/Best-Baseline .
Figure 4: Comparison between Rel-MOSS and w/o Rel-Gate in terms of a). Euclidean distance, and b). Manhattan distance.
Figure 5: Visualization of entity representations learned by SMOTE, GraphSMOTE, and Rel-MOSS.
Dataset
f1-driver-top3
f1-driver-dnf
event-user-repeat
event-user-ignore
Metric
PR-AUC
ROC-AUC
PR-AUC
ROC-AUC
PR-AUC
ROC-AUC
PR-AUC
ROC-AUC
RDL
0.2796 ±0.0035
0.7572 ±0.0112
0.2030 ±0.0044
0.7091 ±0.0094
0.7012 ±0.0103
0.7674 ±0.0102
0.4975 ±0.0087
0.8092 ±0.0088
RelGNN
0.3085 ±0.0149
0.7792 ±0.0105
0.2081 ±0.0100
0.6911 ±0.0123
0.6323 ±0.0106
0.7212 ±0.0145
0.4525 ±0.0069
0.8301 ±0.0075
SMOTE
0.2993 ±0.0250
0.7369 ±0.0185
0.1996 ±0.0057
0.7017 ±0.0087
0.7155 ±0.0099
0.7808 ±0.0091
0.5028 ±0.0161
0.8318 ±0.0114
Rel-MOSS
0.3571 ±0.0071
0.7999 ±0.0058
0.2372 ±0.0018
0.7153 ±0.0042
0.7419 ±0.0024
0.7959 ±0.0063
0.5308 ±0.0027
0.8524 ±0.0055
Table 2: Evaluation results comparison in terms of PR-AUC ↑ and ROC-AUC ↑ .
Dataset
f1-driver-top3
f1-driver-dnf
event-user-repeat
event-user-ignore
Standard RDL
1.0401
6.1067
2.9947
13.0044
Rel-MOSS
0.9979
5.7454
3.6566
14.0246
# Sample
1353
11411
3842
19239
Imb-ratio
4.86
7.36
1.04
4.92
Table 3: Practical runtime (s) comparison of RDL and Rel-MOSS.
Appendix figures & tables9 assets
Supplementary material from the paper’s appendix.
Appendix
Notation
Description
R
Relational database (RDB)
T
Set of tables in the RDB
T,Tt
A specific table in the relational database
S
Set of linkages induced from the RDB foreign-primary key reference
e,esyn
RDB entity, synthetic entity
em
The m -th feature of entity e
Appendix
Table 4: Notations and corresponding descriptions.
Dataset
f1-driver-top3
f1-driver-dnf
avito-user-clicks
avito-user-visits
# Positive
231
10046
2302
78467
# Negative
1122
1365
57152
8152
Imb-ratio
4.86
7.36
24.83
9.62
Dataset
event-user-repeat
event-user-ignore
stack-user-engagement
stack-user-badge
# Positive
1882
3247
68020
163048
# Negative
1960
15992
1292830
3223228
Appendix
Table 5: Extent of class imbalance for each dataset. Imb-ratio represents the imbalance ratio, which is defined as # Majority /# Minority . The statistics is summarized on the train set, which determines the model training dynamics.
Figure 6: Performance of Rel-MOSS versus γ in Eq. 13 on 6 datasets, in terms of balanced accuracy (B-Acc) and G-Mean.
Figure 7: Performance of Rel-MOSS versus ω in Eq. 11 on 6 datasets, in terms of balanced accuracy (B-Acc) and G-Mean.
Figure 8: Performance of Rel-MOSS versus learning rate η on 6 datasets, in terms of balanced accuracy (B-Acc) and G-Mean.
Dataset
f1-driver-top3
f1-driver-dnf
event-user-repeat
event-user-ignore
Metric
B-Acc
G-Mean
B-Acc
G-Mean
B-Acc
G-Mean
B-Acc
G-Mean
d=32
0.7345 ± 0.0127
0.7274 ± 0.0146
0.7184 ± 0.0195
0.7167 ± 0.0064
0.7317 ± 0.0246
0.7276 ± 0.0284
0.7263 ± 0.0072
0.7032 ± 0.0131
d=64
0.7886 ± 0.0134
0.7861 ± 0.0121
0.6717 ± 0.0071
0.6589 ± 0.0145
0.6991 ± 0.0273
0.6981 ± 0.0134
0.7101 ± 0.0020
0.6816 ± 0.0058
d=128
0.8098 ±0.0104
0.8014 ±0.0142
0.6510 ±0.0221
0.6262 ±0.0300
0.7411 ±0.0072
0.7398 ±0.0059
0.7460 ±0.0071
0.7362 ±0.0103
d=256
0.7122 ± 0.0119
0.7122 ± 0.0164
0.6755 ± 0.0281
0.6662 ± 0.0540
0.6864 ± 0.0249
0.6677 ± 0.0620
0.7210 ± 0.0158
0.6918 ± 0.0284
d=512
0.6203 ± 0.0195
0.5513 ± 0.0607
0.6830 ± 0.0301
0.6777 ± 0.0388
0.6778 ± 0.0216
0.6722 ± 0.0101
0.6988 ± 0.0150
0.6583 ± 0.0298
Appendix
Table 6: Entity classification performance of Rel-MOSS versus latent dimension d .
Dataset
f1-driver-top3
f1-driver-dnf
event-user-repeat
event-user-ignore
Metric
B-Acc
G-Mean
B-Acc
G-Mean
B-Acc
G-Mean
B-Acc
G-Mean
U=256
0.7585 ± 0.0182
0.7582 ± 0.0128
0.6821 ± 0.0021
0.6811 ± 0.0141
0.7245 ± 0.0361
0.6894 ± 0.0257
0.7189 ± 0.0134
0.6889 ± 0.0179
U=512
0.7965 ± 0.0098
0.7839 ± 0.0378
0.6870 ± 0.0102
0.6789 ± 0.0126
0.6983 ± 0.0184
0.6379 ± 0.0446
0.7340 ± 0.0146
0.7244 ± 0.0274
U=1024
0.8098 ±0.0104
0.8014 ±0.0142
0.6510 ±0.0221
0.6262 ±0.0300
0.7411 ±0.0072
0.7398 ±0.0059
0.7460 ±0.0071
0.7362 ±0.0103
U=2048
0.7972 ± 0.0148
0.7959 ± 0.0135
0.6501 ± 0.0229
0.6332 ± 0.0351
0.7507 ± 0.0027
0.7205 ± 0.0169
0.7247 ± 0.0018
0.7038 ± 0.0056
Appendix
Table 7: Entity classification performance of Rel-MOSS versus memory bank scale U .
Dataset
f1-driver-top3
f1-driver-dnf
event-user-repeat
event-user-ignore
Metric
B-Acc
G-Mean
B-Acc
G-Mean
B-Acc
G-Mean
B-Acc
G-Mean
B=128
0.6203 ± 0.0192
0.5513 ± 0.0120
0.7002 ± 0.0376
0.6969 ± 0.0538
0.6843 ± 0.0255
0.6824 ± ± 0.0248
0.7352 ± 0.0249
0.7314 ± 0.0364
B=256
0.8032 ± 0.0156
0.7984 ± 0.0261
0.6050 ± 0.0112
0.5465 ± 0.0424
0.7261 ± 0.0282
0.7190 ± 0.0442
0.7194 ± 0.0072
0.6886 ± 0.0137
B=512
0.8098 ±0.0104
0.8014 ±0.0142
0.6510 ±0.0221
0.6262 ±0.0300
0.7411 ±0.0072
0.7398 ±0.0059
0.7460 ±0.0071
0.7362 ±0.0103
B=1024
0.8185 ± 0.0124
0.8138 ± 0.0178
0.6879 ± 0.0132
0.6820 ± 0.0189
0.6576 ± 0.0084
0.6125 ± 0.0106
0.7085 ± 0.0073
0.6714 ± 0.0137
Appendix
Table 8: Entity classification performance of Rel-MOSS versus batch size B .
Dataset
f1-driver-top3
f1-driver-dnf
event-user-repeat
event-user-ignore
Metric
B-Acc
G-Mean
B-Acc
G-Mean
B-Acc
G-Mean
B-Acc
G-Mean
RDL-HGT
0.5124 ±0.0175
0.1179 ±0.1670
0.5497 ±0.0324
0.3647 ±0.1116
0.6021 ±0.0737
0.4296 ±0.3045
0.6820 ±0.0059
0.6235 ±0.0147
Rel-MOSS (HGT)
0.7675 ±0.0870
0.7502 ±0.0832
0.6901 ±0.0458
0.6857 ±0.0624
0.6279 ±0.0640
0.5456 ±0.1788
0.7125 ±0.0078
0.6813 ±0.0119
RelGNN
0.4976 ±0.0034
0.0927 ±0.1311
0.5272 ±0.0066
0.2973 ±0.0332
0.6279 ±0.0671
0.5822 ±0.1229
0.6303 ±0.0418
0.5233 ±0.0869
Rel-MOSS (RelGNN)
0.7439 ±0.0514
0.7378 ±0.0702
0.7009 ±0.0486
0.7008 ±0.0342
0.6912 ±0.0266
0.6903 ±0.0262
0.7341 ±0.0208
0.7158 ±0.0320
Appendix
Table 9: Entity classification performance of Rel-MOSS with HGT and RelGNN backbones.
Relational deep learning (RDL) converts relational databases (RDBs) into heterogeneous graphs, but graphs derived directly from database schemas are often not well suited for how graph neural networks (GNNs) perform relational reasoning. We study what makes a relational graph suitable for deep learning and show that schema-derived graphs suffer from two systematic failures: information overload and semantic fragmentation. Our empirical analysis reveals that the desired graph is not the raw schema, but a result of controlled structural adaptation. Performance depends on balancing two operations: mitigating information overload via filtering, and repairing semantic fragmentation via injection. Specifically, filtering serves as a bias-variance knob with non-monotonic effects, while injection improves performance only when it explicitly restores the relational dependencies missing from the original schema. Based on these findings, we develop an end-to-end structural optimizer that applies both operations to adapt relational graphs automatically. Across 26 tasks spanning classification, regression, and recommendation, the optimized graphs consistently improve accuracy while often reducing inference cost.
Yao Cheng, Siqiang Luo
Nanyang Technological University, College of Computing and Data Science, Singapore.
Relational databases (RDBs) are the primary data infrastructure in many enterprises, yet recent deep learning methods designed for RDBs have been evaluated under inconsistent experimental protocols, making fair comparison difficult. We present one of the first systematic benchmarking studies of recently released deep learning methods for RDBs, evaluating them across five relational databases, with one classification and one regression task for each. We refactor all deep RDB models to allow the full range of experimental procedures to be applied consistently across all methods. Our findings indicate that the relational transformer (RT) approach delivers the strongest overall performance on both classification and regression tasks compared to the state-of-the-art graph-based modeling and learning of RDBs. Even for single-table learning tasks, deep learning methods designed for RDBs outperform the leading tabular foundation model, TabPFN 2.5. Extending learning from a single table (hop = 0) to multiple tables (hop = 1, 2) by connecting neighboring tables in relational databases enhances performance, but the additional benefit from higher hops diminishes as computational overhead grows. Deep RDB learning methods have the potential to challenge state-of-the-art tabular foundation models, especially on large-scale enterprise data. The source code for this benchmarking study is publicly available.
Kazi F. Akhter, Bharath Ajendla, Manar D. Samad
Department of Computer Science Tennessee State University Nashville, TN, USA · SAP AI Research and Innovation SAP Labs Palo Alto, CA, USA
Relational deep learning has emerged as a powerful paradigm for learning end-to-end predictive models over relational databases by representing them as temporal heterogeneous graphs. Recent advances based on graph neural networks and Transformers have achieved strong performance across diverse domains. However, the effectiveness of simpler relational baselines remains underexplored, making it difficult to assess how much architectural complexity is needed to achieve strong predictive performance. Motivated by the observation that predictive signals arise from target attributes, relational attributes, and historical labels, we revisit how effectively these signals can be exploited using simple propagation methods. We adapt fixed low-pass feature propagation to relational entity graphs and train an MLP for prediction. The resulting predictions are further refined using Correct-and-Smooth, a graph-based label propagation algorithm that incorporates historical labels over task-specific meta-graphs connecting target entities. Across classification and regression tasks on RelBench, an MLP trained on neighborhood-filtered features outperforms one using only target-entity features on most tasks and recovers a substantial portion of the performance of heterogeneous GNNs. Correct-and-Smooth provides further gains from historical labels, although applying it requires a separately constructed meta-graph because connections among target entities are not directly specified by the relational entity graph. Together, our studies revisit the effectiveness of established propagation methods as simple RDL baselines while identifying canonical meta-graph construction as a key challenge for effective label propagation.
Viet The Nguyen, Vijay Prakash Dwivedi, Gunther Gust
University of Würzburg · Seamless Labs, Inc. · Stanford University