> ## Documentation Index
> Fetch the complete documentation index at: https://docs.priorlabs.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Relational α

> Learn about TabPFN's capabilities on multi-table relational data

Most real-world data does not live in a single table. It lives in a relational database, where the rows you want to predict sit in one table and the evidence sits in others, reachable through foreign keys. **TabPFN-Rel α** is the harness that applies TabPFN-3 to this setting: it flattens the database into one table and predicts in-context, with no task-specific training.

## How it works

TabPFN-Rel runs in three stages.

1. **Deep feature synthesis.** Starting from the table that holds the entity you are predicting for, it follows the schema's foreign keys outward and aggregates the rows reachable at each depth into features, such as `COUNT(results)` or `MEAN(results.points)`. This is the recipe popularized by [featuretools](https://github.com/alteryx/featuretools), and TabPFN-Rel builds on [RDBLearn](https://github.com/HKUSHXLab/rdblearn)'s implementation of it.
2. **Depth selection.** How far to traverse is the one hyperparameter that matters, and it is chosen per task rather than fixed.
3. **In-context prediction.** The resulting flat table goes to TabPFN-3, which predicts the labels of the query rows from the labelled context rows in a single forward pass.

Only rows written before each entity's prediction timestamp are aggregated, so a model never sees the future of the entity it is predicting.

## The relational stack

TabPFN-Rel is released alongside two other pieces.

[**RelArena**](https://github.com/PriorLabs/relarena) is the benchmarking framework TabPFN-Rel is evaluated in. It standardizes data loading, the evaluation protocol and the tuning budget across relational methods, so that numbers from different methods are comparable. It runs on the public databases and entity-level tasks of **RelBench**.

**RPI**, the Relational Predictive Interface, is a model-agnostic interface for defining a prediction problem on your own database and applying any model implemented in RelArena to it, including TabPFN-Rel. It is the entry point if you are not benchmarking.

## Getting Started

TabPFN-Rel is evaluated through **RelArena**, a benchmarking framework that standardizes data loading, evaluation protocol and tuning budget across relational methods. The snippet below runs it over the tasks of one database and returns a leaderboard.

```bash theme={null}
pip install relarena
```

```python theme={null}
import pandas as pd

import relarena.models  # registers the built-in models, including tabpfn-rel
from relarena.evaluation import compute_leaderboard
from relarena.registry import registry
from relarena.results import summary_to_dataframe
from relarena.runner import run_experiment
from relarena.tasks import list_entity_tasks

frames = []
for spec in list_entity_tasks(["rel-f1"]):
    summary = run_experiment(
        registry.get("tabpfn-rel-client"), spec.dataset, spec.task, seed=0, n_trials=3
    )
    frames.append(summary_to_dataframe(summary))

board = compute_leaderboard(pd.concat(frames, ignore_index=True))
```

`tabpfn-rel-client` runs through the hosted TabPFN API and passes text columns through to the model; a local variant is available for running the model yourself.

## Key Features

* **No task-specific training**: features are computed once and the prediction is a single in-context forward pass, so there is no gradient training loop to configure.
* **Schema-driven**: the aggregations follow the foreign keys already declared in your database, so no manual feature engineering is required to get a first result.
* **Almost nothing to tune**: aggregation depth is the only hyperparameter searched, in contrast to the graph neural networks typically applied to this setting.
* **Text columns included**: free-text fields in the entity table are passed to the model rather than dropped, which matters on tasks where the text carries the signal.

## Learn More

<CardGroup cols={2}>
  <Card title="Advancing Open and Reproducible Relational Learning" icon="file-pdf" href="https://arxiv.org/abs/2608.16319">
    The report covering RelArena-α, TabPFN-Rel and the RPI.
  </Card>

  <Card title="RelArena on GitHub" icon="github" href="https://github.com/PriorLabs/relarena">
    Source, installation and defining tasks on your own database.
  </Card>
</CardGroup>
