Multimodal Schema-Agnostic Learning on Relational Databases

Joe Meyer, Divyansha Lachi, Mahmoud Mohammadi, Roshan Reddy Upendra, Eva L Dyer, Minghua Li, Tom Palczewski

TL;DR

Existing graph neural networks for relational databases rely on bespoke, column-specific encoders that cause parameter explosion and prevent transfer across schemas. RELATE solves this with a schema-agnostic, plug-and-play encoder that processes multimodal column features through shared modality encoders and compresses them via Perceiver-style cross-attention into fixed-size node embeddings. This architecture achieves performance within 3% of schema-specific baselines on RelBench while slashing parameter counts by up to 5×, paving the way for relational foundation models.

What Problem Does This Paper Address?

Relational databases—spread across multiple linked tables—can naturally be represented as heterogeneous temporal graphs. While Relational Deep Learning (RDL) models tables directly without expensive join operations, existing pipelines assign separate, dedicated encoders to every individual column and node type.

This approach has three major drawbacks:

  1. Poor Scalability: A database with hundreds of columns and tables leads to an explosion of trainable parameters.
  2. High Memory Overhead: Memory requirements scale linearly with schema complexity.
  3. No Cross-Schema Generalization: Because encoder weights are tied directly to specific columns, models cannot generalize to unseen schemas or support multi-dataset pretraining—a critical roadblock to developing general-purpose tabular/relational foundation models.

Methods

RELATE (Relational Encoder for Latent Aggregation of Typed Entities) replaces per-column and per-table encoders with a unified pipeline:

  • Shared Modality-Specific Encoders: Instead of column-specific modules, all features are categorized into four core modalities and routed through shared encoders across the entire database:
  • Numerical: Encoded using Fourier Number Embeddings (FoNE) for continuous scalars.
  • Temporal: Timestamps are decomposed (year, month, day, etc.) and encoded using combined positional and cyclic encodings.
  • Categorical: Categorical values (especially anonymized IDs) are hashed into a shared vocabulary conditioned on column embeddings.
  • Textual: Semantic text and high-cardinality descriptive fields are encoded using a lightweight pretrained sentence encoder (Model2Vec).
  • Metadata Conditioning: Column and table names are encoded via a text embedding model and injected into cell features (via addition and an MLP for numeric/text data, or sigmoid gating for temporal data), allowing the shared encoders to distinguish between different features sharing the same data type.
  • Perceiver-Style Cross-Attention Bottleneck: A set of $L$ learnable latent queries ($L=8$) attends to the variable-length set of column embeddings for a given node, followed by self-attention blocks. This decouples computation from feature count and produces a permutation-invariant, fixed-size node embedding ready for downstream GNN backbones (like HGT or RelGNN).
[Raw Columns] ──> [Shared Modality Encoders + Metadata] ──> [Cross-Attention (8 Latents)] ──> [GNN Backbone]

Datasets

The authors evaluated RELATE on seven datasets from RelBench, a standard benchmark for deep learning on relational databases spanning domains like e-commerce, healthcare, sports, and Q&A:

  • rel-amazon, rel-avito, rel-event, rel-f1, rel-hm, rel-stack, and rel-trial.
  • Evaluations cover both node classification (measured via AUROC) and node regression (measured via MAE).

Key Insights and Ideas

  • Permutation Invariance Matters: Tables have no natural column ordering. By framing column aggregation as cross-attention between learnable latent tokens and unordered column sets, the model naturally handles missing columns, column reordering, and arbitrary schemas.
  • Latent Cross-Attention Beats Full Self-Attention: Ablations revealed that compressing column tokens into a small set of latent queries matched or outperformed full self-attention (+$0.0068$ AUC on HGT, +$0.0039$ AUC on RelGNN) while dramatically reducing computational overhead on feature-heavy tables.
  • Constant Parameter Footprint: Unlike standard encoders that balloon with schema width, RELATE maintains an essentially constant parameter footprint (~1.4M parameters) regardless of the number of tables or columns.

Key Results

  • Competitive Predictive Power: Across RelBench classification tasks, RELATE achieved AUROC within 3% of specialized schema-specific encoders for both HGT and RelGNN. On some tasks (e.g., rel-event user-ignore), RELATE actually outperformed the baseline (0.8510 vs. 0.8130 AUC on HGT).
  • Massive Parameter Reductions:
  • On feature-rich datasets like rel-trial (15 tables, 140 features), RELATE required only 19.7% of the standard encoder parameters (~1.44M vs. ~7.30M), representing a ~5× reduction.
  • On rel-event (128 features), it reduced parameters by more than 70% (1.45M vs. 4.97M).
  • Plug-and-Play Compatibility: RELATE was successfully swapped into both RelGNN and Heterogeneous Graph Transformer (HGT) architectures without requiring task-specific modifications.

Limitations and Future Work

  • Small-Data Sensitivity: RELATE struggled on tasks with very few training examples, notably rel-f1 (e.g., driver-top3 classification dropped from 0.8297 to 0.4779 on HGT), suggesting standard schema-specific models may overfit or exploit narrow column cues better when data is scarce.
  • Multi-Dataset Pretraining Not Fully Realized: While RELATE's architecture is explicitly designed to enable cross-schema relational foundation models, the paper primarily evaluates single-dataset training from scratch; large-scale pretraining across multiple distinct databases remains future work.

Summary updated

BibTeX
@inproceedings{meyer2025multimodal,
  author = {Joe Meyer and Divyansha Lachi and Mahmoud Mohammadi and Roshan Reddy Upendra and Eva L Dyer and Minghua Li and Tom Palczewski},
  title = {{Multimodal Schema-Agnostic Learning on Relational Databases}},
  booktitle = {AITD @ EurIPS},
  year = {2025},
  url = {https://openreview.net/forum?id=UDLOqb00XB},
}
Figure