Abstract
Accurate power load forecasting is a prerequisite for optimizing energy allocation, aligning campus electricity supply with demand, and mitigating carbon emissions in campus integrated energy systems. To improve campus load forecasting accuracy and support low-carbon energy dispatch, this study proposes an IRDOA-DSR-Transformer-based carbon reduction framework for campus Integrated Energy System (IES). First, input features related to uncertain student behaviors, including campus electric vehicle charging records, temporal characteristics, and environmental variables, are compressed using Uniform Manifold Approximation and Projection (UMAP). The dimensionality reduction process preserves environmentally sensitive data structures while filtering redundant noise, thereby enhancing feature quality for subsequent forecasting and carbon-reduction analysis. Second, a dynamic sparse routing gate mechanism is introduced to adaptively emphasize critical electricity-use periods, especially environmentally sensitive intervals such as overnight charging. This mechanism strengthens the model’s capability to capture multi-scale temporal dependencies and mitigates the limitations of conventional Transformers in identifying key load patterns, reducing dispatch inefficiencies and emission increases caused by forecasting errors. Finally, an improved Inheritance Reorganization Dhole Optimization Algorithm is used to optimize the model’s hyperparameters. Experimental results show that the proposed method achieves a maximum goodness-of-fit coefficient of 98.41% and reduces Root Mean Square Error (RMSE) by up to 50% relative to benchmark models. Under identical dispatch logic, the method lowers campus carbon emissions by approximately 3.9%–7.3%, demonstrating both forecasting advantages and practical carbon-reduction potential.
1 Introduction
With the advancement of smart campus development and the gradual integration of distributed renewable energy sources, the operational mode of campus power systems is undergoing profound transformation (; ). Campus power systems are not only major energy consumers but also significant sources of carbon emissions. Accurate forecasting of campus power load provides a theoretical basis for optimizing power dispatch and rationally allocating distribution resources, while also effectively reducing inefficient energy consumption and associated pollutant emissions, thereby offering critical technical support for the establishment of green and low-carbon campuses (; ). However, campus electricity demand is heavily influenced by the inherent uncertainty of student behaviors—such as irregular electric vehicle charging, fluctuating campus presence due to course schedules and holidays, and spontaneous activity changes—which introduces significant temporal variability and randomness into the load profile. As argued in , the uncertainty of renewable energy generation further complicates the regulation of the power supply-demand balance on campus. From an environmental perspective, forecasting inaccuracies caused by these uncertainties tend to induce supply-demand mismatches, which in turn increase reserve capacity redundancy and lead to substantial energy waste and associated carbon emissions. Therefore, precisely modeling the impacts of student behavior uncertainty and achieving high-accuracy campus power load forecasting is of vital practical significance for real-time supply-demand balance and advancing energy saving and emission reduction goals.
With the deepening development of smart campuses and the continual growth in electricity demand from faculty and students, precise campus power load forecasting has become pivotal for optimizing campus energy management. Numerous researchers have explored various methods to improve forecasting accuracy. Based on the prediction timescale, campus power load forecasting models can be categorized into four types: (1) Ultra-short-term load forecasting models, which predict load fluctuations in the next few minutes and are crucial for ensuring stable campus power supply (); (2) Short-term load forecasting models, which forecast load variations from 1 h up to 1 week ahead and play a key role in campus power dispatch and maintenance scheduling (); (3) Medium-term load forecasting models, which predict load demands from 1 week to several months ahead, supporting semester-based electricity planning and energy consumption budgeting; (4) Long-term load forecasting models, which forecast load requirements from several months to years, aiding in campus power infrastructure expansion and green energy integration planning (; ). Among these, short-term load forecasting is a critical technique for predicting near-term energy demand and holds direct implications for real-time carbon reduction.
Based on forecasting mechanisms, load forecasting models can be broadly classified into four categories: physical models, traditional statistical models, artificial intelligence models, and hybrid models. Constructing physical forecasting models typically involves an in-depth analysis of the intrinsic relationships between historical data and key physical parameters (). Common physical forecasting methods include the unit consumption method, elasticity coefficient method, and load density method (). For instance, proposed a turbine blade row multiphysics forecasting model based on a physical-information-enhanced Fourier neural operator that integrates partial physical knowledge to improve prediction accuracy. However, this model suffers from lengthy mesh generation times for complex geometries. Similarly, embedded a lithium battery physical model within a neural network to jointly estimate the state of health and state of charge, improving the model’s interpretability; nevertheless, challenges related to parameter identification caused by battery polarization effects remain unresolved. Furthermore, physical models generally rely heavily on domain-specific expertise, resulting in high costs for data acquisition and model development (). From an environmental standpoint, such models often lack the flexibility to adapt to dynamic behavioral patterns, limiting their ability to reduce prediction-induced energy waste.
Unlike the construction approach of physical models, traditional statistical models focus on identifying patterns of load variation over time from historical data. These models rely on inherent statistical regularities within the data to analyze the past and predict the future, providing practical solutions for short-and medium-term load forecasting (). Common models include the autoregressive model (), autoregressive moving average model (), and autoregressive integrated moving average model (; ), which are typical tools in time series forecasting. proposed a hybrid load forecasting model that integrates a multilayer perceptron with statistical methods, improving accuracy in medium-to long-term load prediction and alleviating average convergence issues; however, it struggles with handling long-term anomalous data. combined Bagging with ARIMA and exponential smoothing to enhance the accuracy of electricity consumption forecasts across multiple countries. Nonetheless, generating numerous bootstrap samples increases computational cost and results in lower efficiency when processing ultra-large datasets. introduced the spARIMA model, which improves robustness against noisy data but demonstrates limited adaptability to complex trend time series. However, campus power load exhibits strong dynamics and randomness due to factors such as class schedules and holiday switches, embedding complex nonlinear characteristics within the load data. Most traditional statistical models assume linearity, making it difficult to fully capture such nonlinear fluctuations, thereby limiting their forecasting performance. This limitation is particularly consequential in environmental terms, as nonlinear load variations—especially during peak periods—are precisely where prediction errors lead to the greatest energy waste.
With the rapid advancement of computer science, artificial intelligence models have been widely employed in the field of load forecasting due to their ability to accurately model nonlinear features in time series data and achieve high-precision predictions. Deep learning, leveraging complex neural network structures, enables adaptive learning and processing of nonlinear data, bringing new opportunities for optimizing campus power load forecasting models. This has driven the rapid development of deep learning models in recent years. For instance, applied recurrent neural networks to load forecasting tasks, taking into account the periodic characteristics of time series data such as power loads. However, RNNs often encounter issues with vanishing or exploding gradients when handling long sequences. To address this problem, and applied Long Short-Term Memory and Gated Recurrent Unit, which are variants of RNN, to similar forecasting scenarios. These models improve the modeling of long-term dependencies through gating mechanisms. Despite these improvements, both models still exhibit strong dependence on the distribution of input data, showing limited generalization capabilities when faced with distribution shifts or anomalous fluctuations. Innovatively, introduced the Transformer architecture into time series forecasting tasks. By leveraging the self-attention mechanism, it overcomes the sequence dependency limitations inherent in recurrent networks and demonstrates superior global feature extraction and data adaptability in long-sequence prediction. This effectively enhances the accuracy of load forecasting. Given the clear limitations in generalization and robustness of single prediction models in complex and dynamic real-world applications, some studies have suggested the development of hybrid models to integrate the strengths of different approaches. Research consistently shows that such hybrid models typically outperform single models in terms of prediction accuracy (; ). For example, proposed a hybrid model combining Convolutional Neural Networks and Long Short-Term Memory, with results indicating that this model can simultaneously capture spatial local features and long-term temporal dependencies, significantly improving prediction accuracy. introduced a novel three-stage short-term forecasting method that integrates similar day optimization, multi-level signal processing, and hybrid prediction techniques. Experimental results demonstrate that this method effectively extracts multi-scale features from meteorological and historical power data, leading to enhanced prediction accuracy and robustness. Despite these advances, most existing load forecasting models, including deep learning approaches, are designed based on generic building load patterns and do not explicitly account for the unique behavioral uncertainties of campus occupants—particularly student-driven electricity consumption patterns. As a result, these models often fail to precisely capture the critical load fluctuations during periods of high environmental sensitivity (e.g., overnight electric vehicle charging peaks or holiday transitions), leaving untapped potential to reduce energy waste and carbon emissions through more accurate and behavior-aware predictions.
More recently, a growing body of research has specifically targeted campus/microgrid environments or electric vehicle charging scenarios with advanced deep learning architectures. proposed a hybrid LSTM-RNN model for consumption pattern forecasting in a university microgrid, employing K-means clustering to identify distinct load profiles and improve prediction accuracy to as high as 96.4%. Despite its effectiveness, this method relies on static clustering and does not dynamically adapt to the continuous uncertainties introduced by student behaviors such as irregular EV charging. developed a hybrid Transformer-TCN-GRU architecture for thermal load forecasting on a large university campus, leveraging 8 years of steam demand data and weather parameters to achieve a coefficient of determination of 0.96. However, it focuses exclusively on thermal loads and does not account for the stochastic electrical demand driven by occupant activities. In the domain of EV charging, introduced a two-stage hierarchical clustering and Transformer-BiLSTM hybrid framework that captures spatiotemporal variability in charging loads with notable reduction in MAE and RMSE. While effective, it categorizes user behavior into discrete clusters and does not explicitly model the fine-grained, continuous uncertainty arising from individual student schedules and mobility patterns. These recent studies highlight the increasing adoption of Transformer-based hybrids in energy forecasting, yet they collectively reveal a common limitation: they treat behavioral factors as either external static inputs or post hoc clusters, without an integrated mechanism to quantify and embed student behavior uncertainty directly into the forecasting model or to link such uncertainty to carbon emission outcomes.
In a comprehensive analysis of existing electric load forecasting methods, this study identifies several unresolved challenges in using deep learning models for campus load forecasting, particularly when facing the uncertainty of student behavior and its environmental implications. First, despite extensive research focusing on improving forecasting accuracy, current models inadequately characterize the importance of features at different time steps within load sequences. Because student-induced loads—such as electric vehicle charging demand—are highly intermittent and concentrated in specific periods, failure to capture these crucial trend nodes results in significant prediction errors during high-demand periods, which disproportionately amplify energy waste and associated carbon emissions. Second, when dealing with complex temporal dependencies introduced by diverse student activity patterns (e.g., class schedules, on-campus events, vacation cycles), the attention mechanisms of existing models often employ an indiscriminate weighting approach across all time steps. This uniform treatment makes it difficult to filter out core features with high predictive value from redundant information, thereby limiting the model’s ability to adapt to the non-linear and stochastic nature of student behavior and restricting further improvements in prediction accuracy and environmental benefits. Moreover, optimizing the computational resources of these models to efficiently extract multi-scale temporal features from load sequences, while balancing performance and computational cost across different student behavior scenarios, requires in-depth research and exploration.
Unlike existing studies that largely overlook the role of student behavior uncertainty in campus load forecasting, this research directly addresses this gap by integrating student behavior features into the forecasting model and quantifying the associated carbon reduction effects. The present study proposes an IRDOA-DSR-Transformer-based carbon reduction method for campus integrated energy systems, specifically designed to address the challenges posed by student behavior uncertainty and to enhance both prediction accuracy and the resulting environmental benefits. The model first preprocesses the power load time series data to retain multi-scale temporal features and intrinsic dependencies. It then improves the traditional Transformer architecture by introducing a dynamic sparse routing gate, enabling adaptive selection and focusing on key period features—particularly those periods with high environmental sensitivity, such as overnight charging intervals. Next, the model utilizes an inheritance reorganization dhole optimization algorithm to optimize the core parameters, enhancing the algorithm’s convergence performance and global search capability to avoid local optima. Finally, the collaborative interaction of all modules completes the campus load forecasting task. The main innovations and contributions of this study are reflected in the following aspects:
A UMAP-based feature dimensionality reduction technique is developed to effectively manage high-dimensional, complex student behavior data (including electric vehicle charging records, temporal features, and campus schedules). This method preserves essential structures related to environmentally sensitive load patterns while removing redundant noise, thereby enabling the model to better capture the impact of behavior uncertainty and minimize prediction errors during critical periods, contributing to reduced energy waste.
An IRDOA-DSR-Transformer-based carbon reduction method for campus integrated energy systems is proposed. After extensively mining multi-scale dependencies in power load time series data, this model employs dynamic sparse routing gate mechanisms to achieve adaptive selection and focusing on critical temporal features—particularly those driven by student behavior (e.g., overnight charging peaks). By explicitly modeling the dynamic influence of student behavior, this enhancement significantly improves prediction accuracy and the environmental performance of campus power systems.
An innovative inheritance reorganization dhole optimization algorithm is proposed, which is characterized by an experience inheritance strategy and dynamic population reorganization strategy. These approaches significantly enhance the algorithm’s convergence speed and global search stability, making it highly effective for optimizing key model parameters under diverse student behavior scenarios and ensuring reliable prediction performance.
The remainder of this paper is structured as follows: Section 2 introduces the data preprocessing methods. Section 3 discusses in detail the construction of the power load forecasting model. Section 4 presents the improvement mechanism of the IRDOA algorithm and its optimization process for the hyperparameters of the DSR-Transformer. Section 5 elaborates on the entire campus power load forecasting process and evaluation metrics. Section 6 validates the feasibility and effectiveness of the proposed model and algorithm through multiple case studies. Finally, Section 7 summarizes the main findings and contributions of this study and discusses its limitations.
2 UMAP-based dimensionality reduction for environmentally sensitive campus load data under uncertain student behavior
In this study, student behavior uncertainty is conceptualized as the collective effect of stochastic and semi-periodic human activities that influence campus electricity demand. To make this uncertainty tractable for machine learning, we deconstruct it into measurable components and encode them as features. Specifically, four categories of behavioral drivers are considered:
Electric vehicle charging behavior: randomness arises from students’ arrival times, departure times, initial state-of-charge, and charging duration. These can be characterized by real-time charging station records, providing variables such as charging power, charging start/end timestamps, and session length.
Temporal context: time-of-day, day-of-week, and week-of-semester indicators capture the strong periodic tendencies in student routines (e.g., weekday classes vs. weekend low occupancy), transforming calendar time into a structured feature.
Environmental conditions: outdoor temperature, humidity, and irradiance influence both EV battery efficiency and building HVAC loads, interacting with student presence to modulate total demand.
Campus schedule and events: binary or categorical variables indicating exam periods, holidays, vacations, and special events serve as proxies for large-scale, synchronized deviations from typical load patterns.
Together, these features form a high-dimensional input vector that implicitly encodes the magnitude and timing of student behavior uncertainty. However, directly feeding such a high-dimensional, heterogeneous set into a forecasting model would cause the curse of dimensionality, obscure the critical behavioral patterns, and increase the risk of overfitting to noise. More importantly, from an environmental perspective, excessive feature dimensions dilute the model’s ability to focus on time intervals where prediction errors most directly impact energy waste—such as overnight EV charging peaks and holiday transitions.
As shown in Figure 1, the Pearson correlation coefficient is calculated to quantify the degree of association between each input feature and the actual campus electricity load, providing a quantitative criterion and physical basis for feature selection in this study. From both statistical and physical perspectives, the relative importance of each variable for load forecasting exhibits a clear hierarchical structure. Among them, historical load (Phist, with a correlation coefficient of 0.92) has the highest correlation, providing a fundamental time-trend baseline for the model to capture electricity consumption inertia. Since the validation period falls within a typical summer high-load teaching month (July), ambient temperature (T, correlation coefficient 0.78) and solar radiation (PV, 0.65) show significant positive correlations, directly reflecting the physical law of surging campus central air-conditioning and cooling system loads driven by high temperatures. Meanwhile, student electric vehicle charging data (PEV, correlation coefficient 0.54) and weekday attribute (Dtype, correlation coefficient 0.42) reflect load fluctuations caused by daily campus activities. Using these features collectively as inputs allows the model to grasp the overall electricity consumption trend via historical load while effectively capturing load peaks caused by sudden weather changes or concentrated EV charging using meteorological and behavioral features, thereby realistically enhancing the accuracy of the prediction model for short-term campus load forecasting.
FIGURE 1
To address the issue of excessively high input feature dimensions, this study employs Uniform Manifold Approximation and Projection (UMAP) for dimensionality reduction. Compared with linear methods (e.g., PCA), UMAP offers a distinct advantage in that it preserves both local and global data structures, which is crucial for maintaining the nonlinear relationships between student behaviour patterns and load variations. The mathematical formulation of the dimensionality reduction process is as follows:
UMAP reduces dimensionality by constructing a topology between high-dimensional and low-dimensional spaces, optimizing the similarity between the topologies. Specifically, given a high-dimensional dataset , where each sample represents a data point containing electric vehicle charging features xi, the objective is to find the corresponding low-dimensional representation that preserves the inherent structure of the data. The process can be described in the following steps:
Step 1Calculation of similarity in high-dimensional spaceThe conditional probability represents the probability that a data point xj is a neighbor of xi. The formula for this probability is given in Equation 1:where d(xi,xj) represents the Euclidean distance between data points xi and xj, while ρi is the distance from the data point xi to its nearest neighbor. This parameter ensures the local connectivity of the manifold. σi is a scale parameter, determined through binary search, such that This parameter is as defined in Equation 2:To obtain a symmetric similarity matrix, the joint probability distribution is defined as in Equation 3:
Step 2Modeling probability distribution in low-dimensional spaceIn the low-dimensional space, UMAP utilizes a modified t-distribution to model the similarity between pairs of points. For the low-dimensional representations yi and yj, their similarity is defined as in Equation 4:where the parameters a and b are determined through nonlinear least squares fitting, with typical values set to a≈1.93 and b ≈ 0.79. These settings are chosen to better match the probability distribution in the high-dimensional space.To better control the distribution of points in the low-dimensional space, UMAP introduces a piecewise function as in Equation 5:where mindist is a user-defined parameter that indicates the minimum distance between points in the low-dimensional space.
Step 3Optimization of the mapping processUMAP optimizes the low-dimensional mapping by minimizing the difference between the probability distributions in the high-dimensional and low-dimensional spaces. For this purpose, cross-entropy is adopted as the loss function as in Equation 6:where pij represents the similarity between data points in the high-dimensional space, and qij denotes the corresponding similarity in the low-dimensional space. This loss function can be interpreted as the cross-entropy between two fuzzy sets.
Based on UMAP, a multidimensional feature set is constructed to simulate the uncertainty in student behavior, which includes temporal features, electric vehicle-related features, environmental features, campus schedule features, and more. Using UMAP for dimensionality reduction, the high-dimensional features of student behavior uncertainties (often exceeding 50 dimensions) are reduced to 2–3 dimensions. This process preserves the essential structures related to campus power load within the data. The reduced features can distinctly differentiate between power load patterns during school terms and vacation periods, providing more robust feature inputs for subsequent load forecasting models.
The UMAP dimensionality reduction structure is shown in Figure 2.
FIGURE 2
The UMAP-based data preprocessing process considering student behavior uncertainty in this paper is as follows:
Data collection and data source description: The data used in this study originates from the UCSD benchmark dataset in SDSC Dataverse. The dataset covers a time span of 1 year. From this dataset, the data for July are extracted for validation, with a sampling frequency of 15 min, capturing coupled multi-dimensional features. Specifically, these features include the original campus electricity load curve, surrounding meteorological conditions (including temperature, solar radiation, and humidity), as well as high-dimensional student behavior uncertainty feature matrices derived from electric vehicle charging times and campus activity schedules, among other data.
Data cleaning: This study implemented a rigorous data cleaning procedure. For sporadic missing values or outliers occurring at individual time points, linear interpolation was applied to fill them in order to ensure the continuity of the time series. For anomalous days with large consecutive missing data segments, the affected data were directly discarded to guarantee the quality of the training set and prevent large-scale gaps or dead values from negatively impacting the deep network.
High-dimensional input and UMAP dimensionality reduction: After the data cleaning stage, the processed multi-dimensional feature data are reconstructed into a high-dimensional feature matrix and fed into the UMAP dimensionality reduction module. The UMAP method can effectively handle the complex nonlinear relationships among environment, behavior, and load, while preserving the key features and distribution patterns of the original high-dimensional data to the greatest extent during dimensionality reduction. Finally, the high-dimensional features are optimally compressed into a low-dimensional spatial representation. This low-dimensional feature form not only effectively removes redundant noise from the data but also fully retains the sensitivity of the load to behavior and environment, thereby significantly improving the training efficiency and short-term prediction accuracy of the DSR-Transformer model.
3 Formulation of the IRDOA-DSR-Transformer-based carbon reduction method for campus IES
This section constructs the IRDOA-DSR-Transformer campus load forecasting model. Before detailing the internal components of the forecasting model, we first describe the interactions among the modules within the overall model architecture. The specific operational process and interaction mechanism are as follows: First, the system inputs a five-dimensional raw dataset containing dimensions such as behavior and environment, and performs data quality governance, cleaning and correcting missing values and outliers. Subsequently, the cleaned high-dimensional feature sequence is fed into the UMAP preprocessing module. Through nonlinear manifold learning, the original feature space is reduced to two dimensions. This low-dimensional manifold highly condenses the key topological information of the input data, thereby improving the prediction accuracy and computational efficiency of the subsequent model. Next, the dimensionally reduced data stream is sent to the DSR-Transformer prediction model. At this stage, the system iteratively trains the network using the training set, and simultaneously introduces an improved IRDOA optimization algorithm for global adaptive collaborative optimization of the core hyperparameters. Finally, forward inference is performed on the test set based on the optimized prediction model, outputting a high-precision campus electrical load forecasting sequence. This forecasting sequence is fed in real time into the carbon factor-integrated environmental benefit accounting module (CEBAM), achieving a full-process closed-loop collaboration from load forecasting to estimated carbon emissions of the integrated energy system. The framework of the IRDOA-DSR-Transformer campus load forecasting model is shown in Figure 3.
FIGURE 3
When the Transformer model processes information, the input sequence is first transformed into vectors through an embedding layer, with positional encoding added to incorporate both semantic and positional features. These vectors are then passed into the encoder, where the multi-head self-attention mechanism captures internal dependencies within the sequence. Subsequently, the vectors undergo residual connections, layer normalization, and feedforward neural network processing. The encoder module is stacked multiple times to deepen feature extraction. The modeling process is as follows:
3.1 Input layer
The Transformer model introduces a positional encoding module, which aims to inject absolute positional information into the embedded vectors, enabling the model to understand the sequential relationships of the elements. This addresses the problem of element order in continuous sequence modeling. The encoding is generated using sine and cosine functions, allowing each position in the sequence to be assigned a unique identifier. Its mathematical expression is as in Equation 7:where pos represents the position, d is the dimension of the input vector, and i∈(0,d/2) indicates the vector.
3.2 Multi-head attention mechanism
The self-attention mechanism transforms the input data through three independent linear layers, corresponding to the query Q, key K, and value V matrices. The core operation involves computing the dot product between Q and K, generating attention weight distribution for each position in the sequence relative to all other positions. These weights are then used to perform a weighted sum of the V matrix, resulting in an output vector that captures internal dependencies. This matrix-based parallel computation allows the model to efficiently capture long-range dependencies between elements in the input data.
The mathematical model of the self-attention mechanism is as in Equation 8:where dk represents the dimension of the matrix K.
The multi-head attention mechanism processes and extracts key features through multiple self-attention mechanisms. Simultaneously, the outputs from these multiple self-attention mechanisms are combined through a linear layer to produce the final output.
The mathematical model of the multi-head attention mechanism is as in Equation 9:where , , and are the weight matrices used to create the j-th attention head, W1 represents the output projection matrix, and m denotes the number of heads in the multi-head attention mechanism.
3.3 Feed-forward network
In addition to multi-head attention, the core components of the Transformer model include the feed-forward network, normalization layers, and residual connections. The introduction of normalization layers and residual connections primarily aims to mitigate the vanishing gradient problem and accelerate training convergence. The feed-forward network, being a position-wise fully connected network, independently and in parallel processes each position in the sequence. Its mathematical formula is as in Equation 10:where W1 and W2 represent the weight matrices of the first and second linear layers, respectively, while B1 and B2 are the bias vectors for the first and second linear layers.
3.4 Output layer
The output layer of the Transformer model consists of a linear transformation layer followed by a Softmax function, as in Equation 11:where W represents the weight matrix, and b is the bias vector.
The campus power load output is not only directly connected to the electric load data of campus buildings and the electric vehicle-related data of students, but it is also indirectly influenced by the student’s presence on campus, holidays, and campus weather conditions. The level of campus power load primarily depends on the routines and teaching activities of faculty and students. Its daily, weekly, and even academic year variations exhibit significant periodicity, such as daytime peaks and nighttime troughs in electricity use, as well as high loads during semesters and low loads during holidays. This results in a load curve with cyclical and phase characteristics, where there is typically strong intrinsic correlation in load data over time. The challenge in forecasting campus power loads lies in effectively learning the dependencies in historical load sequences, extracting intrinsic variation patterns, and using these features for accurate future load predictions. However, the traditional Transformer model treats all temporal load features equally when handling campus load sequences, making it difficult to adaptively focus on key pattern nodes across different time scales. This limitation affects its ability to capture multi-level temporal patterns of campus electricity usage, posing a bottleneck for improving prediction accuracy. The main constraints include:
The Transformer model, when dealing with long-term campus power load sequences, struggles to effectively differentiate the varying importance of load features across different periods, thereby impairing its ability to precisely capture trends in load changes.
The current attention mechanism in the Transformer uniformly weights all time steps in the sequence during computation, lacking the ability to focus particularly on features from key periods. This makes the model susceptible to interference from routine load fluctuations while extracting sequence interaction information, hindering its ability to mine core information with predictive value from complex data, thus limiting improvements in campus load prediction accuracy.
To better mine the multi-scale temporal features within campus power load sequences, this paper proposes significant enhancements to the traditional Transformer architecture by introducing a dynamic sparse routing gate mechanism. This mechanism can adaptively select and focus on the most predictive key time period features in the sequence, effectively enhancing the model’s ability to capture critical information about campus electricity behavior. This design significantly improves computational resource utilization efficiency while further enhancing the accuracy of load predictions.
The mathematical formulation of the Transformer model based on the dynamic sparse routing gate is as follows:
First, given the hidden state input h at the current moment, which carries temporal feature information extracted by previous network layers, a linear projection is performed using the first-layer weight matrix W1 of the feed-forward network, resulting in an intermediate activation vector as in Equation 12:where z represents the raw activation scores of all potential neurons, dff denotes the dimension of the intermediate layer in the feed-forward network, and dmodel is the dimension of the model’s hidden layer.
To evaluate the importance of different neurons, an independent gating projection layer Wg is introduced. This layer is structurally identical to W1 but uses separate parameters. Through this projection, the gating weight vector can be calculated as in Equation 13:where each element g in the vector gj indicates the importance of the corresponding j-th neuron in the context of the current input. Its value directly determines the probability that this neuron is retained during the subsequent sparse selection phase.
After obtaining the gating score vector, the next step is to select the top k most important neurons from the entire intermediate layer of the feed-forward network to achieve computational sparsity. This process requires two key steps: Top-k selection and the creation of a gating vector.
By applying the Top-k algorithm to the gating score vector g, the k elements with the highest values are selected. This process returns two arrays as in Equation 14:where values contains the specific numeric values of the selected top k gating scores, while indices records the indices of the neurons corresponding to these scores.
Based on the selected neuron indices, a sparse gating vector m is constructed. This vector functions to mask non-essential neurons in subsequent computations, thereby retaining activations only for the important neurons. The specific calculation is as in Equation 15:where represents the temperature parameter, and j denotes the neuron index.
After obtaining the sparse gating vector m, it needs to be applied to the intermediate activation values of the feed-forward network to perform the sparsification process and generate the final output. The sparse gating vector m is element-wise multiplied with the intermediate activation values z from the first layer of the feed-forward network, as in Equation 16:where represents the activation values after sparsification.
Next, the sparsified activation values are applied to the activation function. The computation is as in Equation 17:where GeLU denotes the activation function, and a represents the sparsified vector after activation.
Finally, the activated sparse vector is multiplied by the weight matrix of the second layer of FFN to obtain the final output of this FFN block, as in Equation 18:where o represents the final output vector of the FFN block, and W2 denotes the weight matrix of the second layer of the FFN.
Through this dynamic sparse routing gate mechanism, the model can automatically select and focus on key period features based on the temporal characteristics of the input sequence. It adaptively adjusts the computational path of the neural network, thereby significantly enhancing the efficiency of capturing campus power load variation patterns while maintaining the model’s representational power. This results in improved accuracy and generalization in multi-scale temporal forecasting tasks.
Based on the load forecasting results obtained from the aforementioned dynamic sparse routing gate-based Transformer model, this study further constructs a carbon factor-integrated environmental benefit accounting module (CEBAM), which maps the forecasted load sequence to the operational carbon emissions of the campus power system, thereby achieving a closed-loop assessment from load forecasting to environmental benefits. The fundamental assumption used for carbon emission estimation in this paper is that the campus integrated energy system implements low-carbon-oriented joint optimal scheduling. Guided by the day-ahead forecast curves, flexible resources are dynamically dispatched to maximize the consumption of local renewable energy and reduce purchased electricity.
The core of this module lies in establishing the dispatching relationship between the forecasted load and the net purchased power, and calculating the total carbon emissions by incorporating time-of-use grid carbon emission factors. The specific calculation process is as follows:
First, considering that the campus is equipped with rooftop photovoltaic (PV) systems and energy storage systems, driven by the forecasted load Pload(t), the energy storage system formulates its charging and discharging strategy based on time-of-use carbon factors. The net purchased power Pgrid(t) is then determined by the equation as in Equation 19:where Pcharge(t) and Pdischarge(t) represent the charging and discharging power of the energy storage device, respectively. Its dispatch strategy is based on the forecasted load, prioritizing charging during periods of low grid carbon intensity and discharging during periods of high grid carbon intensity, thereby shifting electricity consumption to cleaner time periods.
Furthermore, the total campus carbon emissions Ctotal can be expressed as in Equation 20:where EFgrid is the carbon emission factor of the regional power grid, Cgas represents the carbon emissions generated from natural gas consumption, and CPV denotes the carbon emission reduction from photovoltaic power generation. The higher the self-consumption rate of PV, the larger CPV becomes, and consequently, the lower the total carbon emissions. The value of the carbon emission factor of the regional power grid is set to 0.3327 kg CO2/kWh, which is derived by time-weighted integration of regional marginal emission tracking data from the U.S. Environmental Protection Agency’s eGRID for the California (CAMX) subregion under high summer load conditions. The adoption of this localized carbon emission factor ensures high geographical applicability to the UCSD campus microgrid. Carbon emissions are calculated by accumulating over discrete simulation time steps (Δt = 0.25 h, i.e., 15 min).
Cgas and CPV can be further expanded as in Equations 21 and 22:where Fgas(t) is the instantaneous natural gas consumption rate, and EFgas is the carbon emission factor of natural gas. The carbon emission factor of natural gas is specifically set at 0.198 kg CO2/kWh. This operational parameter strictly adheres to national greenhouse gas accounting standards, providing a verifiable mathematical benchmark for local fuel combustion emissions.where PPV,self(t) is the power of rooftop photovoltaic generation directly consumed by the campus load at time t, and its value is influenced by the forecasted load Pload(t) and the energy storage charging/discharging strategy; EFgrid is the time-of-use grid carbon emission factor. This formula indicates that the carbon emission reduction from PV is equal to the amount of PV electricity consumed multiplied by the grid emission factor. In other words, for every 1 kWh of PV electricity consumed, the same amount of electricity purchased from the grid is avoided, along with its associated carbon emissions. The carbon emission factor for photovoltaics is set to the same value as that of the regional power grid (i.e., 0.3327 kg CO2/kWh), which mathematically ensures consistency in net carbon footprint accounting and thus accurately reflects the actual carbon reduction achieved by PV replacing purchased electricity.
It should be noted that, within this module, the accuracy of load forecasting directly affects the energy storage dispatch strategy and the efficiency of PV utilization: the more accurate the forecast, the more effectively the energy storage system can charge during low-carbon periods and discharge during high-carbon periods, and the less PV generation is curtailed due to incorrect scheduling decisions. Therefore, under the same campus energy structure and dispatch logic, there exists a negative correlation between forecasting accuracy and carbon emissions—the smaller the forecasting error, the lower the carbon emissions.
Beyond the theoretical formulation, the proposed IRDOA-DSR-Transformer-based carbon reduction method is designed to be directly deployable within existing campus energy management systems (EMS), offering a practical pathway for university facility managers to translate enhanced load forecasts into measurable carbon reductions. The deployment can proceed in three integrated stages.
Data integration and preprocessing. The first stage establishes a lightweight data pipeline that aggregates readily available campus data sources—EV charging station logs, local meteorological records, academic calendars, and building-level smart meter readings—into the UMAP-based dimensionality reduction module. Since these data streams are increasingly accessible through standard building automation protocols or campus IoT platforms, integration can be achieved with minimal additional hardware investment. The automated nature of the preprocessing pipeline ensures that high-dimensional behavioral features are continuously compressed into low-dimensional, environmentally sensitive representations without manual feature engineering.
Model training and adaptive updating. The IRDOA algorithm’s capability for automated hyperparameter tuning is a key enabler for real-world adoption. Non-expert energy managers can retrain the forecasting model periodically. For instance, at the beginning of each semester or after significant changes in campus infrastructure, simply by initiating the optimization routine. The experience inheritance and dynamic population reorganization mechanisms within IRDOA ensure stable convergence even when the distribution of student behavioral data shifts, thereby maintaining prediction accuracy over time without requiring deep learning expertise.
Real-time dispatch support and carbon management. Once trained, the model generates 15-min-ahead load forecasts that are fed into the carbon factor-integrated environmental benefit accounting module (CEBAM). The campus EMS can then use these forecasts to optimize battery storage charging/discharging schedules and coordinate rooftop photovoltaic utilization. As an operational example, when the model anticipates a surge in overnight EV charging load, the EMS can pre-charge storage during low-carbon-intensity midday hours and discharge it during the peak, directly displacing grid electricity with high carbon emission factors.
In summary, the IRDOA-DSR-Transformer model proposed in this paper not only achieves high-precision campus load forecasting but also, through its integration with the carbon factor-integrated environmental benefit accounting module, gains the capability to evaluate its own environmental performance, thereby forming a complete low-carbon-oriented campus power load forecasting model that incorporates carbon emission factors. The structure of this model is shown in Figure 4.
FIGURE 4
4 Inheritance reorganization dhole optimization algorithm
In this study, the primary role of the IRDOA algorithm is to optimize the hyperparameters of the DSR-Transformer forecasting model. Manual tuning of deep learning hyperparameters is often time-consuming and suboptimal, especially when dealing with complex behavioral data. IRDOA automates this process by treating the set of hyperparameters as a candidate solution and searching for the configuration that minimizes the validation forecasting error. This section first introduces the original DOA and its improvements, and then details the hyperparameter optimization framework.
4.1 Dhole optimization algorithm
The Dhole Optimization Algorithm (DOA) is a novel meta-heuristic optimization framework inspired by the social behaviors and hunting strategies of dholes. By simulating collective cooperation, vocal communication, and group hunting skills, this algorithm establishes a robust optimization model rooted in swarm intelligence. Specifically, DOA integrates a sound-guided search mechanism for global exploration with a cooperative hunting strategy for local exploitation. Through the synergy of these dual mechanisms, the algorithm achieves an optimal balance between exploration and exploitation.
4.1.1 Basic search mechanism
Simulate a pack of jackals coordinating search behavior through vocal communication. Let the current optimal position be , and the local optimal position be , then the target position is defined as:where represents the best position in the current population, and represents the best position obtained throughout the entire iteration.
According to the pack size PWN and random sound signals, where PWM represents the number of packs as obtained from Equation 24, the search behavior is divided into two modes:
When PWN is less than 10 and rand is greater than 0.5, perform individual search:where, t and represent the current iteration count and solution, represents the solution obtained from Equation 23, and t+1 and represent the next iteration count and decrement slope, as shown in Equation 26.where T represents the maximum number of iterations.
When PWN is greater than or equal to 10, execute group encirclement:where z represents a random individual of the jackal, derived from the formula:
During the entire encirclement phase, there is competition among the jackals, and the den changes its location considering the positions of the other jackals .
4.1.2 Hunting attack mechanism
Simulate the behavior of a pack of jackals cooperating to attack prey. Based on the prey size evaluation factor S:where represents the prey factor, with a constant value of 3, indicating the maximum prey. In addition, and represent the fitness values of the i-th jackal and prey, respectively.
When the prey is relatively large (), a collaborative attack strategy is used:where represents weak prey; the second and third attacks will kill the prey when it is injured and weakened.
A mixture of cosine and sine functions simulates the swapping technique. The equations for a series of attacks are as follows:where ps represents the suitable time for hunting, which can be obtained from Equation 32:where represents the number of group members most suitable for hunting, EF represents environmental or external factors affecting hunting success, with a value between 0 and 1, k is a real number that affects hunting efficiency, and C1 is used to control the size of the prey in different situations.
When the prey is small , kill it directly:
4.1.3 Vocal communication mechanism
Simulating the process of a jackal pack coordinating behavior through sound. Exploration and development of sound parameter vocalization = randcontrol algorithms balance, as in Equation 34:where is a decision variable: when it is 1, the search phase is executed; when it is 0, the attack phase is executed.
The DOA algorithm effectively balances global search and local development through the organic combination of the three mechanisms mentioned above, improving the efficiency and accuracy of solving optimization problems.
4.2 Improvements of DOA
Although the standard DOA presents an effective optimization approach by simulating the social behaviors and hunting strategies of dholes, its efficiency in optimizing hyperparameters for complex, nonlinear campus load forecasting remains limited in practical applications. To address this limitation, this study proposes an Improved Inheritance and Reorganization-inspired Dhole Optimization Algorithm (IRDOA). IRDOA enhances convergence performance by incorporating an experience inheritance strategy, enabling a more effective utilization of historical optimal information and accelerating convergence toward the global optimum. Furthermore, by introducing a dynamic population reorganization strategy, the algorithm strengthens information exchange within the swarm, promoting a more diverse and efficient search process while mitigating the risk of premature convergence.
4.2.1 Experience inheritance strategy
The experience inheritance strategy is an innovative optimization technique designed to enhance the convergence performance of the Dhole Optimization Algorithm. This strategy integrates historical elite individuals' experiential information into the iterative process, thereby strengthening the algorithm’s guided search capability. It enables more effective utilization of past successful experiences while avoiding redundant exploration of ineffective regions. Within the experience inheritance strategy, the intensity of experiential guidance dynamically varies over iterations, allowing the algorithm to extensively leverage prior knowledge during the early stages and progressively focus on deep exploitation of the current optimal region in later stages.
The mathematical formulation of the experience inheritance strategy is as follows:where denotes the experience guidance probability, represents the multi-generation experience memory pool, is the experience guidance vector, and α and β are adaptive learning factors.
Compared to the original random search, experience inheritance offers a more intelligent and directed search strategy. This guidance facilitates a more purposeful exploration around the current promising solutions, potentially improving the ability to locate the global optimum. By incorporating experience inheritance, the algorithm places greater emphasis on historical successful experiences during the search process, dynamically adjusting the search direction based on information from elite individuals across generations. This adaptability enables the algorithm to adopt more effective search strategies at different stages of optimization.
4.2.2 Dynamic population reorganization strategy
The dynamic population reorganization strategy is an advanced optimization technique centered on the periodic restructuring of the population. By facilitating information exchange between superior and inferior individuals, this strategy promotes knowledge transfer within the population and helps maintain diversity.
Within the dynamic population reorganization strategy, the reorganization operation is improved as follows:where denotes the individual indices sorted by fitness, represents the sorted population, and (G) correspond to the indices of superior and inferior individuals respectively, and is a perturbation term for maintaining diversity.
By integrating the above two strategies, the IRDOA algorithm significantly enhances convergence speed, global search capability, and search stability while preserving the advantages of the original DOA. This integration provides a more effective solution framework for complex optimization problems.
4.3 Numerical verification of IRDOA
To evaluate the convergence speed and global search performance of the IRDOA algorithm, this study selects classical optimization algorithms such as the Great Wall Construction Algorithm (GWCA) (), Grey Wolf Optimization (GWO) (), RIME (), and Particle Swarm Optimization (PSO) () for comparison. The feasibility and advantages of the IRDOA algorithm are demonstrated using single-objective test functions F1 to F4, F7, and F9. The parameter settings for each single-objective optimization algorithm are presented in Table 1.
TABLE 1
| Algorithm | Parameters |
|---|---|
| GWCA | MaxFES = 1,000; Pop = 30 |
| GWO | MaxFES = 1,000; Pop = 30 |
| RIME | MaxFES = 1,000; Pop = 30 |
| PSO | MaxFES = 1,000; Pop = 30 |
| DOA | MaxFES = 1,000; Pop = 30 |
| IRDOA | MaxFES = 1,000; Pop = 30 |
Parameters setting.
In Table 1, MaxFES, denotes the maximum number of function evaluations, and Pop represents the population size.
To ensure the scientific rigor and accuracy of the evaluation process, the maximum number of iterations and the population size are kept consistent for each algorithm. Table 2 presents the comparative experimental results between the IRDOA algorithm and five intelligent optimization algorithms, showing the mean and standard deviation of 30 independent runs for each algorithm.
TABLE 2
| F | GWCA | GWO | RIME | |||
|---|---|---|---|---|---|---|
| Avg [95% CI] | Std | Avg [95% CI] | Std | Avg [95% CI] | Std | |
| F1 | 7.02 [6.08, 7.96] | 2.63 | 1.49 × 10−26 [1.44 × 10−26, 1.54 × 10−26] | 1.36 × 10−27 | 6.30 × 10−67 [0, 2.54 × 10−66] | 5.34 × 10−66 |
| F2 | 3.49 [3.14, 3.84] | 0.97 | 8.26 × 10−16 [7.99 × 10−16, 8.53 × 10−16] | 7.67 × 10−17 | 9.91 × 10−32 [0, 2.35 × 10−31] | 3.79 × 10−31 |
| F3 | 3.19 × 102 [2.91 × 102, 3.47 × 102] | 77.64 | 2.17 × 10−5 [0, 1.28 × 10−4] | 5.41 × 10−5 | 2.26 × 10−55 [0, 3.11 × 10−54] | 1.47 × 10−54 |
| F4 | 6.36 [5.84, 6.88] | 1.45 | 5.42 × 10−7 [3.64 × 10−7, 7.20 × 10−7] | 4.97 × 10−7 | 1.44 × 10−34 [0, 1.20 × 10−33] | 5.40 × 10−34 |
| F7 | 3.38 [3.19, 3.57] | 0.52 | 1.19 × 10−16 [0, 8.64 × 10−15] | 2.38 × 10−14 | 8.61 × 10−16 [8.61 × 10−16, 8.61 × 10−16] | 0 |
| F9 | 5.26 × 102 [4.93 × 102, 5.59 × 102] | 92.47 | 3.94 × 10−1 [3.92 × 10−1, 3.96 × 10−1] | 6.57 × 10−3 | 4.59 × 10−8 [3.26 × 10−8, 5.93 × 10−8] | 3.73 × 10−8 |
| F | PSO | DOA | IRDOA | |||
|---|---|---|---|---|---|---|
| Avg [95% CI] | Std | Avg [95% CI] | Std | Avg [95% CI] | Std | |
| F1 | 2.96 × 10−7 [1.72 × 10−7, 4.20 × 10−7] | 3.47 × 10−7 | 5.46 × 10−73 [0, 6.56 × 10−72] | 3.07 × 10−72 | 0 [0, 0] | 0 |
| F2 | 5.79 × 10−6 [3.19 × 10−6, 8.39 × 10−6] | 7.26 × 10−6 | 5.49 × 10−51 [0, 4.12 × 10−50] | 1.82 × 10−50 | 4.72 × 10−205 [4.63 × 10−205, 4.81 × 10−205] | 2.49 × 10−206 |
| F3 | 0.24 [0, 1.24] | 0.51 | 1.47 × 104 [0, 3.00 × 104] | 4.26 × 104 | 6.17 × 10−267 [5.90 × 10−267, 6.44 × 10−267] | 7.54 × 10−268 |
| F4 | 0.02 [0.06, 0.42] | 0.07 | 26.79 [12.27, 41.31] | 40.58 | 7.26 × 10−186 [7.26 × 10−186, 7.26 × 10−186] | 0 |
| F7 | 18.27 [18.22, 18.32] | 0.14 | 5.37 × 10−12 [4.48 × 10−12, 6.26 × 10−12] | 2.49 × 10−12 | 8.68 × 10−14 [8.67 × 10−14, 8.70 × 10−14] | 4.19 × 10−16 |
| F9 | 2.41 × 10−1 [2.11 × 10−1, 2.71 × 10−1] | 8.42 × 10−2 | 2.75 × 10−4 [2.74 × 10−4, 2.75 × 10−4] | 4.13 × 10−7 | 3.94 × 10−6 [3.91 × 10−6, 3.97 × 10−6] | 7.29 × 10−8 |
Numerical verification results.
As shown in Table 2, compared withva other metaheuristic optimization algorithms, the proposed IRDOA algorithm holds a clear advantage on the vast majority of single-objective test functions, demonstrating strong competitiveness. Taking test function F2 as an example, the mean value of the IRDOA algorithm is 4.72 × 10−205, and its 95% CI is tightly locked at [4.63 × 10−205, 4.81 × 10−205]. This indicates that its convergence result approaches zero with extremely high certainty, achieving the best performance among the six algorithms. Meanwhile, its standard deviation is 2.49 × 10−206. Such an extremely small standard deviation, combined with the very narrow 95% confidence interval, strongly confirms that the IRDOA algorithm has exceptionally high robustness, proving that it is only marginally affected by random initialization and operates stably. On test function F7, although its mean is slightly inferior to those of the GWO and RIME algorithms, it still outperforms the other algorithms. Furthermore, a statistical significance analysis of the above test results was conducted using the Wilcoxon rank-sum test, with the detailed p-values recorded in Table 3. The statistical results indicate that on the vast majority of benchmark functions, the p-values between IRDOA and the peer algorithms are substantially less than 0.05 (p < 0.05), confirming the statistical significance of the proposed algorithm’s performance improvement. Only against GWO and RIME on F7, and against RIME on F9, the p-values exceed 0.05 (p > 0.05), representing a comparable level of convergence performance among the algorithms without exhibiting a statistically prominent difference at the 5% significance level. Overall, the above comparisons and statistical tests demonstrate that the IRDOA algorithm possesses overall superior convergence accuracy, robustness, and operational consistency.
TABLE 3
| F | IRDOA VS GWCA | IRDOA VS GWO | IRDOA VS RIME |
|---|---|---|---|
| p-value | p-value | p-value | |
| F1 | 3.02 × 10−11 | 3.02 × 10−11 | 3.02 × 10−11 |
| F2 | 3.02 × 10−11 | 3.02 × 10−11 | 3.02 × 10−11 |
| F3 | 3.02 × 10−11 | 3.02 × 10−11 | 3.02 × 10−11 |
| F4 | 3.02 × 10−11 | 3.02 × 10−11 | 3.02 × 10−11 |
| F7 | 3.02 × 10−11 | 1.0000 | 1.0000 |
| F9 | 3.02 × 10−11 | 3.02 × 10−11 | 1.0000 |
| F | IRDOA VS PSO | IRDOA VS DOA | IRDOA |
| p-value | p-value | p-value | |
| F1 | 3.02 × 10−11 | 1.07 × 10−7 | — |
| F2 | 3.02 × 10−11 | 8.48 × 10−9 | — |
| F3 | 3.02 × 10−11 | 1.10 × 10−8 | — |
| F4 | 3.02 × 10−11 | 2.15 × 10−6 | — |
| F7 | 3.02 × 10−11 | 3.02 × 10−11 | — |
| F9 | 3.02 × 10−11 | 3.02 × 10−11 | — |
Statistical significance analysis (p-value) based on Wilcoxon rank-sum test.
4.4 IRDOA-based hyperparameter optimization for DSR-Transformer
To apply IRDOA for tuning the DSR-Transformer model, the hyperparameter optimization problem is first formulated mathematically. Let θ represent a vector of hyperparameters to be optimized. The objective is to find θ* that minimizes the prediction error on a validation set, as in Equation 42:where Θ denotes the feasible hyperparameter space, and is the fitness function defined as the Root Mean Squared Error (RMSE) on the validation dataset, as in Equation 43:where yi is the actual load, is the forecasted load obtained by training the DSR-Transformer with hyperparameters θ, and Nval is the number of validation samples. The model is trained using the Adam optimizer with a fixed number of training epochs, and the RMSE is evaluated to guide the IRDOA search.
4.4.1 Decision variables and encoding
Each individual in IRDOA represents a specific hyperparameter configuration. Based on sensitivity analysis of Transformer-type architectures, the following hyperparameters are selected as decision variables, along with their search ranges:
Learning rate (η): continuous, log-uniform distribution in [10–4, 10–2].
Dropout rate (p): continuous, uniform distribution in [0.0, 0.5].
Number of attention heads (h): integer, {2, 4, 8}.
Dimension of the feed-forward network intermediate layer (dff): integer, {256, 512, 1024}.
Number of encoder layers (L): integer, {1, 2, 3}.
Thus, an individual is encoded as a real-valued vector X = [η, p, h, dff, L], where integer variables are treated by rounding the corresponding components during fitness evaluation.
4.4.2 Fitness evaluation and training protocol
For each candidate hyperparameter set X, the DSR-Transformer is constructed and trained on the training set using the Adam optimizer with mean squared error (MSE) loss. To prevent overfitting, early stopping is employed: training stops if the validation loss does not decrease for 10 consecutive epochs, and the model weights from the best validation epoch are restored. The maximum number of training epochs is set to 100. The batch size is 64. After training, the RMSE on the validation set is computed as the fitness value . The smaller the RMSE, the fitter the individual.
4.4.3 Optimization procedure
The overall IRDOA-driven hyperparameter optimization follows the steps below, where the population size is set to
Popand the maximum number of function evaluations is
MaxFES:
Initialization: Generate an initial population of Pop individuals randomly within the search space. Evaluate their fitness using the protocol above and identify the best individual.
Experience inheritance: For each individual, compute the experience guidance vector according to (Equations 35–37) using the historical elite pool.
Position update: For each individual, perform either individual search or group encirclement based on (Equations 24–28), integrating the guidance from Step 2.
Hunting attack: Adjust positions using the cooperative hunting mechanism (Equations 29–33), with prey size evaluation.
Dynamic population reorganization: Periodically (every 10 iterations) apply the restructuring operators (Equations 38–41) to enhance diversity.
Fitness evaluation and selection: For all new positions, round discrete variables, construct the corresponding DSR-Transformer models, train them, and compute fitness. Retain superior individuals for the next-generation.
Termination: If the number of function evaluations reaches MaxFES, stop and output the hyperparameter set with the lowest validation RMSE; otherwise, return to Step 2.
Figure 5 shows the structure of the IRDOA algorithm.
FIGURE 5
5 Campus power load forecasting process and evaluation metrics
5.1 Forecasting process
As presented in
Figure 6, the power load forecasting process based on the dynamic sparse routing gate Transformer model is as follows:
UMAP-based data preprocessing is performed for dimensionality reduction of campus load data considering uncertain student behavior. The original high-dimensional input features, including temporal information, environmental factors, and student behavior-related variables, are first normalized and then mapped into a low-dimensional feature space by UMAP. The processed data are subsequently divided into training, validation, and testing sets. The training set is used to fit the forecasting model, the validation set is used for hyperparameter adjustment and model selection, and the testing set is used only for the final performance evaluation.
Model and algorithm parameters are initialized. The parameters for the DSR-Transformer and IRDOA models are initialized as shown in Table 4. The input dimension and output dimension are determined according to the dimensionality-reduced features and the single-step load forecasting target, respectively. The learning rate, dropout rate, optimizer, and loss function are first set according to common settings in deep learning-based load forecasting tasks, and then further adjusted based on the validation performance to avoid overfitting and improve prediction stability.
Optimization of hyperparameters for the IRDOA model. The IRDOA optimization algorithm is used to optimize the hyperparameters that are sensitive to the performance of the DSR-Transformer model. During the optimization process, the forecasting error on the validation set is taken as the main criterion, and the model parameters are iteratively updated to obtain a more suitable parameter combination. This process aims to improve the prediction accuracy while maintaining the generalization ability of the model.
Power load prediction. Under the condition of the optimized hyperparameters, the DSR-Transformer model is trained using the training set and adjusted using the validation set. After the model training is completed, the testing set is used to evaluate the forecasting performance. The trained model is then applied to predict the campus power load for the upcoming day.
Evaluation of load forecasting results. The performance of the proposed DSR-Transformer is comprehensively evaluated using four prediction metrics: R2, MAPE, MSE, and RMSE. R2 is used to measure the fitting degree between the predicted and actual values, while MSE and RMSE are used to quantify the absolute prediction error. MAPE is used to evaluate the relative forecasting error. These metrics are calculated on the testing set to ensure that the reported results reflect the generalization performance of the model rather than its fitting ability on the training data.
FIGURE 6
TABLE 4
| Parameters | Values | |
|---|---|---|
| DSR-Transformer | Input dimension | 2 |
| Output dimension | 1 | |
| Learning rate | 0.001 | |
| Dropout rate | 0.1 | |
| IRDOA | Optimizer | Adam |
| Loss function | MSE | |
The DSR-Transformer and IRDOA parameters setting.
5.2 Evaluation indexes
5.2.1 Evaluation indexes for optimization algorithm
The average convergence values (AVG) and standard deviation (STD) were employed to evaluate the convergence performance of the optimization algorithms, as in Equations 44 and 45:where yi represents the ith data point of the sample.
5.2.2 Evaluation indexes for PV power point forecasting
The Mean Absolute Error (MAE), Mean Absolute Percentage Error (MAPE), Root Mean Square Error (RMSE), and the coefficient of determination (R2) were applied to comprehensively evaluate the results of photovoltaic power point forecasting, as shown in Equations 46–49.where represents the predicted values, yi denotes the true value, represents the average value of the actual values and N indicates the number of sample points.
6 Case study
To improve the methodological transparency and reproducibility of the proposed framework, the detailed parameter settings and computational configurations are further summarized in Table 5. The UMAP parameters were configured to preserve the main structural characteristics of student behavior uncertainty after dimensionality reduction. The dynamic sparse routing gate was used to retain the most informative intermediate neurons and reduce redundant computation in the feed-forward network. The IRDOA-related parameters were set to ensure sufficient search diversity and convergence stability under a unified computational budget.
TABLE 5
| Module | Parameter | Value | Module | Parameter | Value |
|---|---|---|---|---|---|
| UMAP | Number of neighbors | 15 | DSR-Transformer | Input dimension | 2 |
| UMAP | Minimum distance | 0.10 | DSR-Transformer | Output dimension | 1 |
| UMAP | Output dimension | 2 | DSR-Transformer | Learning rate | 0.001 |
| UMAP | Distance metric | Euclidean | DSR-Transformer | Dropout rate | 0.10 |
| Dynamic sparse routing gate | Retained neuron ratio | 0.25 | DSR-Transformer | Optimizer | Adam |
| Dynamic sparse routing gate | Top-k value | 0.25 dff | DSR-Transformer | Loss function | MSE |
| Dynamic sparse routing gate | Temperature coefficient τ | 0.70 | IRDOA | Population size | 30 |
| IRDOA | Maximum function evaluations | 1,000 | IRDOA | Experience memory size | 5 |
| IRDOA | Reorganization interval | 5 iterations | IRDOA | Adaptive learning factor α | 0.7 → 0.3 |
| IRDOA | Adaptive learning factor β | 0.3 → 0.7 | Convergence criterion | Fitness tolerance | 10–6 |
| Convergence criterion | Maximum function evaluations | 1,000 | Convergence criterion | Stability window | 10 iterations |
Parameter settings and computational configurations.
As shown in Table 5, the final parameter configuration was not only determined by prediction accuracy but also by model stability and computational efficiency. The UMAP settings allow high-dimensional student behavior features to be compressed into a compact low-dimensional representation, while the sparse routing gate reduces redundant neuron activation in the feed-forward network. Meanwhile, the IRDOA settings ensure a sufficient search space under a unified computational budget. The convergence criterion further avoids unnecessary iterations when the best fitness value becomes stable. Therefore, the proposed configuration provides a reasonable balance among feature preservation, prediction performance, convergence stability, and computational cost.
To validate the prediction performance of the proposed IRDOA-DSR-Transformer model, this study selects data from the UCSD benchmark dataset in SDSC Dataverse. The dataset originates from actual operational measurements of the microgrid at the University of California, San Diego (UCSD) campus. Although the original data spans 1 year, this study extracts a representative 10-day continuous time slice within July (a typical high-load summer teaching month) for case validation, where the first 9 days serve as the training set and the tenth day is used for testing. The selection of this specific 10-day window is highly justified as it captures a complete behavioral cycle (encompassing both standard academic weekdays and weekends) paired with intense summer cooling loads, which represents the most volatile and challenging operational scenario for the campus energy system. Testing under such high-variability baseline conditions provides a rigorous evaluation of the model’s tracking and forecasting proficiency. With a sampling frequency of 15 min, each daily cycle generates exactly 96 discrete observations, accumulating a total of 960 independent sequential observations throughout the experiment. These behavioral and meteorological elements, together with the load data, are fused to form the input feature matrix. Regarding external validity, while this short-term period cannot fully reflect year-round seasonal transitions, it serves as a concentrated empirical testbed sufficient for verifying the structural efficacy of the proposed model components. To ensure broader generalization, extending the framework to annual or cross-seasonal datasets will be prioritized in our future research.
6.1 Case 1: verification of power load forecasting
In Case 1, to verify the superior convergence capabilities and search performance of the improved IRDOA algorithm, the original DOA algorithm, GWO, and RIME were selected as comparison optimization algorithms, while keeping the control prediction model unchanged. The hyperparameters of the DSR-Transformer were optimized, and the effectiveness and feasibility of the IRDOA algorithm were tested through load forecasting results. The findings are presented in Figure 7.
FIGURE 7
As depicted in Figure 7a, at 0:00, the results predicted by the IRDOA algorithm are closest to the actual values, where the actual load at this moment is 1,403.86 kW and the IRDOA prediction is 1,406.57 kW, differing by merely 2.71 kW. Even in the area with the greatest error, at 5:15, the actual load is approximately 1,472.66 kW, while the IRDOA prediction stands at 1,495.85 kW, resulting in an error of only 1.55%. This outcome highlights the superiority and strong competitiveness of the IRDOA algorithm in load forecasting. The improved IRDOA algorithm employs an experience inheritance strategy, enhancing its convergence performance, which allows it to effectively utilize historical optimal information and accelerate its approach to the global optimum. Additionally, by introducing a dynamic population restructuring strategy, IRDOA strengthens intra-population information exchange, diversifies and improves the efficiency of the search process, and reduces premature convergence risk. Therefore, compared to other algorithms, the IRDOA algorithm exhibits superior accuracy in load forecasting, demonstrating its potential and competitiveness in practical applications. Figure 7b is a scatter plot of the fitting results between algorithms and actual data, where it is evident that the purple line representing the IRDOA algorithm aligns more closely with the red line representing actual data. In contrast, the other three algorithms show relatively poorer fitting results to actual student electricity load data, particularly noticeable in the middle range of load data. Figure 7c presents a radar chart of four evaluation metrics for the algorithms. Given the different meanings, calculation methods, and result formats of these metrics, they have been normalized via the min-max method. An algorithm with indicator values closer to one exhibits better performance. As shown, the metrics for the IRDOA algorithm, represented in green, all tend towards 1, whereas the RIME algorithm performs the worst in testing. In summary, the IRDOA-DSR-Transformer stands out as the most competitive algorithm, affirming the feasibility and effectiveness of the IRDOA improvements.
Figure 8 provides the evaluation results of each prediction model.
FIGURE 8
Figure 8a divides the 24-h period into 96 intervals, each representing detailed load data in 15-min increments. This visualization clearly illustrates the actual versus predicted load data across different times of the day. The campus load is relatively low during the evening, as student electric vehicle charging demand has yet to reach its peak. From midnight (0:00) to 6:00 a.m., the student electricity load increases significantly, consistent with the typical pattern of overnight electric vehicle charging. Between 6:00 a.m. and 12:00 p.m., the load remains high but is more stable compared to nighttime, due to students attending classes and the campus experiencing consistent electricity consumption with minimal fluctuation. Figure 8b intuitively presents the comparison between prediction errors and actual data. Using the actual data as a baseline, the outer ring represents the prediction error. The closer the ring’s shape is to a perfect circle, the smaller the error and the better the algorithm’s predictive performance. For example, at 2:00 a.m., the IRDOA-DSR-Transformer achieves the smallest prediction error of 12.871 kW, compared to 32.336 kW for DOA-DSR-Transformer, and 29.044 kW and 13.738 kW for GWO-DSR-Transformer and RIME-DSR-Transformer, respectively. Figure 8c displays a bar chart of prediction errors, where smaller absolute values indicate better algorithm performance. It can be observed that while the standard deviation of IRDOA-DSR-Transformer is 30.26 and that of DOA-DSR-Transformer is 30.07, the IRDOA-DSR-Transformer exhibits the smallest mean absolute error and average deviation in absolute terms. In summary, the IRDOA-DSR-Transformer demonstrates strong superiority and stability in forecasting student electricity load.
Table 6 lists the comparison results of load forecasting evaluation indexes of each algorithm.
TABLE 6
| Prediction model | Assessment criteria | |||
|---|---|---|---|---|
| MSE | R2 | MAPE (%) | RMSE | |
| IRDOA-DSR-Transformer | 25 | 98.25% | 36 | 42 |
| DOA-DSR-Transformer | 46 | 97.14% | 57 | 61 |
| GWO-DSR-Transformer | 51 | 96.68% | 79 | 86 |
| RIME-DSR-Transformer | 64 | 95.26% | 62 | 94 |
Comparison of load forecasting evaluation indexes of different optimization algorithms.
As shown in Table 6, the IRDOA-DSR-Transformer achieves the R2 value of 98.25%, representing improvements of 1.11%, 1.57%, and 2.99% over the other three algorithms, respectively. This indicates a highly accurate fit between its predicted curve and the actual load profile. Additionally, the IRDOA-DSR-Transformer reduces the MSE by approximately 50% on average compared to the other algorithms, demonstrating superior prediction accuracy. Furthermore, comparative analyses of the RMSE and MAPE show significant reductions achieved by IRDOA-DSR-Transformer. Specifically, RMSE decreases by 31.15% and 36.84% relative to the best-performing DOA-DSR-Transformer, while MAPE is reduced by an impressive 36.84%. In summary, the quantitative analysis and visualization results from this case study suggest that the IRDOA-DSR-Transformer achieves competitive performance in the evaluated load forecasting tasks. It shows advantages over the compared traditional algorithms in terms of prediction accuracy and data fitting quality under the tested conditions, indicating its potential for further exploration in practical applications.
6.2 Case 2: verification of carbon reduction effect
6.2.1 Experiment 1
Case 2 Experiment 1 aims to validate the effectiveness of the proposed improvements to the DSR-Transformer model. Under the condition that the intelligent optimization algorithm is fixed as IRDOA, we comprehensively compare DSR-Transformer with a variety of baseline models, including Transformer, BiGRU, PatchTST, TimesNet, and LSTM. Although the effectiveness of the model enhancements is verified through quantitative analysis and evaluation metrics, the analysis focuses on the comparison between DSR-Transformer and the Transformer and BiGRU models, highlighting its superior accuracy in electricity load forecasting. The results are presented in Figure 9.
FIGURE 9
As shown in Figure 9a, compared with other forecasting models, the IRDOA-DSR-Transformer shows competitive performance in load prediction accuracy for this case. Its predicted load curve follows the actual data with relatively small deviation, and it exhibits comparable or better prediction stability than several baseline models including Transformer, BiGRU, PatchTST, TimesNet, and LSTM. At the point of maximum error, where the actual load is approximately 1,472.6 kW, the proposed model predicts about 1,482.4 kW, corresponding to a prediction error of 0.6%. One possible contributing factor to this improvement is the introduction of a dynamic sparse routing gate, which may help capture input features relevant to load prediction more effectively. Subsequent multi-dimensional evaluations in Figures 9b, c focus primarily on comparative analysis with the representative IRDOA-Transformer and IRDOA-BiGRU models. Figure 9b presents a comparison of campus carbon emissions under different prediction models. Under the specific carbon accounting assumptions and dispatch logic adopted in this study, the IRDOA-DSR-Transformer leads to simulated carbon emissions of 9,060 kg, which are 3.9% and 7.3% lower than those of the IRDOA-Transformer and IRDOA-BiGRU models, respectively. This suggests a potential link between improved forecasting accuracy and reduced emissions, as more accurate load patterns may enable better charge/discharge scheduling of the energy storage system and a higher proportion of self-consumed photovoltaic power. However, the actual emission reduction in practice would depend on real-time dispatch decisions, storage constraints, and grid carbon intensity dynamics. Figure 9c shows a Venn diagram illustrating the overlap between each model’s predicted results and the original load data. Notably, in this specific test, the IRDOA-DSR-Transformer shares 10 identical values with the original data—more than any other compared model—providing additional evidence of its improved point forecast accuracy under the evaluated conditions.
The fitting results of the proposed model for campus electricity load are shown in Figure 10, with a focus on detailed comparative analysis with the IRDOA-Transformer and IRDOA-BiGRU models.
FIGURE 10
Figure 10 presents a comprehensive evaluation of the IRDOA-DSR-Transformer model’s performance through comparisons with other forecasting models. Figures 10a–c use scatter plots to visually compare the predicted load values of the three models against the actual load values. The results indicate that the IRDOA-DSR-Transformer achieves the best fit to the load data. Specifically, the scatter points of the improved model are closer to the 1:1 reference line, demonstrating a high degree of consistency between predicted and actual values. Moreover, the points are densely clustered with fewer outliers, reflecting strong predictive stability and more reliable outcomes. Figures 10d–g illustrate the comparison of four key evaluation metrics: R2, MSE, RMSE, and MAPE. The findings show that the IRDOA-DSR-Transformer achieves the highest R2 value, indicating superior data fitting capability.
The evaluation results of all models are summarized in Table 7.
TABLE 7
| Prediction model | Assessment criteria | |||
|---|---|---|---|---|
| MSE | R2 | MAPE (%) | RMSE | |
| IRDOA-DSR-Transformer | 16 | 98.41% | 21 | 33 |
| IRDOA-Transformer | 45 | 96.36% | 95 | 59 |
| IRDOA-BIGRU | 31 | 95.21% | 53 | 66 |
| IRDOA-PatchTST | 49 | 96.49% | 42 | 29 |
| IRDOA-TimesNet | 22 | 96.33% | 47 | 42 |
| IRDOA-FEDformer | 29 | 97.14% | 59 | 62 |
| IRDOA-Autoformer | 49 | 95.75% | 14 | 51 |
| IRDOA-Informer | 12 | 96.05% | 86 | 65 |
| IRDOA-LSTM | 55 | 95.27% | 72 | 43 |
Comparison of prediction indicators of different models.
As shown in Table 7, the IRDOA-DSR-Transformer model demonstrates significant advantages in prediction error and stability. The overall superiority of the proposed framework is evaluated based on a comprehensive multi-metric trade-off rather than relying on a single indicator, as no single deep learning model consistently dominates all evaluation dimensions. Specifically, the proposed model achieves the highest R2 value of 98.41%, indicating its outstanding global data fitting capability and superior tracking of temporal load trends compared to all benchmarks. Regarding other indicators, although our model does not sweep the absolute top spot in every single metric—such as having a higher MAPE (21%) than IRDOA-Autoformer (14%), and an MSE or RMSE slightly higher than IRDOA-Informer (12) and IRDOA-PatchTST (29), respectively—it delivers the most balanced and robust performance overall. Crucially, while IRDOA-Informer achieves a lower MSE, its RMSE balloons to 65; similarly, while IRDOA-PatchTST yields a lower RMSE, its MSE degrades to 49. This mathematically reveals that these benchmark models suffer from severe localized prediction spikes or high variance during specific periods. In contrast, the proposed model simultaneously maintains both an exceptionally low MSE (16) and RMSE (33), proving its unique capacity to suppress extreme errors and avoid catastrophic forecasting failures. Furthermore, it should be noted that although the MAPE of our model is 21%, this does not compromise the operational efficacy of low-carbon management. Over a 24-h dispatch horizon, the over-prediction and under-prediction errors tend to cancel each other out during the temporal integration process. Actual validation demonstrates that when this prediction error propagates to the final carbon emission reduction ratio, it introduces only a minor fluctuation of approximately ±0.95%. This proves that despite minor day-ahead prediction variances, the proposed scheme coupling the forecasting model with low-carbon dispatch can steadily deliver the expected economic and environmental benefits in real-world operation.
In summary, the proposed IRDOA-DSR-Transformer model is well-suited for efficiently forecasting highly volatile and nonlinear campus electricity load sequences.
6.2.2 Experiment 2
To further examine whether the performance improvement of the proposed method comes from the effective contribution of each component rather than a simple stacking of modules, an ablation study was conducted. In this study, the IRDOA optimization strategy, the DSR-based model improvement, and the data preprocessing module were removed step by step while keeping the remaining experimental settings unchanged. The forecasting results of different variants were then compared with the actual load data to evaluate the individual contribution of each component to the overall model performance. The results are shown in Figure 11.
FIGURE 11
The ablation results show that the complete IRDOA-DSR-Transformer achieves the best forecasting performance among all tested variants, with an R2 of 0.9899, RMSE of 17.0893, and MAPE of 1.0145%. Compared with the model without IRDOA, the RMSE and MAPE are reduced by approximately 51.93% and 51.79%, respectively. When the model improvement or data preprocessing module is removed, the prediction accuracy further decreases, indicating that these components also contribute to the overall forecasting performance. These results verify the effectiveness of the proposed optimization strategy, model improvement, and data preprocessing in enhancing campus load forecasting accuracy.
As summarized in Table 8, taking the pure baseline model as the anchoring benchmark, the stepwise stacking of each innovative component yields substantial quantitative gains for the enhancement of forecasting accuracy. Solely introducing data preprocessing (UMAP) cuts the MSE by 35.20%, validating the foundational virtue of feature reduction and noise filtering, while incorporating DSR gating and model upgrades accelerates the improvement amplitude, securing a 77.11% reduction in MSE. Most prominently, upon compounding the global hyperparameter tuning via the IRDOA algorithm, the complete framework (IRDOA-DSR-Transformer) captures a paramount prediction precision, achieving a 95.27% plummet in MSE and a 21.63% lift in R2 compared with the baseline. These comprehensive comparisons distinctively decouple and substantiate the indispensable standalone merits of feature selection, structural routing, and parameter optimization within the proposed closed loop.
TABLE 8
| Component | Assessment criteria | |||
|---|---|---|---|---|
| MSE (decrease) | R2 (increase) | MAPE (decrease) | RMSE (decrease) | |
| IRDOA-DSR-Transformer | 95.27% | 21.63% | 76.57% | 78.25% |
| Without IRDOA | 77.11% | 17.51% | 53.69% | 52.15% |
| Only data preprocessing | 35.20% | 7.95% | 18.69% | 19.50% |
Quantitative performance improvement/reduction rates of different components relative to the baseline model.
6.3 Case 3: application and dispatch in real-world scenarios
This section aims to demonstrate the practical significance of the proposed model by applying the forecasting results to different campus and park scenarios for comparison. First, the proposed method is applied to the campus scenario considered in this study, and the corresponding dispatch results are shown in Figure 12.
FIGURE 12
Figure 12 shows the dispatch results in the actual campus scenario. Compared with the other forecasting models, IRDOA-DSR-Transformer produces the smallest deviation from the actual load, and therefore has the least impact on the output of other devices.
To further verify the adaptability of the proposed method, another school scenario is introduced. Compared with the original campus scenario, this scenario represents a daytime teaching-oriented school area with a lower residential ratio and weaker EV charging demand. Its main load comes from teaching buildings, administrative offices, libraries, and a small number of laboratories, resulting in a lower overall load level. The results are shown in Figure 13.
FIGURE 13
From the perspective of load characteristics, this scenario is still affected by class schedules, student arrival times, teaching activities, and environmental factors, showing obvious daily fluctuation characteristics. Daytime teaching and office activities keep the load at a relatively high level, while the load decreases during nighttime and some non-intensive teaching periods. Compared with the original scenario, student behavior uncertainty in this scenario is mainly reflected in variations in arrival time, class schedules, and short-term electricity use, rather than large-scale nighttime residence and centralized EV charging. Therefore, this scenario can be used to test the forecasting stability and generalization ability of the IRDOA-DSR-Transformer model under lower load levels, weaker EV charging disturbances, and different campus operation modes. Similarly, the IRDOA-DSR-Transformer model still shows good competitiveness in this scenario.
Table 9 compares the carbon emissions under two school dispatch scenarios. In Scenario 1, the carbon emission obtained by IRDOA-DSR-Transformer is 9,060 kg, which is 792 kg lower than the actual dispatch result, corresponding to a reduction of approximately 8.04%. Compared with IRDOA-Transformer and IRDOA-BiGRU, the emissions are reduced by 360 kg and 670 kg, respectively. In Scenario 2, IRDOA-DSR-Transformer also achieves the lowest carbon emission of 6,591 kg, which is 545 kg lower than the actual result and 194 kg lower than IRDOA-Transformer. This is mainly because more accurate load forecasting can reduce the mismatch between predicted and actual electricity demand, allowing the dispatch strategy to better coordinate grid electricity purchase, PV consumption, and energy storage operation. As a result, unnecessary high-carbon electricity consumption and inefficient scheduling are reduced. Therefore, under the specific dispatch logic and carbon accounting assumptions of this study, the improved forecasting accuracy of IRDOA-DSR-Transformer suggests a potential for carbon emission reduction in the two school scenarios examined.
TABLE 9
| Prediction model | Scenario 1: carbon emissions | Scenario 2: carbon emissions |
|---|---|---|
| Actually | 9,852 kg | 7,136 kg |
| IRDOA-DSR-Transformer | 9,060 kg | 6,591 kg |
| IRDOA-Transformer | 9,420 kg | 6,785 kg |
| IRDOA-BIGRU | 9,730 kg | 7,048 kg |
Carbon emissions under different dispatch scenarios.
At the same time, to further demonstrate the general applicability of the proposed strategy, it is also applied to an industrial area of an integrated energy system in northern China. In this case, the proposed method is used to forecast the industrial load, with the aim of reducing carbon emissions and improving the economic performance of the system. The main stakeholders considered in the system include the energy manager (EM), the energy provider (EP), and the integrated energy system consumers, represented by the IES cost. The results are shown in Figure 14 and Table 10.
FIGURE 14
TABLE 10
| Prediction model | Carbon emissions | EM revenue | EP revenue | IES cost |
|---|---|---|---|---|
| Actually | 11,752 kg | 2,365 $ | 16,732 $ | 23,155 $ |
| IRDOA-DSR-Transformer | 10,259 kg | 2,478 $ | 18,126 $ | 21,178 $ |
| IRDOA-Transformer | 9,964 kg | 2,254 $ | 17,391 $ | 25,580 $ |
| IRDOA-BIGRU | 10,937 kg | 2,217 $ | 16,497 $ | 24,936 $ |
Carbon emissions and economic performance of the IES under different prediction models.
Figure 14 shows the electrical balance diagram of the IES area, where the dispatch deviation based on the IRDOA-DSR-Transformer prediction is relatively small. Table 10 compares the carbon emissions and economic performance of the IES under different prediction models. The IRDOA-DSR-Transformer achieves a carbon emission of 10,259 kg, which is 1,493 kg lower than the actual result, corresponding to a reduction of approximately 12.70%. Although IRDOA-Transformer obtains the lowest carbon emission, its IES cost increases to 25,580 $, indicating that carbon reduction alone may be achieved at the expense of system economy. In contrast, IRDOA-DSR-Transformer reduces the IES cost from 23,155 $ to 21,178 $, while increasing EM revenue and EP revenue to 2,478 $ and 18,126 $, respectively. This result suggests that accurate load forecasting helps the IES make more appropriate dispatch decisions, such as reducing unnecessary power purchase, improving energy utilization, and avoiding excessive scheduling deviations. Therefore, the proposed model provides a more balanced performance by linking forecasting accuracy with both carbon reduction and economic operation.
7 Conclusion
This paper addresses the challenge of campus electricity load forecasting by proposing an integrated prediction framework that combines UMAP for feature dimensionality reduction, an improved inheritance and reorganization-inspired dhole optimization algorithm, and a dynamic sparse routing gate-based Transformer. By effectively compressing high-dimensional features, enhancing optimization performance, and introducing structural innovations into the prediction model, this approach significantly improves load forecasting accuracy, thereby yielding substantial environmental benefits through reduced energy waste and associated carbon emissions. The main contributions of this study are summarized as follows:
UMAP is employed for the dimensionality reduction of multi-dimensional features, including electric vehicle charging behaviors, temporal characteristics, and environmental factors, compressing the original high-dimensional feature space into 2–3 dimensions. This process preserves the key structural information of the electricity load—particularly environmentally sensitive patterns such as peak charging periods and holiday transitions—while effectively removing redundancy and noise. By retaining the core characteristics of high-impact load periods, this method enhances the discriminative power of the input features for the subsequent forecasting model, thereby contributing to the reduction of energy waste during critical time intervals.
Compared to DOA-DSR-Transformer, GWO-DSR-Transformer, and RIME-DSR-Transformer, the proposed IRDOA-DSR-Transformer achieves an improvement of 1.11%–2.99% in R2, an average reduction of approximately 50% in MSE, a decrease of 31.15%–36.84% in RMSE, a reduction of 36.84% in MAPE, and an acceleration in convergence speed of approximately 28%. Its standard deviation over five independent runs is only ±1.2, demonstrating superior stability over the benchmark algorithms. By introducing an experience inheritance strategy and a dynamic population reorganization mechanism, the algorithm establishes an enhanced balance between global exploration and local exploitation, thereby demonstrating excellent performance in both diverse optimization benchmarks and load forecasting tasks. This enhanced prediction accuracy directly translates into reduced energy waste and improved environmental benefits, particularly during high-load periods such as overnight charging intervals.
In the 96-period load forecasting task, the DSR-Transformer model reduces MAE by 22.7%, lowers RMSE from 61 to 42, decreases MSE from 46 to 25, and elevates R2 to 98.25%, representing a 3.57 percentage point improvement over the baseline Transformer architecture. Notably, the forecasting error during critical periods (0:00–6:00) is strictly controlled within 1.55%. By introducing dynamic sparse routing gates, the model achieves adaptive selection and concentrates on key temporal features—especially those with high environmental sensitivity—thereby enhancing both forecasting accuracy and the associated environmental benefits.
The innovations of this research are mainly reflected in three aspects: (1) proposing an IRDOA-DSR-Transformer-based carbon reduction method for campus IES that considers student behavior uncertainty; (2) introducing sparse routing gates to achieve adaptive focus on critical load periods where prediction accuracy most directly affects energy waste; and (3) developing the IRDOA algorithm to effectively enhance the efficiency and quality of hyperparameter search, ensuring reliable prediction performance under diverse behavioral scenarios.
Nevertheless, several limitations should be acknowledged. First, due to the large number of parameters in the deep model and the limited size of the campus dataset, there remains a risk of overfitting, even with the use of dropout and early stopping. Second, the generalizability of the findings is constrained by the single-campus case study; validation on campuses with different energy infrastructures and student populations is required. Third, the empirical validation currently relies on a relatively short 10-day period extracted from a summer month; coupled with uneven data coverage across different semesters and vacation periods, this short-term window may limit external validity and introduce potential sampling bias, affecting model stability during under-represented seasonal periods. In addition, although different school behavior scenarios and a non-campus IES scenario have been considered, the transferability of the proposed method under more diverse campus energy consumption structures, behavioral patterns, and regional electricity market conditions still requires further validation. Finally, the modeling of behavioral uncertainty relies on feature embedding and dimensionality reduction, rather than explicitly capturing causal relationships or adaptive changes. Future work will focus on extended multi-season datasets, multi-campus validation, integration with realistic dispatch control, and deeper representation of behavioral uncertainty.
Statements
Data availability statement
The raw data supporting the conclusions of this article will be made available by the authors, without undue reservation.
Author contributions
H-YJ: Funding acquisition, Validation, Writing – original draft. ZL: Data curation, Investigation, Methodology, Writing – review and editing. ZhL: Conceptualization, Visualization, Writing – original draft.
Funding
The author(s) declared that financial support was received for this work and/or its publication. This work was Supported by 2026 Hebei Provincial Youth Fund for Higher Education Scientific Research (No.QN2026063): Research on the Generation Mechanism and Optimization Pathways for Improving Accessibility in Elderly Education through Digital Intelligence Empowerment in Hebei Province.
Conflict of interest
The author(s) declared that this work was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.
Generative AI statement
The author(s) declared that generative AI was not used in the creation of this manuscript.
Any alternative text (alt text) provided alongside figures in this article has been generated by Frontiers with the support of artificial intelligence and reasonable efforts have been made to ensure accuracy, including review by the authors wherever possible. If you identify any issues, please contact us.
Publisher’s note
All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.
References
1
AdekunleA. A.FofanaI.PicherP.Rodriguez-CelisE. M.Arroyo-FernandezO. H.ZemouriR. (2025). Optimizing deep learning predictive models: a comprehensive review of RNN and its variant architectures. Appl. Soft Comput.185, 114015. 10.1016/j.asoc.2025.114015
2
AlsamraeeS. A.KhannaS. (2026). A hybrid transformer-TCN-GRU based model for thermal load forecasting of a large university campus. Energy344, 140114. 10.1016/j.energy.2026.140114
3
BianJ. W.LiuF.ZhaoQ.TangY. C.ZhenX. L.LyuX. F.et al (2026). Optimization of source pencil arrangements in gamma irradiation devices using particle swarm optimization algorithm. Radiat. Phys. Chem.240, 113411. 10.1016/j.radphyschem.2025.113411
4
ChiuM.-C.HsuH.-W.ChenK. S.WenC.-Y. (2023). A hybrid CNN-GRU based probabilistic model for load forecasting from individual household to commercial building. Energy Rep.9, 94–105. 10.1016/j.egyr.2023.05.090
5
de OliveiraE. M.Cyrino OliveiraF. L. (2018). Forecasting mid-long term electric energy consumption through bagging ARIMA and exponential smoothing methods. Energy144, 776–788. 10.1016/j.energy.2017.12.049
6
DongY.LiuK.JiangH.DongY.WangJ. (2025). Power load forecasting using deep learning and reinforcement learning. Inf. Sci.720, 122523. 10.1016/j,ins.2025.122523
7
FengZ. X.ZhangX.QuanW.LiuX. F.AnJ. H.WangC.et al (2025). A hybrid deep learning model based on rime optimization and multi-head attention for cooling load prediction in public buildings. Energy339, 139100. 10.1016/j.energy.2025.139100
8
GuanZ. Y.RenC. J.NiuJ. T.WangP. X.ShangY. Z. (2023). Great wall construction algorithm: a novel meta-heuristic algorithm for engineer problems. Expert Syst. Appl.233, 120905. 10.1016/j.eswa.2023.120905
9
HafeezG.AlimgeerK. S.KhanI. (2020). Electric load forecasting based on deep learning and optimized by heuristic algorithm in smart grid. Appl. Energy269, 114915. 10.1016/j.apenergy.2020.114915
10
HajjajiI.MansourA. A.DahmouniH. (2026). AI-driven energy optimization in university microgrid: a hybrid LSTM-RNN forecasting consumption patterns approach. Energy Rep.15, 109023. 10.1016/j.egyr.2025.109023
11
KarthikaS.MargaretV.BalaramanK. (2017). “Hybrid short term load forecasting using ARIMA-SVM,” in Proceedings of the 2017 Innovations in Power and Advanced Computing Technologies (i-PACT), Vellore, India1–7. 10.1109/IPACT.2017.8245060
12
KimJ. H.LeeB. S.KimC. H. (2023). A study on the development of long-term hybrid electrical load forecasting model based on MLP and statistics using massive actual data considering field applications. Electr. Power Syst. Res.221, 109415. 10.1016/j.epsr.2023.109415
13
LahyaniM. A.AmayriM. (2025). Explainable hybrid deep learning model with attention mechanism for short-term load forecasting. Sustain. Cities Soc. Adv.1, 100003. 10.1016/j.scsadv.2025.100003
14
ŁawryńczukM.ZarzyckiK. (2025). LSTM and GRU type recurrent neural networks in model predictive control: a review. Neurocomputing632, 129712. 10.1016/j.neucom.2025.129712
15
LiY. T.WuK.LiuJ. (2023). Self-paced ARIMA for robust time series prediction. Knowledge-Based Syst.269, 110489. 10.1016/j.knosys.2023.110489
16
LiL. L.ZhangW. H.LiY.JiangC. J.WangY. F. (2024). Multi-physical fields prediction model for turbine cascades based on physical information neural networks. Aerosp. Sci. Technol.155, 109709. 10.1016/j.ast.2024.109709
17
LiuJ. L.CaoW. T.QuX. Y. (2025). Short-term multi-regional load forecasting considering dynamic spatial features with missing data. Energy Build.348, 116450. 10.1016/j.enbuild.2025.116450
18
LiuW. L.GaoY.ZhuQ.YouY. L.XiaB. C. (2025). Diesel selective catalytic reduction emission prediction based on physical model data-driven and variational autoencoder-fully connected neural network-improved Bayesian algorithm (VAE-FCNN-IBO). Energy337, 138611. 10.1016/j.energy.2025.138611
19
LiuZ.LiZ.JinX.JiaH. (2026). Multi-time-domain hierarchical scheduling of integrated energy systems with frequency decomposition considering large-scale grid connection of electric vehicles. IEEE Trans. Smart Grid17 (1), 244–254. 10.1109/tsg.2025.3617542
20
LuL. Q.ZhangZ. P.ZhangG. L.HanB.YangH. R.ZhuZ. X.et al (2025). Application of a deep learning model with physical model constraints and attention mechanism for state prediction in high-power power-shift tractors. Comput. Electron. Agric.238, 110883. 10.1016/j.compag.2025.110883
21
MatreninP.SafaralievM.DmitrievS.KokinS.GhulomzodaA.MitrofanovS. (2022). Medium-term load forecasting in isolated power systems based on ensemble machine learning models. Energy Rep.8, 612–618. 10.1016/j.egyr.2021.11.175
22
PappasS. S.EkonomouL.KarampelasP.KaramousantasD.KatsikasS.ChatzarakisG.et al (2010). Electricity demand load forecasting of the Hellenic power system using an ARMA model. Electr. Power Syst. Res.80, 256–264. 10.1016/j.epsr.2009.09.006
23
PengC.TaoY. F.ChenZ. P.ZhangY.SunX. (2022). Multi-source transfer learning guided ensemble LSTM for building multi-load forecasting. Expert Syst. Appl.202, 117194. 10.1016/j.eswa.2022.117194
24
QiaoB. Y.YangY. Z.TangZ.HanD. H.WuG. (2025). CNN-attention combined with improved transformer model for medium- and long-term SST prediction. Ocean. Eng.340, 122315. 10.1016/j.oceaneng.2025.122315
25
RazaM. Q.NadarajahM.EkanayakeC. (2016). On recent advances in PV output power forecast. Sol. Energy136, 125–144. 10.1016/j.solener.2016.06.073
26
RoyalE.BandyopadhyayS.NewmanA.HuangQ.Tabares-VelascoP. C. (2025). A statistical framework for district energy long-term electric load forecasting. Appl. Energy384, 125445. 10.1016/j.apenergy.2025.125445
27
WangC.ZhaoH. S.LiuY.FanG. J. (2024). Minute-level ultra-short-term power load forecasting based on time series data features. Appl. Energy372, 123801. 10.1016/j.apenergy.2024.123801
28
YanX. Y.CaoY. T. (2025). A three-stage hybrid model for short-term photovoltaic power prediction. Sol. Energy301, 113904. 10.1016/j.solener.2025.113904
29
YanX.ChowdhuryN. A. (2014). Mid-term electricity market clearing price forecasting utilizing hybrid support vector machine and auto-regressive moving average with external input. Int. J. Electr. Power and Energy Syst.63, 64–70. 10.1016/j.ijepes.2014.05.037
30
YanQ.LuZ. Y.LiuH.HeX.ZhangX.GuoJ. (2023). An improved feature-time transformer encoder-Bi-LSTM for short-term forecasting of user-level integrated energy loads. Energy Build.297, 113396. 10.1016/j.enbuild.2023.113396
31
YuY. X.WangF.YangM.ZhangY. M.WangZ. Y. (2026). Deep learning short-term load forecasting method based on adaptive mode decomposition. Electr. Power Syst. Res.252, 112450. 10.1016/j.epsr.2025.112450
32
YuanY.ChenZ. H.WangZ.SunY. F.ChenY. X. (2023). Attention mechanism-based transfer learning model for day-ahead energy demand forecasting of shopping mall buildings. Energy270, 126878. 10.1016/j.energy.2023.126878
33
YuanL.ZhongJ. Y.LiuY. L.LiuX. B.WangY. Q.DongZ. Y. (2026). A two-stage hierarchical clustering and transformer-BiLSTM hybrid framework for electric vehicle charging load forecasting. Int. J. Electr. Power and Energy Syst.174, 111461. 10.1016/j.ijepes.2025.111461
34
ZhangJ. H.ChenJ. D.LiuD.HeL.YangK.DuF. L.et al (2025). Multi-state joint prediction algorithm for lithium battery packs based on data-driven and physical models. Energy322, 135641. 10.1016/j.energy.2025.135641
35
ZhangQ. J.LiuY. X.FuZ. P.CaoS.LiZ.WangZ.et al (2026). Multi-load forecasting for regional integrated energy systems using a hybrid ResNet-GRU-MTL model with dynamic grey wolf optimization. Renew. Energy256, 124690. 10.1016/j.renene.2025.124690
36
ZhaoH. R.HanX. Y.GuoS. (2018). DGM (1, 1) model optimized by MVO (multi-verse optimizer) for annual peak load forecasting. Neural Comput. Appl.30, 1811–1825. 10.1007/s00521-016-2799-1
37
ZouS.PengM. H.YangJ.FengQ.DouM. Y.HuangF. C.et al (2026). SDERIME: enhanced RIME algorithm with Sobol sequences and differential evolution for heavy calcium carbonate powder particle size distribution soft sensor model optimization. Expert Syst. Appl.296, 128993. 10.1016/j.eswa.2025.128993
Summary
Keywords
campus power load, deep learning, environmental impact, prediction, student behavior uncertainty
Citation
Jie H-Y, Li Z and Liu Z (2026) Quantifying the environmental impacts of student behavior uncertainty in campus power system: an electricity load forecasting-driven carbon reduction method. Front. Environ. Sci. 14:1854059. doi: 10.3389/fenvs.2026.1854059
Received
13 April 2026
Revised
09 July 2026
Accepted
09 July 2026
Published
14 August 2026
Volume
14 - 2026
Edited by
Can Wang, Tsinghua University, China
Reviewed by
Ariana James, Florida Memorial University, United States
Hilal Surat, Artvin Coruh University, Türkiye
Updates
Copyright
© 2026 Jie, Li and Liu.
This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.
*Correspondence: Zhifeng Liu, liuzhifeng@tust.edu.cn
Disclaimer
All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article or claim that may be made by its manufacturer is not guaranteed or endorsed by the publisher.