The first foundation model to outperform supervised ML on relational data.
1pip install kumoai
Foundation models have transformed nearly every domain of machine learning from language, vision to code, but structured data in relational databases has remained stubbornly resistant. These databases power the world’s most critical business decisions, yet predictive modeling on them still requires weeks of manual feature engineering, task-specific training, and carefully tuned pipelines. Today, we introduce KumoRFM-2: a pre-trained foundation model that changes this equation entirely. For the first time, a few-shot foundation model outperforms supervised approaches on common relational benchmarks. No training, just a query and a few examples.
"Kumo.ai has transformed how we approach lead scoring at Databricks. Since deploying their platform, we've seen conversion rates from leads to opportunities improve from 1.2x to 6x, and we've doubled the volume of high-intent, quality leads entering our pipeline. The impact on our marketing performance has been substantial."
- Anoop Muraleedharan, Sr Director Data & Analytics, Databricks
What is KumoRFM?
Most foundation models on structured data operate on a single flat table: one row per example, one column per feature. However, real-world data doesn’t live in flat tables but in relational databases: users connected to orders connected to products connected to reviews, all evolving over time. Flattening these relationships into a single row through manual aggregation (e.g., "average order value in the last 30 days") loses the fine-grained structural signals that often drive the best predictions, and requires significant human effort to get right.
KumoRFM is a Relational Foundation Model. It operates directly on a database and respects multiple tables, foreign keys, and timestamps. The key mechanism that makes this possible is In-Context Learning (ICL): rather than training a model per task, KumoRFM is pre-trained once on a large corpus of synthetic and real-world relational data. At inference time, you provide a small set of context examples (typically a few thousand) and the model generalizes to this task in a single forward pass.
Each context example consists of two parts: a local subgraph extracted from the database around a specific entity at a specific point in time, and the corresponding ground-truth target (e.g., "this user churned," or "this item sold 142 units"). For temporal tasks, these are constructed automatically by replaying historical database states based on sampling entity-centric subgraphs up to an anchor timestamp and computing the target from events that occurred after it. This automatic context generation is driven by the Predictive Query Language (PQL), a declarative interface where you express what to predict rather than how. No training. No flattening.

Overview of the KumoRFM system. Connect a database, specify a predictive query, and KumoRFM handles the rest, from context generation to model inference.
What’s New in KumoRFM-2
KumoRFM-2 introduces a hierarchical attention architecture that processes information at three distinct scales: within individual tables (row and column attention), across tables (graph attention over foreign keys), and across context examples (cross-sample attention).

First, a lightweight network processes each table independently through alternating column attention (relating features within a column) and row attention (relating features within a row). Critically, context targets are injected directly into the input tables at this stage. This makes the entire intra-table computation task-conditioned: the model learns which columns and rows are relevant to the current prediction task, and can filter out noise before it propagates further. This is a fundamental improvement over v1, where task information was only available later in the pipeline.
Afterwards, a larger network takes the row embeddings produced in the first stage and distributes them across the relational structure via graph attention over primary-foreign keys, interleaved by cross-sample attention that shares information across context samples. This is where the model performs relational reasoning. It correlates signals across tables (e.g., linking a user's profile to their transaction history) and learns from patterns across different context examples to inform the prediction.
This staged design has several practical benefits. It avoids the quadratic complexity of attending over every cell in every table simultaneously, enabling KumoRFM-2 to scale to large contexts and deeper subgraphs. It also produces better representations: noisy or irrelevant features are pruned early at the table level, so the cross-table reasoning stage operates on cleaner signals.
Beyond the architecture, KumoRFM-2 introduces several additional improvements. Smarter context selection utilizes local context drawn from the prediction entity's own history as lagged targets and combines them with global context from the most recent database snapshots across other entities. For pre-training, KumoRFM-2 leverages an expanded corpus of synthetic and real-world relational data, transitioning progressively from single tables to more complex relational structures.
Experimental Results
We evaluated KumoRFM-2 on 41 challenging benchmarks across 15 relational databases spanning e-commerce, medical, enterprise, social, and academic domains.

KumoRFM-2 is able to outperform the strongest supervised models across binary/multi-class classification and regression tasks, including relational deep learning models and data-scientist-engineered tabular ensembles. On the SAP SALT enterprise benchmark, it surpasses giant AutoGluon ensembles by 8% and recent tabular foundation models by about 25%. Fine-tuning pushes performance even further, improving performance by 16% in total, with each task completing in under two minutes.
Beyond raw accuracy, KumoRFM-2 maintains strong performance with as little as 0.2% of available training data used as context, remains stable when up to 75% of foreign key links are removed (cold-start scenarios), and shows near-zero degradation when injecting a large corpus of noisy columns to the input.
Scaling KumoRFM-2
KumoRFM-2 is designed to support in-context learning natively over databases, either (1) in-memory, (2) via database and warehouse connectors, or (3) through a custom graph engine. Specifically, data processing can either be pushed down to the underlying database or executed with a custom graph engine that handles 500B+ rows via memory-mapped I/O at 5GB/sec throughput. The entire workflow fits in a few lines of code:
1from kumoai import rfm
2
3# Connect to your warehouse and build a graph:
4graph = rfm.Graph.from_snowflake(
5 connection=rfm.backend.snow.connect(...),
6 tables=["users", "orders", "items"],
7)
8
9# Initialize the model:
10model = rfm.KumoRFM(graph)
11
12query = """ # Predict user churn:
13PREDICT COUNT(orders.*, 0, 30, days)=0
14FOR EACH users.user_id
15"""
16result = model.predict(query, explain=True)
KumoRFM-2 is designed as an agent-ready system. The same abstractions exposed through the Python SDK are available as a collection of skills for integration into LLM-based workflows, turning predictive modeling into a composable primitive for autonomous agents.
Get Started
KumoRFM-2 is available today. Read the paper, explore the examples, or start making predictions on your own data:
- Read the paper: Full technical details and benchmarks
- Try KumoRFM: Start making predictions
- SDK Documentation: pip install kumoai
- Agent Skills: Integrate into agentic workflows
- Notebooks: Hands-on examples
- PQL Paper: Our Predictive Query Language
- KumoRFMv1 Paper: Our previous iteration







