Next Article in Journal
Virtual Reality: A New Frontier of Physical Rehabilitation
Previous Article in Journal
SEANet: Semantic Enhancement and Amplification for Underwater Object Detection in Complex Visual Scenarios
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Natural Gas Consumption Forecasting Model Based on Feature Optimization and Incremental Long Short-Term Memory

1
Wuhan Jiyi Network Technology Co., Ltd., Wuhan 430205, China
2
School of Geosciences, Yangtze University, Wuhan 430100, China
*
Author to whom correspondence should be addressed.
Sensors 2025, 25(10), 3079; https://doi.org/10.3390/s25103079
Submission received: 26 February 2025 / Revised: 27 April 2025 / Accepted: 30 April 2025 / Published: 13 May 2025

Abstract

:
Natural gas, as a vital component of the global energy structure, is widely utilized as an important strategic resource and essential commodity in various fields, including military applications, urban power generation and heating, and manufacturing. Therefore, accurately assessing energy consumption to ensure a reliable supply for both military and civilian use has become crucial. Traditional methods have attempted to leverage long-range features guided by prior knowledge (such as seasonal data, weather, and holiday data). However, they often fail to analyze the reasonable correlations among these features. This paper proposes a natural gas consumption forecasting model based on feature optimization and incremental LSTM. The proposed method enhances the robustness and generalization capability of the model at the data level by combining Gaussian Mixture Models to handle missing and anomalous data through modeling and sampling. Subsequently, a weakly supervised cascade network for feature selection is designed to enable the model to adaptively select features based on prior knowledge. Finally, an incremental learning-based regression difference loss is introduced to promote the model’s understanding of the coupled relationships within the data distribution. The proposed method demonstrates exceptional performance in daily urban gas load forecasting for Wuhan over the period from 2011 to 2024. Specifically, it achieves notably low average prediction errors of 0.0556 and 0.0392 on the top 10 heating and non-heating days, respectively. These results highlight the model’s strong generalization capability and its potential for reliable deployment across diverse gas consumption forecasting tasks within real-world deep learning applications.

1. Introduction

In recent years, with the rapid development of industrial technology, the demand for natural gas among residents has been steadily increasing. However, due to the influence of weather changes, market demand, and other factors, accurately predicting the daily residential natural gas load has become a significant challenge for effectively assessing energy consumption [1,2,3,4,5,6]. Previously, some researchers used traditional statistical models [7,8,9], such as the Autoregressive Integrated Moving Average (ARIMA) [10,11] model and regression models, to perform nonlinear modeling of natural gas data. However, these simple nonlinear relationships were insufficient to model the incremental, periodic, and coupled features within data sequences.
As a primary component of the global energy mix, natural gas has accounted for nearly 25% of worldwide energy consumption in recent years [12]. This trend reflects the rapid advancement of industrial technologies and the ongoing transition toward cleaner, more affordable, abundant, and cost-effective energy sources, which are gradually replacing conventional fossil fuels [13]. With the increasing demand for natural gas for both industrial operations and residential usage, ensuring a reliable supply hinges critically on accurate consumption forecasting [14]. However, current gas demand forecasting methods face three major challenges [14,15,16]: (1) Temporal sensitivity: Daily gas consumption exhibits substantial intra-day fluctuations due to usage peaks. Furthermore, seasonal variations cause extreme distributions in summer and winter. Additionally, long-term forecasting is often coupled with multi-energy systems, complicating the prediction due to cross-energy interactions. (2) Spatial heterogeneity: Gas consumption patterns vary significantly across regions (e.g., industrial zones vs. residential areas) and user types (e.g., industrial boilers, residential distributed heating, and CNG refueling stations), leading to complex spatial dynamics. (3) Multi-factor coupling effects [17,18]: Gas demand is dynamically influenced by multiple exogenous factors, including extreme weather events, public holidays, and macroeconomic cycles. Accurately forecasting natural gas demand is, therefore, essential, not only to improve operational efficiency, reduce costs, and conserve energy but also to support reliable supply and avoid overconsumption. Motivated by these challenges, residential daily natural gas consumption forecasting has garnered substantial attention from both researchers and industry practitioners. Commonly adopted evaluation metrics include the Mean Absolute Error (MAE) and Mean Absolute Percentage Error (MAPE) [19,20] for regression accuracy. Moreover, to assess the model’s temporal robustness, metrics such as advance warning accuracy (i.e., the ability to forecast threshold fluctuations N hours in advance) and response error under extreme conditions are also employed.
Subsequently, machine learning methods such as Support Vector Machines (SVMs) [21], K-Nearest Neighbors (KNN) [22], decision trees [23], and ensemble learning [24] were introduced. These methods successfully fit coupled data through high-order nonlinear modeling but still faced challenges when handling time-series information. With the development of deep learning across various domains, promising accuracy levels have been achieved. In the field of natural gas forecasting, the ARIMA model, as a classic regression model, first uses historical data for prior predictions. It then applies differencing to smooth the data, effectively addressing the relationships among strongly coupled data. Finally, cumulative error corrections are used to refine the model, overcoming the inability of direct regression models to capture long-range dependencies in sequences. However, frequent smoothing operations during the model training stage significantly reduce the interaction among features. Subsequently, Baldacci et al. [25] sampled historical data to construct sample models, using KNN and local regression algorithms for prior regression modeling, achieving notable prediction accuracy in both rural and urban settings. Gorucu et al. [26] predicted natural gas consumption using conditional control variables (such as temperature, natural gas prices, customer count, and exchange rates).
Machine learning, with its excellent data-fitting capabilities, has been widely applied to various regression forecasting tasks. Common methods include Support Vector Regression (SVR), Artificial Neural Networks (A NNs) [27], and Recurrent Neural Networks (RNNs [28]). Among these, RNNs, with their chain-like structure and memory loops, efficiently learn feature distributions from time-series data. Long Short-Term Memory networks (LSTM [28,29,30]), a special form of RNNs, have been extensively used in energy consumption forecasting tasks due to their powerful context feature-capturing ability. For example, localized LSTM models can be trained and predicted based on different feature subsets (e.g., season, temperature, and user type), improving model adaptability and accuracy. Labi et al. [30] developed a composite LSTM recurrent model based on consumption profile recognition for day-ahead natural gas consumption forecasting. Moreover, some research has combined LSTM with Convolutional Neural Networks (CNNs) to leverage the CNN’s spatial invariance for local feature extraction [31,32,33], complementing LSTM’s capability to capture long-range features. LSTNet [34] further introduced a skip-RNN to handle long-term temporal features and added an autoregressive component to enhance the constraint between input and output predictions. Subsequently, Temporal Convolutional Networks (TCNs) [35] optimized both an RNN and CNN, achieving a balance between training time and inference speed. However, the above methods largely overlooked the strong temporal coupling characteristics of natural gas forecasting. The natural gas daily load exhibits stochastic variations influenced by time factors such as seasons and holidays.
In summary, existing methods primarily focus on short-term data for supervised prediction without fully exploring the impact of external factors such as seasonality, holidays, and weather. Notably, these external factors exhibit significant sensitivity to regression predictions. Current approaches are limited to performing time convolution operations within a local feature range, which restricts their ability to analyze local features over short periods. They often overlook the long-term effects of external factors like holidays and weather, making them unsuitable for predicting irregular and sensitive data and leading to delays in prediction responses. A recent study, DCSDNet [12], takes into account the multiple seasonalities and irregularities of natural gas consumption. It employs a dual-convolution seasonal analysis network, which first uses MSTL (Multi-Seasonal Time-series Decomposition) to analyze the effects of various seasonalities on regression predictions. Subsequently, it integrates local and global convolutional networks to extract short-term and long-term features from data sequences for mathematical modeling. Finally, it incorporates an autoregressive model to predict historical consumption, further enhancing the coupling between historical and future predictive features. However, as the prediction range increases, the accuracy of the predictions diminishes under the influence of unexpected events within the prediction window, such as holidays and weather changes [36]. Later, Na et al. [37] proposed a Wavelet LSTM model based on wavelet transformation and Long Short-Term Memory networks. This model preprocesses feature data using wavelet transformation to construct data associations. Validation on real natural gas datasets demonstrated that Wavelet LSTM outperformed traditional LSTM in understanding the coupling relationships among sequence features and improved prediction accuracy. Shu et al. [38] analyzed daily and quarterly natural gas load characteristics in Chengdu and proposed using an iterative weakly supervised learner (XGBoost [39]). By employing a custom loss function during data training, their model was guided to adapt to multitask learning scenarios effectively.
Despite the methods mentioned above attempting to fit features through feature-guided approaches, such fitting often lacks correlations among features. Specifically, the daily natural gas load is influenced not only by historical data but also by external factors, such as seasons and weather. Designing an adaptive feature selection mechanism remains a key challenge in addressing daily natural gas load forecasting. To tackle this issue, we propose a natural gas forecasting model based on feature optimization and incremental LSTM. Specifically, we first utilize a Gaussian Mixture Model to handle missing and anomalous data through modeling and sampling, thereby enhancing the robustness and generalization capability of the model. Next, we design a weakly supervised cascade feature selection model to adaptively perform prior feature selection for daily natural gas loads. Subsequently, LSTM is employed to incrementally predict the prior-selected features. Incremental learning adjusts network gradients adaptively using weather, holidays, and total natural gas consumption as scaling factors. This encourages the model to explore potential coupling relationships within the data during the training phase, further enhancing its generalization capability.
In summary, the main contributions of this paper are as follows:
(1)
Proposed a method for modeling missing/anomalous data sampling based on Gaussian mixture distributions, enhancing the robustness and generalization capability of the network;
(2)
Developed a weakly supervised cascade network feature selector, which improves the coupling between historical and current data, enabling the network to achieve more accurate predictions when dealing with sensitive data;
(3)
Introduced an incremental prediction method to address the prediction lag caused by anomalous data, fully leveraging the model’s feature-awareness capabilities;
(4)
Lastly, designed a regression difference loss in conjunction with the mean squared error loss to enhance the feature fusion of long-range data associations, improving the accuracy of natural gas consumption forecasting.
The remainder of this paper is organized as follows: Section 2 presents the architectural design of the proposed method, with each subsection detailing the design motivation and principles. Section 3 describes the dataset sources and experimental setup, followed by a quantitative and qualitative analysis of the experimental results. Subsequently, ablation studies are conducted to validate the superiority of our approach. Finally, Section 4 provides a detailed discussion and comprehensive conclusions of our method. A summary of all abbreviations and symbols used in this work is provided in Table 1 for clarity and reproducibility.

