Source-linked AI summary

A deep generative model for probabilistic energy forecasting in power systems: normalizing flows

Jonathan Dumas, Antoine Wehenkel Damien Lanaspeze, Bertrand Cornélusse, Antonio Sutera

arXiv:2106.09370v4cs.LGcs.SYeess.SYstat.ML

TL;DR

Renewable generation uncertainty complicates power-system operations, and probabilistic scenarios can support decision-making. This paper evaluates conditional normalizing flows against GANs and VAEs, finding them more accurate overall in quality and value; the study also reports a retailer-bidding net profit of 107 ke for normalizing flows.

  • Problem

    Increasing renewable capacity makes power-system operations harder to predict because renewable generation is uncertain.

    Source: §1 · p. 1
  • Method

    The paper evaluates normalizing flows that directly learn the stochastic multivariate distribution by maximizing likelihood, alongside GANs and VAEs.

    Source: §5 · pp. 16–17
  • Results

    Normalizing flows are reported as more accurate overall in quality and value than GANs and VAEs; in retailer bidding, NF outperformed both with total net profit of 107 ke.

    Source: §5 · p. 16, §4.3 · p. 16
  • Takeaways & Limitations

    Normalizing flows provide exact likelihoods that can support scenario transfer and importance sampling for stochastic optimization.

    Source: §5 · p. 17

    GAN training is difficult because of its saddle-point optimization, and similar performance to VAEs or normalizing flows often requires cumbersome hyperparameter tuning.

    Source: §2.3 · p. 8

Abstract

from arXiv · show

Greater direct electrification of end-use sectors with a higher share of renewables is one of the pillars to power a carbon-neutral society by 2050. However, in contrast to conventional power plants, renewable energy is subject to uncertainty raising challenges for their interaction with power systems. Scenario-based probabilistic forecasting models have become a vital tool to equip decision-makers. This paper presents to the power systems forecasting practitioners a recent deep learning technique, the normalizing flows, to produce accurate scenario-based probabilistic forecasts that are crucial to face the new challenges in power systems applications. The strength of this technique is to directly learn the stochastic multivariate distribution of the underlying process by maximizing the likelihood. Through comprehensive empirical evaluations using the open data of the Global Energy Forecasting Competition 2014, we demonstrate that this methodology is competitive with other state-of-the-art deep learning generative models: generative adversarial networks and variational autoencoders. The models producing weather-based wind, solar power, and load scenarios are properly compared in terms of forecast value by considering the case study of an energy retailer and quality using several complementary metrics. The numerical experiments are simple and easily reproducible. Thus, we hope it will encourage other forecasting practitioners to test and use normalizing flows in power system applications such as bidding on electricity markets, scheduling power systems with high renewable energy sources penetration, energy management of virtual power plan or microgrids, and unit commitment.

1. Introduction

As renewable penetration rises, uncertainty challenges operational predictability, making probabilistic forecasts valuable for decision-making. This paper introduces conditional normalizing flows and compares them with GANs and VAEs across renewable and load scenarios on forecast quality and decision value.

1. Introduction

  • Rising renewable generation makes power-system operations harder to predict, while probabilistic forecasts model possible future realizations for decision-making.The paper focuses on scenarios for load, PV generation, and wind generation.Source: §1 · p. 1

1.1. Related work

  • Earlier work explored deep generative models for energy forecasting, but comparisons of normalizing flows were limited in scope and often omitted weather conditioning or forecast value.The cited comparison of normalizing flows with GANs and VAEs covered daily load-profile quality without weather forecasts.Source: §1.1 · pp. 2–3

1.2. Research gaps and scientific contributions

  • The study compares conditional models using weather information across PV, wind, and load, and evaluates quality and value on open GEFcom 2014 data.It extends earlier work with monotonic normalizing-flow transformations and an easily reproducible case study.Source: §1.2 · pp. 3–4
  • Normalizing flows are reported as more accurate than GANs and VAEs in both forecast quality and value.Source: §1.2 · p. 4

1.3. Applicability of the generative models

  • The authors identify applications including energy-management forecasting, stochastic unit commitment, and day-ahead market participation.Scenarios may also support robust optimization through derived quantiles.Source: §1.3 · p. 5

1.4. Organization

  • The paper presents the implemented generative models, then assessment methods, empirical results, conclusions, and appendices covering additional details.Source: §1.4 · p. 5

2. Background

The paper frames conditional generative models as producing day-ahead, weather-based scenarios for wind, PV, or load. It introduces normalizing flows, VAEs, and GANs and compares their training objectives and trade-offs.

