The safe and stable operation of the power system is essential to the normal functioning of the economy and society, and accurate electricity demand forecasting is a key prerequisite for this [
1,
2]. Based on the forecast time horizon, electricity demand can be categorized into long-, medium-, and short-term forecasts [
3,
4]. Long-term electricity demand forecasts form the basis for deploying future power generation plans, system upgrades, and grid expansion in power system planning [
5]. Short-term demand forecasting is crucial for day-to-day market operations, providing decision-making support for market participants in risk assessment, bid optimization, and profit maximization [
4]. Mid-term electricity demand forecasting is crucial for operational regulation of power systems, power generation scheduling, and formulation of electricity marketing strategies [
1].
In recent years, electricity demand has grown rapidly with economic and social development—particularly with the rise of new electricity-consuming sectors such as data centers and electric vehicle charging [
6,
7]. At the same time, to mitigate the effects of climate change, electricity generation from renewable energy sources such as wind and solar power has grown rapidly [
8]. However, due to the intermittent and volatile nature of renewable energy generation, the difficulty of dispatch in power systems has increased significantly, posing enormous challenges to the safe and stable operation of the power grid and further highlighting the importance of accurately forecasting medium-term electricity demand. Beginning in late 2019, the COVID-19 pandemic has altered short-term electricity consumption patterns and significantly changed the regularity of electricity demand fluctuations. These sharp fluctuations in electricity demand, caused by extreme weather events and sudden economic crises, have resulted in a number of outliers in electricity demand time series. These outliers undoubtedly have a significant impact on the construction of forecasting models. If outliers are not addressed effectively, a model’s predictive accuracy may be compromised.
Given that previous research on monthly electricity demand forecasting has yielded relatively limited results in handling outlier effects, this paper proposes a new hybrid forecasting model that accounts for their impact. The model first preprocesses raw electricity demand data using the regARIMA module of X-13ARIMA-SEATS (X13) to remove the effects of outliers and moving holidays. It then employs a Hodrick–Prescott (HP) filter to decompose the series, corrected for outliers and moving holidays, into trend and cyclical components. Subsequently, CNNs incorporating an attention mechanism are used to forecast each component series separately. Finally, the final forecast is obtained by reconstructing the component sequence forecasts and correcting for the moving-holiday effect. An application to electricity demand forecasting in Changzhou, China, shows that under the unified rolling protocol, the proposed model produced the fewest errors among the compared models.
1.1. Related Work
Early electricity demand forecasting primarily relied on statistical analysis methods to build predictive models. These methods mainly included the Autoregressive Integrated Moving Average (ARIMA) [
9], Holt–Winters [
10,
11], and multiple regression models [
12,
13,
14]. The main features of these methods are their simplicity and ease of implementation; they offer good forecasting accuracy when electricity demand changes are relatively stable. However, when electricity demand exhibits complex, nonlinear variations, the prediction errors tend to be relatively large. To effectively address the nonlinearity of electricity demand time series, machine learning-based forecasting methods have been applied. These methods primarily include tree-based models, such as Decision Tree Regression [
15], Gradient-Boosted Decision Trees [
16], Random Forest [
17,
18,
19], Bayesian Additive Regression Trees [
20], and kernel-based support vector regression (SVR) [
21]. With the rise of deep learning technologies, neural network-based electricity demand forecasting models have become a focal point of research in academia and industry, leading to many of these models—for example, Chang et al. [
22] proposed a method using weighted evolutionary fuzzy neural networks to forecast monthly electricity demand. A medium-term electricity forecasting model based on N-BEATS was proposed by Oreshkin et al. [
23]. Chaturvedi et al. [
24] validated the predictive performance of the long short-term memory (LSTM) network; Zhang et al. [
17] evaluated the predictive performance of models such as LSTM and Gated Recurrent Units.
Many studies have found that relying on a single forecasting model does not effectively improve the accuracy of electricity demand forecasting. Consequently, many researchers have developed hybrid forecasting models to enhance accuracy by leveraging the complementary strengths of different models [
25]. The development of these hybrid forecasting models has generally proceeded along two main lines. The first involves using the original electricity demand time series and combining different forecasting techniques to improve forecasting accuracy. Hong [
26] proposed a hybrid forecasting model combining seasonal cyclical support vector regression with the chaotic artificial swarm algorithm. Cao and Wu [
27] developed a seasonal electricity consumption forecasting model that combines the fruit fly optimization algorithm with support vector regression. Askari and Keynia [
28] proposed a method for optimizing neural networks for medium-term electricity load forecasting using particle swarm and ant lion algorithms. Wu et al. [
29] proposed a short-term electricity load forecasting model that uses the Cuckoo algorithm to optimize the parameters of the fractional ARIMA model. Jiang et al. [
30] developed a monthly electricity consumption forecasting model that combines the fruit fly optimization algorithm with the Holt–Winters smoothing method. Hussein and Awad [
31] constructed a power consumption forecasting model combining K-means clustering with Nonlinear Autoregressive with External and Genetic Algorithms. Wan et al. [
32] proposed a hybrid e-SVR model that accounts for seasonal trends. Wan et al. [
33] proposed a combined forecasting method that integrates the first-order univariate gray differential equation GM(1,1) with residual correction and seasonal fluctuation analysis. Tang et al. [
34] developed a model for monthly electricity consumption forecasting based on the modified seasonal index model using GM(1,1). Yang et al. [
35] proposed a medium-term electricity load forecasting model based on Prophet, XGBoost, and LSTM, while Sharma and Jain [
36] suggested that the combination of backpropagation neural networks with radial basis function neural networks can significantly improve the accuracy of mid-term electricity load forecasts. Shawon et al. [
37] and Rubasinghe et al. [
38] developed hybrid forecasting models combining convolutional neural networks (CNNs) and LSTMs. These hybrid forecasting models are typically based on univariate time series and rarely incorporate meteorological, demographic, or socioeconomic variables.
Another approach to building hybrid predictions is to use a decomposition-and-ensemble framework [
39]. This approach assumes that the original electricity demand consists of various components with different characteristics or different cycles. In developing a hybrid forecasting model, decomposition techniques are utilized to isolate the volatility characteristics inherent in the electricity demand series. This process generates component series that can subsequently be forecasted independently using various advanced forecasting methodologies. González-Romera [
40] proposed a hybrid forecasting model that combines Fourier series decomposition with neural networks. Abu-Shikhah and Elkarmi [
41] developed a hybrid predictive model that utilizes singular value decomposition. Zhu et al. [
42] decomposed electricity demand using a moving-average method and then applied an adaptive particle swarm optimization algorithm to forecast the resulting component series. Bunnoon et al. [
43] developed a hybrid prediction model based on HP filtering technology and neural networks. Xiong et al. [
44] developed a hybrid forecasting model that combines empirical mode decomposition and support vector regression. Shao et al. [
45] proposed a semi-parametric medium-term electricity demand forecasting framework based on aggregated empirical modal decomposition. Niu et al. [
46] proposed a prediction method for optimizing support vector regression based on the STL, variational mode decomposition (VMD), and the Grey Wolf algorithm. Dudek et al. [
47] extracted the volatility characteristics of electricity demand using an exponential smoothing model and then developed an LSTM-based forecasting method. Huan et al. [
48] developed a model based on multivariate empirical mode decomposition and particle swarm optimization SVR. Luzia et al. [
49] proposed a hybrid forecasting model combining wavelet and Fourier transform decomposition techniques with ARIMA. Wang et al. [
50] developed a method to optimize SVR predictions by leveraging improved multimodal reconstruction and particle swarm optimization. Xu et al. [
51] proposed a combined forecasting model featuring a two-stage error-correction mechanism that integrates traditional linear methods, seasonal adjustment techniques, deep learning models, and intelligent optimization algorithms. Such hybrid forecasting models can be constructed within either a univariate or a multivariate framework, and the model’s forecasting accuracy is often closely related to the decomposition techniques employed.
1.2. Research Gaps and Contributions
According to our literature review, three gaps remain in monthly electricity demand forecasting. First, outlier effects are often overlooked, even though outliers can distort parameter estimation and reduce forecast accuracy. Second, moving-holiday effects receive limited attention, even though consumption patterns around major holidays vary across years. Third, relatively few studies combine seasonal adjustment with decomposition-based deep learning.
To address these gaps, this study develops a hybrid monthly electricity demand forecasting method that integrates seasonal adjustment with decomposition-based deep learning. The main contributions are as follows:
regARIMA preprocessing is applied before neural network forecasting to remove outliers and moving-holiday effects, thereby reducing the influence of irregular fluctuations on model construction.
A multi-branch convolutional neural network is designed to capture periodic demand patterns, and channel attention is used to emphasize informative features.
The framework combines regARIMA adjustment, Hodrick–Prescott decomposition, and multi-scale convolution with channel attention. It achieved the lowest average error on the primary Changzhou dataset. In Guangzhou, this framework ranked first when adding two self-attention bidirectional long short-term memory layers but did not significantly outperform in per-comparison tests, whereas a recurrent model without the convolutional front end performed poorly. These results support the proposed convolution-attention design and indicate that recurrent depth alone is insufficient.
The proposed design differs from related hybrid frameworks in three respects. First, regARIMA adjustment precedes HP decomposition, so the trend and cyclical components are estimated after outliers and moving-holiday effects have been removed. Second, each adjusted component is forecast separately rather than using a single adjusted series. Third, the CNN-attention architecture is evaluated against ablation and recurrent baselines under the same rolling, validation, and Hyperband protocol. This ordered combination, rather than any individual module, is the contribution evaluated in this study.