Table of Contents
Fetching ...

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

Xi Cheng, Weijie Shen, Haoming Chen, Chaoyi Shen, Jean Ortega, Jiashang Liu, Steve Thomas, Honglin Zheng, Haoyun Wu, Yuxiang Li, Casey Lichtendahl, Jenny Ortiz, Gang Liu, Haiyang Qi, Omid Fatemieh, Chris Fry, Jing Jing Long

TL;DR

ARIMA_PLUS tackles the challenge of scalable, interpretable large-scale time series forecasting and anomaly detection by embedding a modular, decomposition-based pipeline directly into Google BigQuery. It combines data processing, holiday and event adjustment, outlier handling, multi-seasonality, change-point detection, and ARIMA-based trend modeling with covariates in a divide-conquer framework that maintains interpretability through component-wise forecasts. The approach delivers state-of-the-art accuracy on 42 Monash datasets, enables automatic scaling to tens of millions of series, and provides a SQL-based interface for easy integration, forecasting, and anomaly detection. Its practical impact lies in automated, transparent forecasting across enterprise-scale time series, with robust handling of irregularities, bounds, and custom business signals across diverse domains.

Abstract

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.

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

TL;DR

ARIMA_PLUS tackles the challenge of scalable, interpretable large-scale time series forecasting and anomaly detection by embedding a modular, decomposition-based pipeline directly into Google BigQuery. It combines data processing, holiday and event adjustment, outlier handling, multi-seasonality, change-point detection, and ARIMA-based trend modeling with covariates in a divide-conquer framework that maintains interpretability through component-wise forecasts. The approach delivers state-of-the-art accuracy on 42 Monash datasets, enables automatic scaling to tens of millions of series, and provides a SQL-based interface for easy integration, forecasting, and anomaly detection. Its practical impact lies in automated, transparent forecasting across enterprise-scale time series, with robust handling of irregularities, bounds, and custom business signals across diverse domains.

Abstract

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.

Paper Structure

This paper contains 36 sections, 8 equations, 17 figures, 5 tables.

Figures (17)

  • Figure 1: The univariate time series modeling pipeline in ARIMA_PLUS. The ML functions in the diagram are discussed in Section \ref{['interface']}.
  • Figure 2: Illustration of change point detection in the forward step. A total of 9 local forecasts are shown. Black lines stand for local forecasts $F^i$. Red arrows stand for large residuals $R_j^i$. Red boxes stand for the 5 local forecasts whose total residuals $R^i$ are above the threshold. Finally, red dots stand for the Forward Potential Change Starts (FPCS).
  • Figure 3: Stable periods for step change adjustment.
  • Figure 4: The multivariate time series modeling pipeline, including model training and prediction. The "CREATE MODEL" and ML functions in the diagram are discussed in Section \ref{['interface']}. The "ARIMA_PLUS" pipeline refers to the univariate time series modeling pipeline, as illustrated in Figure \ref{['fig-univariate']}.
  • Figure 5: For multiple time series, the system first identifies them using the ID columns. It then executes a separate training and prediction pipeline for each series, distributing the workload and auto-scaling compute and storage resources as needed.
  • ...and 12 more figures