Long-Term Electricity Demand Prediction Using Non-negative Tensor Factorization and Genetic Algorithm-Driven Temporal Modeling
Abstract
This study proposes a novel framework for long-term electricity demand prediction based solely on historical consumption data, without relying on external variables such as temperature or economic indicators. The method combines Non-negative Tensor Factorization (NTF) to extract low-dimensional temporal features from multi-way electricity usage data, with a Genetic Algorithm that optimizes the hyperparameters of time series models applied to the latent annual factors. We model the dataset as a third-order tensor spanning electric utilities, industrial sectors, and years, and apply canonical polyadic decomposition under non-negativity constraints. The annual component is forecasted using autoregressive models, with hyperparameter tuning guided by the prediction error or reconstruction accuracy on a validation set. Comparative experiments using real-world electricity data from Japan demonstrate that the proposed method achieves lower mean squared error (MSE) than baseline approaches without tensor decomposition or evolutionary optimization. Moreover, we find that reducing the model’s degrees of freedom via tensor decomposition improves generalization performance, and that initialization sensitivity in NTF can be mitigated through multiple runs or ensemble strategies. These findings suggest that the proposed framework offers an interpretable, flexible, and scalable approach to long-term electricity demand prediction and can be extended to other structured time series forecasting tasks.
1 Introduction
Forecasting electricity demand is essential for effective energy policy and infrastructure planning. While overestimation may result in excessive infrastructure investment, underestimation poses an even greater risk—insufficient power supply can lead to widespread energy shortages, disrupting industry, limiting innovation, and ultimately undermining opportunities for economic and societal prosperity [1, 2].
Many existing studies incorporate external variables such as meteorological, demographic, or economic indicators to enhance electricity demand estimation [3, 4]. However, such data are often unavailable, unreliable, or inconsistent across regions and time periods. An alternative approach is to rely solely on historical electricity consumption data, which is typically more accessible and standardized. To make this approach effective—especially for long-term forecasting—it is necessary to adopt advanced methods capable of capturing latent temporal and structural patterns within the consumption data. A detailed review of related forecasting methods, tensor-based feature modeling, and hyperparameter optimization techniques is provided in Section 1.1.
This study proposes a novel framework for long-term electricity demand forecasting based solely on annual consumption data. The method combines Non-negative Tensor Factorization for latent feature extraction and Genetic Algorithm-based optimization for time series modeling. The objective is to enhance generalization performance by reducing model complexity while maintaining forecasting accuracy. In addition, we investigate how sensitive the proposed method is to initialization randomness introduced during the tensor decomposition step. This analysis is essential for understanding the robustness and reliability of the framework in practical forecasting settings.
1.1 Related Work
Electricity demand forecasting has been studied extensively using statistical, machine learning, and hybrid approaches. Comprehensive reviews by Hong et al. [1] and Lago et al. [2] summarize advances in probabilistic modeling, neural networks, and ensemble methods. Many of these rely on external variables such as temperature, population, or macroeconomic indicators to enhance short- and long-term forecast accuracy [3, 4].
Other studies have focused on incorporating sociopolitical or regulatory dimensions, such as policy-driven demand shifts and renewable energy adoption [5, 6]. Time series forecasting using grey-Markov models or seasonal ARIMA has been applied in data-scarce environments [7, 8], showing that consumption-only models can still yield useful predictions.
Short-term load forecasting using ARIMA and neural networks has also been demonstrated on pure consumption data [9]. Fan and Hyndman’s Monash Electricity Forecasting Model (MEFM) [10] uses semiparametric additive models with external factors for national-scale long-term forecasting, but its adaptability to variable-scarce scenarios remains unclear.
Tensor decomposition methods—particularly Non-negative Tensor Factorization (NTF)—have been used for pattern extraction and clustering in electricity data [11, 12, 13], and have also proven effective in domains like image processing and hyperspectral analysis [14, 15]. Sparse and incremental extensions of NTF have been developed for recommendation systems and completion tasks [16, 17], though these do not address time series forecasting.
Xu et al. [18] provide a comprehensive survey of tensor-based forecasting. Zarnaz et al. [19] demonstrate that NTF can improve generalization in financial time series forecasting, highlighting the potential of low-rank latent modeling in structured domains.
In terms of forecasting algorithms, classical ARIMA models typically rely on manually tuned parameters based on domain expertise or statistical criteria [20]. Genetic Algorithms have been adopted to automate parameter search in hybrid models and epidemic prediction tasks [21, 22]. Their flexibility makes them well-suited for non-convex, high-dimensional search spaces like those arising in time series modeling.
While deep learning methods have become increasingly prominent in short-term forecasting [23], their application to long-term national-scale prediction remains limited due to their data and compute requirements, and lack of interpretability.
In this context, our work integrates NTF and Genetic Algorithm-based time series modeling to support interpretable, scalable, and data-efficient long-term electricity demand prediction, without requiring external covariates.
1.2 Theoretical Background
1.2.1 Non-negative Tensor Factorization (NTF)
Let be a third-order non-negative tensor representing electricity consumption data across electric utilities, industries, and years. NTF aims to approximate by decomposing it into three factor matrices:
where , , and are non-negative factor matrices, and denotes the outer product. We denote by the -th element of , and by the corresponding element of the approximated tensor . Each factor vector , , and contains non-negative elements, where , , and denote the -th, -th, and -th elements of , , and , respectively.
The update rules for multiplicative optimization are:
(1) | ||||
(2) | ||||
(3) | ||||
(4) |
Reconstruction accuracy is measured by the Frobenius norm:
1.2.2 Genetic Algorithm for Time Series Modeling
We use a Genetic Algorithm (GA) to optimize the hyperparameters for each time series model applied to the latent temporal factors extracted by NTF. The GA evolves individuals representing sequences:
Each individual’s fitness is defined as the negative mean squared error (MSE) between the predicted and actual electricity demand during the validation period.
Selection is performed using tournament selection, and crossover/mutation are applied to promote diversity. This process enables adaptive modeling of latent time series while avoiding overfitting and underfitting issues associated with fixed ARIMA parameters.
2 Methodologies
2.1 Data Description and Tensor Construction
The dataset used in this study is derived from publicly available electricity consumption records published by the Federation of Electric Power Companies of Japan. It includes annual consumption data from 1963 to 2015, recorded across ten regional electric utilities and detailed industry classifications.
The industry labels consist of 36 categories organized hierarchically. These are aggregated into 10 major industrial sectors: Mining, Manufacturing, Chemical Industry, Petroleum and Coal Products Manufacturing, Rubber Product Manufacturing, Ceramic and Stone Product Manufacturing, Steel Industry, Non-ferrous Metal Manufacturing, Machinery and Equipment Manufacturing 1, and Machinery and Equipment Manufacturing 2.
The full dataset is modeled as a third-order non-negative tensor , where (electric utilities), (industries), and (years). This tensor serves as the input to the Non-negative Tensor Factorization (NTF) process described in Section 1.2.1.
To evaluate forecasting performance, the dataset is split into training, validation, and test sets along the year mode. Two test cases are constructed:
-
•
Case A2010: Training data from 1963–2003, validation data from 2004–2009, test data from 2010–2015.
-
•
Case A2000: Training data from 1963–1993, validation data from 1994–1999, test data from 2000–2005.
2.2 Tensor Decomposition and Rank Selection
The training tensor is decomposed using the canonical polyadic (CP) NTF method. The number of update iterations is fixed at 100, and the rank is selected by evaluating reconstruction accuracy (as defined in Section 1.2.1) across different candidate ranks.
Figure 1 shows the reconstruction accuracy for each rank. Based on a trade-off between reconstruction quality and computational cost during the Genetic Algorithm (GA) optimization, we choose for all experiments.

2.3 Time Series Forecasting on Latent Factors
Following tensor decomposition, we apply time series forecasting to each column of the annual factor matrix . Each time series is modeled using an ARIMA() process, where hyperparameters are optimized via a Genetic Algorithm as outlined in Section 1.2.2.
The predictive annual factor matrix for the validation period is denoted as:
The reconstructed tensor for the validation period is then:
The GA selects the best set of ARIMA parameters by minimizing the mean squared error (MSE) between the sum of predicted consumption and the ground-truth validation tensor.
2.4 Baseline Methods for Comparison
To evaluate the effectiveness of our NTF+GA-based method, we define two baseline methods:
-
•
w/o NTF: Apply ARIMA(3,2,3) directly to each of the 100 time series corresponding to (utility, industry) combinations, bypassing tensor decomposition.
-
•
w/o GA: Apply fixed ARIMA(3,2,3) to each latent annual factor obtained from NTF without performing GA-based hyperparameter search.
These settings allow us to isolate the impact of NTF and GA independently.
2.5 Evaluation Protocol and Test Case Patterns
We define four evaluation patterns depending on the test case and fitness criterion used during GA optimization:
-
•
Pattern A2010: GA optimized using MSE on total consumption (Case A2010).
-
•
Pattern B2010: GA optimized using reconstruction accuracy (Frobenius norm) (Case A2010).
-
•
Pattern A2000: GA optimized using MSE (Case A2000).
-
•
Pattern B2000: GA optimized using reconstruction accuracy (Case A2000).
The ARIMA hyperparameters used in fixed settings are shown in Table 1.
Pattern | |||
---|---|---|---|
A2010 | 3 | 2 | 3 |
B2010 | 2 | 1 | 3 |
A2000 | 3 | 2 | 2 |
B2000 | 2 | 1 | 2 |
3 Results
3.1 Prediction Accuracy
We evaluate the proposed method and the two baseline methods (w/o NTF, w/o GA) across four experimental patterns described in Section 2.5. Tables 2–5 summarize the MSE and reconstruction accuracy for each method. Figures 2–5 illustrate the annual total electricity demand predicted by each method compared with the ground truth.
Method | MSE () | Reconstruction |
---|---|---|
Proposed | 5.022 | 0.811 |
w/o GA | 6.292 | 0.819 |
w/o NTF | 21.70 | 0.816 |

