Artificial intelligence increasingly helps providers achieve more robustness for their grids, provide better forecasts of electricity prices, and make energy use more efficient. In critical infrastructures, such as the energy system, AI should not be a black box – its decisions need to be understandable at any time. Researchers at the Karlsruhe Institute of Technology (KIT) have developed a new method for a more transparent analysis of AI-based predictions for energy systems. The results of their study have been published in Nature Communications. (DOI: 10.1038/s41467-026-73243-5)
Managing power supply is becoming increasingly complex. While the amounts of available wind and solar power depend on the weather, electric vehicles, battery storage systems, and heat pumps are altering the consumption patterns. “Grid operators and utilities rely more and more on artificial intelligence to make their systems more efficient and robust,” said tenure-track professor Dr. Benjamin Schäfer from KIT’s Institute for Automation and Applied Informatics (IAI).
To align power generation and consumption as accurately as possible, numerous features need to be considered at the same time – such as weather forecasts, load predictions, grid and distributor capacities as well as consumer behavior. “AI helps us here, but it must not remain a black box. People must be able to understand how the AI forecasts and decisions come about. Especially in the critical field of energy, where errors can have serious consequences, transparency and human supervision are crucial – and the European Union’s AI Act actually mandates them,” said Schäfer, head of the Helmholtz Young Investigator Group DRACOS (short for Data-Driven Analysis of Complex Systems) at KIT. For his work, the Heidelberg Academy of Sciences and Humanities will award him the Viktor & Sigrid Dulger Foundation's Ecology Prize 2026.
“SHAPformer” Combines Several Methods
In their recent study, funded by the Helmholtz AI Cooperation Unit, which is part of the Helmholtz Association, Schäfer’s working group presents the new “SHAPformer” method. It was developed to provide time-series forecasts, i.e. predictions based on successive data recorded in equally spaced points in time, such as electricity consumption or prices. The objective is to make AI-based predictions that are not only accurate, but also transparent.
The researchers combined transformer models – known from advanced language models, with explainable AI methods (XAI). The name “SHAPformer” references the connection of transformer models with SHAP methods. They are based on game theory concepts and show how individual features such as temperatures, holidays, wind power forecasts, or earlier consumption data impact a prediction.
Impact of Individual Features Becomes Visible
“When training our models, we excluded some information on purpose,” said Matthias Hertel, research assistant at the IAI and lead author of the study. “This way, we could understand the influence of certain input on the predictions made by the model.” The information used by the team to train its system included real data provided by transmission grid operator TransnetBW. The goal was to predict power consumption and prices over periods of up to one week – and at the same time show transparently which features have an impact on the forecast. Thus, the contributory effect of individual features on a forecast can be analyzed.
Explainability Integrated Directly into the Training
With many existing methods, explanations are generated only after the prediction, requiring significant computational power. “Our approach is special because explainability has been integrated right into the training process,” said Hertel. The forecasts remain accurate, while the analysis become significantly more efficient.
“Our work provides the methodological basis required to transfer such approaches to practice in the future,” said Schäfer. In this process, not only technical precision and trustworthiness are important, but also user acceptance. As an example, Schäfer mentions intelligent loading and unloading systems of electric vehicles or home storage systems that react automatically to electricity price fluctuations. “Consumers are probably more willing to accept an intelligent loading system if they can understand why their electric vehicles were loaded later at night than usual – for example because electricity prices were particularly high earlier on and the postponement saved them money.”
Originalpublikation
Matthias Hertel, Sebastian Pütz, Ralf Mikut, Veit Hagenmeyer & Benjamin Schäfer: Explainable time-series forecasting with sampling-free SHAP for Transformers. Nature Communications, 2026. DOI 10.1038/s41467-026-73243-5.
More information on the DRACOS research group at KIT

Zeitreihenvorhersage