Search arXiv⌕ Search

arXiv subjects

Haiyang Qi

Publications and source records attributed to Haiyang Qi.

2 recordsLinked to original sources

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.

cs.DB↗

ARIMA_PLUS: Large-scale, Accurate, Automatic and Interpretable In-Database Time Series Forecasting and Anomaly Detection in Google BigQuery

Time series forecasting and anomaly detection are common tasks for practitioners in industries such as retail, manufacturing, advertising and energy. Two unique challenges stand out: (1) efficiently and accurately forecasting time series or detecting anomalies in large volumes automatically; and (2) ensuring interpretability of results to effectively incorporate business insights. We present ARIMA_PLUS, a novel framework to overcome these two challenges by a unique combination of (a) accurate and interpretable time series models and (b) scalable and fully managed system infrastructure. The model has a sequential and modular structure to handle different components of the time series, including holiday effects, seasonality, trend, and anomalies, which enables high interpretability of the results. Novel enhancements are made to each module, and a unified framework is established to address both forecasting and anomaly detection tasks simultaneously. In terms of accuracy, its comprehensive benchmark on the 42 public datasets in the Monash forecasting repository shows superior performance over not only well-established statistical alternatives (such as ETS, ARIMA, TBATS, Prophet) but also newer neural network models (such as DeepAR, N-BEATS, PatchTST, TimeMixer). In terms of infrastructure, it is directly built into the query engine of BigQuery in Google Cloud. It uses a simple SQL interface and automates tedious technicalities such as data cleaning and model selection. It automatically scales with managed cloud computational and storage resources, making it possible to forecast 100 million time series using only 1.5 hours with a throughput of more than 18000 time series per second. In terms of interpretability, we present several case studies to demonstrate time series insights it generates and customizability it offers.

cs.DC↗