TL;DR
Selecting the right formula and Kalman filter adaptation parameters for Generalized Additive Models (GAMs) in electricity demand forecasting is traditionally a manual, tedious process. This paper introduces an Automated Machine Learning (AutoML) framework built on the open-source DRAGON library that uses an evolutionary algorithm to simultaneously optimize GAM formulas and state-space hyperparameters. By optimizing both components jointly, the proposed approach improves test-set forecasting performance by 54% over handcrafted state-of-the-art baselines.
What Problem Does This Paper Address?
Electricity grid operators must match power generation to demand continuously to prevent blackouts. Because consumer behavior shifts over time—driven by evolving habits, economic changes, and new appliances—static models degrade. Operators commonly pair Generalized Additive Models (GAMs)—interpretable, semi-parametric linear combinations of smooth covariate effects—with state-space Kalman filtering to dynamically reweight model terms online.
However, building an effective online GAM requires two critical upfront design decisions:
- The formula specification ($f$): deciding which features to include, how to preprocess them (e.g., exponential smoothing of temperature to model building thermal inertia), and which spline bases and degrees of freedom to assign.
- The state-space hyperparameter ($Q$): the noise covariance matrix that controls how aggressively the Kalman filter updates term weights in response to recent errors.
Traditionally, choosing $f$ and $Q$ requires heavy manual expert tuning. Existing automated tools (like GAGAM) only search restricted, fixed spline structures and optimize formulas independently of the dynamic adaptation parameter $Q$, often yielding over-complicated models that fail during online filtering.
Methods
The authors cast the problem as a joint optimization task: finding $(f^\star, Q^\star) \in \Omega$ to minimize a regularized validation loss: $$\ell(f, Q, \mathcal{D}_{\text{valid}}) = \text{RMSE} + \eta \cdot \text{DF}(\hat{f})$$ where $\text{DF}(\hat{f})$ is the model's effective degrees of freedom (penalizing overly complex models), and $\eta = \sqrt{\text{Var}[Y]} / 5000$.
Key technical components include:
- Hierarchical Search Space via DRAGON: Encodes formulas with variable-length arrays defining univariate or bivariate terms, parameterized feature engineering (smoothing parameters $\alpha \in [0, 1]$, categorical selections), spline types (cubic, cyclic cubic, thin-plate splines, tensor products), and basis dimensions $q_k$, alongside the diagonal entries of $Q$.
- Evolutionary Operators with Interpretability Constraints: Defines custom two-point crossover and multi-point mutation operators that manipulate formula terms and $Q$ coefficients while strictly forbidding duplicate features in a formula to preserve interpretability.
- Joint Optimization vs. Sequential Tuning: The authors compare two evolutionary algorithm (EA) paradigms:
- $\text{EA}(f) + Q_{\text{igs}}$: Evolves static formulas on fixed GAMs, then tunes $Q$ post-hoc via an iterative grid search ($Q_{\text{igs}}$).
- $\text{EA}(f, Q)$: Simultaneously evolves the formula structure $f$ and the adaptation covariance matrix $Q$.
Datasets
The authors evaluate their method on French national electricity demand data sourced from RTE (the French Transmission System Operator):
- Features: Half-hourly/hourly electrical demand, meteorological variables (temperature, cloud cover, wind speed), and calendar data (day of the week, position in year, holiday/break indicators).
- Train Split ($\mathcal{D}_{\text{train}}$): 2017–2020 (excluding COVID-19 pandemic lockdowns to avoid non-representative structural bias).
- Validation Split ($\mathcal{D}_{\text{valid}}$): 2021–2022 (used to evaluate loss and guide the EA search).
- Test Split ($\mathcal{D}_{\text{test}}$): 2023–2024 (unseen evaluation set).
Models are fitted independently for each of the 24 hours of the day to account for distinct intra-day load patterns.
Key Insights and Ideas
- Sequential tuning fails under adaptation: Optimizing a formula statically and then applying iterative grid search ($Q_{\text{igs}}$) fails dramatically when models become complex. As observed with GAGAM, selecting an over-parameterized formula leads the Kalman filter to become unidentifiable, degrading performance.
- Joint search is critical: The joint search $\text{EA}(f, Q)$ identifies formulas that are specifically tailored to adapt well under Kalman filtering, preventing filter divergence and drastically outperforming sequential optimization.
- Explicit complexity regularization matters: Adding the effective degrees of freedom ($\eta \cdot \text{DF}(\hat{f})$) to the validation objective penalizes redundant spline complexity, protecting the search from selecting models that overfit during training.
Key Results
Experiments evaluated each method on an operational weekly rolling forecast setup (updating state weights every Monday with past-week records):
| Model | Test RMSE (MW) | Test MAPE (%) |
|---|---|---|
| SotA (Handcrafted, static) | 4397 | 7.95% |
| GAGAM (AutoML, static) | 4240 | 7.73% |
| $\text{EA}(f)$ (Static) | 4290 | 8.03% |
| SotA $+ Q_{\text{igs}}$ (Handcrafted, adaptive) | 3364 | 5.07% |
| GAGAM $+ Q_{\text{igs}}$ (Adaptive) | 5976 | 7.78% |
| $\text{EA}(f) + Q_{\text{igs}}$ (Adaptive) | 4320 | 8.10% |
| $\text{EA}(f, Q)$ (Joint AutoML) | 1552 | 2.20% |
- $\text{EA}(f, Q)$ outperformed the handcrafted adaptive state of the art ($\text{SotA} + Q_{\text{igs}}$), slashing test RMSE from 3364 MW down to 1552 MW—a 54% improvement.
- It achieved consistent, uniform error reductions across all 24 individual hourly models.
Limitations and Future Work
- Independent Parameter Mutations: The current EA mutates $f$ and $Q$ independently, rather than binding an effect's spline parameters directly to its corresponding diagonal coefficient in $Q$.
- Validation Overfitting: The authors noted signs of validation set overfitting, suggesting future iterations should incorporate rolling cross-validation rather than a single validation split.
- Computational Cost: Both GAM estimation (via P-IRLS) and rolling Kalman filtering over long horizons are computationally demanding, limiting the search budget to $T = 200$ model evaluations.
- Model Ensembling: Future work aims to expand the search space from single GAMs to heterogeneous mixtures of "expert" models—combining GAMs with deep neural networks.
Summary updated