arXiv:2608.25903cs.DBcs.LG2026-08

用SQL筛选关键路径,让关系型深度学习训练更快更准。

MetaSieve: Faster Relational Deep Learning through SQL-Based Metapath Selection

论文配图:MetaSieve: Faster Relational Deep Learning through SQL-Based Metapath Selection
图 1 · 摘自论文原文
  • 通过SQL统计分析,自动筛选出对模型有用的关系路径
  • 在多个数据集上将每轮训练时间大幅缩短,准确率不降反升
  • 无需改动GNN结构,适配各类关系学习任务

关系型深度学习(RDL)是一种在多表关系数据库上进行机器学习的有效方法。在RDL中,数据库被建模为图,每一行是节点,外键关系是边,然后在该图上训练图神经网络(GNN)。GNN训练需对每个训练种子节点采样其邻域子图,训练成本主要由子图大小决定。本文提出MetaSieve,一种基于SQL的元路径选择层,通过数据库的连接和聚合能力减少子图规模。我们观察到采样子图由外键链接构成的元路径生成,且许多元路径可被剪枝而不影响精度。MetaSieve对每个候选元路径扩展计算统计量,使用新设计的评分函数评估其价值,偏好轻量但信息丰富的路径。低于阈值的路径被视为无意义并被剪除。该选择过程仅依赖数据库统计与任务标签,不依赖GNN参数,因此可兼容多种GNN架构。在RelBench基准测试中,采用多个GNN骨干网络,MetaSieve始终显著降低每轮训练时间,同时保持甚至提升准确率。

原文摘要 · Abstract (English)

Relational Deep Learning (RDL) is an effective approach to machine learning over multi-table relational databases. In RDL, a database is modeled as a graph in which each row is a node and each foreign-key relation is an edge, and a graph neural network (GNN) is trained on this graph. Training a GNN requires sampling a subgraph around every seed node in the training set, and the cost of training is largely determined by the size of these subgraphs. This paper aims to reduce subgraph size by leveraging the join and aggregation capabilities of relational database systems. We observe that sampled subgraphs are obtained by following metapaths composed of foreign-key links, and that many of these metapaths can be pruned without loss of accuracy. We present MetaSieve, a metapath selection layer that determines which metapaths to retain and which to prune. For each candidate metapath extension, MetaSieve computes statistics via SQL join and aggregation queries and evaluates the extension based on a novel scoring function that prefers lightweight but informative candidates. Metapaths whose scores fall below a threshold are deemed uninformative and pruned. Metapath selection in MetaSieve is lightweight since it relies only on database statistics and task labels, and it is independent of GNN parameters, so it integrates with diverse GNN architectures for classification and regression. Our evaluation on the RelBench benchmark with multiple GNN backbones shows that MetaSieve consistently reduces per-epoch training time by large margins while maintaining and often improving accuracy.

关系学习图神经网络数据库优化元路径

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。