Method | MSE () | Reconstruction |
---|---|---|
Proposed | 6.655 | 0.825 |
w/o GA | 10.43 | 0.818 |
w/o NTF | 14.40 | 0.883 |

Method | MSE () | Reconstruction |
---|---|---|
Proposed | 6.524 | 0.799 |
w/o GA | 19.60 | 0.795 |
w/o NTF | 13.54 | 0.892 |

Method | MSE () | Reconstruction |
---|---|---|
Proposed | 5.995 | 0.818 |
w/o GA | 7.595 | 0.842 |
w/o NTF | 5.606 | 0.913 |

3.2 Influence of Random Seed Initialization
To assess the stability of the proposed method, we examine how reconstruction accuracy varies with different random seed values used during NTF initialization. Tables 6–9 show reconstruction accuracy on validation data for five different seeds: 10, 20, 30, 42, and 45. The corresponding prediction results, averaged over the top three reconstruction runs, are plotted in Figures 6–9.
Seed | Reconstruction |
---|---|
10 | 0.904 |
45 | 0.890 |
42 | 0.888 |
30 | 0.876 |
20 | 0.862 |

Seed | Reconstruction |
---|---|
10 | 0.904 |
45 | 0.890 |
42 | 0.888 |
30 | 0.875 |
20 | 0.862 |

Seed | Reconstruction |
---|---|
42 | 0.886 |
30 | 0.878 |
45 | 0.865 |
20 | 0.623 |
10 | 0.601 |

Seed | Reconstruction |
---|---|
30 | 0.897 |
20 | 0.896 |
42 | 0.895 |
10 | 0.879 |
45 | 0.868 |

