Time Series Energy Demand Forecasting

Model Architecture (DemandLSTM)

A multi-horizon deep learning model with quantile regression and attention for reliable energy demand forecasting.

Computational graph of the DemandForecast (DemandLSTM) model: input tensor feeds a 2-layer, 128-unit LSTM with dropout 0.25, into an AttentionPool mechanism (score head, softmax, weighted sum) producing a context vector, into a Head Dropout (0.25) that feeds three parallel Linear heads -- Lower Spread, Point, and Upper Spread -- whose softplus-bounded spreads combine with the point value into P10, P50, and P90 forecasts
Key Model Details
  • Multi-horizon forecasting (48 steps)
  • 2-layer LSTM (128 units each)
  • Attention-based pooling
  • Head dropout (rate = 0.25)
  • 3 parallel heads (P10, P50, P90)
Input Shape
  • (batch_size, 24, 37)
  • 24 lookback steps
  • 37 features
Model Outputs
  • P10 (lower bound)
  • P50 (median prediction)
  • P90 (upper bound)
  • Each: (batch_size, 48)
Why It Works
  • LSTM captures temporal patterns
  • Attention focuses on important timesteps
  • Quantile regression provides uncertainty
  • Softplus ensures non-negative spread
Use Case
  • Reliable and accurate energy demand forecasts for better planning and operations.
Note:P10 ≤ P50 ≤ P90 (guaranteed by construction, because spread heads use softplus)|24 = lookback (input sequence length)|48 = forecast horizon (output length)

The full byte-level architecture detail (LSTM gate equations, DemandTFT, conformal calibration) lives in docs/architecture/model-architecture.md at the repo root.

EcoLens · Energy Grid Intelligence & Carbon Accounting