## 3 Methodology
### Long-Term Bias Mitigating  
Considering the pitfall of long-term prediction, we additionally forecast the short term as preparation for correcting the bias of the long-term prediction. Specifically, this only requires adjusting the parameters of the final MLP layer in the encoder-decoder framework to obtain the short-term prediction \(Y2_{short}\in\mathbb{R}^{\rm N\times S}\) as Equations (16) and (17), where \(S\) is less than and divisible by \(L\). In other words, \(L\) can be written as \(n\times S\), where \(n\) is an integer.  
\[\begin{array}{l}Y2_{Short}=MLP_{Short}(\mathrm{H}_{t}^{l+1})\\ L=n\times S,\ n,L,S\in\mathbb{Z}^{+}\end{array} \tag{16}\]  
Meanwhile, the loss function is defined as the mean squared error (MSE) for independent training as shown in Equation (17), where \(N_{s}\) represents the number of samples.  
\[Loss_{3}=\frac{1}{N_{s}}{\sum_{i=1}^{N_{s}}}\big{(}Y_{i}-Y2_{short_{i}}\big{)} ^{2} \tag{17}\]  
In this situation, the preliminary long-term forecast \(Y1_{Long}\in\mathbb{R}^{\rm N\times L}\) from the encoder-only framework and both the long-term \(Y2_{Long}\in\mathbb{R}^{\rm N\times L}\) and short-term \(Y2_{Short}\in\mathbb{R}^{\rm N\times S}\) forecast from the encoder-decoder framework are available for subsequent bias mitigating and final forecasting. To align the dimension, the extended sequence is constructed by replicating the short-time prediction sequence into n copies as shown in Equation (18). In most conditions, time-series data such as temperature and electricity do not fluctuate much and inherently show a strong periodic law. Therefore, iterating short-term forecasting is not just an error correction trick but a mechanism to decompose long-term dependencies into locally coherent segments. By averaging these segments, the model constructs a long-term forecast that reflects the hierarchical, multi-scale nature of real-world time-series data. This approach effectively bridges the gap between the global insights provided by the transformer encoder and the decoder's requirement for local temporal fidelity, ultimately enhancing dependency modeling and mitigating error propagation.  
\[\mathrm{Y2}_{\rm short}^{rep}=[Y2_{Short},Y2_{Short},\dots,Y2_{Short}] \tag{18}\]  
Furthermore, TSNN-ESTD integrates these three outputs by means of a weighted average and gives the final forecast as shown in Equation (19). The core contribution of TSNN-ESTD is to correct the bias of long-term forecasts with short-term forecasts. According to our preliminary experiments, it is found that the model generally achieves the best performance when the weights of the two long-term models are adjusted to be the same. The long-term predictions of both models with encoder-only and encoder-decoder architectures are treated as equally important. The final result is then calculated by the weighted average of the long-term and short-term forecast series.  
\[Y_{Final}=\alpha\times\frac{1}{2}(Y1_{Long}+Y2_{Long})+\beta\times\mathrm{Y2 }_{\rm short}^{rep}s.t\ \alpha+\beta=1 \tag{19}\]At this point, the long-term forecasts \(Y1_{Long}\) and \(Y2_{Long}\) at time steps 1 to S, S + 1 to 2S, and so on, can be corrected by the short-term forecast \(Y2_{Short}\), which can help the model's performance in capturing long-term dependencies to some extent.