4 Discussion
This section discusses key findings from the experimental results and analyzes the implications in terms of model generalization, reconstruction accuracy, and sensitivity to initialization.
4.1 Impact of Fitness Criteria on Forecast Accuracy
Comparing Patterns A2010 and B2010, where the only difference lies in the GA fitness function (MSE versus reconstruction accuracy), we observe contrasting behavior. As shown in Tables 2 and 3, optimizing for reconstruction accuracy leads to higher structural fidelity (0.825 vs. 0.811), while optimizing for MSE yields better forecasting performance in terms of true error (lower MSE).
Interestingly, in Patterns A2000 and B2000 (Tables 4 and 5), both MSE and reconstruction accuracy improve when the GA is optimized for reconstruction accuracy. This suggests that the optimal fitness criterion may depend on the data range, underlying consumption trends, or the degree of seasonality and noise.
4.2 Effect of Model Complexity and Degrees of Freedom
To understand the generalization ability of each model, we analyze the total number of degrees of freedom (DOF) associated with each configuration. Table 10 summarizes the DOF for each experimental pattern in the proposed method, computed as:
We find that configurations with fewer DOF (e.g., B2010 and B2000) generally result in better reconstruction accuracy and sometimes better MSE, supporting the hypothesis that model simplicity contributes to generalization.
Pattern | DOF = | ||
---|---|---|---|
A2010 | 25 | 21 | 46 |
B2010 | 16 | 14 | 30 |
A2000 | 24 | 23 | 47 |
B2000 | 16 | 13 | 29 |
Notably, the w/o NTF baseline exhibits the highest reconstruction accuracy in several patterns. However, this is likely due to its increased effective DOF per tensor element, as ARIMA is applied independently to each utility–industry pair. In contrast, our method enforces structural constraints through NTF, which may sacrifice reconstruction accuracy but improves generalization by capturing shared latent patterns.
4.3 Sensitivity to Initialization
4.4 Interpretability and Scalability
By reducing the dimensionality of the original data through NTF, the proposed method achieves interpretable factor matrices that reflect underlying temporal trends. The use of GA further automates the selection of appropriate time series model complexity for each factor, allowing for adaptive modeling without manual tuning.
Moreover, the framework is scalable and extensible. It can be adapted to include additional modes (e.g., geographic regions, customer classes) or applied to other domains such as water or gas demand, provided a structured tensor representation is available.
5 Conclusion
This study presented a novel framework for long-term electricity demand forecasting using only historical consumption data. By leveraging Non-negative Tensor Factorization (NTF) to extract latent temporal features and optimizing time series model parameters through a Genetic Algorithm (GA), the proposed method achieves both interpretability and competitive prediction accuracy.
Experimental evaluations on real-world electricity consumption data from Japan demonstrated that the proposed approach consistently outperforms baseline methods in terms of mean squared error (MSE), particularly when model complexity is effectively reduced via latent factor modeling. The use of GA for adaptive ARIMA parameter tuning was shown to be effective across multiple forecasting scenarios.
Our analysis further revealed that minimizing reconstruction error during GA optimization can improve generalization, especially when accompanied by a reduction in the total degrees of freedom. Moreover, while NTF introduces sensitivity to initialization, the impact on predictive performance can be mitigated through multiple trials or ensemble strategies.
The proposed framework is domain-independent and can be extended to other utility forecasting tasks, such as water or gas consumption, provided the data can be represented as structured tensors. Future work includes incorporating adaptive rank selection, robust initialization strategies, and expanding the method to support exogenous variables or probabilistic forecasting outputs.
References
- [1] T. Hong, P. Pinson, and S. Fan, “Probabilistic electric load forecasting: A tutorial review,” International Journal of Forecasting, vol. 32, no. 3, pp. 914–938, 2016.
- [2] J. Lago, F. De Ridder, and B. De Schutter, “Forecasting electricity demand: A review of the state-of-the-art with a look into the future,” Renewable and Sustainable Energy Reviews, vol. 136, p. 110202, 2021.
- [3] B. Jie, J. Baba, and A. Kumada, “Mathematical analysis of time-series & meteorological factors in electricity demand forecasting based on carbon neutrality,” in 2023 IEEE/IAS Industrial and Commercial Power System Asia (I&CPS Asia), 2023, pp. 137–142.
- [4] Y. Cao, R. Zhong, J. Yu, and M. Munetomo, “Optimization of electricity consumption forecasting models via hyper-heuristic algorithm,” in 2024 6th International Conference on Data-driven Optimization of Complex Systems (DOCS), 2024, pp. 114–120.
- [5] P. Sutthichaimethee, A. Chatchorfa, and S. Suyaprom, “A forecasting model for economic growth and co2 emission based on industry 4.0 political policy under the government power: Adapting a second-order autoregressive-sem,” Journal of Open Innovation: Technology, Market, and Complexity, vol. 5, no. 3, p. 69, 2019. [Online]. Available: https://www.sciencedirect.com/science/article/pii/S219985312201006X
- [6] F. Haines and D. Mcconnell, “Green electricity markets? constructed realities, prosumerism and solar pv,” Socially Responsible Investment eJournal, 2013. [Online]. Available: https://api.semanticscholar.org/CorpusID:156798094
- [7] X.-P. Wang and M. Meng, “Forecasting electricity demand using grey-markov model,” in 2008 International Conference on Machine Learning and Cybernetics, vol. 3, 2008, pp. 1244–1248.
- [8] R. K. Shiwakoti, C. Charoenlarpnopparut, and K. Chapagain, “Time series analysis of electricity demand forecasting using seasonal arima and an exponential smoothing model,” in 2023 International Conference on Power and Renewable Energy Engineering (PREE), 2023, pp. 131–137.
- [9] C. Nichiforov, I. Stamatescu, I. Făgărăşan, and G. Stamatescu, “Energy consumption forecasting using arima and neural network models,” in 2017 5th International Symposium on Electrical and Electronics Engineering (ISEEE), 2017, pp. 1–4.
- [10] S. Fan and R. J. Hyndman, “Forecasting electricity demand in australian national electricity market,” in 2012 IEEE Power and Energy Society General Meeting, 2012, pp. 1–4.
- [11] A. Durand, F. Roueff, J.-M. Jicquel, and N. Paul, “Smooth nonnegative tensor factorization for multi-sites electrical load monitoring,” in 2021 29th European Signal Processing Conference (EUSIPCO), 2021, pp. 1666–1670.
- [12] T. Moriyama, M. Hosoe, M. Kuwano, and Y. Minamino, “Extraction of power consumption patterns using non-negative tucker decomposition,” in 2022 IEEE International Conference on Big Data (Big Data), 2022, pp. 3163–3171.
- [13] A. Man Shun Ang, Y. Sam Hung, and Z. Zhang, “A non-negative tensor factorization approach to feature extraction for image analysis,” in 2016 IEEE International Conference on Digital Signal Processing (DSP), 2016, pp. 168–178.
- [14] Y. Jiang, Q. Ruan, G. An, and Y. Jin, “Fast non-negative tensor factorization based on cp decomposition for 3d facial expression recognition,” in 2018 14th IEEE International Conference on Signal Processing (ICSP), 2018, pp. 527–532.
- [15] F. Xiong, K. Qian, J. Lu, J. Zhou, and Y. Qian, “Nonlocal low-rank nonnegative tensor factorization for hyperspectral unmixing,” in IGARSS 2020 - 2020 IEEE International Geoscience and Remote Sensing Symposium, 2020, pp. 2157–2160.
- [16] X. Zhang and M. K. Ng, “Sparse nonnegative tensor factorization and completion with noisy observations,” IEEE Transactions on Information Theory, vol. 68, no. 4, pp. 2551–2572, 2022.
- [17] D. Biswas, K. M. Azharul Hasan, and Z. Zarnaz, “Progressive recommendation by incremental tensor factorization,” in 2022 25th International Conference on Computer and Information Technology (ICCIT), 2022, pp. 483–488.
- [18] K. Xu, S. Yan, W. Zhang, J. Wang, and X. He, “Tensor forecasting: A survey,” IEEE Access, vol. 8, pp. 158 755–158 771, 2020.
- [19] Z. Zarnaz, D. Biswas, and K. A. Hasan, “Credit card approval prediction by non-negative tensor factorization,” in 2021 2nd International Conference on Robotics, Electrical and Signal Processing Techniques (ICREST), 2021, pp. 319–323.
- [20] J. Fattah, L. Ezzine, Z. Aman, H. E. Moussami, and A. Lachhab, “Forecasting of demand using arima model,” International Journal of Engineering Business Management, vol. 10, p. 1847979018808673, 2018. [Online]. Available: https://doi.org/10.1177/1847979018808673
- [21] S. K. Panda, S. Anwar, and S. Racharla, “Pandemic outbreak analysis using machine learning techniques,” in 2024 15th International Conference on Computing Communication and Networking Technologies (ICCCNT), 2024, pp. 1–7.
- [22] L. Zhang, Q. Xu, Z. Wang, and Y. Huang, “Hybrid time series forecasting with ga optimized neural networks,” Neurocomputing, vol. 285, pp. 66–74, 2017.
- [23] J. Duan, Y. Lv, Z. Qiao, M. Wang, and Y. Cao, “Short-term load forecasting using deep learning: A review,” Energies, vol. 12, no. 2, p. 356, 2019.