Comparing Structural Interpretability in the Temporal Fusion Transformer and Random Forest: Variable Selection, Attention, and Medium-Scope Explanation in Energy Price Time Series
Sylwester Bejger
Key points
From the paper's conclusion- The Temporal Fusion Transformer (TFT) is presented as an interpretable-by-design architecture, whose Variable Selection Networks (VSNs) and attention weights are routinely reported in applied work as structural findings.
Abstract
The Temporal Fusion Transformer (TFT) is presented as an interpretable-by-design architecture, whose Variable Selection Networks (VSNs) and attention weights are routinely reported in applied work as structural findings. This paper asks what those mechanisms contribute to an economist’s understanding of energy price formation and how they compare with the variable importance measures of Random Forest Regression (RFR). The testbed is Polish wholesale fuel prices, governed by an import parity pricing mechanism whose benchmark hierarchy is documented in the empirical literature, so the expected structure is independently known; TFT is treated as an off-the-shelf model and read as the applied literature reads it. Conceptually, the product of VSN and attention weights constitutes a medium-scope explanation, intermediate between global importance rankings and local SHAP attributions, describing how a variable’s influence is distributed across the lookback window. Empirically, the reference forest concentrates on the refined-product benchmark by more than five times what its feature set alone would deliver, under MDI, MDA-OOB and SHAP alike; the averaged VSN does not depart from that baseline and does not recover the benchmark hierarchy that the mechanism implies, a failure attributable in part to softmax partial identification among correlated predictors. Re-estimation under many random seeds in two independent implementations reproduces exactly at a fixed seed but not across seeds, whereas the forest’s rankings remain stable. A single TFT estimation therefore supports no reproducible structural claim under the training budget used here, and averaging across seeds removes the dispersion without altering these conclusions.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- From Linear Regression to Temporal Fusion Transformers: Benchmarking Electricity Price Forecasting Models in Markets with Different Renewable Energy SharesElectricity · 2026
- Tokenization and Architecture Jointly Allocate Component Roles in Time Series TransformersarXiv · 2026
- Explainable time-series forecasting with sampling-free SHAP for TransformersNature Communications · 2026
- MP-Transformer: A Hybrid Model Integrating Multi-Period ARIMA and Dynamically Gated Attention for Time-Series ForecastingInformation Technology And Control · 2026
- When Attention Does Not Explain the Peak: Temporal Reference vs. Forecast Output in Attention-Based Time-Series ForecastingarXiv · 2026
- FISformer: Replacing Self-Attention With a Fuzzy Inference System in Transformer Models for Time Series ForecastingIEEE Transactions on Fuzzy Systems · 2026