2. Materials and Methods

In this subsection, we provide a detailed description of our method, along with an explanation of the design motivations behind it. As shown in Figure 1, we describe the overall network framework. Subsequently, we elaborate on the relevant gas forecast techniques employed in our method. Finally, we give a brief overview of the loss functions used in our approach.

2.1. Data Process

Previous models, such as LSTM and attention mechanism-based LSTM, have attempted to deepen the network layers to achieve more advanced feature selection. However, deeper networks often result in the loss of shallow feature representations, making it challenging to mathematically model the nonlinear relationships of long-sequence features in natural gas consumption forecasting effectively. To address this issue, we first preprocess the anomalous and missing data in the natural gas dataset. The specific processing method is shown in Equation (1).
X ( l ) = A d a p t i v e ( X ( l ) X m i n ( l ) X m a x ( l ) X m i n ( l ) )
where X ( l ) represents the length of the feature sequence, and adaptive (Equation (4)) is a function used for adaptively removing anomalous and missing data, while X m a x and X m i n represent the maximum and minimum values in the dataset, respectively.
For deep neural networks (DNNs) [40], preventing overfitting and enhancing the model’s robustness are critical steps that must be prioritized in natural gas consumption forecasting. Previous models, such as KS-LSTM [41,42], attempted to predict missing values to generate pseudo-predictions, which were then used to control the gradient of the model discriminatively, thereby improving the model’s robustness and generalization capability. In this paper, we construct a Gaussian Mixture Model (GMM) to establish the relationships between anomalous and missing data. A GMM is a typical probabilistic model used to represent mixed distributions. A one-dimensional GMM consists of K components, where each component represents one of the K mixed distributions. The formula for the GMM distribution is shown below. This approach allows us to utilize the constructed data for model training, thereby enhancing the model’s generalization capability.
g ( x , u , σ ) = 1 2 π σ 2 e ( x u ) 2 2 σ 2
Here, x represents the input distribution, while u and σ denote the mean and variance of the distribution, respectively. Therefore, the formula for the Gaussian Mixture Model is shown as Equation (3).
G ( x , u , σ ) = i = 0 K 1 ( x i , u i , σ i )
where i represents each Gaussian distribution.
We apply a Gaussian Mixture Model (GMM) to the anomalous and missing data belonging to the same category. Subsequently, feature sampling is performed following a uniform distribution. The uniform distribution further eliminates central bias errors, enabling the model’s distribution to better align with real-world scenarios.
A d a p t i v e ( x ( l ) ) ( a , m ) = R a n d o m ( i = 0 K 1 G ( x ( a , m ) , ( i ) x ( a , m ) . ( i ) m e a n , x ( a , m ) . ( i ) v a r ) , l × r )
Specifically, uniform sampling is performed within the range [ x ( a , m ) . ( i ) m e a n x ( a , m ) . ( i ) v a r , x ( a , m ) . ( i ) m e a n + x ( a , m ) . ( i ) v a r ] , where the mean and standard deviation correspond to the center of the Gaussian distribution for features of the same category. When the number of features for the same category is less than l × r , all available features are used for training. Conversely, when the number of features exceeds l × r , features are randomly sampled within the specified range based on the aforementioned sampling principle.
Here, l represents the feature sequence of the same category, K denotes the feature categories, and r is the feature selection factor, which is set to 0.5 in this study. This indicates that abnormal data features (Abnormal: a) and missing data features (Miss: m) are uniformly selected alongside general data features to perform soft supervised learning on the model. These operations further enhance the robustness of the model.

2.2. Weakly Supervised Cascade Network Feature Selection

Previous methods have focused on constructing deep learning models for single-feature selection, often overlooking the correlations between historical and current data [43,44]. These correlations are particularly evident in how time, seasonal holidays, and specific events or activity days influence daily natural gas load variations. Therefore, by observing historical data, we can make a rough prediction of the current day’s natural gas load. Motivated by this, we leverage historical data, considered as weakly labeled data, to select features for the regression prediction model and establish a nonlinear relationship. As shown in Figure 2, we implement a multi-model voting mechanism to perform feature selection on redundant multi-input features.
(1)
First, for the input samples, we construct the feature mapping relationship by minimizing the Gini index criterion. The Gini index is shown in Equation (5):
g i n i ( f l ) = 1 k = 0 l 1 ( f ( j ) j = 0 j = i 1 f ( j ) ) 2
where l represents the length of the feature, and k and j represent feature sequences.
(2)
Subsequently, we use a multi-cascade network to evaluate feature responses in the dataset. Initially, the model analyzes various factors such as time, holidays, special events, and school schedules to establish feature mappings that influence the daily natural gas load. To address uncertainties in feature representation, we incorporate an uncertainty gradient into the mean squared error loss, enabling fine-tuning of the model’s parameters. This approach helps the model adapt effectively to datasets with similar characteristics, enhancing its feature selection capability. By iteratively refining this process, the model constructs highly responsive relationships for daily natural gas load forecasting. Equation (6) provides a detailed description of this process:
l o s s ( x , p , t ) = l o s s s u p e r v i s e d × l o s s u n s u p e r v i s e d = 1 N b = 0 i 1 ( p i t i ) 2 + b = 0 f Δ × m o d e l ( x b ; θ ) θ
where x represents the input data, l o s s s u p e r v i s e d is the mean squared error loss, l o s s u n s u p e r v i s e d is the gain unsupervised loss, N is the total number of samples, and b represents a single training sample.
Figure 2. Weakly supervised cascading network feature selection framework.
Figure 2. Weakly supervised cascading network feature selection framework.
Sensors 25 03079 g002
Using the above method, the XGBOOST model was used to filter all features originally included, and finally, the type main features, as shown in Table 2, were selected.

2.3. LSTM Network Architecture

