Feed 0% source
Engineering AI-generated

Explainable Load Forecasting with Covariate-Informed Time Series Foundation Models

Generated by a local model from a scientific paper, claim-checked against the full text. Provenance is open by design.

They report that a foundation model, trained on generic time series data, can explain its own electricity load forecasts in 5 seconds without any domain-specific training. That sounds too good to be true. Usually, getting a Transformer to respect physics means spending weeks cleaning data and tuning hyperparameters. Here is how they bypassed the usual grind and what breaks when you try to ship it.

The Problem

Deploying black-box deep learning models in critical infrastructure like power grids hits a wall: trust. The EU AI Act and similar regulations demand transparency. You cannot just hand a Transmission System Operator (TSO) a neural network’s prediction and say "it works." You need to know why it predicted a spike in load.

Traditional post-hoc explainability methods like SHAP (Shapley Additive Explanations) provide theoretically sound feature attributions. But they are computationally brutal. Exact SHAP requires evaluating $2^N$ feature subsets. For time series, $N$ is the number of timesteps plus covariates. Even with grouping, you need thousands of model evaluations. For large foundation models, this turns a millisecond inference into a minute-long bottleneck. Most practitioners resort to approximation or ignore explainability entirely, leaving them non-compliant and opaque.

The core failure is that standard SHAP assumes fixed input shapes. You can’t just feed a model "half a time series" and expect it to work. It expects a tensor of a specific width. This forces researchers to sample missing values from a background dataset, introducing noise and variance. The paper identifies this as the primary blocker for adopting TSFMs (Time Series Foundation Models) in regulated environments.

How It Works

The authors propose a masking strategy that exploits the architectural flexibility of TSFMs. Unlike rigid legacy models, TSFMs like Chronos-2 and TabPFN-TS accept arbitrary context lengths and variable sets. This allows them to treat "missing" features as valid inputs rather than errors.

Here is the mechanism:

  1. Group Features: Instead of attributing importance to every single hour of history, they group the input into four temporal windows (last day, last week, last month, older) and three covariate groups (holiday, temperature, irradiance). This reduces the problem from hundreds of features to seven.
  2. Mask Inputs: To compute the SHAP value for a specific group, they simply withhold it. For Chronos-2, they set the target variable values to NaN, which the model internally treats as missing. For TabPFN-TS, they drop the rows entirely. For covariates, they remove the column from the input matrix.
  3. Evaluate Coalitions: They run the model on all $2^7 = 128$ combinations of included/excluded groups. Because the context length shrinks when you mask earlier time steps, the computation is cheaper than the naive baseline.
  4. Compute Attributions: The difference between the full prediction and the masked prediction attributes the marginal contribution of that feature group to the final forecast.

[Figure 1] illustrates this pipeline. The key insight is that TSFMs handle empty or partial inputs gracefully. This eliminates the need for background sampling, yielding exact SHAP values rather than noisy estimates.

[Figure 3] shows the result: local explanations for specific days. You can see exactly how the model reacts to a holiday or a temperature drop. It’s not just a heatmap; it’s a causal claim backed by game theory.

Numbers

The paper benchmarks Chronos-2 and TabPFN-TS against a Transformer trained from scratch on eight years of operational data from the German TSO TransnetBW.

Accuracy: * The custom Transformer (8.75 years of data) achieves the best Mean Absolute Error (MAE) at 150.2 MW. * Chronos-2 (zero-shot, covariate-informed) hits 156.2 MW MAE. * TabPFN-TS (zero-shot, covariate-informed) hits 163.2 MW MAE.

The delta between the trained specialist and the zero-shot foundation model is negligible (~4%). Chronos-2 outperforms a Transformer trained on only one year of data by 26.8%. This confirms the "zero-shot" claim: you get near-specialist accuracy without the training cost.

Latency & Cost: * Chronos-2: Inference takes ~65 ms. Generating a full SHAP explanation (128 forward passes) takes 5.12 seconds. * TabPFN-TS: Inference takes ~5.5 seconds. Explanation takes 366 seconds (6 minutes).

TabPFN-TS is unusable for interactive debugging. Chronos-2 is fast enough to integrate into a dashboard.

Explainability Quality: The SHAP values align with domain knowledge. * Holidays: The model correctly predicts lower load on Sundays/holidays and a rebound on Mondays. * Temperature: Lower temps increase load (heating). Higher temps decrease load (less heating, though cooling isn't dominant in this dataset). * Irradiance: Higher solar irradiance decreases net load (behind-the-meter PV generation).

These aren't random correlations. The model learned the physics of the grid from generic pretraining.

What's Missing

The paper is rigorous, but it leaves three gaps that matter for production deployment.

  1. Single Region, Single Dataset: The evaluation is strictly on Baden-Württemberg, Germany. Weather profiles, industrial mixes, and holiday calendars vary globally. The paper notes that both models encounter difficulties on specific days in proximity to public holidays. It suggests incorporating covariates for long weekends or school holidays as a potential improvement. This implies the current feature set may be insufficient for complex calendar effects, rather than a fundamental failure of the pretraining data.
  2. Perfect Weather Forecasts: The covariates used are ERA5 reanalysis data (historical truth). In production, you forecast weather, and weather forecasts are wrong. The paper acknowledges this is an "upper bound" on accuracy. There is no analysis of how SHAP attributions degrade when the input covariates are noisy or biased. If the weather forecast is off by 5°C, does the SHAP value for temperature stay stable, or does it flip sign? That robustness test is missing.
  3. Probabilistic Uncertainty: The authors evaluate point forecasts (medians). TSFMs are inherently probabilistic, outputting distributions. SHAP on a median hides the variance. If the model is uncertain, the SHAP values might be misleading. The paper admits this is future work, but for risk-sensitive grid operations, knowing when the model is unsure is as important as knowing what it predicts.

Should You Prototype This

Yes, if you are building a monitoring tool.

The code is available at https://github.com/KIT-IAI/SHAP4TSFMs. The paper itself is licensed under CC BY 4.0.

Do not prototype this for real-time control loops. The 5-second lag for an explanation is too slow for sub-minute markets. But for day-ahead planning dashboards, where operators need to justify forecasts to regulators or stakeholders, this is a viable stack.

Start with Chronos-2. Ignore TabPFN-TS for now—the latency is prohibitive. The masking logic is straightforward but requires careful handling of the specific internal behaviors of each model. You cannot blindly apply generic masking utilities. Chronos-2 requires NaN injection, while TabPFN-TS requires row deletion. You will likely need custom wrappers to manage these distinct requirements. The value proposition is clear: you get a transparent, audit-ready explanation for free, attached to a model that beats your custom-trained baselines out of the box. The only risk is domain shift. Test it on your local data first. If the SHAP values look physically nonsensical, the model is hallucinating, and you should revert to a simpler baseline.

Novelty
0.0/10
Impact
0.0/10
Overall
0.0/10
#time-series#explainable-ai#energy-forecasting#foundation-models#shap