Stochastic Rounding for Low-Precision Renewable Scenario Generators

Grid operators who hedge against cloud and wind swings do not need a single forecast. They need many plausible future trajectories of solar or wind output, called scenarios, so that a risk-aware dispatcher can size reserves against the bad tail. These scenario generators are being pushed onto cheap embedded hardware: inverter controllers and microgrid gateways that run 8- or 16-bit fixed-point or half-precision arithmetic. Work on chaotic simulation at low precision shows a specific failure on such hardware. When a recurrent update adds a small increment to its state and that increment is smaller than half the gap between representable numbers, round-to-nearest throws it away. Trajectories then stall at spurious fixed points or fall into short loops, and the spread of the simulated distribution collapses (Periodic orbits in chaotic systems simulated at low precision). In a renewable scenario generator, the small increments are the stochastic weather innovations. Losing them means losing the tail, and the tail is exactly what conditional value-at-risk (CVaR) dispatch, which sizes reserves against the worst few percent of outcomes, is built to price.

This note proposes to measure that failure and to fix it with stochastic rounding. Stochastic rounding rounds up or down with probability proportional to distance, so on average it adds nothing and loses nothing. The claim is that a quantized recurrent scenario generator for deseasonalized solar irradiance and wind power under-covers ramp tails under round-to-nearest. Applying stochastic rounding to the recurrent state update alone should recover the full-precision tail at 8–16 bits, at negligible cost. The test is whether this changes reserves computed by a CVaR inverter-dispatch model, not only whether it changes forecast scores.

Core Claim

Write the generator's state update as $h_{t+1} = h_t + \delta_t$, where $\delta_t$ combines deterministic dynamics and a sampled innovation, and let $\Delta$ be the local quantization step. Under round-to-nearest, any component with $|\delta_t| < \Delta/2$ is erased. Under stochastic rounding, the quantized state $\hat h_{t+1}$ equals $h_t + \Delta\,\mathrm{sign}(\delta_t)$ with probability $|\delta_t|/\Delta$ and $h_t$ otherwise, so that

$$ \mathbb{E}[\hat h_{t+1} - h_t] = \delta_t . $$

The expected increment is preserved, but stochastic rounding adds variance of order $\Delta|\delta_t|$, which comes from the Bernoulli form above.

The empirical prediction has three parts. First, at low bit-width, round-to-nearest generators show shrunken ensemble spread, too-low coverage of the 95% and 99% quantiles of ramp magnitude, and run-length artifacts: repeated or frozen segments during cloudy periods. Second, stochastic rounding removes most of this damage. Third, the reserve requirement computed by CVaR dispatch falls with round-to-nearest, silently moving a risk-averse operator toward a risk-neutral answer. That third prediction is what makes the issue operational. On the 20-house feeder in Optimal Dispatch of Residential Photovoltaic Inverters Under Forecasting Uncertainties, Dall'Anese et al. report the gap between the two answers as 27.83 kWh (risk-neutral) versus 44.05 kWh (95% CVaR) of curtailment reserve.

The chaos-degradation direction supplies the mechanism and the method. Renewable intermittency supplies the setting and the stakes. The claim is deliberately narrow. Precision damage matters for scenario generation that rolls forward step by step and feeds a tail-sensitive dispatcher. It may not matter for point forecasting.

Research Program

The generators work on the stationary residual left after subtracting the per-timestamp historical diurnal mean. This is the ensemble-deduction step of Modified Auto Regressive Technique for Univariate Time Series Prediction of Solar Irradiance. That paper showed this residual is predictable enough that an autoregressive (AR) model matched LSTMs and CNNs at the 10-minute horizon (14.20% MAPE versus 14.56% and 14.71%). We reuse its preprocessing, which motivates our choice of small models.

We build two generator families. The first is an AR model of order $p$ driven by resampled innovations. The second is an Euler State Network from Reservoir Computing by Discretizing ODEs: a fixed random recurrent network whose weight matrix is antisymmetric ($W = W_h - W_h^\top$), so that a forward-Euler step neither dissipates nor amplifies the state. Only its readout is trained, and it is driven by sampled noise to produce scenarios. Gallicchio tested this network only on classification and only in full precision. The low-precision question is sharp for it. Its weights stay antisymmetric under symmetric rounding of $W$. Rounding the state, however, adds dissipation or spurious drift, which may destroy the non-dissipative property that motivates the design. Both families are small enough for microcontrollers, which is the point.

Each generator runs in 8-bit and 16-bit fixed point, in Float16, and in Float32 as reference. Round-to-nearest and stochastic rounding are applied either to the state update only or to all operations. We first check that the setup reproduces known results on Lorenz 1996, where Klöwer et al. documented spurious stabilization and its removal by stochastic rounding. We then move to real data.

The analysis tracks three things: the distribution of the residual, the joint behavior of trajectories (ramp durations, run lengths, autocorrelation), and the downstream reserve. That last one is the endpoint that matters.

Baselines

The do-nothing reference is the Float32 generator with the same weights. It defines the target distribution. Every low-precision variant is scored by its distance from this reference and from held-out observations. A second naive reference is round-to-nearest at each bit-width with no change. That is what a practitioner gets by quantizing a model and shipping it.

