November 30, 2021
NeuralProphet provides a solution to some of users’ most common needs, based on Meta’s own internal data scientists, as well as the requests of external industry practitioners, aiming to maximize the scalability and flexibility of time series forecasts.
As industry becomes sophisticated in the use of deep learning for decision making, time series forecasting has emerged as a dominant type of data. Whether it’s projecting product demand to adequately stock inventory or forecasting infection rates for disease control programs, the growing scale for data demands new approaches.
Enter more sophisticated deep learning models that are increasingly popular, thanks to their nonparametric nature — useful when your data aren’t normally distributed — and scalability to match complex data sets. Their black box nature, however, can make them less useful for forecasting when predictions shape business or operational decisions that need to be both accurate and easily explained.
Statistical models such as autoregressive integrated moving average (ARIMA) and exponential smoothing state space (ETS), as parametric models with restrictive assumptions that depend on underlying data, also lack scalability to assimilate large data and complex patterns.
This gap between interpretable classic models and modern deep learning models remains largely an open research topic. Our viewpoint is that hybrid models are needed to bridge the distance between the two.
At Meta AI, we’re jumping in with an updated solution: NeuralProphet, a scalable and an easy to use framework for hybrid forecasting models that builds on the legacy of Facebook Prophet, the open source forecasting library that we released in 2017.
NeuralProphet improves on Prophet by addressing its key shortcomings: extensibility of the framework, missing local context for predictions and forecast accuracy.
NeuralProphet is highly scalable, easy to use, and extensible, as it is built entirely in PyTorch and trained with standard deep learning methods.
NeuralProphet introduces local context with support for auto-regression and lagged covariates.
NeuralProphet improves forecast accuracy with a hybrid model, where some model components can be configured as neural networks.
Presented in a user-friendly Python package, NeuralProphet uses a fusion of classic components and neural networks to produce highly accurate time series forecasts quickly. Current Prophet users will find the package to be familiar in design.
The framework provides automatic hyperparameter selection, making it a convenient and accessible tool for beginners. Advanced forecasting practitioners can incorporate domain knowledge and leverage deeper expertise with a superset of custom modules, model weight sparsification, and global modeling capabilities.
As a modular framework, NeuralProphet is composed of components that are interpretable, scalable and independently configurable. All modules are jointly trained with mini-batch stochastic gradient descent (SGD). Any model component that is trainable by SGD can be included as a module, which makes it easy to extend the framework with the state-of-the-art forecasting methods of the future.
NeuralProphet includes all the components from the original Prophet model: trend, seasonality, recurring events, and regressors. Further, NeuralProphet now also provides support for auto-regression and lagged covariates. That's particularly relevant in the kinds of applications in which the near-term future depends on the current state of the system. The majority of time series forecasting exhibits those dynamics, evidenced in scenarios related to energy consumption, traffic patterns, air quality measures, and much more. For example, when there’s a strong uptick in server load, it might have been triggered by a recent event that could continue for prolonged periods, which should be reflected in near-term forecasts.
In the paper linked below, we demonstrate the framework’s interpretable decomposition capabilities on synthetic data and contrast it to Prophet. Additionally, we benchmark both models on a wide range of industrial applications.
As one of the most popular forecasting tools within Meta and beyond, Prophet has set an industry standard. Yet its limitations around key features, such as the lack of local context, have presented challenges for users. Because Prophet was built on top of Stan, a probabilistic programming language, it wasn’t simple to extend the original forecasting library. It’s why the ability to extend Prophet is one of the most requested features users have suggested on GitHub.
NeuralProphet retools Prophet from the bottom up, addressing the challenges by replacing Stan with PyTorch, which is both flexible and easy to use. This makes it easy for developers to extend the framework with new features, and to adopt new research. As an example, we were inspired by AR-Net to enable users to seamlessly configure auto-regression and covariate modules as classic time series components or as deep neural networks.
Upgrading Prophet with NeuralProphet empowers frontline engineers and business leaders with insights that would improve a range of industrial applications. NeuralProphet could be useful, for example, in helping utility companies meet customer demand efficiently during a heat wave.
NeuralProphet provides the forecasting practitioner with a fast, explainable model with reasonable accuracy and in a convenient and scalable framework that’s trainable on any modern computer.
We’d like to thank Ram Rajagopal, Associate Professor of Civil and Environmental Engineering at Stanford University, Christoph Bergmeir, Senior Lecturer in Data Science and Artificial Intelligence, Italo Lima, Senior Data Scientist at Netflix, and Caner Komurlu, Research Data Scientist at Meta, for their contributions to NeuralProphet.
PhD Student at Stanford University, Sustainable Systems Lab (Sponsored in part by a research agreement between Stanford University and Total S.A.)
PhD Research Student, Monash University