## 4 BILSTM-Transformer Based Bems Model
### Microgrid Optimization Method Based on Cognitive Control
#### 4.5.3 Quantification of Information Gap
Although there are occasional slight fluctuations in the loss function in the later stages of training, the overall trend indicates that the algorithm has good convergence. After the training is completed, the BiLSTM-Transformer network shows strong generalization ability and can effectively cope with the scheduling requirements in the online environment. By combining the temporal feature extraction capability of BiLSTM and the global dependency modeling capability of Transformer, the network can maintain stable forecasting performance in a variety of complex scenarios. The training loss is shown in Figure 5.

### Load-Forecasting Result

This Section will present the experimental results. Section 5.3.1 will show the prediction performance and performance parameters of different network structures (Table 1). Section 5.3.2 will show the prediction results and performance parameters of the cognitive control system with or without data loss (Table 2). Figure 5: Training loss of BiLSTM–Transformer. Firstly, from the perspective of symmetry, an ideal forecasting model should be able to make consistent responses to changes in actual data when processing time series and should not exhibit overreaction or lag biased towards a certain direction. For example, if the model can accurately capture changes in actual data during an upward trend, it should also exhibit similar accuracy during the same downward trend. This symmetry is reflected in the balance and consistency of the model, that is, the response to load changes can remain symmetrical in both rising and falling stages. Applied to load forecasting: In load-forecasting tasks, if the actual load rises within a certain period of time, the predicted curve should also rise smoothly, maintaining symmetry with the actual data. If the predicted values exhibit irregular spikes or deviations at certain moments, it indicates that this symmetry has been disrupted and the model's handling of signal changes at these locations is asymmetric. #### 5.3.1 Network Performance Comparison

In Figure 5(a), The BiLSTM-Transformer (BT) model: It can be seen that the model is almost completely consistent with the overall trend and the actual load change, especially in the key load fluctuation area; the prediction curve can closely follow the actual curve, showing a high degree of synchronization and stability. By combining the bidirectional time series processing capability of BiLSTM and the self-attention mechanism of Transformer, the BT model effectively captures the short-term and long-term dependence of the load, thereby enhancing the accuracy of the model when dealing with complex load changes. As you can see in the graph, the forecast curve almost coincides with the actual load curve with no significant deviations or spikes, indicating that the model performs well in terms of symmetry and continuity. This consistency allows the BT model to maintain a high degree of balance in capturing both upward and downward trends in load. In Figure 5(b), The LSTM-Transformer model: The LSTM-Transformer model combines a long short-term memory network (LSTM), which is used to capture short-term dependencies in time series, and Transformer, which handles global dependencies through a self-attention mechanism and the Transformer architecture. This combination gives the model an advantage in dealing with the complexity of load changes. As can be seen from the Figure, the prediction curve of the LSTM-Transformer model is in good sync with the actual load curve in the general trend, especially in the interval where the load is relatively stable; the model can follow the fluctuation of the actual load more accurately, showing a certain stability. However, in some rapidly changing regions, there is a slight deviation between the forecast curve and the actual load, especially near the peaks and valleys, and there is a certain delay or shift in the model's predictions.