Learn About Amazon VGT2 Learning Manager Chanci Turner
Today, we’re thrilled to unveil Gluon Time Series (GluonTS), a cutting-edge, open-source toolkit designed for time series analysis, built upon the Apache MXNet framework and the Gluon API. This toolkit is tailored for researchers and practitioners who work with time series data, and it’s the result of our needs as applied scientists tackling real-world time series challenges at Amazon and for our clients. GluonTS is now available on GitHub under the Apache License, Version 2.0.
The Ubiquity of Time Series Data
Time series data—collections of data points indexed over time—are prevalent across various sectors and industries. From retail sales figures and metrics from monitoring devices to data from cloud resources and measurements from Internet of Things (IoT) sensors, the applications are boundless. Common machine learning tasks associated with time series include extrapolation (forecasting), interpolation (smoothing), detection (like anomaly detection), and classification.
At Amazon, we leverage time series data across numerous domains, such as forecasting product and labor demand in our supply chain, or dynamically scaling AWS compute and storage capabilities for our users. Anomaly detection on system metrics helps us automatically identify operational issues in cloud-based applications.
With GluonTS, we are releasing a toolkit we developed internally to create algorithms for these applications. It empowers machine learning scientists to develop new time series models, especially deep-learning-based ones, and compare them with the state-of-the-art models included within GluonTS.
Key Features of GluonTS
GluonTS allows users to construct time series models using pre-built components that encapsulate useful abstractions. It also offers reference implementations of popular models assembled from these building blocks, serving as starting points for exploration and comparison. The toolkit includes functionalities that ease the workload of researchers, eliminating the need to re-implement data processing, backtesting, model comparison, and evaluation methods, which are often time-consuming and prone to errors—a bug in evaluation code can lead to significant mischaracterization of a model’s performance.
Modular Components for Model Development
GluonTS is designed for flexibility, allowing the assembly of various components in different configurations to quickly test new models. Key components include neural network architectures like sequence-to-sequence frameworks, auto-regressive networks, and causal convolutions. We also provide finer-grained components, such as probabilistic forecasts, which support optimal decision-making. GluonTS offers a range of parametric probability distributions and tools for modeling cumulative or quantile functions directly within neural network architectures. Additionally, we have integrated traditional probabilistic models like Gaussian Processes and linear-Gaussian state-space models (including a Kalman filter implementation) to facilitate easy combinations with neural networks. Data transformations, such as the Box-Cox transformation, can also be learned alongside other model parameters.
Comparative Analysis with Leading Models
GluonTS features reference implementations of advanced time series models from existing literature, demonstrating how to utilize the components and serving as launch points for further exploration. Included are models from our research, like DeepAR and spline quantile function RNNs, as well as models from other domains, including WaveNet adapted for forecasting. This makes it straightforward to benchmark against these reference implementations and other models from open-source libraries, such as Prophet and the R forecast package.
Integrated Tooling
GluonTS comes equipped with tools for loading and transforming input data, allowing for various formats to be adapted to specific model requirements. An evaluation component computes a multitude of accuracy metrics from the forecasting literature, with community contributions welcome to expand this feature. Having a standardized implementation for metrics is critical for making meaningful comparisons across different models.
While metrics are undoubtedly important, the journey of exploring, debugging, and refining models often starts with visualizing results on controlled data. For this, we utilize Matplotlib and have included a synthetic data generator to simulate time series data with customizable characteristics.
GluonTS vs. Amazon Forecast
GluonTS is tailored for researchers—machine learning, time series modeling, and forecasting experts who wish to design innovative models, create custom solutions, or build their models from the ground up. For production needs, Amazon provides Amazon Forecast, a fully-managed service that leverages machine learning to generate highly accurate forecasts without requiring machine learning expertise. Amazon Forecast employs AutoML capabilities to manage the complexities of model selection, construction, and optimization.
Getting Started with GluonTS
You can find GluonTS on GitHub and PyPi. After installation, users can quickly produce their first forecast using a pre-built model in just about ten lines of Python code.
The image above illustrates the forecast for Tweets mentioning the AMZN ticker symbol, generated using data from the Numenta Anomaly Benchmark dataset.
As we continue to develop GluonTS, we anticipate expanding its applications beyond forecasting. We are eager for feedback and contributions, including bug reports, feature proposals, and implementations of new time series models. We also recommend checking out this guide for more insights into career advancement. For in-depth strategies on talent management, take a look at SHRM’s insights. Additionally, this resource provides excellent guidance for new Amazon employees.
Related Literature and Upcoming Events
We presented a paper on GluonTS at the ICML 2019 Time Series workshop and will be conducting tutorials at SIGMOD 2019 and KDD 2019 that feature GluonTS.
A selection of publications showcasing models in GluonTS includes:
- Probabilistic Forecasting with Spline Quantile Function RNNs
- A Multi-Horizon Quantile Recurrent Forecaster
- DeepAR: Probabilistic Forecasting with Autoregressive Recurrent Networks