After performing high-responsive feature selection, constructing an accurate regression model becomes critical. Traditional RNNs are unable to capture long-distance sequential feature information effectively. LSTM (see Figure 3), through its gating mechanisms (input gate, forget gate, and output gate), efficiently facilitates the interaction between short-range adjacent feature information and long-range global feature information.
(1)
Input gate: For the input data x t L , in our time-series setting, the input sequence is denoted as { x 1 , x 2 , …, x t }, where each x t represents the feature vector at a time step, where it is first passed through an activation function for feature regularization, resulting in y ^ t , as shown in the following formula:
y ^ t = S i g m o i d ( w i , t c a t ( x t , h t 1 ) + b i ) t = 1 1 + e ( w i , c a t ( x t , h t 1 ) + b i )
where t represents the time-series state, w i t denotes the weight value at a specific time step, and b i t represents the bias value at a specific time step.
(2)
Forget gate: By performing cascade network feature selection under weak supervision, the forget gate can better respond to high-weight features while suppressing the interference of disruptive features on the network.
f t = S i g m o i d ( w f c a t ( x t , h t 1 ) + b f )
Here, w f represents the output weight of the network node from the previous stage, and b f is the learnable bias.
(3)
Output gate: Features are interacted through short-distance skip connections, effectively preventing gradient vanishing.
O t = S i g m o i d ( w i , t c a t ( x t , h t 1 ) + b o ) h t = O t × t a n h ( C t )
Here, b o is initialized to 1, and C t represents the learnable parameter.

2.4. Incremental Learning for Regression Prediction

Due to the influence of external factors such as holidays and weather, traditional LSTM models struggle to handle data distribution anomalies caused by sensitive data, leading to prediction lag and significant declines in regression accuracy. In this paper, we propose Incremental Learning for Regression Prediction, which enhances the coupling between sequential data by introducing additional regression variables to address the issue of declining prediction accuracy as the prediction time range increases. Specifically, we add fully connected layers to the LSTM model to improve its incremental regression prediction capability. This process is defined as follows:
Traditional LSTM-based models often suffer from prediction lag and performance degradation when confronted with significant shifts in external environmental factors, such as holidays or abrupt weather changes. To address this limitation, we propose an Incremental Learning for Regression Prediction strategy, which substantially enhances the model’s adaptability to distributional anomalies and improves forecasting accuracy under non-stationary conditions. Specifically, in the first stage, the model takes an input data sequence x and generates predictions y ^ t across multiple time horizons. The differences between adjacent time steps are then computed, as shown in Equation (10), to obtain the true incremental signals, with the temporal span in this study set to t = 2 . In the second stage, a nonlinear fully connected layer is designed to perform incremental regression prediction based on the generated outputs y ^ t , enabling the model to learn fine-grained temporal changes in the target series. Joint optimization of the base forecasting task and the incremental prediction objective enables the model to better capture the intrinsic dependencies within sequential data. This coupled learning framework enhances robustness and effectively mitigates the decline in prediction accuracy caused by missing or anomalous inputs. To further enhance the generalization capability of the proposed Incremental Learning for Regression Prediction strategy, we incorporate real-time monitoring of the incremental prediction residuals (as defined in Equation (12)). When the residual consistency metric ζ remains below a predefined threshold (0.5) for consecutive steps, a localized fine-tuning process is activated. In this phase, only the fully connected layers responsible for incremental regression are updated, while the LSTM backbone remains frozen to preserve the model’s stability. Moreover, during training, Gaussian noise—with a standard deviation set to 10% of the current batch’s standard deviation—is added to simulate disruptions caused by external factors such as extreme weather or holidays. This augmentation improves the robustness of the model in handling unexpected or rare events.
g t ( x ) = ( L S T M ( x ) t L S T M ( x ) t 1 )
p = L i n e a r 1 × ( L S T M ( L i n e a r 1 × ( 1 , d i m ) ) , 1 )
ζ = | g t p |
Herein, p denotes the model-generated incremental prediction, and g t represents the corresponding ground-truth increment, using the loss function from Section 2.5. L i n e a r n × denotes the fully connected layer, where n denotes the number of fully connected layers, which is set to 1 in this paper. LSTM refers to the LSTM model from Section 2.3, and dim represents the number of neurons in the hidden layer.

2.5. Incremental Loss Function

Traditional regression models typically use mean squared error (MSE) loss to construct regression relationships for supervision. However, in the field of natural gas forecasting, MSE loss is insufficient for effectively supervising the correlations between data points. In this paper, we design a regression difference loss L r in conjunction with MSE loss to fully leverage the differences between predicted values for regression supervision, as defined below:
L r ( ( l ) ; θ ) = 1 l i = 0 l 1 ( p g t ) 2
where l represents the length of the feature sequence, and p and g t are defined as shown in Equations (10) and (11).
Finally, the overall loss L of our model is defined as follows:
L = 1 N i = 0 l 1 ( y y ^ t ) 2 + L r
Here, y represents the label value.
Efficient data filtering provides a solid data foundation for enhancing the robustness of the model. Subsequently, the weakly supervised cascade feature selection identifies key features relevant to natural gas forecasting. Finally, the long-range data correlation modeling loss (regression difference loss) promotes the accuracy of natural gas forecasting.

3. Experiment and Result Analysis

3.1. Data Description

This study leverages multi-source data collected from the SCADA system of Wuhan’s high-pressure natural gas pipeline network, hourly meteorological observations from the Wuhan Meteorological Bureau, and officially published national holiday calendars by the General Office of the State Council. The dataset spans from 30 December 2010 to 5 January 2025, covering three complete annual consumption cycles and supporting long-term pattern learning. Daily gas consumption is derived from real-time measurements recorded by Rosemount 3051S differential pressure flowmeters deployed across 13 administrative districts in Wuhan, including 7 industrial zones and 6 residential areas. The sensors report instantaneous flow every 5 min, which is aggregated into daily totals (unit: 10,000 m3/day). To ensure data integrity, periods with abnormal pressure values (<0.2 MPa or >4.0 MPa) are automatically discarded, and 0.42% of missing entries are imputed via temporal linear interpolation, preserving the continuity of time-series inputs for model training.
Our analysis of gas consumption patterns reveals that industrial usage exhibits a distinct bimodal distribution, with peaks occurring between 08:00 and 10:00 and 18:00 and 20:00. The peak-to-valley ratio reaches 1:2.3, and weekday consumption is 1.8 times higher than that of weekends. Residential gas consumption is significantly affected by seasonal factors: the average daily usage in the winter is 3.1 times that in the summer, and daily volatility during the heating season increases by 47% compared to non-heating periods.
Meteorological data integrate hourly observations (temperature, humidity, and wind speed) with 72 h temperature forecasts. Through feature engineering, three categories of variables are constructed: (1) cumulative cold effect: when the daily average temperature is below 5 °C, gas consumption increases by 7.2% for each consecutive day; (2) temperature–humidity interaction: when the temperature is below 10 °C and humidity below 60%, each 1% drop in humidity results in a 1.8% increase in consumption; and (3) temperature forecast error compensation: when ∣ΔT∣ > 3 °C, a dynamic compensation module is triggered to correct the deviation.
Holiday data are encoded based on the national holiday calendar issued by the State Council, segmented into three phases: (1) pre-holiday stockpiling: during the 7 days before the Spring Festival, daily consumption increases by 4.5%; (2) holiday core period: industrial and commercial consumption decreases by 22%; and (3) post-holiday recovery: in the 3 days after the holiday, consumption gradually rebounds.
The generalizability of the proposed model is constrained by three main factors:
(1)
Climate dependency: the model is developed based on a subtropical monsoon climate (Köppen Cfa) and requires recalibration of temperature thresholds when applied to tropical or high-latitude regions.
(2)
Differences in gas consumption structure: in Wuhan, industrial usage accounts for 42% of total gas consumption, significantly higher than in many European and North American cities (typically <30%), which may lead to an overestimation of industrial demand when transferring the model.
(3)
Pipeline network topology: Wuhan adopts a looped gas network with 28% redundancy, whereas cities like Paris use a radial topology with only 12% redundancy, leading to different pressure response dynamics under the same load variations.
In addition, factors such as the seven-day Spring Festival holiday in China (with an average residential consumption drop of 8%) versus the Western Christmas holiday (with a 25% drop), as well as the “coal-to-gas” policy transition during 2017–2020, should be carefully considered for cross-regional model transfer.

3.2. Implementation Details

In this study, temperature, humidity, wind speed, atmospheric pressure, precipitation, time, and holiday information from the WHU Larger-Scale Pipeline Natural Gas Dataset (WNGD) are utilized as input features for both the proposed method and the baseline methods. The experiments are conducted on a hardware environment equipped with an NVIDIA GTX 4060Ti GPU and software environment consisting of Windows 10, Python 3.10, and PyTorch 1.18 with CUDA 12.1. For all models, the batch size is fixed at 64, and the random seed is set to 1234 to ensure reproducibility. Training (see Table 3) is performed for 5000 epochs using the Adam optimizer, with an initial learning rate of 1 × 10−3 and a learning rate decay of 1 × 10−2. The training process is organized into four distinct stages: rapid descent, parameter optimization, smooth fitting, and fine smoothing. An early stopping strategy is applied to prevent overfitting and to identify optimal parameter solutions. Furthermore, the validation loss on the test set is continuously monitored to ensure model generalization and to further mitigate overfitting. Furthermore, we included Table A1, Table A2, Table A3 and Table A4 in the Appendix A to provide detailed descriptions of the model architectures for both the baseline methods and our proposed approach. These tables include the input and output feature dimensions, the internal components of each model, and the types of activation functions used.

