An explainable hybrid transformer–BiLSTM framework for multivariate household energy demand forecasting with weather integration

Q2 Energy
Michael Marko Sesay, Antony Ngunyi, Herbert Imboga
{"title":"An explainable hybrid transformer–BiLSTM framework for multivariate household energy demand forecasting with weather integration","authors":"Michael Marko Sesay,&nbsp;Antony Ngunyi,&nbsp;Herbert Imboga","doi":"10.1186/s42162-026-00635-8","DOIUrl":null,"url":null,"abstract":"<div><h3>Purpose</h3><p>Accurate and explainable household load forecasting is critical for demand-side management, tariff-aware scheduling, and reliable smart grid operation. This study introduces a leakage-controlled multi-horizon forecasting pipeline that integrates predictive accuracy with statistical validation, interpretability, robustness, and operational relevance.</p><h3>Methods</h3><p>We model multivariate household demand using an hourly smart-meter dataset spanning 14 months (Nov 2022-Jan 2024; N=10,234 time steps), incorporating aligned local weather covariates. A hybrid Transformer-BiLSTM is trained using a multi-output configuration to predict 24-hour and 168-hour trajectories. Hyperparameters are optimized via Bayesian optimization (Optuna) employing chronological train/validation/test splits and a rolling-origin evaluation protocol. Performance is assessed using MAE, RMSE, and MAPE, while pairwise forecast differences are validated using the Diebold–Mariano procedure. Model explanations are generated through SHAP and attention analyses, further complemented by robustness testing (noise and feature dropout) and inference-efficiency measurements.</p><h3>Results</h3><p>At the 24-hour horizon, the hybrid model achieves MAE and RMSE values of 0.0539/0.0701 (MAPE 29.7%), yielding performance comparable to N-BEATS (MAE/RMSE 0.0531/0.0684). For the 168-hour horizon, the model attains superior performance among evaluated baselines (MAE/RMSE/MAPE 0.0566/0.0746/30.1%) and demonstrates statistically significant improvements over the Transformer, BiLSTM, and TCN models (Diebold-Mariano, <span>\\(p&lt;0.001\\)</span>). SHAP analysis identifies electrical indicators (e.g., voltage, power factor) and meteorological variables (e.g., pressure, temperature statistics) as the dominant drivers of medium-term predictions. Median inference latency remains in the tens-of-milliseconds range per sample, facilitating near real-time application.</p><h3>Conclusion</h3><p>Beyond improving forecast accuracy, the proposed framework provides statistically supported and interpretable attributions, remains stable under input degradation, and demonstrates operational value in a tariff-based battery scheduling case study, reducing energy cost by approximately 2.29% over an aggregated multi-week evaluation.</p><h3>Graphical abstract</h3><div><figure><div><div><picture><source><img></source></picture></div></div></figure></div></div>","PeriodicalId":538,"journal":{"name":"Energy Informatics","volume":"9 1","pages":""},"PeriodicalIF":0.0000,"publicationDate":"2026-02-07","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://link.springer.com/content/pdf/10.1186/s42162-026-00635-8.pdf","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Energy Informatics","FirstCategoryId":"1085","ListUrlMain":"https://link.springer.com/article/10.1186/s42162-026-00635-8","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q2","JCRName":"Energy","Score":null,"Total":0}
引用次数: 0

Abstract

Purpose

Accurate and explainable household load forecasting is critical for demand-side management, tariff-aware scheduling, and reliable smart grid operation. This study introduces a leakage-controlled multi-horizon forecasting pipeline that integrates predictive accuracy with statistical validation, interpretability, robustness, and operational relevance.

Methods

We model multivariate household demand using an hourly smart-meter dataset spanning 14 months (Nov 2022-Jan 2024; N=10,234 time steps), incorporating aligned local weather covariates. A hybrid Transformer-BiLSTM is trained using a multi-output configuration to predict 24-hour and 168-hour trajectories. Hyperparameters are optimized via Bayesian optimization (Optuna) employing chronological train/validation/test splits and a rolling-origin evaluation protocol. Performance is assessed using MAE, RMSE, and MAPE, while pairwise forecast differences are validated using the Diebold–Mariano procedure. Model explanations are generated through SHAP and attention analyses, further complemented by robustness testing (noise and feature dropout) and inference-efficiency measurements.

Results

At the 24-hour horizon, the hybrid model achieves MAE and RMSE values of 0.0539/0.0701 (MAPE 29.7%), yielding performance comparable to N-BEATS (MAE/RMSE 0.0531/0.0684). For the 168-hour horizon, the model attains superior performance among evaluated baselines (MAE/RMSE/MAPE 0.0566/0.0746/30.1%) and demonstrates statistically significant improvements over the Transformer, BiLSTM, and TCN models (Diebold-Mariano, \(p<0.001\)). SHAP analysis identifies electrical indicators (e.g., voltage, power factor) and meteorological variables (e.g., pressure, temperature statistics) as the dominant drivers of medium-term predictions. Median inference latency remains in the tens-of-milliseconds range per sample, facilitating near real-time application.

Conclusion

Beyond improving forecast accuracy, the proposed framework provides statistically supported and interpretable attributions, remains stable under input degradation, and demonstrates operational value in a tariff-based battery scheduling case study, reducing energy cost by approximately 2.29% over an aggregated multi-week evaluation.

Graphical abstract

具有天气整合的多元家庭能源需求预测的可解释混合变压器- bilstm框架
目的准确且可解释的家庭负荷预测对于需求侧管理、电价感知调度和可靠的智能电网运行至关重要。本研究介绍了一种泄漏控制的多水平预测管道,该管道将预测准确性与统计验证、可解释性、鲁棒性和操作相关性相结合。方法:我们使用跨越14个月(2022年11月至2024年1月,N=10,234个时间步)的每小时智能电表数据建立多元家庭需求模型,并结合对齐的当地天气协变量。混合变压器- bilstm使用多输出配置进行训练,以预测24小时和168小时的轨迹。超参数通过贝叶斯优化(Optuna)进行优化,采用时序训练/验证/测试分割和滚动原点评估协议。使用MAE、RMSE和MAPE评估性能,而使用Diebold-Mariano程序验证两两预测差异。模型解释通过SHAP和注意力分析生成,进一步辅以鲁棒性测试(噪声和特征剔除)和推理效率测量。结果在24小时水平面上,混合模型的MAE和RMSE值分别为0.0539/0.0701 (MAPE为29.7)%), yielding performance comparable to N-BEATS (MAE/RMSE 0.0531/0.0684). For the 168-hour horizon, the model attains superior performance among evaluated baselines (MAE/RMSE/MAPE 0.0566/0.0746/30.1%) and demonstrates statistically significant improvements over the Transformer, BiLSTM, and TCN models (Diebold-Mariano, \(p<0.001\)). SHAP analysis identifies electrical indicators (e.g., voltage, power factor) and meteorological variables (e.g., pressure, temperature statistics) as the dominant drivers of medium-term predictions. Median inference latency remains in the tens-of-milliseconds range per sample, facilitating near real-time application.ConclusionBeyond improving forecast accuracy, the proposed framework provides statistically supported and interpretable attributions, remains stable under input degradation, and demonstrates operational value in a tariff-based battery scheduling case study, reducing energy cost by approximately 2.29% over an aggregated multi-week evaluation.Graphical abstract
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
Energy Informatics
Energy Informatics Computer Science-Computer Networks and Communications
CiteScore
5.50
自引率
0.00%
发文量
34
审稿时长
5 weeks
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信
小红书