Supporting Time Series and Tabular Foundation Models in BigQuery

Traditional database machine learning (DBMS-ML) systems rely on task-specific model training, which introduces operational complexity, resource-intensive training phases, and artifact-management overhead. Foundation Models (FMs) for time series (e.g., TimesFM) and tabular data (e.g., TabFM) enable training-free SQL inference -- via zero-shot forecasting and in-context learning -- directly on database tables. However, integrating multi-hundred-million-parameter models into a distributed query engine like BigQuery presents severe challenges in worker memory consumption, quadratic O(n^2 + nm^2) attention complexity, and distributed execution alignment. In this paper, we present the design and production deployment of native TimesFM (AI.FORECAST) and TabFM (AI.PREDICT) in BigQuery. To address their distinct computational bottlenecks, we develop tailored execution architectures and systems optimizations: for TabFM, a decoupled two-stage prefill-decode architecture with 1 MB chunked Key-Value cache broadcast, stage-scoped shared-memory reuse, and deterministic class-balanced subsampling eliminates redundant in-context learning across workers and bounds per-worker decode memory; for TimesFM, a one-stage hash-partitioned C++ TFLite runtime delivers a 2.29x speedup over Python PyTorch, while 8-bit integer quantization provides an additional 2.53x resident memory reduction (4.15x combined) and 3.58x faster cold initialization with a -0.29% mean MASE shift. We evaluate our system across 56 GIFT-Eval time series benchmarks, enterprise forecasting workloads scaling to 10 million time series, and 51 TabArena tabular tasks. Our results prove the effectiveness of the integration, demonstrating that zero-shot foundation models scale to billions of rows and match or outperform fully trained models like XGBoost without manual training pipelines.

Authors

Publication Details

Journal
arXiv
Published
2026-12-02
Primary Topic
Advanced Database Systems and Queries
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

Supporting Time Series and Tabular Foundation Models in BigQuery

Rajat Subhra Sen, Jing Jing Long, Omid Fatemieh, Jiashang Liu et al.
arXiv
Advanced Database Systems and Queries
preprint

Supporting Time Series and Tabular Foundation Models in BigQuery

Rajat Subhra Sen, Jing Jing Long, Omid Fatemieh, Jiashang Liu, Qiang Hao, Petros Mol, Haiyang Qi, Ayush Jain, Haoming Chen, Weihao Kong, Weijie Shen, Zehao Xu, Yichen Zhou, Erez Louidor Ilan, Abhimanyu Das, Jenny Ortiz, Xi Cheng, Steve Thomas, Chaoyi Shen
preprint en

Abstract

Traditional database machine learning (DBMS-ML) systems rely on task-specific model training, which introduces operational complexity, resource-intensive training phases, and artifact-management overhead. Foundation Models (FMs) for time series (e.g., TimesFM) and tabular data (e.g., TabFM) enable training-free SQL inference -- via zero-shot forecasting and in-context learning -- directly on database tables. However, integrating multi-hundred-million-parameter models into a distributed query engine like BigQuery presents severe challenges in worker memory consumption, quadratic O(n^2 + nm^2) attention complexity, and distributed execution alignment. In this paper, we present the design and production deployment of native TimesFM (AI.FORECAST) and TabFM (AI.PREDICT) in BigQuery. To address their distinct computational bottlenecks, we develop tailored execution architectures and systems optimizations: for TabFM, a decoupled two-stage prefill-decode architecture with 1 MB chunked Key-Value cache broadcast, stage-scoped shared-memory reuse, and deterministic class-balanced subsampling eliminates redundant in-context learning across workers and bounds per-worker decode memory; for TimesFM, a one-stage hash-partitioned C++ TFLite runtime delivers a 2.29x speedup over Python PyTorch, while 8-bit integer quantization provides an additional 2.53x resident memory reduction (4.15x combined) and 3.58x faster cold initialization with a -0.29% mean MASE shift. We evaluate our system across 56 GIFT-Eval time series benchmarks, enterprise forecasting workloads scaling to 10 million time series, and 51 TabArena tabular tasks. Our results prove the effectiveness of the integration, demonstrating that zero-shot foundation models scale to billions of rows and match or outperform fully trained models like XGBoost without manual training pipelines.

arXiv
Advanced Database Systems and Queries
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon