Interpretable Load Prediction Method Based on Neural Additive Model and Gradient Boosting Tree
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-08
- Publication Date
- 2026-08-14
AI Technical Summary
现有预测方法多以深度神经网络或单一梯度提升树为主,虽能实现一定拟合效果,但普遍存在明显局限
本发明将特征拆分为主效应与复杂交互集,兼顾线性可解释性与非线性拟合能力,有效捕捉历史负荷、气象、时间及资源配置等多维度因素的影响规律。改进神经加性模型可输出清晰形状函数与特征贡献值,实现主效应的直观量化解释;以第一阶段残差为目标引入梯度提升树修正,精准捕捉特征间复杂交互关系,大幅降低预测误差。整体方法在保证高预测精度的同时,通过特征归因、分层可解释分析完整呈现各因素对负荷的影响路径与贡献程度,解决传统黑箱模型不可解释、泛化性弱的问题。模型结构轻量化、计算效率高,可适配不同场景下的实时负荷预测需求,兼具实用性与可靠性。
Smart Images

Figure CN122332932B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of load forecasting technology, and in particular to an interpretable load forecasting method based on a neural additive model and gradient boosting tree. Background Technology
[0002] Load forecasting is a core support for power dispatch and supply-demand matching. It is influenced by multiple factors, including historical load, weather, calendar time, and resource allocation, leading to increasingly higher requirements for accuracy and interpretability. Existing forecasting methods mainly rely on deep neural networks or single gradient boosting trees, which, while achieving some fitting effect, generally have significant limitations.
[0003] Deep learning models are complex and black-box in structure, unable to provide feature contribution and impact mechanisms, thus failing to meet interpretability requirements. Traditional gradient boosting trees, while outputting feature importance, struggle to accurately characterize the monotonic and nonlinear trends of main effects and are inadequate for fitting high-dimensional sparse features. Furthermore, most methods fail to decouple load impact data from modeling, resulting in large prediction residuals and weak generalization ability. They cannot simultaneously balance prediction accuracy and model interpretability, making it difficult to support safe, stable, and refined power system scheduling decisions. Summary of the Invention
[0004] To address the aforementioned issues, this invention proposes an interpretable load prediction method based on a neural additive model and gradient boosting tree, achieving both high accuracy and high interpretability in load prediction, clearly revealing the multi-factor influence mechanism and effectively improving prediction stability.
[0005] To achieve the above objectives, the present invention adopts the following technical solution: In a first aspect, the present invention provides an interpretable load prediction method based on a neural additive model and a gradient boosting tree, comprising: Historical load, meteorological series, calendar time, and resource allocation data were used to construct a basic sample set, which was then divided into a main effect feature set and a complex interaction feature set. The main effect feature set is input into the improved neural additive model to obtain the first-stage features and fusion contribution values. The first-stage prediction residual is calculated based on the first-stage features and the actual load value. The second-stage enhancement input is constructed based on the fusion contribution value and the complex interaction feature set. The input gradient boosting tree is used to derive the corrected residual with the first-stage prediction residual as the target. Load forecasting results are obtained based on the first-stage characteristics and corrected residuals. Hierarchical interpretable analysis is then performed based on shape function, characteristic attribution, and load forecasting results.
[0006] Secondly, the present invention provides an interpretable load prediction system based on a neural additive model and a gradient boosting tree, comprising: The feature set partitioning module is configured to construct a basic sample set from historical load, meteorological sequence, calendar time and resource allocation data, and divide it into a main effect feature set and a complex interaction feature set. The first-stage processing module is configured to input the main effect feature set into the improved neural additive model to obtain the first-stage features and fusion contribution values. The second-stage processing module is configured to calculate the first-stage prediction residual based on the first-stage features and the actual load value, construct the second-stage enhancement input based on the fusion contribution value and the complex interaction feature set, input the gradient boosting tree, and derive the corrected residual with the first-stage prediction residual as the target. The interpretable analysis module is configured to obtain load forecast results based on the first-stage features and corrected residuals, and perform hierarchical interpretable analysis based on shape function, feature attribution, and load forecast results.
[0007] Thirdly, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the interpretable load prediction method based on a neural additive model and gradient boosting tree described in the first aspect.
[0008] Fourthly, the present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps in the interpretable load prediction method based on a neural additive model and gradient boosting tree described in the first aspect.
[0009] Compared with the prior art, the beneficial effects of the present invention are as follows: This invention decomposes features into main effects and complex interaction sets, balancing linear interpretability with nonlinear fitting capability, effectively capturing the influence patterns of multi-dimensional factors such as historical load, weather, time, and resource allocation. The improved neural additive model outputs clear shape functions and feature contribution values, achieving an intuitive quantitative interpretation of main effects. A gradient boosting tree correction is introduced, targeting the first-stage residuals, to accurately capture complex interactions between features and significantly reduce prediction errors. The overall method, while ensuring high prediction accuracy, fully presents the influence paths and contribution levels of each factor on the load through feature attribution and hierarchical interpretable analysis, solving the problems of uninterpretability and weak generalization of traditional black-box models. The model structure is lightweight and computationally efficient, adaptable to real-time load prediction needs in different scenarios, combining practicality and reliability.
[0010] Advantages of additional aspects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0011] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute a limitation thereof.
[0012] Figure 1 The main flowchart of an interpretable load prediction method based on a neural additive model and gradient boosting tree is provided for an embodiment of the present invention. Figure 2 This is a detailed flowchart of an interpretable load prediction method based on a neural additive model and gradient boosting tree, provided for an embodiment of the present invention.
[0013] Figure 3 This is a comparison diagram of the annual hourly load forecast and the actual value, and a partial enlargement diagram provided in an embodiment of the present invention; wherein, (a) is a comparison of the annual hourly load forecast and the actual value; and (b) is a comparison of the forecast and the actual value for a typical local period. Figure 4 The diagram shows the shape functions of the main effects output by the first-stage model provided in this embodiment of the invention; wherein, from top to bottom and from left to right, the sub-graphs represent the contributions of temperature, humidity, irradiance, wind speed, time period, month, weekday, holiday markers, total GDP, total added value, household expenditure, and export services, respectively. Figure 5 This is a stacked diagram illustrating the bidirectional contribution of main effect features provided in an embodiment of the present invention. Figure 6 This is a stacked illustration of the predicted composition based on contribution translation provided in an embodiment of the present invention; Figure 7 A global feature attribution summary diagram of the second-stage residual correction model provided in this embodiment of the invention; Figure 8 This is a local contribution decomposition diagram of the second-stage residual correction model provided in this embodiment of the invention at the peak load time. Detailed Implementation
[0014] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0015] With the continuous advancement of the construction of new power systems, power load is influenced by a variety of factors, including meteorological conditions and socio-economic changes, exhibiting significant nonlinear, periodic, time-varying, and complex coupled characteristics. Load forecasting results directly affect power system dispatch, reserve configuration, and safe and economical operation; therefore, there is an urgent need to develop power load forecasting methods that combine high accuracy and high reliability.
[0016] Existing load forecasting methods mainly include statistical methods, machine learning methods, and deep learning methods. Statistical methods are simple in structure and computationally efficient, but their ability to characterize high-dimensional influencing factors and complex nonlinear relationships is limited. Machine learning and deep learning methods can improve forecast accuracy, but they often have strong "black box" properties, making it difficult to reveal the mechanism by which each input factor affects the forecast result, resulting in low decision-making reliability in practical engineering scheduling. Especially in long-term continuous load forecasting scenarios, models that only pursue forecast accuracy but lack interpretability are difficult to meet the requirements of transparency and reliability for engineering applications.
[0017] In recent years, Neural Additive Models (NAMs) have been increasingly applied as white-box models for interpretable load forecasting due to their ability to learn the independent contribution relationships of individual input features to the output. These methods can individually characterize the independent influence of different factors on load changes through shape functions, thus improving the model's interpretability to some extent. However, existing load forecasting methods based on NAMs struggle to characterize the cross-coupling effects between different factors, and are insufficient in expressing historical load inertia, meteorological-derived variable coupling, higher-order nonlinear interactions, and complex residual structures. When load sequences are simultaneously affected by time-lag loads, different meteorological characteristics, and socioeconomic factors, a single additive model cannot simultaneously ensure interpretability and model complex relationships, resulting in large prediction errors and failing to meet high-standard engineering applications.
[0018] Based on this, this invention proposes an interpretable load prediction method, system, medium, and device based on a neural additive model and a gradient boosting tree. By improving the two-stage prediction framework that combines main effect modeling of the neural additive model with residual correction of the gradient boosting tree, the main effect information and complex interaction information during load change are modeled separately and conquerably. In the first stage, a vectorized neural additive model based on grouped convolution is used to learn the independent contribution relationship of main effect features to the load prediction result. In the second stage, the prediction residual from the first stage is used as the learning target, and the gradient boosting tree model is used to perform residual compensation learning on the complex interaction features and the contribution information from the first stage, thereby improving prediction accuracy while enhancing the interpretability of the prediction.
[0019] Example 1 like Figure 1 As shown, this embodiment discloses an interpretable load prediction method based on a neural additive model and gradient boosting tree, including the following steps: S1: Construct a basic sample set from historical load, meteorological series, calendar time, and resource allocation data, and divide it into a main effect feature set and a complex interaction feature set; S2: Input the main effect feature set into the improved neural additive model to obtain the first-stage features and fusion contribution values; S3: Calculate the first-stage prediction residual based on the first-stage features and the actual load value, construct the second-stage enhancement input based on the fusion contribution value and the complex interaction feature set, input the gradient boosting tree, and derive the corrected residual with the first-stage prediction residual as the target. S4: Based on the first-stage characteristics and corrected residuals, load forecast results are obtained, and hierarchical interpretable analysis is performed according to the shape function, characteristic attribution, and load forecast results.
[0020] Next, combined Figure 1 This embodiment provides a detailed description of an interpretable load prediction method based on a neural additive model and a gradient boosting tree.
[0021] Step S1: Obtain historical load data and influencing factor data, and perform preprocessing and feature set construction.
[0022] In this embodiment, historical load, meteorological sequences, calendar times, and resource allocation data are first acquired, and a basic sample set for load forecasting is formed according to a unified time index. Let the first... The historical load at each moment is The meteorological sequence is Calendar time characteristics are Resource configuration data is ,in Indicates the year. Then the original sample... It can be represented as: ; Furthermore, in order to convert the above data into input for a two-stage interpretable load forecasting model, this embodiment performs anomaly processing and missing data completion on historical loads, constructs historical load-derived features, calendar time features, meteorological-derived features, and socio-economic features, and further divides them into a main effect feature set and a complex interaction feature set.
[0023] The specific steps are as follows: Step S1.1: Obtain historical load, meteorological sequence, calendar time and resource configuration data.
[0024] Assume there are a total of For hourly samples, the historical load sequence can be represented as: ; The meteorological sequence can be represented as: ; In the formula, Indicates temperature; Indicates humidity; Indicates irradiance; Indicates wind speed.
[0025] Calendar time features can be extracted from timestamps: ; In the formula, Indicates the year; Indicates the month, with values from 1 to 12; Represents weekdays and weekends, with values ranging from 1 to 7; Indicates a time period, with values ranging from 1 to 24; Indicates the holiday status, with a value of 0 or 1.
[0026] Resource allocation data is annual data and can be represented as follows: ; In the formula, Indicates the GDP of the research region; Represents the total population; This represents the total number of unemployed people; This represents the average annual electricity price; Indicates the urbanization rate; Indicates the total increase; This represents household consumption expenditure; Indicates the export of services; This represents gross fixed capital formation. Resource allocation data is organized by year. Match it with the load sample at the corresponding time.
[0027] Step S1.2: Perform anomaly handling and missing data completion on historical loads.
[0028] Zero or obviously unreasonable values in the load sequence are considered abnormal load values and replaced with null values. Let the load value after anomaly handling be... Then it can be expressed as: ; For missing segments, linear interpolation is used to complete them. If and These are the missing points The complete historical load value is calculated based on the effective load observation points before and after the observation points: ; In the formula, This represents the complete historical load value; This represents the time interval between the missing point and the previous valid point. This represents the time interval between the missing point and the next valid point.
[0029] Step S1.3: Construct historical average load and lag characteristics based on historical load.
[0030] Historical load data are grouped and statistically analyzed based on month, week, and time period to construct historical average load characteristics. .set up Indicates the month. Indicates the day of the week. To represent a time period, then: ; In the formula, Indicates all that satisfy , , A collection of historical samples; This indicates the number of samples in the set.
[0031] For any time Its historical average load characteristics can be recorded as: ; Furthermore, to characterize the intraday and intraweek inertia of the load, 24-hour and 168-hour lag characteristics of the historical average load are constructed: ; ; In the formula, Used to characterize the inertia of daily cyclical loads; Used to characterize the inertia of cyclic loads.
[0032] In the field of power load forecasting, "inertia" usually refers to the continuous and periodic patterns of load evolution over time. This is because random fluctuations in power load constitute only a small portion; the majority is constrained by the patterns of human social activities. Human electricity consumption habits and social activities exhibit inertia and habit. For example, if a factory starts operating at 8 a.m. and stops at 6 p.m., with workers taking a two-hour break at noon, the load will show a pattern of rising at 8 a.m., decreasing at noon, and then rising again in the afternoon.
[0033] The interpretation of the above-mentioned lag characteristics is that the load at a certain moment today is related to the load at the same moment yesterday, which can be abstracted as daily cycle load inertia, corresponding to the daily work and rest cycle; the load at a certain moment today is also related to the load at the same moment a week ago, which can be abstracted as weekly cycle load inertia, corresponding to the production system cycle.
[0034] For example, as summer approaches, daytime temperatures rise significantly, leading to an earlier release of electricity demand for cooling during residents' daily routines, with many turning on their air conditioning equipment as early as 9 a.m. In contrast, the mild climate of spring and autumn means there is virtually no concentrated demand for cooling, resulting in a clear seasonal difference in electricity usage patterns.
[0035] Electricity load has significant temporal inertia characteristics. Daily cycle load inertia can reflect the continuity of residents' daily routines: if electricity consumption behaviors such as turning on the air conditioner occur at fixed times the previous day, similar electricity consumption habits are very likely to continue at the same time the next day, forming a daily electricity consumption pattern.
[0036] At the same time, social production activities fluctuate rhythmically, with significant differences in production and operation status between workdays and rest days. The operating hours and production load of enterprises will be adjusted according to the weekly work schedule. This pattern can be characterized by the inertia of weekly production load. The industrial production electricity consumption on rest days of the same week has a high degree of convergence.
[0037] In summary, daily and weekly load inertia quantitatively characterize the continuity of people's electricity consumption behavior from two dimensions: the daily routines of residents and the weekly production rhythm of society. Electricity consumption behavior inertia directly affects the regional power load change trend. The two are coupled together and can accurately depict the characteristics of daily residential electricity consumption and weekly industrial production electricity consumption.
[0038] Step S1.4: Construct derived features based on calendar time and meteorological sequence.
[0039] Construct holiday identification features based on calendar time: ; In the formula, Indicates the characteristics of holiday signs; Represents a timestamp.
[0040] Furthermore, a thermal comfort index is constructed based on temperature and humidity. The standard atmospheric pressure is set as follows: The humidity is Then the water vapor pressure It can be represented as: ; The saturated vapor pressure can be expressed as: ; then relative humidity It can be represented as: ; Thermal comfort index based on temperature and relative humidity : ; Furthermore, temperature-related features were constructed, including 24-hour and 72-hour rolling mean features of temperature, 24-hour rolling mean features of thermal comfort, and temperature squared features: ; ; ;
[0041] In the formula, , and Used to characterize the short-term cumulative effects of meteorological impacts; Nonlinear relationships used to characterize the effects of temperature.
[0042] Step S1.5: Divide the main effect feature set and the complex interaction feature set.
[0043] Temperature, humidity, irradiance, wind speed, month, day of the week, time of day, holiday identification features, and resource allocation features are divided into a set of main effect features, denoted as: ; In the formula, express The main effect eigenvector at time t.
[0044] Historical average load and 24-hour and 168-hour lag characteristics, thermal comfort index and 24-hour rolling mean characteristics, 24-hour and 72-hour rolling mean characteristics of temperature, and temperature square characteristics are divided into a complex interactive feature set, denoted as: ; In the formula, express Complex interactive feature vectors at any given time.
[0045] The division between the main effect feature set and the complex interaction feature set is primarily based on the degree of feature coupling. The main effect feature set corresponds to "atomic features" that are direct, independent, and often have simple trends in relation to the load; while the complex interaction feature set mainly reflects complex coupling characteristics such as historical evolution, time windows, and nonlinear superposition.
[0046] The core objective of this embodiment is to improve the overall interpretability of the model while ensuring the accuracy of power load forecasting. Based on this, this embodiment categorizes fundamental features with clear physical meaning and intuitive logic into the main effect feature set. This facilitates theoretical logical deduction and also echoes the subsequent example analysis. The variables within this feature set are independent and clearly defined, without multi-variable interaction or coupling interference, enabling a quantitative definition of the model's interpretability level. Simultaneously, a complex effect feature set is constructed to assist in accuracy optimization.
[0047] Step S2: Use the improved neural additive model to perform the first stage modeling of the main effect feature set.
[0048] In this embodiment, the following is constructed: Figure 2The vectorized neural additive model based on grouped convolution shown performs the first-stage modeling of the main effect feature set obtained in step S1. This model achieves parallel and independent modeling of the main effect features through channelized input, grouped convolution, residual convolution, and contribution value mapping. The specific steps are as follows: Step S2.1: Standardize the main effect feature set.
[0049] Let step S1 yield The main effect feature vector at time t is: ; In the formula, Indicates the number of main effect features; Indicates the first The main effect characteristics are in The value at time.
[0050] Standardize the main effect features: ; In the formula, Represents the standardized first Individual main effect characteristics; and They represent the first and second training sets, respectively. The mean and standard deviation of each main effect feature.
[0051] This yields the input matrix for the first-stage model: ; Step S2.2: Construct a vectorized neural additive model based on grouped convolution.
[0052] For the input vector Construct it into a channelized input tensor adapted for one-dimensional grouped convolution: ; In the formula, Each element corresponds to an independent input channel, which is used for subsequent grouped convolution mapping.
[0053] Considering that ordinary convolution mixes all input features together for computation, maintaining a typical "black box" model, it fails to achieve the goal of "interpretability." Therefore, this embodiment uses channelized grouped convolution to process the data, ensuring that each input feature undergoes convolution operation only within its own channel, guaranteeing the independence of each variable and preventing them from being coupled and mixed together. This follows the previous discussion of dividing the main effect feature set, ensuring that each feature is independent, direct, interpretable, and non-interactive and uncoupled.
[0054] Let the grouped convolution operator be And the number of groups is equal to the number of main effect features. Then the first layer feature mapping can be represented as: ; In the formula, This represents the parameters of the first-layer grouped convolution. Since the number of groups is consistent with the number of main effect features, each feature in the main effect feature set is mapped to an independent processing channel. Local feature extraction is performed on the feature sequence within each channel through a one-dimensional grouped convolution structure, ensuring that the spatial domain and feature domain remain independent of each feature during the mapping process. Each main effect feature is mapped only within its corresponding channel, thereby maintaining the decomposability of the contribution of each feature.
[0055] Step S2.3: Extract the main effect nonlinear features through the residual convolution structure.
[0056] Based on the initial grouped convolutional mapping, this embodiment introduces residual convolutional structures within each independent channel. Let the initial mapping result be... The residual convolution feature extraction process can then be represented as: ; ; In the formula, and Represents the convolution parameters in the residual convolution structure; This indicates normalization processing; This represents a nonlinear activation function. The above structure enhances the nonlinear fitting capability of the main effect features while maintaining the independence of the feature channels.
[0057] Step S2.4: Output the independent contribution values of each main effect feature.
[0058] Channel compression and contribution value mapping are performed on each independent channel of the residual convolution structure output to obtain the th... The main effect characteristics at time 1 Independent contribution value: ; In the formula, Indicates the first The independent contribution of each main effect feature to the first-stage prediction results; This represents the contribution mapping function, which consists of grouped convolution, residual connections, normalization, and nonlinear activation.
[0059] The independent contribution values of all main effect features constitute the contribution vector: ; In the formula, Used to generate the first-stage prediction results and as enhanced input information for the second-stage residual correction model.
[0060] Step S2.5: Additive polymerization yields the first-stage prediction results.
[0061] The independent contributions of each main effect feature are additively aggregated and then added to the model bias term to obtain the first-stage standardized prediction results: ; In the formula, This represents the standardized predicted value output by the first-stage improved additive neural model; This is the model bias term in the standardized space.
[0062] Step S3: Construct a gradient boosting tree residual correction model with the prediction residual of the first stage as the target.
[0063] In this embodiment, the prediction residual from the first stage is used as the learning objective to construct a second-stage gradient boosting tree residual correction model, which is used to compensate for the complex interaction information that was not fully characterized by the first-stage improved additive neural model. The specific steps are as follows: Step S3.1: Calculate the first-stage prediction residuals. In step S2, the first-stage improved additive neural model outputs standardized prediction results. The first-stage predicted load was obtained through inverse standardization. In the standardized space, the first-stage prediction residual can be expressed as: ; In the formula, express The standardized residuals at each time step.
[0064] The target load is standardized. ; In the formula, This represents the standardized actual load value; and These represent the mean and standard deviation of the training set load values, respectively.
[0065] In the dimensions of the actual load, the residual can also be expressed as: ; In the formula, Represents the residual in the true load dimension; This indicates the first phase of predicted load.
[0066] Step S3.2: Construct the second-stage enhanced input features.
[0067] Let the complex interaction feature vector obtained in step S1 be: ; In the formula, Indicates the number of complex interaction features; Indicates the first A complex interactive feature in The value at any given moment.
[0068] Standardize complex interaction features: ; In the formula, Represents the standardized first A complex interactive feature; and They represent the first and second training sets, respectively. The mean and standard deviation of a complex interactive feature.
[0069] Let the independent contribution vector of the main effect features output in step S2 be: ; The second-stage augmented input features can then be represented as: ; In the formula, express Time-standardized complex interaction feature vector ; express The augmented input features at time step 1. This augmented input simultaneously includes complex interaction features and information on the contribution of the first-stage main effects.
[0070] For all training samples, the augmentation input matrix and the residual learning objective are as follows: ; ; Step S3.3: Train the gradient boosting tree residual correction model.
[0071] In this embodiment, the second-stage residual correction model is implemented using a gradient boosting tree model; as a specific implementation, the gradient boosting tree model adopts the Light Gradient Boosting Machine (LightGBM) model. This model enhances the input features. As input, predict the residuals in the first stage. To output learning objectives.
[0072] Let the second-stage gradient boosting tree model be... ,Depend on If the regression trees are composed of 1000 trees, then the residual prediction function can be expressed as: ; In the formula, This represents the standardized residual correction result of the second-stage output; Indicates the first A regression tree; This represents the learning rate.
[0073] The model training objective can be expressed as: ; In the formula, This represents the residual prediction error loss function; Indicates the first The regularization term for each tree.
[0074] For regression tasks, the loss function takes the form of mean squared error: ; Step S3.4: Output the residual correction results.
[0075] In the prediction phase, for the time to be predicted First, construct the complex interaction feature vector according to step S1. And standardized according to the mean and standard deviation of the training phase, to obtain Simultaneously, the independent contribution vectors of the main effect features are obtained according to step S2. The two are then concatenated to form an enhanced input feature: ; The enhanced input features are input into the trained gradient boosting tree residual correction model to obtain the standardized residual correction result. The residual correction result under the true load dimension can be expressed as: ; In the formula, This represents the residual correction result in terms of the actual load dimensions.
[0076] Step S4: Merge the results of the first and second stages to obtain the final load prediction sequence.
[0077] In this embodiment, the first-stage prediction results and the second-stage residual correction results are fused to obtain the final load prediction sequence. The specific steps are as follows: Step S4.1: Integrate the prediction results of the first stage with the residual correction results of the second stage.
[0078] In step S2, the first-stage improved additive neural model outputs standardized prediction results. In step S3, the second-stage gradient boosting tree residual correction model outputs the standardized residual correction result. Therefore, the final standardized prediction result can be expressed as: ; In the formula, express The final standardized load forecast result at any given time.
[0079] The final standardized forecast results are then restored to the actual load dimensions to obtain the final load forecast value: ; In the formula, express The final load forecast at any given time.
[0080] If expressed in terms of actual load dimensions, the final prediction result can also be written as: ; Step S4.2: Generate the final load forecast sequence and evaluate its performance.
[0081] For including By dividing the prediction period into prediction periods for each prediction time and arranging the final prediction values for each time point in chronological order, the final load prediction sequence can be obtained.
[0082] ; Step S5: Perform hierarchical interpretable analysis based on shape function, feature attribution, and prediction decomposition results.
[0083] In this embodiment, a hierarchical interpretable analysis of the load forecasting process is performed based on the main effect contribution of the first stage, the residual correction attribution of the second stage, and the two-stage forecasting component results. The specific steps are as follows: Step S5.1: Construct the shape function of the main effect features.
[0084] In this embodiment, a shape function corresponding to each main effect feature is constructed based on the independent contribution values of each main effect feature output by the first-stage improved additive neural model.
[0085] Let the first The standardized input corresponding to each main effect feature is: Then its shape function can be expressed as: ; In the formula, Indicates the first The shape function of each principal effect feature in the standardized space.
[0086] Restoring the standardized eigenvalues to their original physical dimensions: ; Convert the contribution value in the standardized space to load dimensions: ; In the formula, Indicates the first The main effect characteristics take values of The independent contribution of time to the load forecast result, in MW.
[0087] In the specific implementation, let the first... Each main effect characteristic changes continuously within its range of values, and the corresponding contribution output is obtained, resulting in a shape function curve: ; In the formula, This indicates the number of sampling points used to draw the shape function.
[0088] Step S5.2: Generate the first-stage bidirectional contribution stacking interpretation diagram.
[0089] In this embodiment, a bidirectional contribution stacking interpretation diagram is generated based on the independent contribution values of each main effect feature at each time step. Let the... The main effect characteristics are in Load dimension contribution value at time 1 for: ; Furthermore, the contribution value is decomposed into positive and negative contribution components: ; ; In the formula, Indicates a positive contribution; This indicates a negative contribution.
[0090] Let the true dimensional bias term of the first-stage improved additive neural model be: ; Then As a baseline, positive contributions are accumulated upwards, and negative contributions are accumulated downwards, with the following accumulation boundaries: ; ; In the formula, Indicates the upper bound of cumulative positive contributions; This indicates the lower bound of the cumulative negative contribution.
[0091] Step S5.3: Generate a translation and stacking display diagram.
[0092] In this embodiment, to facilitate a visual representation of the predicted composition relationship, each contributing component is translated based on a reference, generating a translation stacking display diagram.
[0093] Let the first The main effect characteristics in the selected time interval The minimum contribution value is: ; Then the translated first The contribution components of each main effect can be expressed as: ; For the second-stage residual correction result, its minimum value is defined within the selected time interval: ; The residual correction components after translation are: ; To ensure that the stacked top after translation matches the final prediction, a translation base is defined: ; In the formula, This is an indicator function; it takes the value 1 when the minimum value of the residual correction result is less than 0, and 0 otherwise.
[0094] The top value of the translated stacked graph is: ; In the formula, express The top of the time-shifted stacked graph is summed to predict the value.
[0095] According to the conservation of translation, we know that: ; Step S5.4: Generate the second-stage global feature attribution summary diagram.
[0096] In this embodiment, based on the gradient boosting tree residual correction model trained in step S3, the SHAP method is used to perform global feature attribution analysis on the second-stage model. The input to the second-stage model is the enhanced input features: ; for At time t, the output of the second-stage model can be decomposed into: ; In the formula, This represents the baseline output of the second-stage model; Indicates the first A pair of enhanced input features The SHAP contribution value of the time-residual correction result; This represents the total number of enhanced input features.
[0097] No. The global attribution strength of each feature is: ; In the formula, Indicates the first The global contribution strength of each feature to the second-stage residual correction model.
[0098] Step S5.5: Generate a local SHAP contribution decomposition map for the predicted peak load time.
[0099] In this embodiment, the predicted peak time in the final load forecast sequence is selected for local SHAP contribution decomposition. Let the final forecast sequence be:
[0100] Then predict the peak load time It can be represented as:
[0101] For the enhanced input features corresponding to this peak time The output of the second-stage model can be decomposed into: ; In the formula, Indicates the first The local contribution of each feature to the residual correction result at the peak prediction time.
[0102] Furthermore, to verify the effectiveness of the two-stage interpretable load forecasting method based on an improved neural additive model and gradient boosting tree proposed in this embodiment, this section uses Greek national electricity load data for example analysis. The experimental data covers hourly load and related influencing factors from January 1, 2006 to December 31, 2025, with historical data from 2006 to 2024 used as model training samples and the full-year data of 2025 used as test samples.
[0103] To demonstrate the effectiveness of the method in this embodiment, EBM, NAM, LightGBM, and NAM-LightGBM are set as comparison models. EBM is used to characterize the predictive performance of additively interpretable ensemble models; NAM is used to characterize the predictive performance of single main-effect interpretable models; LightGBM is used to characterize the predictive performance of single gradient boosting tree models; and NAM-LightGBM is used to characterize the performance of two-stage residual correction models without the introduction of vectorized convolution improvements.
[0104] In terms of constructing the evaluation system, this embodiment uses the coefficient of determination. Mean absolute error (MAE) and mean absolute percentage error (MAPE) are used as performance evaluation metrics for prediction. Let the test set... The actual load at each moment is The predicted load is The total number of test samples is The actual average load is The indicators are defined as follows: ; ; ; In the formula, The MAE and MAPE values are used to characterize the model's ability to explain actual load fluctuations; the closer the value is to 1, the better the model's predictive performance. MAE and MAPE are used to quantify the mean absolute deviation and percentage level between the predicted load and the actual load; the smaller the value, the higher the model's predictive accuracy.
[0105] Using the above indicators, the prediction results of the method in this embodiment and each comparative method on the test set throughout 2025 were evaluated, and the calculation results are shown in Table 1.
[0106] Table 1. Comparison of performance indicators of each model in the annual load forecasting task for 2025;
[0107] As shown in Table 1, the method in this embodiment achieved the best forecasting performance in the annual load forecasting task for 2025. The MAE was 0.9534, the MAE was 201.11MW, and the MAPE was 3.50%, all of which were superior to the comparison methods. Compared with the NAM-LightGBM model, the MAE of the method in this embodiment was reduced from 250.19MW to 201.11MW, and the MAPE was reduced from 4.34% to 3.50%, indicating that the vectorized neural additive model based on grouped convolution can improve the fitting ability of the first-stage main effect nonlinear learning and improve the effect of the second-stage residual correction.
[0108] At the same time, such as Figure 3 As shown, the predicted load curve of the method in this embodiment has a high degree of fit with the actual load curve. It can accurately capture the temporal variation pattern of load on an annual scale and in typical periods, demonstrating excellent load forecasting performance.
[0109] To further verify the balance between prediction accuracy and interpretability achieved by the method in this embodiment, this embodiment statistically analyzes the magnitude ratio of the prediction results from the first-stage improved additive neural model to the residual correction results from the second stage. The percentage of the second-stage residual correction can be expressed as: ; The proportion of the main effect that can be explained in the first stage can be expressed as: ; Statistics show that in this embodiment, the magnitude of the residual correction in the second-stage gradient boosting tree accounts for 6.19%, while the interpretable main effect prediction portion undertaken by the first-stage improved neural additive model accounts for 93.81%. Therefore, the method in this embodiment does not primarily rely on the black-box residual correction model to improve prediction accuracy. Instead, based on the first-stage interpretable main effect model undertaking the main prediction task, it only utilizes the second-stage model to compensate for a small number of complex interactive residuals, thereby enhancing the interpretability of the overall prediction results while maintaining high prediction accuracy.
[0110] Furthermore, this embodiment uses... Figures 4 to 8 The interpretability of the model is verified. Figure 4 The main effect feature shape function generated by the first-stage improved neural additive model is shown to illustrate the independent influence of basic features such as meteorological sequences, calendar time, and socioeconomic factors on load forecasting results. Figure 5 By preserving the positive and negative directions of the contribution values of each main effect feature through a bidirectional contribution stacking plot, the enhancement or suppression effects of different features on the time series can be explained. Figure 6 The composition and structure of the prediction results are presented intuitively through a translational and stacked display diagram; Figure 7 The global feature attribution distribution of the second-stage gradient boosting tree residual correction model is shown based on the SHAP method, which is used to reveal the overall impact of complex interaction features and the contribution information of the first stage on residual correction. Figure 8 Further local SHAP contribution decomposition is performed on the predicted peak load time to explain the formation of the residual correction results at a specific time.
[0111] The above indicators and comparison results show that the method of this embodiment not only... It outperforms the comparison models in terms of MAE and MAPE, and can reveal the formation process of the prediction results from multiple levels such as main effect shape function, time series contribution decomposition, global residual attribution and local sample interpretation, thus achieving a unity of prediction accuracy and model interpretability.
[0112] Example 2 This embodiment provides an interpretable load prediction system based on a neural additive model and gradient boosting tree, including: The feature set partitioning module is configured to construct a basic sample set from historical load, meteorological sequence, calendar time and resource allocation data, and divide it into a main effect feature set and a complex interaction feature set. The first-stage processing module is configured to input the main effect feature set into the improved neural additive model to obtain the first-stage features and fusion contribution values. The second-stage processing module is configured to calculate the first-stage prediction residual based on the first-stage features and the actual load value, construct the second-stage enhancement input based on the fusion contribution value and the complex interaction feature set, input the gradient boosting tree, and derive the corrected residual with the first-stage prediction residual as the target. The interpretable analysis module is configured to obtain load forecast results based on the first-stage features and corrected residuals, and perform hierarchical interpretable analysis based on shape function, feature attribution, and load forecast results.
[0113] Example 3 This embodiment provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps in the interpretable load prediction method based on a neural additive model and gradient boosting tree as described in Embodiment 1 above.
[0114] Example 4 This embodiment provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps in the interpretable load prediction method based on a neural additive model and gradient boosting tree as described in Embodiment 1 above.
[0115] The steps or modules involved in Embodiments 2 to 4 above correspond to those in Embodiment 1. For specific implementation details, please refer to the relevant description section of Embodiment 1. The term "computer-readable storage medium" should be understood as a single medium or multiple media including one or more instruction sets; it should also be understood as including any medium capable of storing, encoding, or carrying an instruction set for execution by a processor and enabling the processor to perform any of the methods in this invention.
[0116] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. An interpretable load prediction method based on a neural additive model and gradient boosting tree, characterized in that, include: Historical load, meteorological sequence, calendar time, and resource allocation data are used to construct a basic sample set, which is then divided into a main effect feature set and a complex interaction feature set. Specifically, historical load data, meteorological sequence data, calendar time data, and resource allocation data are obtained based on time indexes; historical average load characteristics are constructed based on time nodes for historical loads, and lag characteristics are constructed based on time inertia; the time inertia refers to the persistence and periodicity of load evolution over time; holiday identification features are constructed based on calendar time; thermal comfort indices and temperature-related features are constructed based on meteorological sequences; meteorological sequence data, calendar time data, resource allocation data, and holiday identification features are divided into a main effect feature set; historical load data, lag characteristics, thermal comfort indices, and temperature-related features are divided into a complex interaction feature set. The main effect feature set is input into the improved neural additive model to obtain the first-stage features and fusion contribution values. Specifically, the main effect feature set is standardized and grouped using a one-dimensional grouped convolution, which serves as the input vector. This input vector is then input into the improved neural additive model. Through the grouped convolution operator, each feature in the main effect feature set is mapped to an independent processing channel. Local feature extraction is performed on the feature sequences within each channel using a one-dimensional grouped convolution structure to obtain the first-layer feature mapping for each channel. Residual features are obtained through residual convolution and mapped to independent contribution values. The independent contribution values of all channels are fused to obtain the fusion contribution value, and additive aggregation is performed on all independent contribution values to obtain the first-stage features. Specifically, the independent contribution values of all main effect features constitute the fusion contribution value. ; in, For independent contribution value, Used to generate the first-stage prediction results and as enhanced input information for the second-stage residual correction model; The independent contributions of each main effect feature are additively aggregated and then added to the model bias term to obtain the first-stage standardized prediction results: ; in, For the first The main effect characteristics at time 1 Independent contribution value, The standardized predicted value of the output of the first-stage improved additive neural model is called the first-stage feature. The model bias term in the standardized space; The first-stage prediction residual is calculated based on the first-stage features and the actual load value. The second-stage enhancement input is constructed based on the fusion contribution value and the complex interaction feature set, and the input gradient boosting tree is used to derive the corrected residual with the first-stage prediction residual as the target. Specifically, let the complex interaction feature vector be: ; in, Indicate the number of complex interaction features; standardize the complex interaction features: ; in, Represents the standardized first A complex interactive feature; Indicates the first A complex interactive feature in The value at time; and They represent the first and second training sets, respectively. The mean and standard deviation of each complex interaction feature; let the independent contributions of all main effect features constitute the fusion contribution: ; The second-stage augmented input features are then represented as: ; In the formula, express Time-standardized complex interaction feature vector ; express The enhanced input features at each time step; the enhanced input simultaneously includes complex interaction features and the contribution information of the first-stage main effect; Based on the first-stage features and corrected residuals, load forecast results are obtained. A hierarchical interpretable analysis is then performed based on the shape function, feature attribution, and load forecast results. Specifically, based on independent contribution values, shape functions corresponding to each main effect feature are constructed; based on the independent contribution values of each main effect feature at each time step, a two-way contribution stacking interpretation diagram is generated; specifically, let the first... The main effect characteristics are in Load dimension contribution value at time 1 for: ; In the formula, The standard deviation of the training set load values is represented by the standard deviation of the training set load values. Indicates the first The independent contributions of each main effect feature to the first-stage prediction results; the contribution values are decomposed into positive and negative contribution components: ; ; in, Indicates a positive contribution; Indicates negative contribution; let the true dimensional bias term of the first-stage improved additive neural model be: ; in, The mean of the training set load values is represented by... As a baseline, positive contributions are accumulated upwards, and negative contributions are accumulated downwards, with the following accumulation boundaries: ; ; in, Indicates the number of main effect features. Indicates the upper bound of cumulative positive contributions; Indicates the lower boundary of cumulative negative contributions; performs a baseline translation on each contribution component to generate a translation stacking display diagram; specifically, let the first... The main effect characteristics in the selected time interval The minimum contribution value is: ; Then the translated first The contribution components of each main effect are expressed as follows: ; For the second-stage residual correction result, its minimum value is defined within the selected time interval: ; in, This represents the residual correction result in terms of the actual load dimensions; its shifted residual correction components are: ; To ensure that the stacked top after translation matches the final prediction, a translation base is defined: ; in, The indicator function takes the value 1 when the minimum value of the residual correction result is less than 0, and 0 otherwise; therefore, the top value of the translation stacked plot is: ; in, express The top of the time-shifted stacked graph is summed to predict the value.
2. The interpretable load prediction method based on a neural additive model and gradient boosting tree as described in claim 1, characterized in that, The calculation of the first-stage prediction residual based on the first-stage features and the actual load value specifically includes: obtaining the first-stage prediction load by inverse standardization based on the first-stage features, and obtaining the first-stage prediction residual based on the first-stage prediction load and the actual load value.
3. The interpretable load prediction method based on a neural additive model and gradient boosting tree as described in claim 1, characterized in that, The process of deriving the corrected residual based on the first-stage prediction residual specifically includes: inputting the second-stage enhancement input into the gradient boosting tree, obtaining the prediction residual based on the first-stage prediction residual, and obtaining the corrected residual based on the prediction residual and the actual load value.
4. The interpretable load prediction method based on a neural additive model and gradient boosting tree as described in claim 1, characterized in that, The process of obtaining load forecasting results based on the first-stage characteristics and corrected residuals specifically includes: obtaining standardized load forecasting results based on the first-stage characteristics and corrected residuals, restoring them to the true load dimensions, and obtaining the load forecasting results.
5. An interpretable load prediction system based on a neural additive model and gradient boosting tree, characterized in that, An interpretable load prediction method based on a neural additive model and gradient boosting tree as described in claim 1 includes: The feature set partitioning module is configured to construct a basic sample set from historical load, meteorological sequence, calendar time and resource allocation data, and divide it into a main effect feature set and a complex interaction feature set. The first-stage processing module is configured to input the main effect feature set into the improved neural additive model to obtain the first-stage features and fusion contribution values. The second-stage processing module is configured to calculate the first-stage prediction residual based on the first-stage features and the actual load value, construct the second-stage enhancement input based on the fusion contribution value and the complex interaction feature set, input the gradient boosting tree, and derive the corrected residual with the first-stage prediction residual as the target. The interpretable analysis module is configured to obtain load forecast results based on the first-stage features and corrected residuals, and perform hierarchical interpretable analysis based on shape function, feature attribution, and load forecast results.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps in the interpretable load prediction method based on a neural additive model and gradient boosting tree as described in any one of claims 1-4.
7. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps in the interpretable load prediction method based on a neural additive model and gradient boosting tree as described in any one of claims 1-4.
Citation Information
Patent Citations
Knowledge distillation and time self-attention additive neural network-based interpretable load prediction method
CN121529508A
Optimizing care management interventions using predictive models
US20260004936A1