3.3. Evaluation Metrics

To evaluate the effectiveness of the proposed method, we used the Mean Absolute Percentage Error (MAPE) to assess the model’s accuracy. The calculation formula for the evaluation metric is as follows:
M A P E = 1 N i = 0 N 1 y i y ^ i y i × 100
where N represents the number of samples, y is the true label, and y ^ is the predicted value from the model.

3.4. Experimental Analysis

(1) Experimental analysis of comparative methods: Firstly, to further analyze the prediction errors and their underlying causes, we conducted both quantitative and qualitative comparisons between our proposed method and several baselines, including the Backpropagation Neural Network (BP), Transformer, and Temporal Fusion Transformer (TFT) [45] models, under different conditions. The results demonstrate that our method consistently outperforms the others in terms of both prediction accuracy and stability.
As shown in Table 4, the error growth rate of our method is significantly slower than that of the comparison models as the forecast horizon extends, indicating better stability in mid- to long-term forecasting tasks. For instance, when forecasting the top 10 days, the Absolute Mean Percentage Error (MAPE) of our method on heating and non-heating days reaches 0.0556 and 0.0392, respectively.
The BP model suffers from larger errors primarily due to its reliance on traditional gradient descent-based optimization without effective integration of multi-factor features relevant to gas consumption. Although Transformer and TFT architectures are capable of capturing long-range dependencies, their performance drops significantly during highly volatile periods (e.g., holidays) due to the absence of an effective feature selection mechanism. In contrast, our method integrates a weakly supervised cascad network feature selection and an Incremental Learning for Regression Prediction strategy, which substantially enhances the model’s capacity to model long-term dependencies and adapt to spatial heterogeneity. Furthermore, the introduced incremental loss contributes to higher predictive accuracy under complex conditions.
Figure 4 illustrates the temporal trend of daily prediction errors across different methods. It is evident that our model achieves lower initial prediction errors after incorporating the feature selection module, suggesting that a well-designed feature coupling strategy can help the model focus on key variables early in training, thereby improving convergence efficiency. During heating days, baseline models suffer from rapidly increasing errors as the prediction step grows, especially under strong feature coupling scenarios, resulting in steep error gradients and degraded inference performance. On non-heating days with more stable consumption patterns, all models exhibit better overall performance, but ours still maintains a leading edge. To analyze the learning stability and convergence of the proposed model, we present the loss trajectories on the training and validation sets (see Figure 5).
Finally, we performed a sensitivity analysis on key factors affecting prediction accuracy. The results highlight that heating status (heating vs. non-heating days), feature coupling intensity, sequence volatility (e.g., holidays), and forecast horizon are the most influential variables. Our method effectively addresses these challenges through carefully designed feature selection and model architecture, thereby improving overall predictive performance.
(2) Analysis of prediction failures in the WNGD: This subsection analyzes SHAP visualizations based on real weather data collected in Wuhan from 1 January to 9 February 2025, in conjunction with model prediction errors for both the HDD and NHD. As illustrated in Figure 6, the prediction errors are primarily influenced by temperature, humidity, wind score, and precipitation. Specifically, for HDD prediction, the error tends to decrease with increasing atmospheric pressure, whereas for NHDs, the error increases with rising pressure and humidity. Furthermore, as shown in Table 4, the prediction errors from day 28 to day 35 exhibit higher stability compared to earlier periods, with average error values of 0.104 and 0.044 for HDDs and NHDs, respectively. These results suggest that features such as pressure, humidity, and time effectively support the regression performance of the proposed model. Notably, on day 28, the prediction errors for the HDD and NHD reached 0.115 and 0.048, which were 0.005 and 0.006 higher than those on day 27 when holiday-related features were not incorporated. Following the inclusion of holiday indicators, the errors gradually declined. This improvement can be attributed to two key mechanisms: (1) the weakly supervised cascad feature selection strategy that leverages auxiliary features for short-term regularization to mitigate erroneous predictions, and (2) the incremental loss optimization, which exploits historical prediction features to enhance long-term memory and decision-making capability. The synergy of these strategies enables the model to retain robustness and generalization performance even when encountering atypical or erroneous cases.

3.5. Ablation Study

(1) Effectiveness of the loss function: From Figure 7 and Figure 8, we can clearly observe that in short-term daily natural gas load forecasting, the MAPE gradient increases significantly more slowly with prediction time when using regression difference loss compared to not using it. This improvement is attributed to the regression difference loss working synergistically with the mean squared error loss to establish an efficient data correlation supervision mechanism. Additionally, an interesting phenomenon is observed: when using regression difference loss, the error values for different types of data (heating days/non-heating days) remain below 0.06 during the first 15 days (see Table 5) of prediction. In contrast, without regression difference loss, the error values consistently exceed 0.06. This further demonstrates that regression difference loss has a clear advantage in handling strongly coupled time-series data, enabling efficient supervised utilization of the data.
(2) Effectiveness of feature selection: As shown in Figure 9, we compare the MAPE trends before and after applying feature selection, highlighting the performance improvement brought by filtering out less informative features, with the change in the number of features, and the results of all features (All features) show a relatively obvious upward trend, especially when the number of features is large, where the results keep improving, while the results of HDDs and NHDs present different growth trends, respectively. The upward trend of HDDs is relatively more significant, while that of NHDs is more stable. Overall, the selected features have a more significant improvement effect on enhancing the prediction performance of HDDs.
(3) Effectiveness of adding future features: Observations from Figure 10 and Figure 11 reveal that after applying L1 features, as shown in Table 6, the improvement in model prediction accuracy is significant, particularly in heating day load forecasting. By introducing L1 features, the model better captures the trends in load variations. This is especially evident in the early stages of prediction, where errors decrease substantially, and fluctuations stabilize. In contrast, without feature selection, the error for heating days gradually increases with the number of prediction days, highlighting the model’s inadequacy in capturing trends during long-term forecasting. For non-heating days, the overall error remains low and stable, with minimal differences between the two cases. This indicates that the load variation is relatively small and less dependent on future features.
(4) Prediction comparison of weather features with different durations: From the Figure 12, it is evident that after incorporating weather features of varying durations, the average MAPE for heating days is significantly higher than that for non-heating days. Furthermore, as the duration of the included weather features increases, the error for both heating and non-heating days exhibits an upward trend, with the error growth being more pronounced for heating days. This indicates that weather features have a substantial impact on natural gas load forecasting for heating days, contributing to higher prediction complexity and uncertainty. Gas load on heating days is strongly influenced by weather factors such as temperature, humidity, and wind speed. As weather features evolve over time, they may introduce greater volatility, leading to an accumulation of errors. In contrast, natural gas load forecasting for non-heating days shows better stability and robustness, with lower errors that increase more gradually. The natural gas demand on non-heating days is relatively stable and less influenced by weather factors, resulting in lower prediction errors.
(5) Ablation study for the sensitivity of the adaptive feature sampling function (Equation (4)) with respect to the value of r: As shown in Table 7, the sensitivity analysis on the value of r reveals that when r < 0.5, the prediction error increases consistently with longer forecasting horizons for both HHDs and NHDs. Nevertheless, the overall trend indicates that increasing r generally leads to lower prediction errors. Notably, when r = 0.8 or r = 1.0, the prediction error increases compared to r = 0.5 and values below. The optimal performance is achieved when r = 0.5, yielding the lowest overall prediction error. These findings suggest that in adaptive feature sampling, too few features can reduce the model’s ability to capture feature interactions at the sample level, while excessive features introduce noise that hinders the model’s fitting capacity. This further confirms that an appropriate sampling ratio enhances the model’s understanding of sample data, thereby improving its generalization and predictive performance.

4. Conclusions

