Differentiable physics: a pooled learned correction head on arm D's forecast and recent errors
Take-home: the network's gain over arm D comes mainly from correcting how arm D's error depends on
its own forecast level and the calendar, and reading recent errors adds little that we can detect.
Arm D is the best forecast of
experiment 155:
a convex demand model, a Kalman filter (a method that updates a forecast from its recent errors), a
winter night offset, and recipe R (subtract 0.75 times the mean error of the last 14 days). We asked
whether a small neural network, trained on many substations at once, can correct arm D better than
the filter and recipe R do. This extends experiment
142, whose network
failed its test for lack of rows. We trained one network on 6 substations, scored it on 5 of them
(D5, D10, D11, D14, D16) in the year from 2025-07-02, and compared it with a copy that was given no
past errors and no Kalman state (the "blind head"). The result is partly supported. The network
beats arm D, the blind head gets most of that gain, and a table without a network comes within 0.01
to 0.02 points of the blind head when both train on one year.
The numbers. Scores are quantile scores (twice the mean pinball loss over 11 quantiles) in points
of effective capacity, at 15.5 to 39 hours ahead, and a lower score is better. Trained on 2020
onward, the network scores 0.125 points lower than arm D (99% interval 0.060 to 0.209 points lower)
and the blind head 0.100 lower, so reading errors adds 0.025 (head minus blind head -0.025, interval
-0.106 to +0.029, which includes zero). Trained on the ensemble-weather year only, the network is
0.071 lower, the blind head 0.054 lower, and a table fitted with the pinball loss 0.038 lower. An
Opus audit found no leakage. The extra gain from 2020-onward training needs arm D's forecast level
and an ensemble-era flag together. The known-answer gate marginally failed (29% against 30%), and
under the pre-registered rule that removes the neural corrector from the queue. We keep the
verdict partly supported because the gate failure is within the seed range (22% to 34%) and the
audit explains it. This is a weaker test than the brief planned: 6 substations, not 16 Primary
substations, and no weather input.
Figures
Results
- The head is compared with arm D, which already contains recipe R. Its contrast stands in for the pre-registered contrast with recipe R.
- Method. One network (two hidden layers of 128 units, a 4-dimensional substation embedding, a
linear skip) trained with the pinball loss at the 11 quantiles (Koenker and Bassett
(1978)) on arm D's rows at leads 12 to 48 hours, following the
pooled-network design of experiment
142. Quantiles are
median + correction + exp(scale) x (arm D quantile - arm D median), so they cannot cross. Inputs: the last 12 half-hours of errors known at the origin (3.5 hours old), the mean error of the last 14 days at the row's half-hour, the mean error at the same weekday and half-hour in the last 4 weeks, the lead, half-hour, day of week, and arm D's mean. Stage 3 adds the Kalman level and anomaly and a flag for ensemble weather. - Two training sets. Stage 2: the 6 substations' stored ensemble year (2024-07 to 2025-06), 125,000 rows. Stage 3: the shared file of the sibling experiment, which adds forecasts on past weather from 2020 onward, 592,000 rows (4.7 times as many). Both score only the ensemble-weather scored year (2025-07-02 to 2026-06-29).
- Rows against experiment 142. The gate fit has 287,000 rows from 3,900 site-runs, against about 3,200 samples in experiment 142: about 90 times the rows, but only 1.2 times the independent history.
- Gate (6 substations, 3 seeds, 8-week injection on held-out blocks). Level step of +3 points: head 29% (22% to 34%, gate 30%), recipe R 67%. Saturday-evening shift of +3 points: head 21% (20% to 23%, gate 15%), recipe R 11%. A first version without the same-weekday input recovered -1.5% of the shift. The input was added before any scored read.
- Scored year, five decision substations, leads 15.5 to 39 hours, outside switching events. Arm D scores 2.432 points. Stage 2: head 2.361, blind head 2.377 (C1 head minus arm D -0.071, interval -0.154 to -0.014; C2 blind minus arm D -0.054, -0.089 to -0.026; C3 head minus blind -0.017, -0.109 to +0.039). Stage 3: head 2.307, blind head 2.332 (C1 -0.125, -0.209 to -0.060; C2 -0.100, -0.140 to -0.064; C3 -0.025, -0.106 to +0.029). Experiment 169's calibrated-spread arm D scores 2.430 on the same rows, so spread calibration is not the source.
- Plain recalibration arm (no network, stage 3 rows). A ridge regression on one-hot site by half-hour, site by day of week, site by lead band, site by forecast-level bin, and half-hour by day of week, plus an ensemble-era flag, shifts arm D's median; a per-cell factor, chosen by pinball loss, scales the quantile offsets. Fitted to all training rows it scores 0.049 points worse than arm D (interval -0.001 to +0.096). Fitted to the ensemble year only it scores -0.030 (interval -0.053 to -0.007). The audit refitted the table with the pinball loss on the same ensemble year and got -0.038, against -0.047 to -0.057 for the blind network, so the ridge's smaller gain probably came from its squared-error fit. The comparison of that ridge with the 2020-onward network is therefore not like for like.
- Per substation, stage 3 head minus arm D: D5 -0.179, D10 -0.075, D11 -0.008, D14 -0.133, D16 -0.243, D9 -0.104. Stage 2: D5 -0.081, D10 -0.066, D11 +0.040, D14 -0.112, D16 -0.142, D9 +0.014.
- Tails (decision substations, stage 3 head against arm D). Pinball at q99: 0.391 against 0.411. At q01: 0.347 against 0.386. Coverage at q95: 93.1% against 94.5%; at q99: 97.6% against 98.1%. The head lowers tail pinball loss but lowers coverage in the upper tail.
- Curtailment cost and the manual heuristic. Not scored: the stored rows are single-substation demand, not node and generator forecasts.
- Audit (Opus, fresh agent, report in the private briefs folder). No leakage: the error inputs never use a reading newer than 3.5 hours before the origin (tested by overwriting the error grid from 25 random positions), the Kalman level and anomaly are the filter state at the cut-off, and training ends before the scored year. Retrained arms match the stored contrasts within 0.01 points. In the ensemble era the level and anomaly come from experiment 136's arm A2 filter, not arm D's own filter, so they are causal but inconsistent between eras. The 2020-onward gain needs the forecast level and the era flag together: zeroing either cuts the blind arm from -0.099 to about -0.05. The spread head is worth 0.014 (one year) and 0.030 (2020 onward). The 29% step recovery reflects the data: arm D already contains the filter and recipe R, so its training errors rarely keep a level shift, and a median regression on the three error features recovers at best 30% of the step. Recipe R's 67% is not comparable, because it assumes arm D would not react to the injected errors.
- Caveats. No ensemble weather input. Stage 3 trains on 4 years of forecasts built on past weather, whose errors are smaller than live ensemble errors, and it flags the era. The gate is one 8-week block per injection. The prediction that the stage 2 gain would be -0.04 to +0.02 was too pessimistic about the sign; the prediction that error-reading adds little held.
Checks
- Median minus mean forecast per site (stage 3 head): D10 -0.69, D11 -0.01, D14 -0.79, D16 -0.33, D5 -0.13, D9 -0.11 points. These are arm D's own offsets plus the head's correction.
- Error of the median forecast beside the score: mean absolute error arm D 4.191, stage 3 head 4.006, blind head 4.063; the contrasts point the same way.
- Triggers that fired: (1) the known-answer gate marginally failed, 29% against 30%; (5) the blind head, nested in the head, scores almost as well; (7) the sibling experiment's design may depend on this result. The audit confirmed the contrasts and found no leakage (see Results). Leaving one substation out never changes the sign of C1 (range -0.096 to -0.156 in stage 3). The audit found nothing that changes a contrast.
What to try next
- Fit a pinball-loss table with a forecast-level by era term to all years. If it matches the blind network, no network is needed for this gain.
- Add the ensemble-mean temperature and shortwave inputs, which the stored forecasts lack.