TL;DR
RELATE introduces a schema-agnostic feature encoder for relational graph data that eliminates the need for rigid, per-column neural network modules. By combining shared modality-specific encoders with a Perceiver-style cross-attention bottleneck, it matches the performance of traditional schema-specific models while slashing parameter counts by up to 5x and paving the way for true graph foundation models.
What Problem Does This Paper Address?
Relational databases are the backbone of modern enterprise data, spanning e-commerce, finance, and healthcare. Recently, Relational Deep Learning (RDL) has emerged as a powerful paradigm, mapping these multi-table databases into heterogeneous temporal graphs where tables are nodes, rows are entities, and foreign keys are edges.
However, current Graph Neural Networks (GNNs) for RDL suffer from a major architectural limitation: they are tightly coupled to a specific database schema. Every single feature column and node type requires its own dedicated encoder (e.g., a specific MLP for a "price" column, a separate embedding lookup for a "product_id" column). This approach causes a parameter explosion on feature-rich datasets, scales poorly, and completely prevents a model trained on one dataset from generalizing to another with a different schema.
Methods
The authors introduce RELATE (Relational Encoder for Latent Aggregation of Typed Entities), a plug-and-play, schema-agnostic feature encoder that can be dropped into any general-purpose GNN backbone like HGT or RelGNN.
The architecture consists of three core components:
- Shared Modality-Specific Encoders: Instead of per-column encoders, RELATE uses just four core encoders shared across the entire graph:
- Numerical: Uses Fourier Number Embeddings (FoNE) to map continuous scalars to dense vectors without requiring normalization.
- Timestamp: Decomposes time into absolute positional and cyclic periodic components.
- Categorical: Hashes discrete tokens into a shared vocabulary space.
- Textual: Leverages a pretrained sentence encoder.
- Column-Level Metadata Conditioning: To help the shared encoders distinguish between different columns of the same modality (e.g., distinguishing "age" from "price"), RELATE encodes column names, table names, and descriptions using a pretrained text model and injects this metadata into the cell embeddings.
- Permutation-Invariant Column Aggregation: To handle a variable number of columns across different tables, RELATE uses a Perceiver-style cross-attention mechanism. A small, fixed number of learnable latent tokens ($L$) act as queries that attend to the variable-length column embeddings ($C_v$). This decouples the computational complexity from the number of features and ensures the model is completely invariant to the order of columns.
Datasets
RELATE was evaluated using RelBench, a comprehensive benchmark for relational deep learning. The evaluation covers seven real-world multi-table datasets across various domains:
rel-amazonandrel-hm(E-commerce)rel-avito(Classifieds)rel-event(Event recommendation)rel-f1(Formula 1 racing statistics)rel-trial(Clinical trials)rel-stack(Stack Overflow Q&A)
Tasks included both node classification (measured via AUC) and node regression (measured via MAE).
Key Insights and Ideas
- A Constant Parameter Footprint: Traditional encoders grow linearly or quadratically in size as more tables and columns are added to a database. Because RELATE shares its modality encoders across all columns, its parameter footprint remains virtually constant (~1.4M parameters) regardless of database complexity.
- Permutation Invariance Enables Transfer Learning: By treating a node's attributes as an unordered set of typed features rather than a fixed-width vector, RELATE can seamlessly process tables with missing columns, rearranged columns, or entirely unseen schemas. This is a crucial prerequisite for training cross-dataset graph foundation models.
- The Cross-Attention Regularization Effect: Replacing full self-attention with a low-rank cross-attention bottleneck doesn't just save compute ($O(L \cdot C_v)$ vs $O(C_v^2)$)—it also acts as an effective regularizer, preventing the model from overfitting to specific column combinations.
Key Results
The authors integrated RELATE into two standard backbones: Heterogeneous Graph Transformer (HGT) and RelGNN.
- Competitive Performance: On node classification tasks, RELATE achieved performance within 3% of the baseline schema-specific encoders on average, occasionally outperforming them (e.g., on the
rel-eventuser-ignore task). - Massive Parameter Reductions: On feature-heavy datasets like
rel-trial(140 features) andrel-event(128 features), RELATE achieved up to a 5x reduction in trainable parameters compared to standard heteroencoders.
Limitations and Future Work
While RELATE performs excellently on classification, it exhibits a larger performance drop on certain regression tasks, most notably within the small-sample rel-f1 dataset. The authors attribute this to a classic trade-off between single-dataset optimization and universal schema flexibility.
Additionally, while the architectural design explicitly targets multi-dataset pretraining, this paper only evaluates models trained from scratch on individual datasets. The immediate next step for this research is to evaluate RELATE in true cross-dataset transfer and zero-shot generalization settings to see if it can fulfill its promise as a building block for relational data foundation models.
Summary updated