Variational Autoencoder Generative Adversarial Network for Synthetic Data Generation in Smart Home

Mina Razghandi, Hao Zhou, Melike Erol‐Kantarci, Damla Turgut · DOI

Abstract

Data is the fuel of data science and machine learning techniques for smart grid applications. However, the availability of data can be an issue due to privacy concerns, data size, and data quality. To this end, we propose a Variational AutoEncoder Generative Adversarial Network (VAE-GAN) as a smart grid data generative model capable of learning various types of data distributions and generating plausible samples without prior analysis. We compared the Kullback-Leibler (KL) divergence, maximum mean discrepancy (MMD), and Wasserstein distance between synthetic data (electrical load and PV production) generated by the proposed model, a vanilla GAN, and the real data distribution. Experiments indicate that the proposed VAE-GAN model outperforms the vanilla GAN, producing distributions most comparable to real-world data.

Introduction

High-quality, granular data is essential for managing modern smart grids, enabling utilities to predict demand, manage electric vehicle charging, and optimize energy costs. However, residential data is notoriously difficult to obtain due to privacy concerns—energy profiles can reveal sensitive details about a resident's daily habits. Existing datasets are often limited in size or quality.

While synthetic data generation offers a path forward, traditional model-based approaches like Markov chains require complex mathematical formulations and often fail to capture the stochastic nature of human behavior. Data-driven models like vanilla Generative Adversarial Networks (GANs) frequently suffer from "mode collapse," where the generator becomes stuck producing a limited variety of samples, failing to represent the full diversity of real-world energy usage.

Methodology

The proposed VAE-GAN architecture combines the structural stability of Variational Autoencoders (VAEs) with the high-fidelity generative power of GANs.

  1. The VAE Component: An encoder compresses input sequences into a regularized "latent space" following a Gaussian distribution. This ensures a smooth representation of the data, preventing the generator from falling into mode collapse.
  2. The GAN Component: A discriminator network attempts to distinguish between real data and the synthetic samples produced by the generator (the VAE's decoder). This adversarial process pushes the generator to produce sharper, more realistic samples.
The VAE-GAN architecture integrates an Encoder for latent space regularization and a Generator-Discriminator pair for high-fidelity data synthesis.

Crucially, the modules utilize Dilated 1D Convolutional Neural Networks (Dilated CONV1D). Inspired by WaveNet, these layers allow the model to capture long-term dependencies in time-series data—such as the relationship between morning and evening energy use—more efficiently than standard recurrent networks.

Results and Evaluation

The model was trained and evaluated using the iHomeLab RAPT dataset, containing 594 days of 15-minute interval data from five Swiss households. The VAE-GAN significantly outperformed the vanilla GAN across all statistical benchmarks:

  • Distribution Matching: The Kullback–Leibler (KL) divergence for electrical load was just 0.017 for VAE-GAN, compared to 0.543 for the vanilla GAN.
  • Distance Metrics: The Wasserstein distance was 52% lower for load consumption and 72% lower for PV production compared to the standard GAN.
  • Statistical Fidelity: The model successfully preserved domain-specific characteristics such as "Near-peak load" and "High-load duration."
Probability Density Function (PDF) of a vanilla GAN generating synthetic load data. The significant mismatch in peak and spread compared to the real load highlights the limitations of non-hybrid adversarial models.

Visual analysis of the probability density functions (PDFs) confirms that while vanilla GANs struggle to match the peak and spread of real data distributions (as seen above), the VAE-GAN's synthetic data achieves a near-perfect overlay with real measurements.

Conclusion

The VAE-GAN framework provides a robust solution for generating realistic synthetic data for smart home applications. By stabilizing the generative process with a variational latent space and utilizing dilated convolutions for temporal awareness, the model overcomes common training pitfalls like mode collapse. Future work will explore appliance-level data generation to support research in Non-Intrusive Load Monitoring (NILM).

Summary updated

BibTeX
@misc{razghandi2022variational,
  author = {Mina Razghandi and Hao Zhou and Melike Erol‐Kantarci and Damla Turgut},
  title = {{Variational Autoencoder Generative Adversarial Network for Synthetic Data Generation in Smart Home}},
  year = {2022},
  eprint = {2201.07387},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2201.07387},
}
Figure