To effectively address the challenge of low accuracy in daily natural gas load forecasting, this paper proposes a feature-optimized and incremental LSTM-based prediction frame, grounded on a natural gas consumption dataset from Wuhan, a representative city in Central China. First, we utilize a Gaussian Mixture Model to discretely model anomalous and missing data, selecting specific data to enhance the model’s generalization and feature-awareness capabilities. Subsequently, to improve the understanding of coupled features within natural gas data, we incorporate sensitivity-aware mechanisms to capture distributional shifts. This strategy proves effective for continuous learning and adaptation in cross-regional migration and long-term deployment scenarios. In addition, a weakly supervised cascade network for feature selection was utilized, improving the transferability and robustness across multi-scale spatiotemporal domains. Finally, to further promote long-range data correlations, we introduce a regression difference loss to efficiently supervise the fitting data and expanding its practical applicability over wider spatial ranges. Beyond natural gas forecasting, the proposed method demonstrates strong versatility in other energy-related applications. In renewable energy scenarios, our model integrated with multimodal data (e.g., wind speed, solar irradiance, and device states) effectively addresses the strong volatility of wind and solar power generation, offering disaster-resilient predictions. In the smart grid context, feature selection enables lightweight deployment, while incremental forecasting supports millisecond-level responses to electricity price signals for real-time optimization. Moreover, in cross-domain applications, the weakly supervised cascad network quantifies feature contributions, enabling the construction of collaborative control platforms for temporal energy forecasting across different sectors.
Despite its outstanding performance on the Wuhan dataset, the generalizability of the proposed natural gas forecasting model is subject to several regional constraints. Factors such as the geographical location, climate conditions, population density, energy structure, user types (residential, industrial, and commercial), local policies, and real-time gas prices all significantly influence gas consumption patterns. For example, in colder regions such as Russia, Canada, or Northern Europe, winter gas demand is highly volatile and strongly seasonal. In contrast, in tropical coastal areas, natural gas is mainly used for commercial cooling or industrial processes, with less seasonal fluctuations. Therefore, localized adjustments in feature engineering and coupling strategies are necessary to ensure adaptability. In addition, variations in energy supply systems, market mechanisms, and user behaviors across countries introduce further modeling challenges. For instance, China’s tiered pricing system may induce abrupt changes in user demand, affecting the stationarity and predictability of the time series. To address these issues and improve model generalization, future work will incorporate additional multi-factor features (e.g., public holidays, heating policies, diurnal temperature range, and urbanization ratios) and employ regional normalization and dynamic feature weighting strategies to enhance the model’s capacity to understand complex local characteristics.
In summary, the proposed feature-optimized and incremental LSTM-based method achieves promising results on the current dataset and shows potential for wider application. Future research will focus on cross-regional validation, cross-domain extension, and real-world deployment to promote the method’s trustworthy application in broader energy forecasting scenarios.

Author Contributions

Conceptualization, H.W.; Methodology, Y.Z.; Writing—original draft preparation, H.W.; Writing—review and editing, X.G.; Visualization, Y.Y. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the Hunan Natural Science Foundation Project Department Union Fund, grant No. 2024JJ8327; the China National Science and Technology Major Project, grant No. 2024ZD1001003; the Tibet Autonomous Region Science and Technology Major Project, grant No. XZ202402ZD0001; the Open Fund of the National Engineering Laboratory for Digital Construction and Evaluation Technology of Urban Rail Transit, grant No. 2023ZH01; the Key Project of the Scientific Research Plan of the Hubei Provincial Department of Education, grant No. D20231304; and the Tianjin Science and Technology Plan Project, grant No. 23YFYSHZ00190 and No. 23YFZCSN00280.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The data presented in this study are available on request from the corresponding author.

Conflicts of Interest

Authors Huilong Wang and Ying Zhang were employed by the company Wuhan Jiyi Network Technology Co., Ltd. The remaining authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

Appendix A

In the appendix of this paper, we provide detailed descriptions of the comparative methods and the specific model parameters used in our proposed approach. Specifically, the appendix includes information on input and output dimensions, activation functions, individual model components, and the exact configurations of the hidden layers.
Table A1. Model configuration of the BP Neural Network.
Table A1. Model configuration of the BP Neural Network.
ModuleInput DimensionOutput DimensionParametersActivation Function
Input Layer[N, M][N, D]No trained parametersNone
Hidden Layer[N, D][N, H]Weights: [N, H]; bias: [H]ReLU
Hidden Layer[N, H][N, D]Weights: [N, D]; bias: [D]ReLU
Output Layer[N, H][N, P]Weights: [N, P];
bias: [P]
Linear
Symbol definitions:
NDHP
Batch size = 64Hidden output
Feature dimension: 32
Number of neurons in hidden layers: H = 64Output dimension: P = 1
Table A2. Model configuration of the Transformer Network.
Table A2. Model configuration of the Transformer Network.
ModuleInput DimensionOutput DimensionParameter
Input Embedding[N, T, M][N, T, d_model]Linear projection: [M→d_model]
Positional Encoding[N, T, d_model][N, T, d_model]Learnable positional embeddings
Multi-Head Attention[N, T, d_model][N, T, d_model]Heads: h; single-head dim: d_k = d_v = d_model/h;
weights: [d_model, h × d_k]
Feed-Forward Network[N, T, d_model][N, T, d_model]Hidden dim: d_ff = 4 × d_model;
Linear layer: d_model→d_ff→d_model
Layer Normalization[N, T, d_model][N, T, d_model]Normalization along the last dimension: d_model
Residual ConnectionInput + sublayer outputSame as inputElement-wise addition
Output Projection[N, T, d_model][N, T, P]Linear layer: [d_model→P]
Symbol definitions:
NTMd_Modelhd_ffP
Batch size = 64Sequence length (number of time steps)Input feature dimensionHidden dimension of the modelNumber of attention heads (default = 8)Hidden dimension of the feed-forward network (4 × d_model)Output dimension (P = 1)
Table A3. Model configuration of the TFT Network.
Table A3. Model configuration of the TFT Network.
Module NameInput DimensionsOutput DimensionsHidden LayerActivation Function
Variable Selection NetworkStatic: [N, S]; past: [N, T_past, C]; future: [N, S]Same as inputMLP: [S→64→32→S]GELU
Static Covariate EncoderStatic features: [N, S][N, 4 × d]MLP: [S→64→32→4 × d]GELU + LayerNorm
LSTM LayerPast features: [N, T_past, C]Hidden states: [N, T_past, d]Hidden units: d;
single-layer unidirectional
Tanh
Temporal Self-AttentionConcatenated features: [N, T_total, d]; T_total = T_past + T_featureAttention output: [N, T_total, d]Multi-head (4 heads);
Ker/value dim: d_k = d_v = d//4
Scaled dot-product
Gated Residual NetworkPrimary input: [N, T, d]Gated output: [N, T, d]FC layer: [d→64→32→d]
Skip Connection
GLU (gated linear unit)
Quantile PredictionFinal feature [N, T_feature, d][N, T_total, Q] (Q: number of quantiles)FC layer: [d→32→Q]Linear
Symbol definitions:
NSCKT_PastT_FeaturedQ
Batch size = 64Static feature dimension (e.g., temperature + holiday = 2)Past dynamic feature dimensionFeature dimensionHistorical time stepsForecast horizon (e.g., 7 days)Hidden dimension (default = 64)Q: number of quantiles
Table A4. Model configuration of the ours.
Table A4. Model configuration of the ours.
ModuleInput DimensionOutput DimensionParameter
Weakly Supervised Cascade Network Feature SelectionKey feature: [N, F]Selection of key feature: [N, M]Weight: [N, M];
bias: [M]
Input Layer[N, M][N, F]Weight: [N, F];
bias: [F]
LSTMLayer[N, F][N, 64]Weight: [N, 64];
bias: [64]
DropoutLayer[N, 64][N, 64]rate = 0.5
LSTMLayerOut[N, D][N, L]Weight: [N, L];
bias: [L];
D: (64→32→64); L = 64
Prediction HeadIncremental Learning for Regression Prediction (LSTMLayer + DropoutLayer)[N, L][N, T]L: (64→128→64);
T = 64
Dense Layer (n = 1)[N, T][N, 1]T: (64→32→1)
Dense Layer[N, L][N, 1]Activation = sigmoid
R×: number of network model structures.

References

  1. Looney, B. Statistical Review of World Energy globally consistent data on world energy markets and authoritative publications in the field of energy. Rev. World Energy Data 2021, 70, 8–20. [Google Scholar]
  2. Soldo, B. Forecasting natural gas consumption. Appl. Energy 2012, 92, 26–37. [Google Scholar] [CrossRef]
  3. Zhang, W.; Yang, J. Forecasting natural gas consumption in China by Bayesian model averaging. Energy Rep. 2015, 1, 216–220. [Google Scholar] [CrossRef]
  4. Yang, D.; Gao, X.; Yang, Y.; Jiang, M.; Guo, K.; Liu, B.; Li, S.; Yu, S. CSA-Net: Complex Scenarios Adaptive Network for Building Extraction for Remote Sensing Images. IEEE J. Sel. Top. Appl. Earth Obs. Remote Sens. 2024, 17, 938–953. [Google Scholar] [CrossRef]
  5. Cheng, X.; Han, K.; Xu, J.; Li, G.; Xiao, X.; Zhao, W.; Gao, X. SPFDNet: Water Extraction Method Based on Spatial Partition and Feature Decoupling. Remote Sens. 2024, 16, 3959. [Google Scholar] [CrossRef]
  6. Gao, X.; Zhang, G.; Yang, Y.; Kuang, J.; Han, K.; Jiang, M.; Yang, J.; Tan, M.; Liu, B.; Sensing, R. Two-Stage Domain Adaptation Based on Image and Feature Levels for Cloud Detection in Cross-Spatiotemporal Domain. IEEE Trans. Geosci. Remote Sens. 2024, 62, 1–17. [Google Scholar] [CrossRef]
  7. Vitullo, S.; Brown, R.H.; Corliss, G.F.; Marx, B.M. Mathematical models for natural gas forecasting. Can. Appl. Math. Q. 2009, 17, 1005–1013. [Google Scholar]
  8. Taboh, S.; Méndez-Díaz, I.; Zabala, P. Heuristics for home appliances scheduling problems with energy consumption bounds. Sustain. Energy Grids Netw. 2024, 39, 101511. [Google Scholar] [CrossRef]
  9. Pappas, S.S.; Ekonomou, L.; Karamousantas, D.C.; Chatzarakis, G.; Katsikas, S.; Liatsis, P. Electricity demand loads modeling using AutoRegressive Moving Average (ARMA) models. Energy 2008, 33, 1353–1360. [Google Scholar] [CrossRef]
  10. Ervural, B.C.; Beyca, O.F.; Zaim, S. Model estimation of ARMA using genetic algorithms: A case study of forecasting natural gas consumption. Procedia-Soc. Behav. Sci. 2016, 235, 537–545. [Google Scholar] [CrossRef]
  11. Ediger, V.Ş.; Akar, S. ARIMA forecasting of primary energy demand by fuel in Turkey. Energy Policy 2007, 35, 1701–1708. [Google Scholar] [CrossRef]
  12. Ding, J.; Zhao, Y.; Jin, J. Forecasting natural gas consumption with multiple seasonal patterns. Appl. Energy 2023, 337, 120911. [Google Scholar] [CrossRef]
  13. Fragalla, M.A.M.; Yan, W.; Deng, J.; Xue, L.; Hegair, F.; Zhang, W.; Li, G. Time Series Production Forecasting of Natural Gas Based on Transformer Neural Networks. Geoenergy Sci. Eng. 2025, 248, 213749. [Google Scholar] [CrossRef]
  14. Zhou, X.; Ye, J.; Zhao, S.; Jin, M.; Hou, Z.; Yang, C.; Li, Z.; Wen, Y.; Yuan, X. Towards Universal Large-Scale Foundational Model for Natural Gas Demand Forecasting. arXiv 2024, arXiv:2409.15794. [Google Scholar]
  15. Chen, Y.; Wang, H.; Li, S.; Dong, R. A novel grey seasonal model for natural gas production forecasting. Fractal Fract. 2023, 7, 422. [Google Scholar] [CrossRef]
  16. Lin, Z.; Xie, L.; Zhang, S. A compound framework for short-term gas load forecasting combining time-enhanced perception transformer and two-stage feature extraction. Energy 2024, 298, 131365. [Google Scholar] [CrossRef]
  17. Gao, X.; Yang, J.; Xie, X.; Yang, Y.; Wang, N.; Cao, X.; Du, B.; Tan, M.; Xu, L.; Kou, Y. DG2-TCR: An Adaptive Clouds Removal Network for Optical Remote Sensing Images Using SAR-Driven Dual-Flow Fusion Guidance. IEEE Trans. Geosci. Remote Sens. 2025, 63, 5619016. [Google Scholar] [CrossRef]
  18. Zhang, Y.; Yang, Y.; Gao, X.; Xu, L.; Liu, B.; Liang, X. Robust extraction of multiple-type support positioning devices in the catenary system of railway dataset based on MLS point clouds. IEEE Trans. Geosci. Remote Sens. 2023, 61, 1–14. [Google Scholar] [CrossRef]
  19. Fabbiani, E.; Marziali, A.; Nicolao, G.D. Forecasting residential gas demand: Machine learning approaches and seasonal role of temperature forecasts. Int. J. Oil Gas Coal Technol. 2021, 26, 202–224. [Google Scholar] [CrossRef]
  20. Bai, S.; Huang, X.; Luo, M.; Su, J. Deep hybrid models for daily natural gas consumption forecasting and complexity measuring. Energy Sci. Eng. 2023, 11, 654–674. [Google Scholar] [CrossRef]
  21. Rubio, G.; Pomares, H.; Rojas, I.; Herrera, L.J. A heuristic method for parameter selection in LS-SVM: Application to time series prediction. Int. J. Forecast. 2011, 27, 725–739. [Google Scholar] [CrossRef]
  22. Wekalao, J.; Baz, A.; Patel, S.K. Design and analysis of high-sensitivity hormone sensor with KNN behavior prediction for healthcare and biomedical applications. Measurement 2025, 242, 116172. [Google Scholar] [CrossRef]
  23. Bortnowski, P.; Matla, J.; Sierzputowski, G.; Włostowski, R.; Wróbel, R. Prediction of toxic compounds emissions in exhaust gases based on engine vibration and Bayesian optimized decision trees. Measurement 2024, 235, 115018. [Google Scholar] [CrossRef]
  24. Li, F.; Zheng, H.; Li, X.; Yang, F. Day-ahead city natural gas load forecasting based on decomposition-fusion technique and diversified ensemble learning model. Appl. Energy 2021, 303, 117623. [Google Scholar] [CrossRef]
  25. Baldacci, L.; Golfarelli, M.; Lombardi, D.; Sami, F. Natural gas consumption forecasting for anomaly detection. Expert Syst. Appl. 2016, 62, 190–201. [Google Scholar] [CrossRef]
  26. Gorucu, F.B. Evaluation and forecasting of gas consumption by statistical analysis. Energy Sources 2004, 26, 267–276. [Google Scholar] [CrossRef]
  27. Szoplik, J. Forecasting of natural gas consumption with artificial neural networks. Energy 2015, 85, 208–220. [Google Scholar] [CrossRef]
  28. Graves, A.; Graves, A. Long Short-Term Memory. In Supervised Sequence Labelling with Recurrent Neural Networks; Springer: Berlin/Heidelberg, Germany, 2012; pp. 37–45. [Google Scholar]
  29. Zheng, J.; Xu, C.; Zhang, Z.; Li, X. Electric load forecasting in smart grids using long-short-term-memory based recurrent neural network. In Proceedings of the 2017 51st Annual Conference on Information Sciences and Systems (CISS), Baltimore, MD, USA, 22–24 March 2017; pp. 1–6. [Google Scholar]
  30. Laib, O.; Khadir, M.T.; Mihaylova, L. Toward efficient energy systems based on natural gas consumption prediction with LSTM Recurrent Neural Networks. Energy 2019, 177, 530–542. [Google Scholar] [CrossRef]
  31. Kim, T.-Y.; Cho, S.-B. Predicting the household power consumption using CNN-LSTM hybrid networks. In Proceedings of the Intelligent Data Engineering and Automated Learning–IDEAL 2018: 19th International Conference, Madrid, Spain, 21–23 November 2018; pp. 481–490. [Google Scholar]
  32. Kim, T.-Y.; Cho, S.-B. Predicting residential energy consumption using CNN-LSTM neural networks. Energy 2019, 182, 72–81. [Google Scholar] [CrossRef]
  33. Dash, P.; Mishra, J.; Dara, S. Bidirectional cnn-lstm architecture to predict cnxit stock prices. J. Theor. Appl. Inf. Technol. 2024, 102, 72–81. [Google Scholar]
  34. Lai, G.; Chang, W.-C.; Yang, Y.; Liu, H. Modeling long-and short-term temporal patterns with deep neural networks. In Proceedings of the 41st International ACM SIGIR Conference on Research & Development in Information Retrieval, Ann Arbor, MI, USA, 8–12 July 2018; pp. 95–104. [Google Scholar]
  35. Lea, C.; Vidal, R.; Reiter, A.; Hager, G.D. Temporal convolutional networks: A unified approach to action segmentation. In Proceedings of the Computer Vision–ECCV 2016 Workshops, Amsterdam, The Netherlands, 8–10 and 15–16 October 2016; pp. 47–54. [Google Scholar]
  36. Huang, S.; Wang, D.; Wu, X.; Tang, A. Dsanet: Dual self-attention network for multivariate time series forecasting. In Proceedings of the 28th ACM International Conference on Information and Knowledge Management, Beijing, China, 3–7 November 2019; pp. 2129–2132. [Google Scholar]
  37. Na, X.; Jia, J.; Zhao, X.; Zhang, L.; Li, F. City natural gas load forecasting based on wavelet transform and LSTM model. Comput. Appl. Softw. 2021, 38, 61–66. [Google Scholar]
  38. Man, S.; Xialan, L.; Ting, X.; Wenjuan, X.; Bin, H. A new model for forecasting the short-term daily demand of urban natural gas. Nat. Gas Ind. 2018, 38, 128–132. [Google Scholar]
  39. Chen, T.; Guestrin, C. Xgboost: A scalable tree boosting system. In Proceedings of the 22nd Acm Sigkdd International Conference on Knowledge Discovery and Data Mining, San Francisco, CA, USA, 13–17 August 2016; pp. 785–794. [Google Scholar]
  40. La Malfa, E.; La Malfa, G.; Nicosia, G.; Latora, V. Deep Neural Networks via Complex Network Theory: A Perspective. arXiv 2024, arXiv:2404.11172. [Google Scholar]
  41. Wang, Y.; Du, T.; Guo, Y.; Dong, F.; Si, J.; Xu, M. A novel Kalman smoothing (Ks)−Long Short-Term Memory (LSTM) hybrid model for filling in short-and long-term missing values in significant wave height. Measurement 2025, 242, 115947. [Google Scholar] [CrossRef]
  42. Wu, L.; Zhong, Z.; Fang, L.; He, X.; Liu, Q.; Ma, J.; Chen, H. Sparsely annotated semantic segmentation with adaptive gaussian mixtures. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Vancouver, BC, Canada, 17–24 June 2023; pp. 15454–15464. [Google Scholar]
  43. Song, H.; Yang, Y.; Gao, X.; Zhang, M.; Li, S.; Liu, B.; Wang, Y.; Kou, Y. Joint classification of hyperspectral and LiDAR data using binary-tree transformer network. Remote Sens. 2023, 15, 2706. [Google Scholar] [CrossRef]
  44. Zhang, G.; Gao, X.; Yang, J.; Yang, Y.; Tan, M.; Xu, J.; Wang, Y. A multi-task driven and reconfigurable network for cloud detection in cloud-snow coexistence regions from very-high-resolution remote sensing images. Int. J. Appl. Earth Obs. Geoinf. 2022, 114, 103070. [Google Scholar] [CrossRef]
  45. Dai, T.-Y.; Niyogi, D.; Nagy, Z. CityTFT: A temporal fusion transformer-based surrogate model for urban building energy modeling. Appl. Energy 2025, 389, 125712. [Google Scholar] [CrossRef]
