An Efficient and Explainable Transformer-Based Few-Shot Learning for Modeling Electricity Consumption Profiles Across Thousands of Domains
Weijie Xia, Gao Peng, Chenguang Wang, Peter Palensky, Eric Pauwels, Pedro P. Vergara
TL;DR
This paper tackles the challenge of modeling electricity consumption profiles (ECPs) under data scarcity across thousands of domains. It proposes a lightweight, explainable few-shot learning framework that uses a Transformer encoder to predict Gaussian Mixture Model (GMM) parameters for target domains from very limited samples, with a two-stage process: within-domain z-step EM and cross-domain residual transfer. The authors show that their method can accurately restore the target ECP distribution using as little as 1.6% of the complete domain data, outperforming a strong time-series imputation baseline while remaining interpretable through mean/variance shifts of GMM components. The approach is validated on a large, diverse dataset of individual household ECPs, and is positioned to scale to thousands of domains in practical energy systems, with open-source code and future work planned toward Copula-based extensions for richer dependency modeling.
Abstract
Electricity Consumption Profiles (ECPs) are crucial for operating and planning power distribution systems, especially with the increasing numbers of various low-carbon technologies such as solar panels and electric vehicles. Traditional ECP modeling methods typically assume the availability of sufficient ECP data. However, in practice, the accessibility of ECP data is limited due to privacy issues or the absence of metering devices. Few-shot learning (FSL) has emerged as a promising solution for ECP modeling in data-scarce scenarios. Nevertheless, standard FSL methods, such as those used for images, are unsuitable for ECP modeling because (1) these methods usually assume several source domains with sufficient data and several target domains. However, in the context of ECP modeling, there may be thousands of source domains with a moderate amount of data and thousands of target domains. (2) Standard FSL methods usually involve cumbersome knowledge transfer mechanisms, such as pre-training and fine-tuning, whereas ECP modeling requires more lightweight methods. (3) Deep learning models often lack explainability, hindering their application in industry. This paper proposes a novel FSL method that exploits Transformers and Gaussian Mixture Models (GMMs) for ECP modeling to address the above-described issues. Results show that our method can accurately restore the complex ECP distribution with a minimal amount of ECP data (e.g., only 1.6\% of the complete domain dataset) while it outperforms state-of-the-art time series modeling methods, maintaining the advantages of being both lightweight and interpretable. The project is open-sourced at https://github.com/xiaweijie1996/TransformerEM-GMM.git.
