Handling Covariates and External Features
What You'll Learn
You'll learn how to incorporate static metadata, known future inputs, and time-varying covariates into neural forecasting models to improve prediction accuracy.
The Core Idea
When forecasting time series, you're rarely working with just the target variable in isolation. Covariates are additional variables that influence your predictions:
- Static covariates: unchanging attributes (e.g., store location, product category)
- Known future covariates: features you know ahead of time (e.g., holidays, promotions, day of week)
- Time-varying observed covariates: variables that change but aren't known in advance (e.g., weather, competitor pricing)
Think of forecasting retail sales: knowing it's Christmas week (known future), that the store is in a mall (static), and yesterday's foot traffic (time-varying) all help predict tomorrow's sales better than sales history alone.
How Neural Models Handle Covariates
Unlike classical ARIMA models (which struggle with external features), neural networks excel at incorporating multiple input streams:
- Static features typically pass through embedding layers or are concatenated to hidden states
- Known future covariates can be fed directly into encoder-decoder architectures for multi-step forecasting
- Time-varying covariates are processed alongside the target sequence, often through separate pathways that merge with temporal representations
Models like Temporal Fusion Transformers and DeepAR (from your recent lessons) have specialized mechanisms: variable selection networks choose relevant covariates, while attention layers weight their importance dynamically across time.
The key is alignment: ensure covariates match the temporal resolution of your target and that "future" features are genuinely available at prediction time.
Key Takeaway: Incorporating static metadata, known future inputs, and time-varying covariates transforms univariate forecasting into rich multivariate prediction, leveraging neural networks' strength in learning complex feature interactions across multiple data streams.