让表格数据模型零样本跨任务通用,无需微调即可直接用。
Relational Transformer: Toward Zero-Shot Foundation Models for Relational Data
- 用表结构和字段信息做令牌编码,结合关系注意力机制建模
- 在多个任务上零样本平均达到93%监督模型的准确率
- 适合需要快速部署、少数据场景的表格分析应用
预训练的Transformer可通过零样本提示适应新序列任务,但关系型数据领域仍缺乏能跨数据集和任务迁移的架构。核心挑战在于关系数据的多样性:模式异构、图结构不一、功能依赖复杂。本文提出关系变压器(Relational Transformer, RT),可在多种关系型数据库上预训练,并直接应用于未见过的数据集与任务,无需特定任务或数据集的微调,也无需检索上下文示例。RT通过任务表提示指定任务,用表/列元数据对单元格进行分词,基于掩码预测预训练,并采用新型关系注意力机制,对列、行及主外键链接进行建模。在涵盖流失预测、销售预测等任务的RelBench数据集上预训练后,RT在二分类任务中零样本平均达到全监督模型93%的AUROC,仅需2200万参数模型单次前向传播,优于270亿参数大模型的84%表现。微调后实现最先进的高样本效率结果。实验表明,其零样本迁移能力依赖任务上下文、关系注意力模式与模式语义。整体为关系型数据基础模型提供了可行路径。代码、模型、数据见:https://github.com/snap-stanford/relational-transformer。
原文摘要 · Abstract (English)
Pretrained transformers readily adapt to new sequence modeling tasks via zero-shot prompting, but relational domains still lack architectures that transfer across datasets and tasks. The core challenge is the diversity of relational data, with varying heterogeneous schemas, graph structures and functional dependencies. In this paper, we present the Relational Transformer (RT) architecture, which can be pretrained on diverse relational databases and directly applied to unseen datasets and tasks without task- or dataset-specific fine-tuning, or retrieval of in-context examples. RT (i) incorporates task specification via task table prompting, (ii) tokenizes cells with table/column metadata, (iii) is pretrained via masked token prediction, and (iv) utilizes a novel Relational Attention mechanism over columns, rows, and primary-foreign key links. Pretrained on RelBench datasets spanning tasks such as churn and sales forecasting, RT attains strong zero-shot performance, averaging 93% of fully supervised AUROC on binary classification tasks with a single forward pass of a 22M parameter model, as opposed to 84% for a 27B LLM. Fine-tuning yields state-of-the-art results with high sample efficiency. Our experimental analyses show that RT's zero-shot transfer leverages task context, relational attention patterns and schema semantics. Overall, RT provides a practical path toward foundation models for relational data. Code, models, data: https://github.com/snap-stanford/relational-transformer.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。