2.1. Multi-output forecast

  • The task is to generate day-ahead multi-output scenarios for wind, PV, or load, distributed according to the target given weather forecasts.A generative model aims to produce synthetic scenarios whose distribution is close to the unknown conditional data distribution.Source: §2.1 · p. 5

2.2. Deep generative models

  • Figure 2 contrasts conditional normalizing flows, VAEs, and GANs by how they learn distributions and generate scenarios.Flows access exact likelihood, VAEs optimize a variational lower bound, and GANs jointly optimize a generator and discriminator in a min-max problem.Source: Figure 2 · p. 6, §2.2 · p. 6

2.2.1. Normalizing flows

  • Normalizing flows compose invertible transformations to map observations to a tractable latent density, enabling density estimation through change of variables.The implemented flow uses an autoregressive MAF with UMNN transformers; the conditional log-density is computed exactly and efficiently in one forward pass.Source: §2.2.1 · pp. 6–7

2.2.2. Variational autoencoders

  • VAEs use an encoder and decoder, trained to maximize a variational lower bound because marginalizing over latent variables makes maximum likelihood intractable.The encoder approximates the posterior; the decoder generates scenarios from latent samples and weather forecasts.Source: §2.2.2 · p. 7, Figure 4 · p. 7

2.2.3. Generative adversarial networks

  • GANs train a generator to produce realistic scenarios and a discriminator to distinguish generated from true samples through adversarial min-max optimization.The implemented model is WGAN-GP, which constrains the discriminator gradient norm; the paper notes this differs from weight clipping, which can yield poor samples or non-convergence.Source: §2.2.3 · pp. 7–8, Figure 5 · p. 8

2.3. Theoretical comparison

  • Flows provide exact likelihood and explicitly learn the data distribution, while VAEs handle non-invertible generators and arbitrary latent dimensions.The paper notes possible VAE sample realism issues on complex datasets, citing evidence about limited posterior approximation from computer vision and suggesting it may explain observed scenario shapes.Source: §2.3 · p. 8
  • GANs can be difficult to train because of the saddle-point problem and mode collapse; in these simulations, they were highly sensitive to hyperparameter variations.The paper cautions that model choice depends on user criteria and dataset, and that computer-vision limitations should be applied cautiously to power systems.Source: §2.3 · pp. 8–9

3. Value and quality assessment

The assessment distinguishes forecast quality from forecast value and argues that generative models should be evaluated for their intended application. It uses complementary quality measures rather than relying on one metric.

3. Value and quality assessment

  • Forecast quality concerns how well forecasts inform about future events, whereas forecast value concerns their benefit in a decision-making process.The paper notes that good performance on one criterion does not imply good performance on others, and that evaluation should be tied to the intended application.Source: §3 · p. 9, §3.1 · p. 9

3.1. Forecast quality

  • The study uses eight complementary quality metrics spanning univariate, multivariate, model-specific, and statistical-testing measures.The groups include CRPS, quantile score, and reliability diagrams; energy and variogram scores; classifier-based and scenario-correlation measures; and the Diebold-Mariano test.Source: §3.1 · p. 9

Univariate metrics

The assessment combines marginal, multivariate, and model-specific measures to capture different aspects of scenario quality. The measures address calibration, dependence, and whether generated samples resemble observations.

Univariate metrics

  • CRPS scores marginal forecast skill, quantile score adds probability-level and tail-error detail, and reliability diagrams compare nominal with observed quantile proportions.CRPS and quantile score are negatively oriented; lower scores are better.Source: Univariate metrics · p. 9

Multivariate metrics

  • The energy score evaluates multivariate forecasts but has limited ability to detect misspecified correlations, while the variogram score captures component correlations.The energy score is a multivariate generalization of CRPS; the variogram score is more discriminative to correlation structure.Source: Multivariate metrics · pp. 9–10

Specific metrics

  • A classifier-based score favors AUC 0.5, while scenario correlation matrices indicate scenario-shape variety.An Extra-Trees classifier discriminates true from generated samples; correlations are computed across the 24 time periods for scenarios generated under a given weather context.Source: Specific metrics · p. 10

Statistical testing

The paper uses the Diebold-Mariano test to assess forecast-score differences and evaluates forecast value through an energy retailer's day-ahead bidding problem. Experiments use GEFCom 2014 tracks with separate learning, validation, and testing sets.

Statistical testing

  • The Diebold-Mariano test assesses whether differences in CRPS, QS, ES, and VS are statistically significant, using a multivariate variant for daily marginal errors.That variant computes one statistic per model pair from the 24-dimensional daily error vector.Source: Statistical testing · p. 10

3.2. Forecast value

  • Forecast value is assessed through an energy retailer's day-ahead market scheduling, balancing its portfolio to avoid imbalance penalties.A scenario-based stochastic planner fixes bids before uncertainty resolves and adapts dispatch decisions by scenario; the retailer is assumed to be a price taker with fixed, known forward prices.Source: §3.2 · p. 10

4. Numerical Results

  • Quality and value evaluations use the load, wind, and PV tracks of the open-access GEFCom 2014 dataset.The tracks comprise one, ten, and three zones, respectively.Source: §4 · p. 11

4.1. Implementation details

  • Each track is divided into learning, validation, and testing sets, used respectively for model fitting, hyperparameter selection, and evaluation.The validation and testing sets each contain 50 randomly selected days per zone; the models generate day-ahead scenarios from weather forecasts.Source: §4.1 · p. 11

Wind track

  • The wind-track inputs include zonal wind components at 10 and 100 meters and derived speed, energy, and direction features.Wind zones are represented with one-hot encoding; the input dimension is 10 × 24 + 10.Source: Wind track · pp. 11–12

PV track

Across tracks, normalizing flows (NFs) perform best on PV and load quality metrics, while wind quality and scenario shapes differ by model. In the retailer case study, NF scenarios yield the highest net profit, though the study cautions that the case is simple.

PV track

  • PV inputs combine solar irradiation, temperature, relative humidity, derived irradiation-squared and irradiation–temperature features, and zone indicators.Periods with zero PV generation across all zones and days are removed from the input.Source: PV track · p. 12

Load track

  • Load inputs use temperature forecasts from 25 weather stations; the load track has one zone and 24 periods per day.The validation and testing sets each contain 50 randomly selected days for this track.Source: Load track · p. 12

Wind track

  • NF scenarios show greater variability and no time correlation, unlike the partially time-correlated VAE and GAN scenarios.The paper suggests NF’s learned multivariate density produces varied scenario shapes, whereas GANs may settle on a particularly effective shape and the VAE’s Gaussian latent space may reduce variability.Source: Wind track · p. 13, All tracks · p. 14, Figure 10 · p. 15

All tracks

  • For PV and load, NF outperforms VAE and GAN across the reported quality metrics; on wind, it is slightly outperformed by VAE.The comparison includes CRPS, QS, reliability diagrams, AUC, ES, and VS.Source: All tracks · p. 13, Table 3 · p. 14

Wind track

4.3. Value results

  • The retailer case study uses PV, wind, and load scenarios to set day-ahead bids, then evaluates those decisions in real-time dispatch using observations.The study simulates independent days with a battery storage device.Source: §4.3 · p. 15

4.4. Results summary

  • Across 1,500 simulated days, using NF PV, wind-power, and load scenarios, the stochastic planner achieved the highest total net profit at 107 ke, versus 97 ke for the VAE.NF ranked first on 39.0% of days.Source: Table 4 · p. 16

4.3. Value results

  • The value comparison is limited by a simple case study in which stochastic optimization relies mainly on average-scenario quality; more advanced studies are left for future work.The authors identify direct access to the probability density function as a potential advantage to examine in more advanced applications.Source: §4.3 · p. 16

5. Conclusion

The paper concludes that normalizing flows (NFs) compare favorably with GANs and VAEs in forecast quality and value. It highlights their exact likelihood and easier hyper-parameter calibration, while noting their limited adoption as a base toolbox component.

5. Conclusion

  • NFs are more accurate overall in quality and value than the compared GAN and VAE models.Table 5 compares the models on quality, value, speed, calibration, and implementation criteria.Source: §5 · p. 16, Table 5 · p. 17
  • NFs directly learn the stochastic multivariate distribution by maximizing likelihood and provide exact likelihoods for model parameters and generated scenarios.Scenario likelihoods can support filtering relevant scenarios for stochastic optimization.Source: §5 · p. 17
  • The authors report that NFs are easier for non-experts to calibrate, while GANs and VAEs are more sensitive to hyper-parameter choices.GAN training is unstable, and scenario quality can vary across separate trainings with fixed hyper-parameters.Source: §5 · p. 17
  • NFs remain less widely used as a base component of the machine-learning toolbox than GANs or VAEs.Source: §5 · p. 17

Appendix A. Additional arguments

Appendix A compares model trade-offs and explains selected normalizing-flow computations. It reports an overall quality-and-value advantage for NFs, alongside training, calibration, and implementation considerations.

Appendix A.1. Table 1 justifications

  • Prior studies differed in scope: Wang et al. and Ge et al. did not assess forecast value; Qi et al. used apparently non-open-access data and did not compare its β VAE with another generative model in both quality and value evaluations.Source: Appendix A.1 · pp. 19–20

Appendix A.2. Table 5 justifications

  • 7 seconds per dataset for the VAE, about 20 seconds for the GAN, and 4 minutes for the NF were the reported average training times.The VAE and GAN generated 5,000 test-set samples in under a second, while the NF took a few minutes; affine autoregressive NF was faster.Source: Appendix A.2 · p. 20
  • Overall, the NF outperforms both the VAE and GAN models in forecast quality and value.The comparison considers eight quality metrics and value in a day-ahead energy-retailer case study.Source: Appendix A.2 · p. 20
  • NF hyper-parameters were easier to identify with a few tested combinations, while GANs were most sensitive and could produce poor scenarios or fail to converge.The VAE was easier to train than the GAN but remained sensitive to hyper-parameter values.Source: Appendix A.2 · p. 20
  • The UMNN-MAF NF is hardest to implement from scratch because it needs an additional integrand network; affine autoregressive NF is easier but may model stochasticity less capably.The implementation comparison applies only to the models implemented in this study; existing Python libraries are also available.Source: Appendix A.2 · p. 20

Normalizing flow computation

  • Without further assumptions on the transformation, log-determinant computation has O(K · T^3) complexity, which may be intractable for large T.Adding K sub-flows otherwise increases computational complexity by O(K).Source: Normalizing flow computation · p. 21

Autoregressive flow

  • Autoregressive transformations have a lower-triangular Jacobian, making the log-absolute-determinant computable in O(T) instead of O(T^3).Source: Autoregressive flow · p. 21

Affine autoregressive flow

  • Affine autoregressive flows are simple and computationally efficient but may need many stacked flows for complex distributions; their universal approximation status is unknown.Source: Affine autoregressive flow · p. 21

Appendix B.2. Variational autoencoders

The appendix describes gradient computation for a conditional VAE and outlines the implemented VAE and GAN variants. It also explains the WGAN-GP choice as a response to issues with weight clipping.

Gradients computation

  • The VAE parameter gradient uses a Monte Carlo estimator, whereas estimating the encoder gradient requires the reparameterization trick.Source: Gradients computation · p. 21

Conditional variational autoencoders implemented

  • The implemented conditional VAE uses Gaussian MLP encoder and decoder networks, with centered isotropic Gaussian latent variables and diagonal-covariance conditional distributions.The text notes that other encoder and decoder architectures, including convolutional networks, are possible.Source: Conditional variational autoencoders… · p. 21

Original generative adversarial network

Wasserstein generative adversarial network

  • WGAN replaces the classifier with a real-valued critic constrained to be 1-Lipschitz; weight clipping can yield poor samples or non-convergence, motivating the implemented WGAN-GP.The Wasserstein formulation uses Kantorovich-Rubinstein duality.Source: Wasserstein generative adversarial… · p. 22

Appendix B.4. Hyper-parameters

The appendix records model hyper-parameter selection and defines the scenario-based metrics used to assess forecast quality. It describes both marginal CRPS and the multivariate energy score.

Appendix B.4. Hyper-parameters

  • Hyper-parameters were selected on the validation set with Weights & Biases; GAN selection took the most time, while NF achieved satisfactory scenario shape and quality after testing only a few settings.The appendix also specifies the NF, VAE, and GAN implementations and model structures.Source: Table B.6 · p. 22, Appendix B.4 · pp. 22–23, Figure B.12 · p. 23

Appendix C. Quality metrics

  • The quality-metric setup evaluates M scenarios per testing day, with the generated scenarios treated as multivariate random variables over the T periods.Source: Appendix C · p. 23

Appendix C.1. Continuous ranked probability score

  • CRPS is computed for each marginal and time period, then averaged over the testing set and across periods for the reported table value.The appendix describes CRPS as the one-dimensional energy-score case.Source: Appendix C.1 · pp. 23–24

Appendix C.2. Energy score

  • The energy score is computed for each testing day and then averaged over the testing set; when applied to marginals, it reduces to CRPS.Its formulation uses the Euclidean norm.Source: Appendix C.2 · p. 24

Appendix C.3. Variogram score

The appendix specifies complementary scenario-quality metrics and a classifier-based two-sample evaluation. It also describes how the classifier evaluation addresses limitations of a 1-nearest-neighbor alternative.

Appendix C.3. Variogram score

  • The variogram score compares pairwise differences across time periods, averages over the testing set, and uses equal weights with γ = 0.5.The cited work reports that γ = 0.5 provides good discriminating ability in most cases.Source: Appendix C.3 · p. 24

Appendix C.4. Quantile score

  • The quantile score uses 99 quantiles, from the 1st through the 99th, and averages scores across quantiles, time periods, and the testing set.Table 3 reports QSq averaged over all quantiles.Source: Appendix C.4 · p. 24

Appendix C.5. Classifier-based metric

  • The classifier-based metric tests whether generated scenarios can be distinguished from observations using a classifier trained and evaluated on held-out data.The testing set is split into testing-train and testing-test subsets; the final score is classifier performance on testing-test.Source: Appendix C.5 · p. 24
  • The 1-nearest-neighbor alternative is unsuitable for weather-conditioned testing and is sensitive to outliers, while its leave-one-out form yields accuracy rather than ROC.Its leave-one-out procedure also uses the testing set to train the classifier.Source: Appendix C.5 · p. 25
  • The modified classifier evaluation uses learning-set scenarios to train a weather-capable Extra-Trees classifier and computes ROC and AUC across repeated scenario samples.The procedure constructs M learning/testing-set pairs with equal proportions of generated scenarios and observations, then trains classifiers and compares results.Source: Appendix C.5 · p. 25

Appendix C.6. Diebold-Mariano test

The Diebold–Mariano test compares forecast errors across competing models under a null of equal expected error. The appendix describes univariate and multivariate handling for different metrics.

Appendix C.6. Diebold-Mariano test

  • The Diebold–Mariano test compares paired models’ daily forecast errors and tests whether the mean loss differential is zero.Under covariance stationarity of the loss-differential series, the statistic is asymptotically standard normal.Source: Appendix C.6 · pp. 25–26
  • A p-value below 5% typically rejects equal accuracy; the sign of the loss differential indicates which model is more accurate.The stated interpretation assumes covariance stationarity of the loss-differential series.Source: Appendix C.6 · p. 26
  • For CRPS and QS, the study adopts a multivariate test across all hours, while univariate tests can identify which hours favor a model.The multivariate version summarizes the comparison in one p-value; ES and VS have one value per testing day.Source: Appendix C.6 · p. 26

Sets and indexes

The appendix defines the time and scenario indexes and lists retailer, generation, and storage quantities used in the optimization formulation. Its constraints represent energy balance, imbalance, and battery operation across scenarios.

Sets and indexes

  • The index definitions identify t as the time period, ω as the scenario, T as periods per day, and #Ω as the number of scenarios.The time-period set is T = {1, 2, . . . , T}.Source: Sets and indexes · p. 26

Parameters

  • The listed parameters include retailer bid and net-position bounds, battery power and capacity limits, efficiencies, initial and final charge, and energy and imbalance prices.The parameter table also defines the duration of a time period.Source: Parameters · p. 26

Variables

  • The variables cover day-ahead bids, retailer net positions, PV and wind generation, battery charging and discharging, state of charge, and deviations.A binary variable prevents simultaneous battery charging and discharging.Source: Variables · p. 26

Appendix D.2. Problem formulation

  • The formulation balances retailer position with PV, wind, load, and battery charging while constraining generation and battery operation across scenarios.Load is non-flexible; the deterministic perfect-forecast oracle is a special case of the stochastic formulation with one scenario.Source: Appendix D.2 · pp. 26–27

Appendix D.3. Dispatching

The dispatch formulation fixes bids and evaluates second-stage decisions using observed PV, wind, and load. In the quality comparisons, normalizing flows outperform VAE and GAN on the reported PV and load Diebold–Mariano tests.

Appendix D.3. Dispatching

  • Dispatch fixes the bids and computes second-stage variables from observed PV, wind, and load values.It is the stochastic formulation specialized to one scenario with the observed values.Source: Appendix D.3 · p. 27
  • The wind NF uses a single-step monotonic flow with four 300-neuron hidden layers and a 40-dimensional latent space.Increasing the number of monotonic-flow steps did not improve results; a five-step autoregressive flow was required for similar results, though those results are not reported.Source: Figure B.14 · p. 28

Appendix E. Quality results

  • The PV and load Diebold–Mariano tests report that NF outperforms both VAE and GAN for CRPS, QS, ES, and VS.For PV, GAN outperforms VAE on ES and VS, while VAE outperforms GAN on CRPS and QS.Source: Figure E.16 · p. 29
  • For the classifier-based metric on PV and load, NF best fakes the classifier, followed by VAE and then GAN.The figure presents results for both tracks.Source: Figure E.17 · p. 29
  • Across testing days, NF scenarios tend not to be time-correlated, whereas VAE and GAN scenarios tend to be correlated over periods, especially VAE on load.The figures show average testing-set correlation matrices for wind, PV, and load.Source: Figure E.20 · p. 30
Loading 2106.09370v4…