The strongest point-forecast competitor is CrossViViT (Improving day-ahead Solar Irradiance Time Series Forecasting by Leveraging Spatio-Temporal Context). It reports an MAE of 50.35 at the cloudy Cabauw station against 54.91 for the best of Informer, Autoformer and PatchTST, with multi-quantile outputs reaching above 0.90 confidence on unseen stations. It is the right ceiling for what a large model achieves. It is not a fair competitor for edge deployment, since the authors report roughly 5 hours per epoch on a high-end GPU. We use its released code (gitbooo/CrossViVit) only for an upper reference on quantile coverage at Cabauw at day-ahead resolution. We do not claim to beat it.

The strongest competitor on our actual question is a direct multi-horizon quantile regressor quantized to the same bit-width. Because it makes no recurrent rollout, it has no state for rounding to stall. It gets the same data, the same parameter budget as the generator, and the same hyperparameter search budget. No reported result was found on Lacuna for low-precision probabilistic renewable forecasters of any kind. The Float32 numbers we produce are therefore the reference.

Beating the baselines means two things. First, stochastic rounding at 8–16 bits must sit within the Float32 generator's sampling noise on tail coverage and CVaR reserve, while round-to-nearest falls outside it. Second, the generator must beat the quantized direct-quantile model on trajectory-level metrics without losing on marginal ones. Two ablations isolate the key ingredient. One applies stochastic rounding everywhere versus only in the state update. The other replaces stochastic rounding with additive uniform dither of matched variance.

Why not just…?

Why not just run in Float32? Many gateways can, and if the target hardware always can, this work reduces to a characterization study that says when not to worry. The value depends on the regime where 32-bit arithmetic per inverter is unavailable or too costly in energy and memory. Sweeping the bit-width shows where degradation begins. If it begins only below 8 bits, we will say so plainly.

Why not just inject Gaussian or uniform dither into the state? This is a real threat, because stochastic rounding is a form of dither. Deng and Shi argue that external perturbations distort the attractor, while their self-derived compensation extended cycle entry of a digital Hénon map from 54 to 196,964 steps (An Error Compensation Method for Improving the Properties of a Digital Henon Map Based on the Generalized Mean Value Theorem of Differentiation). That result is for a deterministic map, not a noise-driven generator. The difference that matters here is that stochastic rounding's added variance scales with the increment, whereas fixed dither inflates spread even in calm clear-sky periods. The matched-dither ablation settles this directly by testing for over-dispersion on clear days.

Why not just recalibrate the quantized output with conformal or quantile rescaling? Post-hoc rescaling can restore marginal coverage at each horizon. It cannot restore run lengths or ramp durations that were damaged by stalling. Multi-step dispatch depends on those, because a 30-minute ramp and three separate 10-minute ones need different reserves. We include a conformally recalibrated round-to-nearest generator as a baseline. If it matches stochastic rounding on CVaR reserve as well as marginal coverage, the trajectory-level argument fails.

Why not just forecast quantiles directly and skip rollouts? For single-stage reserve sizing this may simply win, and the experiments allow that outcome. Scenario trees for multi-stage recourse need joint trajectories. The Value of Multi-stage Stochastic Programming in Risk-averse Unit Commitment under Uncertainty shows that the value of such recourse grows with renewable uncertainty. That is where generators are needed and where we expect their advantage to appear.

Proposed Experiments

The controlled check is Lorenz 1996 at Float16 and fixed-point 16. We confirm that round-to-nearest creates spurious stabilization and that stochastic rounding removes it, as Klöwer et al. report. The invariant measure is scored by Wasserstein distance to Float64.

The main experiments use 10-minute residual irradiance at Cabauw and the other BSRN stations from the CrossViViT data release, and the 5-minute 16 MW wind series from A New Combined Prediction Model for Ultra-Short-Term Wind Power Based on Variational Mode Decomposition and Gradient Boosting Regression Tree. The wind series is short, with 24 test points, so it serves as a secondary check only. Results are split into clear and cloudy days, following CrossViViT's easy/hard distinction.

The metrics are continuous ranked probability score, empirical coverage of the 90/95/99% ramp-magnitude quantiles, ensemble spread ratio, Wasserstein distance between generated and observed residual distributions, and the distribution of frozen-run lengths. Frozen-run length is the number of consecutive identical quantized states, a direct readout of the stalling mechanism.

The downstream test feeds generated PV scenarios into the CVaR inverter dispatch of Dall'Anese et al. on the 20-house feeder, at confidence levels from 85% to 99%. We record curtailment reserve and the realized overvoltage violations when observed trajectories are replayed.

The decisive check is three-sided. Round-to-nearest at 8–16 bits must lower the 95% CVaR reserve and raise realized violations relative to Float32, measurably within the 27.83–44.05 kWh band that separates risk-neutral from risk-averse dispatch. Stochastic rounding must close most of that gap. Neither matched dither nor conformal recalibration may close it equally on cloudy days. If round-to-nearest leaves reserves unchanged, the degradation story does not reach operations and we report a negative result. If dither or recalibration match stochastic rounding, the cheaper fix wins and we recommend it.