TgDLF2.0: Theory-guided deep-learning for electrical load forecasting via Transformer and transfer learning

Jiaxin Gao, Wenbo Hu, Dongxiao Zhang, Yuntian Chen

Introduction

Accurate electrical load forecasting is the backbone of modern power grid management; even a 1% improvement in accuracy can save millions of dollars annually. However, the field faces a "Goldilocks" problem. Purely knowledge-based models (expert systems) are interpretable but often fail to capture complex, nonlinear interactions. Conversely, purely data-driven models (such as standard LSTMs or ANNs) require massive amounts of high-quality data and often struggle with "local minima" because they lack physical grounding.

TgDLF2.0 addresses these challenges by creating a hybrid framework that uses domain knowledge to "guide" a deep learning model. This approach makes the system more efficient, accurate, and capable of performing well even when historical data is limited or noisy.

Methodology

The TgDLF2.0 framework represents a significant architectural evolution from its predecessor, moving from sequential LSTMs to a Transformer-based architecture integrated with transfer learning. The framework is built on three key pillars:

The TgDLF2.0 framework integrates domain knowledge, load ratio decomposition, and machine learning methods like Transformers and transfer learning.

1. Theory-Guided Decomposition

Instead of predicting raw load data directly, the framework uses domain knowledge to decompose the signal. It calculates a dimensionless trend (a smoothed weekly average) and tasks the Transformer with predicting only the local fluctuations. This decomposition simplifies the learning objective significantly.

2. Transformer Architecture

The authors replaced the sequential EnLSTM with a Transformer. This shift allows the model to capture long-term dependencies (up to 96 hours of history) more effectively and leverages parallel GPU processing to reduce training time.

3. Transfer Learning

To address data scarcity in specific districts, the model employs transfer learning. A "source model" is trained on a data-rich district and then fine-tuned for a target district. The authors evaluated three distinct strategies for parameter transferring: updating all weights, fixing the feature extractor (encoder/decoder), or fixing only the output layer.

Three transfer learning strategies for adapting a pre-trained source model to a target district by transferring specific parameters.

Datasets and Experimental Setup

The study utilized a comprehensive dataset from 12 districts in Beijing, China, spanning from January 2008 to September 2011. The data includes:

  • Load Data: 392,256 hourly samples.
  • Meteorological Data: Temperature, humidity, wind speed, and precipitation.
  • Calendar Factors: Flags for weekends, holidays, and seasons.

Districts were categorized into three geographical groups (East, Central, and West Beijing) to test the model's generalization capabilities via four-fold cross-validation.

Key Insights

  • Human Behavior and Attention: Visualizing the Transformer’s attention matrices revealed that the model naturally focuses on the period between 3:00 PM and 11:00 PM. This aligns with human behavior: while work and sleep hours are highly predictable, evening activities introduce high variability, requiring the model to prioritize those features.
  • Robustness to Noise: TgDLF2.0 demonstrated remarkable stability. When tested with 50% artificial noise added to weather forecasts, it performed as well as the original TgDLF did with 0% noise, suggesting the theory-guided approach acts as a stabilizer against poor data quality.
  • Statistical Similarity: Using the Maximum Mean Discrepancy (MMD) algorithm, the authors proved that transfer learning is most effective when source and target districts share high statistical similarity, providing a roadmap for deployment in new regions.

Performance Evaluation

  • Accuracy: TgDLF2.0 achieved an approximately 16% improvement in accuracy (Mean Square Error) over the previous TgDLF and outperformed traditional baselines like ARMA and ARIMA by over 50%.
  • Efficiency: The parallel nature of Transformers allowed training times to be cut by more than half compared to LSTM-based models.
  • Data Scarcity: Transfer learning enabled the model to reach stable convergence in half the number of training epochs, making it highly viable for new power grids with limited historical data.

Limitations and Future Work

Future iterations of the framework may incorporate more complex physical or economic models for the "dimensionless trend." Additionally, the authors suggest exploring "physics-informed" loss functions—which penalize predictions that violate known physical laws of electricity—and 3D attention matrices to better capture multi-feature interactions across time steps.

Summary updated

BibTeX
@misc{gao2022tgdlf,
  author = {Jiaxin Gao and Wenbo Hu and Dongxiao Zhang and Yuntian Chen},
  title = {{TgDLF2.0: Theory-guided deep-learning for electrical load forecasting via Transformer and transfer learning}},
  year = {2022},
  eprint = {2210.02448},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2210.02448},
}
Figure