Explaining solar forecasts with generative AI: A two-stage framework combining transformers and LLMs
Ayesha Siddiqa,
Nadim Rana,
Wazir Zada Khan,
Fathe Jeribi and
Ali Tahir
PLOS ONE, 2025, vol. 20, issue 9, 1-22
Abstract:
Accurate and interpretable solar power forecasting is critical for effectively integrating Photo-Voltaic (PV) systems into modern energy infrastructure. This paper introduces a novel two-stage hybrid framework that couples deep learning-based time series prediction with generative Large Language Models (LLMs) to enhance forecast accuracy and model interpretability. At its core, the proposed SolarTrans model leverages a lightweight Transformer-based encoder-decoder architecture tailored for short-term DC power prediction using multivariate inverter and weather data, including irradiance, ambient and module temperatures, and temporal features. Experiments conducted on publicly available datasets from two PV plants over 34 days demonstrate strong predictive performance. The SolarTrans model achieves a Mean Absolute Error (MAE) of 0.0782 and 0.1544, Root Mean Squared Error (RMSE) of 0.1760 and 0.4424, and R2 scores of 0.9692 and 0.7956 on Plant 1 and Plant 2, respectively. On the combined dataset, the model yields an MAE of 0.1105, RMSE of 0.3189, and R2 of 0.8967. To address the interpretability challenge, we fine-tuned the Flan-T5 model on structured prompts derived from domain-informed templates and forecast outputs. The resulting explanation module achieves ROUGE-1, ROUGE-2, ROUGE-L, and ROUGE-Lsum scores of 0.7889, 0.7211, 0.7759, and 0.7771, respectively, along with a BLEU score of 0.6558, indicating high-fidelity generation of domain-relevant natural language explanations.
Date: 2025
References: Add references at CitEc
Citations:
Downloads: (external link)
https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0331516 (text/html)
https://journals.plos.org/plosone/article/file?id= ... 31516&type=printable (application/pdf)
Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.
Export reference: BibTeX
RIS (EndNote, ProCite, RefMan)
HTML/Text
Persistent link: https://EconPapers.repec.org/RePEc:plo:pone00:0331516
DOI: 10.1371/journal.pone.0331516
Access Statistics for this article
More articles in PLOS ONE from Public Library of Science
Bibliographic data for series maintained by plosone ().