Figure 1. Overview of the proposed method.
Figure 1. Overview of the proposed method.
Sensors 25 03079 g001
Figure 3. LSTM model structure.
Figure 3. LSTM model structure.
Sensors 25 03079 g003
Figure 4. Comparison of predicted MAPEs across different forecast horizons between the proposed method and baseline approaches.
Figure 4. Comparison of predicted MAPEs across different forecast horizons between the proposed method and baseline approaches.
Sensors 25 03079 g004
Figure 5. The loss curve during the training of our method is presented, where the entire process is divided into four distinct phases (as illustrated in the figure). The lower subfigure highlights the final smoothing and fitting stage.
Figure 5. The loss curve during the training of our method is presented, where the entire process is divided into four distinct phases (as illustrated in the figure). The lower subfigure highlights the final smoothing and fitting stage.
Sensors 25 03079 g005
Figure 6. Visualization of the impact of input features on the prediction accuracy of HDDs and NHDs using SHAP.
Figure 6. Visualization of the impact of input features on the prediction accuracy of HDDs and NHDs using SHAP.
Sensors 25 03079 g006
Figure 7. MAPE trend with predict day using no incremental loss.
Figure 7. MAPE trend with predict day using no incremental loss.
Sensors 25 03079 g007
Figure 8. MAPE trend with predict day using our incremental loss.
Figure 8. MAPE trend with predict day using our incremental loss.
Sensors 25 03079 g008
Figure 9. Comparison of MAPE trends before and after including all features and after filtering out the selected features.
Figure 9. Comparison of MAPE trends before and after including all features and after filtering out the selected features.
Sensors 25 03079 g009
Figure 10. MAPE trend with predict day without adding L1 future date event features.
Figure 10. MAPE trend with predict day without adding L1 future date event features.
Sensors 25 03079 g010
Figure 11. MAPE trend with predict day by adding L1 future date event features.
Figure 11. MAPE trend with predict day by adding L1 future date event features.
Sensors 25 03079 g011
Figure 12. MAPE trend with predict day by different weather forecasting duration.
Figure 12. MAPE trend with predict day by different weather forecasting duration.
Sensors 25 03079 g012
Table 1. List of abbreviations.
Table 1. List of abbreviations.
CategoryExample
AcronymsLSTMLong Short-Term Memory
ARIMAAutoregressive Integrated Moving Average
SVMSupport Vector Machine
KNNK-Nearest Neighbors
ANNArtificial Neural Network
RNNRecurrent Neural Network
TCNTemporal Convolutional Network
MSTLMulti-Seasonal Time-series Decomposition
GMMGaussian Mixture Model
MAPEMean Absolute Percentage Error
BPBackpropagation Neural Network
HDDHeating Degree Day
NHDNon-Heating Day
TFTTemporal Fusion Transformer
Abbreviationset al.And others
Eq.Equation
SymbolsXInput feature
lFeature sequence length
Table 2. Different features at various levels (L1→L4, with each training dataset containing the features of the previous layer).
Table 2. Different features at various levels (L1→L4, with each training dataset containing the features of the previous layer).
Feature TypeFeatures Related to the Daily Natural Gas Load
Next date event (L1)TimeHolidaySpecial eventsSchool
Current date event (L2)TimeHolidaySpecial eventsSchool
Current monitoring features (L3)WeatherHumidityWind speedPrecipitationHeating status
Previous monitoring features (L4)Natural gas consumptionAir pressureHeat indexTemperature variationHumidity differenceWind difference
Table 3. Experimental model parameter settings.
Table 3. Experimental model parameter settings.
ModelHyperparametersSeed InitialTrain StrategyInput FeaturesDatasetLoss Functions
BP Neural NetworkBatch size: 64
Optimizer: Adam
Iteration: 5000
Init learning rate: 1 × 10−3
Decay rate: 1 × 10−2
1234Early stoppingTemperature, humidity, wind speed, atmospheric pressure, precipitation, time, and holidaysWNGDMSE loss
Transformer
TFTMSE loss + probabilistic loss
OursMSE loss + regression difference loss
Table 4. Quantitative MAPE results for comparative methods.
Table 4. Quantitative MAPE results for comparative methods.
MethodPredict Date12345678910
BP Neural NetworkHDD0.0660.1080.1580.1910.2210.2480.2970.3110.3270.358
NHD0.0410.0650.0700.0900.1520.0800.0830.0890.0930.103
Predict Date11121314151617181920
HDD0.3710.3950.3960.4080.4280.4350.4760.4850.5050.513
NHD0.1050.1100.1090.1110.1080.1220.1210.1240.1270.122
Predict Date21222324252627282930
HDD0.4870.5250.5340.5220.5410.5610.5730.5490.5940.587
NHD0.1160.1210.1270.1310.1270.1330.1250.1320.1310.148
Predict Date31323334353637383940
HDD0.5900.5980.6040.6280.6020.6100.6130.6250.6180.631
NHD0.1530.1500.1590.1690.1660.1690.1800.1860.1940.203
TransformerHDD0.03210.05520.06210.06830.06950.07120.07150.07770.08370.0872
NHD0.02950.03810.04330.04280.04640.05060.05270.05390.0580 0.0608
Predict Date11121314151617181920
HDD0.09280.09170.09590.09630.0950 0.10860.11780.12190.12190.1205
NHD0.06190.05850.06020.06190.06040.06330.07040.06460.06530.0651
Predict Date21222324252627282930
HDD0.12530.12350.12390.12250.11740.12940.13370.13860.14230.1373
NHD0.05040.05050.05010.04930.05070.04910.04940.05620.05010.0494
Predict Date31323334353637383940
HDD0.11740.11690.11350.11010.11890.11840.12470.11180.12630.1285
NHD0.05320.048330.04940.04970.04810.04950.04980.05180.05270.0544
TFTPredict Date12345678910
HDD0.02980.05260.05830.06410.06620.06790.06870.0740.07970.0789
NHD0.02720.03590.04110.04060.04390.04790.05010.05130.05510.0577
Predict Date11121314151617181920
HDD0.08860.08740.09150.09190.09060.10370.10380.11260.11640.1213
NHD0.05880.05550.05710.05880.05730.06120.06690.06130.06210.0618
Predict Date21222324252627282930
HDD0.11490.11960.11780.12310.11170.12360.12750.13240.13580.1312
NHD0.04770.04780.04740.04670.04810.04660.04680.05340.04750.0468
Predict Date31323334353637383940
HDD0.1120.11150.10830.10510.11360.11380.11920.10660.12040.1249
NHD0.05010.04580.04690.04720.04560.04710.04730.04920.05010.0516
Our networkPredict Date12345678910
HDD0.0260.0450.0500.0560.0570.0580.0590.0640.0690.072
NHD0.0240.0310.0350.0350.0400.0410.0430.0440.0480.050
Predict Date11121314151617181920
HDD0.0770.0750.0790.0790.0780.0900.0900.0980.1010.105
NHD0.0510.0480.0500.0510.0500.0520.0580.0530.0540.055
Predict Date21222324252627282930
HDD0.1000.1040.1020.1060.0970.1070.1100.1150.1180.114
NHD0.0410.0410.0430.0420.0440.0430.0420.0480.0430.042
Predict Date31323334353637383940
HDD0.0970.0960.0980.0950.1020.1020.1080.0960.1090.101
NHD0.0450.0420.0440.0440.0430.0440.0440.0460.0470.048
Table 5. Quantitative results by different loss functions.
Table 5. Quantitative results by different loss functions.
MethodPredict Date12345678910
No incremental lossHDD0.0590.0570.0550.0610.0580.0580.0650.0640.0600.063
NHD0.0540.0590.0630.0630.0580.0620.0640.0620.0580.062
Predict Date11121314151617181920
HDD0.0650.0630.0660.0610.0760.0740.0740.0850.0760.084
NHD0.0640.0550.0580.0690.0610.0690.0620.0600.0630.067
Predict Date21222324252627282930
HDD0.0890.0870.0830.0840.0830.0850.0900.0910.0850.114
NHD0.0530.0520.0550.0550.0540.0580.0610.0520.0560.065
Predict Date31323334353637383940
HDD0.0940.0970.0940.1020.0910.1040.0990.0990.1010.098
NHD0.0580.0610.0690.0590.0570.0580.0600.0500.0560.056
Our incremental lossPredict Date12345678910
HDD0.0260.0450.0500.0560.0570.0580.0590.0640.0690.072
NHD0.0240.0310.0350.0350.0400.0410.0430.0440.0480.050
Predict Date11121314151617181920
HDD0.0770.0750.0790.0790.0780.0900.0900.0980.1010.105
NHD0.0510.0480.0500.0510.0500.0520.0580.0530.0540.055
Predict Date21222324252627282930
HDD0.1000.1040.1020.1060.0970.1070.1100.1150.1180.114
NHD0.0410.0410.0430.0420.0440.0430.0420.0480.0430.042
Predict Date31323334353637383940
HDD0.0970.0960.0980.0950.1020.1020.1080.0960.1090.101
NHD0.0450.0420.0440.0440.0430.0440.0440.0460.0470.048
Table 6. Quantitative MAPE comparison results by adding L1 features.
Table 6. Quantitative MAPE comparison results by adding L1 features.
MethodPredict Date12345678910
No feature selectionHDD0.0260.0410.0510.0560.0640.0620.0610.0700.0730.073
NHD0.0270.0360.0420.0440.0460.0540.0460.0530.0520.052
Predict Date11121314151617181920
HDD0.0790.0820.0760.0800.0830.0910.0970.0970.1070.106
NHD0.0560.0560.0590.0580.0550.0550.0510.0530.0560.056
Predict Date21222324252627282930
HDD0.1160.1070.1100.1020.1030.1060.1150.1210.1070.105
NHD0.0420.0440.0450.0430.0450.0440.0420.0450.0440.044
Predict Date31323334353637383940
HDD0.1130.1040.0950.1040.1030.1070.1150.1050.1060.106
NHD0.0430.0430.0480.0460.0450.0460.0480.0550.0490.052
Our feature selectionPredict Date12345678910
HDD0.0270.0410.0530.0530.0570.0580.0580.0680.0690.071
NHD0.0280.0330.0410.0400.0420.0440.0450.0480.05000.053
Predict Date11121314151617181920
HDD0.0740.0750.0750.0740.0770.0950.0870.0930.1010.112
NHD0.0550.050.0530.0550.0560.0540.0550.0580.0540.056
Predict Date21222324252627282930
HDD0.1100.1020.0980.1020.1000.1050.1260.110.1110.102
NHD0.0410.0410.0430.0420.0420.0430.0430.0430.0450.043
Predict Date31323334353637383940
HDD0.1130.0950.0970.1040.1070.1100.1110.1060.1020.100
NHD0.0410.0410.0430.0460.0500.0450.0450.0430.0460.049
Table 7. Experimental results for the sensitivity of the adaptive sampling function with respect to r.
Table 7. Experimental results for the sensitivity of the adaptive sampling function with respect to r.
r0.10.20.30.40.5 (Ours)0.81.0
1HHD0.04360.03720.03080.02810.0630.03490.0462
NHD0.03920.03270.02740.02510.02410.03180.0415
2HHD0.07380.06310.05240.04890.06070.07940.0452
NHD0.05040.04210.03570.03320.03090.04190.0543
3HHD0.08350.07020.05890.05570.05030.06830.0881
NHD0.05810.04890.04130.03850.03550.04760.0612
4HHD0.09210.07940.06620.06180.00570.07650.0973
NHD0.05790.04890.04110.03890.03510.04740.0611
5HHD0.09540.08190.06870.06320.05690.07890.1012
NHD0.06530.05520.04680.04370.03990.05390.0691
6HHD0.09870.08530.07150.06510.05840.08140.1056
NHD0.06820.05780.04910.04590.04140.05640.0723
7HHD0.10020.08670.07280.06640.05880.08290.1078
NHD0.07070.05990.05110.04770.04310.05850.0751
8HHD0.10730.09210.07750.07190.06390.08830.1154
NHD0.07240.06140.05230.04890.04440.05990.0768
9HHD0.11460.09840.08290.07720.06890.09470.1231
NHD0.07790.06610.05640.05280.04770.06430.0821
10HHD0.11980.10370.08730.08150.07150.09920.1289
NHD0.08150.06930.05920.05540.06720.08570.0511
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Wang, H.; Gao, X.; Zhang, Y.; Yang, Y. Natural Gas Consumption Forecasting Model Based on Feature Optimization and Incremental Long Short-Term Memory. Sensors 2025, 25, 3079. https://doi.org/10.3390/s25103079

AMA Style

Wang H, Gao X, Zhang Y, Yang Y. Natural Gas Consumption Forecasting Model Based on Feature Optimization and Incremental Long Short-Term Memory. Sensors. 2025; 25(10):3079. https://doi.org/10.3390/s25103079

Chicago/Turabian Style

Wang, Huilong, Xianjun Gao, Ying Zhang, and Yuanwei Yang. 2025. "Natural Gas Consumption Forecasting Model Based on Feature Optimization and Incremental Long Short-Term Memory" Sensors 25, no. 10: 3079. https://doi.org/10.3390/s25103079

APA Style

Wang, H., Gao, X., Zhang, Y., & Yang, Y. (2025). Natural Gas Consumption Forecasting Model Based on Feature Optimization and Incremental Long Short-Term Memory. Sensors, 25(10), 3079. https://doi.org/10.3390/s25103079

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop