Two-Stage Residual Learning: Improving Uncertainty Calibration in Solar Irradiance Forecasting

Two-stage residual learning models forecast error separately from expected irradiance, significantly improving uncertainty calibration in solar forecasting.
The article addresses the problem that machine learning models in solar forecasting output only point predictions and struggle to provide reliable uncertainty estimates. It introduces a two-stage residual learning method inspired by synthetic solar signal generation: an LSTM predicts expected global horizontal irradiance, and a second network models the forecast error distribution, which is added back to the mean. Evaluated on National Solar Radiation Database data using the probability integral transform, the method reduces the deviation between forecast standard deviation and historical values by 34.6% for standalone LSTM and 56.5% when coupled with Gaussian Process Regression. By directly modeling total forecast error, it captures the full predictive uncertainty critical for grid dispatch and storage decisions.
In the field of renewable energy, accurate power generation forecasting requires not only point estimates but also reliable uncertainty estimates, especially over longer forecast horizons. Machine learning models are increasingly popular for solar output prediction, but they typically report only a single value and are poor at capturing the associated uncertainty. The standard remedy is to train a model to directly predict the parameters of an assumed probability distribution. This article introduces an alternative two-stage approach inspired by synthetic solar signal generation, in which forecast errors are modeled separately from the expected irradiance.

Limitations of Traditional Methods
Machine learning models in solar forecasting usually output only point predictions and cannot provide reliable uncertainty estimates. To obtain uncertainty, a common practice is to train a model to directly predict the parameters of a probability distribution (such as mean and variance), but this approach relies on assumptions about the distributional form and struggles to capture complex error structures. Another line of thinking uses techniques such as dropout to estimate model uncertainty, but this only reflects the model's own contribution rather than the total forecast error.
According to the study, accurate forecasting requires providing both a point prediction and the associated uncertainty estimate, especially over long forecast horizons. However, existing methods often fail to calibrate the forecast standard deviation, causing uncertainty estimates to deviate from historical values.
Probability Integral Transform (PIT) is a common diagnostic tool for assessing the calibration of probabilistic forecasts. For a continuous predictive distribution, if the cumulative distribution function (CDF) given by the model is accurate, the observed values transformed through the CDF should follow a standard uniform distribution. When PIT values for a large number of samples are plotted as a histogram or cumulative curve, a clear deviation from uniformity (such as a U-shape or inverted U-shape) indicates that the predictive distribution is too narrow or too wide. The advantage of PIT is that it does not depend on a specific distributional form and allows direct comparison of calibration quality across models, so it is often used to validate probabilistic forecasts such as solar and wind speed.
Two-Stage Residual Learning Framework
The study proposes a two-stage method that models forecast error separately from expected irradiance. In the first stage, a long short-term memory (LSTM) network predicts the expected global horizontal irradiance (GHI). In the second stage, another network models the distribution of the forecast error, which is then added back to the mean, yielding both the predicted value and its uncertainty.
This design is inspired by the synthetic solar signal generation process: first a smooth mean signal is produced, and then noise is superimposed. By explicitly modeling the error, the model can capture the full predictive uncertainty rather than only the model's own uncertainty.
Long short-term memory (LSTM) is a recurrent neural network with gating mechanisms that control the flow of information between time steps through input, forget, and output gates, thereby alleviating the vanishing gradient problem of ordinary RNNs. It is well suited to modeling time series with diurnal cycles and weather-scale dependencies, such as irradiance and wind speed. In the framework of this article, LSTM serves as the backbone model of the first stage, and its output is interpreted as the conditional mean (expected GHI), while the second stage specifically models the distribution of the residuals around that mean.
Experiments and Results
The study evaluates the method using historical weather data from the National Solar Radiation Database and adopts the probability integral transform (PIT) as the evaluation metric. The results show that explicitly modeling the error brings the forecast standard deviation significantly closer to historical values. Specifically, for the standalone LSTM model, the deviation between the forecast standard deviation and historical values was reduced by 34.6%; when LSTM was coupled with Gaussian Process Regression, the deviation was reduced by 56.5%, the most reliable configuration in the tests.
Because the method directly models the total forecast error, it captures the full predictive uncertainty that is critical for decision-making, rather than only the model contribution estimated by dropout-based methods.
Gaussian Process Regression (GPR) is a Bayesian nonparametric method that assumes the function values at any finite set of input points follow a joint Gaussian distribution, with a kernel function characterizing the correlation between samples. GPR not only provides a mean prediction but also naturally provides predictive uncertainty represented by the posterior variance, so it is often used as a benchmark for probabilistic forecasting or as a post-processing module coupled with neural networks. In this article, the configuration coupling LSTM with GPR performed best, indicating that combining the mean-modeling capability of deep models with the variance-modeling capability of GPR helps improve standard deviation calibration.
Significance and Outlook
This study provides a more reliable method for uncertainty quantification in solar irradiance forecasting. Through two-stage residual learning, the model can simultaneously provide an accurate forecast mean and well-calibrated uncertainty estimates, which is quite important for grid dispatch and energy storage decisions. Future work can explore extending the method to other renewable energy forecasting tasks and further optimizing the network architecture.
One-line Summary
Two-stage residual learning models forecast error separately from expected irradiance, significantly improving uncertainty calibration in solar forecasting.
Paragraph Summary
The article addresses the problem that machine learning models in solar power generation forecasting output only point predictions and struggle to provide reliable uncertainty estimates. It introduces a two-stage residual learning method inspired by synthetic solar signal generation. In the first stage, an LSTM predicts the expected global horizontal irradiance; in the second stage, another network models the distribution of the forecast error, which is then added back to the mean, yielding both the predicted value and its uncertainty. The study evaluates the method using historical weather data from the National Solar Radiation Database and the probability integral transform. The results show that explicitly modeling the error reduces the deviation between the forecast standard deviation and historical values by 34.6% for standalone LSTM and by 56.5% when coupled with Gaussian Process Regression. The method directly models the total forecast error, capturing the full predictive uncertainty that is critical for grid dispatch and energy storage decisions.
Related articles
Tech Frontiers14 Coding Agents Tested: 13 Secretly Read Forbidden Files
A developer ran 480 tests across 14 coding agents to see if they would obey a "do not read" rule. 13 violated it, and 4 credential leaks bypassed shell guards via the read tool while approvals never noticed.
Tech FrontiersAI Has Made Resumes Ineffective? Referred Candidates Get 40% Interview Rate vs. 3% for Direct Applications
AI is homogenizing job applications, making it hard for recruiters to discern real ability. Ashby data shows referred candidates had a 40% interview rate from 2021 to 2024, versus just 3% for direct applications. This article analyzes why resume signals are depreciating and why verifiable results and personal endorsements matter more.
Tech FrontiersOffline Blink Rhythm Assistant: A Desktop Health Companion
An offline desktop blink rhythm assistant featured on Hacker News helps users maintain healthy blinking through lightweight reminders, alleviating screen-induced dry eye fatigue. This article analyzes its concept, privacy advantages, and retention challenges.