CNN-transformer-based model explained by SHAP and multi-head attention weights for time series forecasting.
Stefano Frizzo Stefenon, João Pedro Matos-Carvalho, Valderi Reis Quietinho Leithardt, Kin-Choong Yow
Instituto Superior de Engenharia de Lisboa, Instituto Politécnico de Lisboa, Rua Conselheiro Emídio Navarro 1, 1959-007 Lisboa, Portugal. · LASIGE, Faculdade de Ciências, Universidade de Lisboa, 1749-016 Lisboa, Portugal.
Key points
From the paper's conclusion- We evaluate the proposed CNN-transformer-based model on a hydroelectric natural flow time series dataset.
Abstract
Convolutional Neural Networks (CNNs) and transformer architectures offer strengths for modeling temporal data: CNNs excel at capturing local patterns and translational invariances, while transformers effectively model long-range dependencies via self-attention. This paper proposes a hybrid architecture integrating convolutional feature extraction with a multi-head attention backbone to enhance multivariate time series forecasting. The CNN module first applies a hierarchy of one-dimensional convolutional layers to distill salient local patterns from raw input sequences, reducing noise and dimensionality. The resulting feature maps are then fed into the prediction model, which applies multi-head attention to capture both short- and long-term dependencies and to weigh relevant covariates adaptively. We evaluate the proposed CNN-transformer-based model on a hydroelectric natural flow time series dataset. Experimental results demonstrate that the proposed model outperforms well-established deep learning models, with a mean absolute percentage error of up to 2.2%. The explainability of the model is obtained by a proposed SHapley Additive exPlanations (SHAP) and Multi-Head Attention Weights (MHAW). Our novel architecture, named CNN-Transformer-SHAP-MHAW, is promising for applications requiring high-fidelity and multivariate time series forecasts.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- A Hybrid CNN–Transformer Deep Learning Model for Household Electric Energy Consumption ForecastingInternational Journal of Energy Research · 2026
- MP-Transformer: A Hybrid Model Integrating Multi-Period ARIMA and Dynamically Gated Attention for Time-Series ForecastingInformation Technology And Control · 2026
- An explainable hybrid transformer–BiLSTM framework for multivariate household energy demand forecasting with weather integrationEnergy Informatics · 2026
- A Hybrid Deep Learning Framework with CEEMDAN, Multi-Scale CNN, and Multi-Head Attention for Building Load ForecastingBuildings · 2026
- TimeFormer: Transformer with attention modulation empowered by temporal characteristics for time series forecastingExpert Systems with Applications · 2025
- STeP-TS: Shared Temporal Filters with Pruning for Time SeriesarXiv · 2026