AutoGluon-TimeSeries Forecasting Framework
- AutoGluon-TimeSeries is an open-source AutoML framework for time series forecasting that integrates local statistical models and global machine learning techniques.
- It employs a forward-selection ensembling strategy and a modular model zoo combining statistical, deep-learning, and tabular regression approaches.
- Designed for robust scalability, AG-TS offers a minimal, reproducible API with automated hyperparameter tuning and validated benchmark performance.
AutoGluon-TimeSeries (AG-TS) is an open-source AutoML framework designed for automated probabilistic and point forecasting in time series data. Developed within the AutoGluon ecosystem, AG-TS integrates “local” statistical models—trained per series—and “global” machine-learning models—trained across all series—into an automated pipeline that emphasizes usability, robustness, and extensibility. By leveraging a forward-selection ensembling strategy, a diverse model zoo, and automated workflow presets, AG-TS consistently achieves state-of-the-art performance on heterogeneous forecasting benchmarks from various domains (Shchur et al., 2023, Sreedhara et al., 2024).
1. System Architecture and Design Principles
AG-TS’s architecture centers on the TimeSeriesDataFrame, a pandas-based “long” format container supporting univariate targets, static covariates (e.g., product ID, location), and time-varying covariates (both past-only and known-future). The main user interface, TimeSeriesPredictor, implements data preprocessing, portfolio model fitting, cross-validation, hyperparameter optimization (HPO), and ensemble construction. A modular “model zoo” provides seamless integration of local statistical, global deep-learning, and global tabular-regression forecast models.
Ensemble construction relies on a 100-step forward-selection algorithm that learns convex weights over component models. Preset configurations (“quick_train”, “medium_quality”, “best_quality”) balance accuracy and runtime via curated hyperparameter defaults. Underlying computations inherit robustness features from AutoGluon’s core—including automated model failure handling, local result caching, CPU parallelization for local models, and GPU support for global models. AG-TS utilizes AutoGluon-Tabular as a backend for tree-based and neural network regressors, and reuses GluonTS for deep-learning model infrastructure (Shchur et al., 2023, Sreedhara et al., 2024).
2. Supported Models, Losses, and Forecasting Objectives
AG-TS partitions its base models as follows:
- Local Statistical Models: SeasonalNaive, ETS (error–trend–seasonality), AutoARIMA (fitted via AIC/AICc/BIC), and Theta (second-derivative decomposition with exponential smoothers). Local models are implemented via StatsForecast.
- Global Deep-Learning Models: DeepAR (autoregressive RNN/LSTM), PatchTST (Transformer-based, patch-level encoding), and Temporal Fusion Transformer (TFT, combining LSTM encoders, multi-head attention, static and dynamic covariates), via GluonTS.
- Global Tabular-Regression Models: RecursiveTabular (repeated one-step-ahead prediction) and DirectTabular (multi-horizon direct prediction), implemented using AutoGluon-Tabular and MLForecast.
Loss functions include quantile loss for probabilistic targets (), weighted quantile loss (wQL) averaged over designated quantiles, and point forecast accuracy measured by Mean Absolute Scaled Error (MASE). For empirical studies and benchmarks, additional metrics include symmetric Mean Absolute Percentage Error (sMAPE) and Root Mean Square Error (RMSE) (Shchur et al., 2023, Sreedhara et al., 2024).
3. Ensembling Mechanisms and Hybrid Model Strategies
Central to AG-TS’s performance is a library-level forward-selection ensemble, which iteratively adds models to minimize the validation loss under convex weight constraints (). Quantile forecasts are aggregated using Vincentization: ensemble quantiles at level are computed as . This structure enables hybrid blends combining statistical local models (excellent for strong series-specific seasonality), global deep-learning models (for cross-series signal extraction), and tabular/ML hybrids, weighted based on validation performance (Shchur et al., 2023, Sreedhara et al., 2024).
4. Automated Workflow, API, and Hyperparameter Optimization
AG-TS prioritizes a minimal and reproducible API, with default workflows requiring only three lines of Python code for end-to-end forecasting:
1 2 3 4 5 |
from autogluon.timeseries import TimeSeriesDataFrame, TimeSeriesPredictor train_data = TimeSeriesDataFrame.from_path("train.csv") predictor = TimeSeriesPredictor(prediction_length=30, eval_metric="mean_wQuantileLoss").fit(train_data) predictions = predictor.predict(train_data) |
Key user parameters are prediction_length (forecast horizon), quantile_levels (default [.1, .5, .9]), preset (controls model mix and runtime), and eval_metric (e.g., “MASE” or “mean_wQuantileLoss”).
By default, “ensemble over HPO” is favored: presets disable aggressive HPO to reduce overfitting and training time. Advanced users may specify hyperparameter_tune=True or bespoke model-wise search spaces for Bayesian or random search, but domain-guided default settings for core hyperparameters (e.g., DeepAR batch_size=64, PatchTST context_length=96, AutoARIMA allowmean=True) are generally used in benchmarks. Pseudocode for per-model random search is provided in (Sreedhara et al., 2024):
1 2 3 4 |
For i=1…N:
hᵢ ← UniformSample(H) # sample hyperparameters
scoreᵢ ← EvalOnValidation(model, hᵢ)
Choose h* = argmin_i scoreᵢ |
5. Empirical Benchmarks and Comparative Performance
AG-TS has been evaluated on up to 36 public panel time series data-sets (Monash repository), spanning frequencies from yearly to minutely and domains from tourism to health care. Datasets range from single long univariate series (e.g., 7.4M-point Wind Power) to vast panels (M4 Monthly: 48,000 series, Kaggle Wikipedia: 145,063 series). Imputation uses domain-adapted strategies (e.g., LOCF, zero-fill, and aggregation), and forecast horizons match competition standards (Sreedhara et al., 2024).
Key benchmark results (4 hr CPU cap, 29 datasets):
Point Forecasts (MASE):
| Framework | avg. rank | champion count (wins) | avg. rescaled error |
|---|---|---|---|
| AutoGluon–TS | 2.08 | 19/29 | 0.073 |
| StatEnsemble | 3.12 | 3/29 | 0.238 |
| AutoPyTorch | 4.12 | 2/29 | 0.257 |
| AutoETS | 4.64 | 1/29 | 0.374 |
| DeepAR | 5.08 | 2/29 | 0.434 |
Probabilistic Forecasts (wQL):
| Framework | avg. rank | champion count | avg. rescaled error |
|---|---|---|---|
| AutoGluon–TS | 1.80 | 19/29 | 0.086 |
| DeepAR | 4.08 | 1/29 | 0.455 |
| TFT | 4.24 | 5/29 | 0.487 |
| AutoETS | 4.40 | 2/29 | 0.489 |
Mean AG-TS runtime is approximately 33 minutes. Local models may exceed 6 hours on long series, but all AG-TS ensemble runs completed within the time cap (Shchur et al., 2023).
A larger benchmark (Sreedhara et al., 2024) used 36 datasets, reporting:
- AG-TS(600s): sMAPE ≈ 0.33, MASE ≈ 24.23
- AG-TS(3600s): sMAPE ≈ 0.31, MASE ≈ 30.10
Longer runtime significantly improved sMAPE by paired t-test (p < 0.05), though gains in MASE were not statistically significant. AG-TS was top-ranked in Friedman tests across domains, with superior consistency over sktime methods, PatchTST, and other baselines.
Observations:
- On univariate long series, local models (AutoARIMA, Theta) perform best and AG-TS ensemble prioritizes them.
- For large panels, deep global models (PatchTST, TFT) dominate selection.
- Monthly series can occasionally favor simple persistence (Naive) models in sMAPE.
- Economic and transport data sees stronger performance from local and exponential smoothing methods, but generalizes less well outside niche domains.
- Computational budget is roughly linear in (# series × horizon); very high-cardinality data (>100k series) can exceed memory limits (Sreedhara et al., 2024).
6. Practical Considerations, Limitations, and Use Cases
AG-TS’s design supports scalability (up to ~10⁷ time steps per run), parallel CPU fitting for local models, and GPU-accelerated training for deep networks. The “quick_train” preset provides rapid runtimes for exploratory analysis; “best_quality” completes in under 1 hour for most benchmarks. AG-TS is suited for out-of-the-box probabilistic forecasting on panel data and as a research platform for blending novel forecasters.
Model failure handling is robust: ensemble construction continues using successful model fits if individual base models crash. Extensibility is achieved via subclassing of Predictor modules for custom model integration. Limitations include memory and runtime constraints on ultra-large datasets and dependence on correct covariate alignment and imputation strategies. GPU use is essential for deep learning models in large-scale or high-frequency contexts (Shchur et al., 2023, Sreedhara et al., 2024).
This suggests AG-TS is particularly effective for automated, heterogeneous forecasting tasks where combining statistical tradition, machine learning capacity, and ensemble robustness is critical. However, persistence-type forecasts may remain optimal for certain strongly seasonal, high-frequency univariate series. Custom HPO may also yield marginal gains on atypical datasets, subject to validation overfitting risk and runtime increase.