Evaluating Temporal Fusion Transformers for Short-Term Load Forecasting With Peak-Aware Adaptive Bias Correction
Abstract
Short-Term Load Forecasting (STLF) is essential for maintaining a stable, affordable, and sustainable electricity supply across residential, commercial, industrial, transportation, and public sectors. Deep learning and ensemble methods such as Long Short-Term Memory (LSTM) and Extreme Gradient Boosting (XGBoost) have emerged as leading STLF algorithms. Recently, Temporal Fusion Transformers (TFT) have shown promise by combining transformer architectures for attention-based predictions with recurrent neural networks for local pattern processing, specifically addressing multi-horizon time series forecasting challenges. This study evaluates whether TFT provides advantages over LSTM and XGBoost for multi-horizon STLF and assesses the impact of bias correction strategies on forecasting accuracy. Using the Panama electricity demand dataset for 24-hour ahead predictions, our results show that while TFT rivals LSTM (MAPE: 3.44% vs. 3.86%), XGBoost significantly outperforms both (MAPE: 1.38%) while requiring substantially shorter training time. Moreover, our peak-aware adaptive bias correction technique reduces test-set MAPE from 8.34% to 3.44% for TFT, from 11.86% to 3.86% for LSTM, and from 2.06% to 1.38% for XGBoost. The relative gain is largest for the weaker deep-learning baselines and smaller for the already well-calibrated XGBoost, which remains the most accurate model overall.