Anchored GENCO: N-1/N-2 screening with a per-point miss guarantee, 16 % to AC on Texas2k

#19
by julianoelhaf - opened

Team: Julian Oelhaf, Changhun Kim - Pattern Recognition Lab, Friedrich-Alexander-Universität Erlangen-Nürnberg (FAU), Germany · Contact: julian.oelhaf@fau.de

Code and tool: https://github.com/julianoelhaf/gridfm-genco-challenge · Data: https://huggingface.co/datasets/julianoelhaf/genco-n2-guaranteed-screening · Models: released GENCO checkpoints gridfm/genco-pf-contingency (Texas2k) and gridfm/genco-pf-datakit (case500, case2000); our case500 fine-tune julianoelhaf/genco-case500-small-n2ft · Interactive demo: https://huggingface.co/spaces/julianoelhaf/anchored-genco-explorer

Bars, share of contingencies sent to exact AC on 60 Texas2k test points: (a) incremental DC 100 % (no valid threshold), GENCO raw 53 %, anchored GENCO + DC 16 %, 15 % truly overload; (b) double outages: DC from the solved N-1 state 62 %, GENCO raw 58 %, ours 23 %

In short: Near line limits, part of GENCO's error is the same for every contingency of an operating point. That shared part already shows in GENCO's prediction of the base case, which the operator has solved exactly. We subtract it, do the same for the usual DC screen, and re-solve by AC only what either flags. On 60 fresh Texas2k operating points (pre-registered) this sends 16 % of N-1 and N-2 contingencies to AC, where 15 % truly overload. Raw GENCO needs 53 %. On our pre-registered calibration set incremental DC, the screen operators run today, found no threshold that keeps the same promise and so re-solves everything (77 % when calibrated on random points only). The promise: a new operating point misses more than 5 % of its overloads with probability at most 10 %, if new points are exchangeable with the calibration ones (marginally over calibration sets).

Question Answer
What does it do? Decides which N-1 and N-2 contingencies of today's grid need an exact AC re-solve, from GENCO and DC anchored to the solved base case
How many AC re-solves? 16 % of contingencies (95 % interval 13-20 %) on 60 fresh Texas2k operating points; 15 % truly overload
Better than today's DC screen? On the pre-registered calibration set incremental DC finds no threshold that meets the guarantee (77 % with random-only calibration); against DC from the solved N-1 state, on double outages: 23 % vs 62 %
What is guaranteed? A new operating point misses more than 5 % of its overloads with probability at most 10 %, if points are exchangeable with the calibration ones; marginal over calibration sets (5 of 60 test points did)
How was it tested? Protocol frozen and hashed on 15 October, run once on fresh points on 16 October; code, data and guides published
Where does it fail? Severe misses (above 150 % of rating) at 32 of 60 points, all from five double outages; DC from the N-1 state matches us on case500 and beats us on case2000; slower than a batched Newton-Raphson

Why

Operators check single outages (N-1); double outages - two circuits on one tower, two lines at one substation - are usually skipped: too many cases for AC power flow. ACER requires European TSOs to develop a probabilistic approach to risk assessment by 2027 (Decision 07/2019). A screen for these cases needs a miss rate stated for each new operating point, not only on average over contingencies, and must beat incremental DC: DC changes on top of the solved AC base case.

How

Concept (schematic): step 1 anchoring removes the shift GENCO shares across the contingencies of an operating point; step 2 thresholds calibrated across operating points split contingencies into exact AC and no AC

GENCO (the released Texas2k contingency checkpoint, run with gridfm-graphkit) predicts the AC state of every contingency in one forward pass. Anchoring keeps only the change it predicts: per branch, GENCO's post-contingency loading minus GENCO's base-case loading plus the exact base-case loading. We anchor DC the same way and score a contingency by the larger of the two. There are no fitted parameters and no training. Per operating point we score all N-1, all parallel-circuit pairs and samples of adjacent and random pairs (about 5,600 contingencies per test point), with load states from the released test split of the checkpoint's data.

Box plots of GENCO loading error near line limits, raw vs anchored, six Texas2k development points: median absolute error 0.1-2.3 % raw, 0.1-0.6 % anchored

Near line limits, part of GENCO's error is a shift shared by all contingencies of an operating point (filled boxes); subtracting GENCO's own base-case error removes most of the large shifts (open boxes): the median absolute error falls from 0.1-2.3 % to 0.1-0.6 % of rating. What remains complements DC: on development points, if each anchored screen is calibrated on its own to miss 5 % of the overloaded contingencies, the two together miss 0.6 %.

Thresholds, one per contingency class and moved together along one calibrated level, come from conformal risk control with operating points as the units. If new points are exchangeable with the calibration ones, a new point misses more than α of its overloads (pooled over classes) with probability at most δ = 10 %, marginally over calibration sets.

Result: pre-registered, run once

We froze and hashed the protocol and code on 15 October, before any result on the test points had been read, and ran the test once on 16 October: calibration on 72 Texas2k operating points, test on 60 new ones. All pre-registered endpoints were met. At α = 5 % the screen sent 16 % of contingencies to AC (95 % interval 13-20 %, bootstrap over the test points with the calibration fixed) and 5 of 60 points missed more than α (the promise allows 10 %, marginally over calibration sets).

  • Raw GENCO: 53 % (43-64 %), 8 of 60 points above α. Anchored GENCO alone: 47.5 %, 11 of 60 above α. Both single screens exceed the promise's 10 % on this test set; the promise is marginal over calibration sets, so one test set can exceed it, and the combined score is the one we pre-registered.
  • Incremental DC: its error varies too much between operating points, and on this calibration set no threshold met the guarantee at α = 5 %. At α = 10 % it needs 70 % vs our 15 %. Calibrated within each point at α = 5 % (no guarantee for a new point) it needs 24 % vs our 16 %.

Per test point: miss rate (GENCO raw 8 of 60 above α, ours 5 of 60) and share sent to AC (means 53 % and 16 %; incremental DC flags all)

Against the strongest DC screen (panel b of the first figure): every N-1 case is solved by AC anyway, so DC can start from the solved single-outage state. On double outages that screen needs 62 % (58-66 %), raw GENCO 58 %, ours 23 % (19-28 %) (a second pre-registered test on the same 60 points, no longer fresh; calibrated on 132 development points).

Where it holds and where it does not

  • Calibration. The pre-registered calibration set included 12 load-quantile points that are not exchangeable with random ones. Calibrated on random points only (checked afterwards): ours 24 % (3 of 60 above α), incremental DC 77 %, raw GENCO 56 %; panel (b) 24 % vs 65 %.
  • Severity. The promise bounds the share of points above α; it does not bound the pooled miss rate or weight misses. Pooled over the test points, 3,271 of 49,555 overloaded contingencies (6.6 %) are missed; 97 % of these stay within 105 % of rating, but 32 of 60 points miss at least one above 150 % (40 misses, worst 237 %). All 40 come from five double outages of parallel or adjacent lines whose anchored scores sit just below the limit (0.985-1.0). Always re-solving such pairs is the obvious next step (untested).
  • What counts as an overload. On our test points 15 % of contingencies overload (at least 325 per point), unlike N-1-secure real operation, and much of the gain is on lines sitting at their rating in the base case. Counting only new or worsened overloads, ours sends 12 % to AC, incremental DC 99.5 %. Secure points with few overloads, and clustered outages (see #7), are untested.
  • Other grids. With the released case500 and case2000 checkpoints we beat base-case incremental DC (cross-validated: 37 % vs 95 %, 69 % vs 90 %), but DC from the solved N-1 state matches or beats us (pre-registered, held-out points, no endpoint on this comparison: ours 31 % vs DC 30 % on case500, ours 75 % vs DC 67 % on case2000). Fine-tuning case500 GENCO on double outages (pre-registered) and its larger Base checkpoint did not change that.
  • Time per 10,000 Texas2k contingencies at α = 5 %, screen vs AC alone (AC tools timed on case2000_goc as a same-size stand-in): Ipopt 156 s vs 637 s, PowerModels 64 s vs 75 s, batched Newton-Raphson 55 s vs 20 s. GENCO inference costs 5 ms per contingency (A100), so the screen pays off when one AC solve costs more than about 6 ms. A one- or two-step Newton screen from the solved base case, which beats GENCO's raw prediction in #17 and in #8 (whose anchored start improves it further), we did not test.
  • Also in the supplement: lines below 70 % of rating in the base case are scored raw, not anchored (about 30 % of test overloads); the anchor assumes the same base case for screen and AC tool; islanding and non-converging contingencies are reported, not scored; reactive limits are not enforced, as in the released data.

Use it

Calibrate once on past operating points, then screen today's from the per-contingency tables (AC base case, GENCO and DC branch loadings); the README has a worked example:

python -m genco_eval.anchor CAL/op* TODAY                   # writes anchored.parquet in every operating-point folder
python -m genco_eval.screen calibrate --cases CAL/op*/anchored.parquet --score anc_max --alpha 0.05 --delta 0.1 --out tau.json
python -m genco_eval.screen screen --cases TODAY/anchored.parquet --thresholds tau.json --out flags.parquet

Relation to other entries

#8 (Kehan Liu) uses the same observation - GENCO's change from the solved pre-outage state, which it calls the anchored change start - as a Newton start, for N-1 on GOC 2000 and for multi-outage scenarios on four grids. #8 posted first, on 22 October; we arrived at it independently (our protocol, frozen and hashed on 15 October, is in the data package) and use it as a screening score for N-1 and N-2, combined with anchored DC and calibrated so that the miss rate carries a guarantee for each new operating point. #7 verifies every case with Newton, studies clustered outages and, on random Texas2k double outages, calibrates a conformal margin (2.6 false alarms per scenario vs 7.3 for DC); ours guarantees the miss rate per operating point and compares against incremental DC. #18 ranks the released Texas2k double outages by GENCO and, as we do, finds the remaining misses close to the limits. #16 computes certified robust secure sets on IEEE 118 and screens their scenarios for exact AC with a split-conformal bound. The pieces fit together: a guaranteed anchored screen decides which cases #8's one-step start or #7's verification still has to handle.

More (all numbers, other grids and all 32 released checkpoints, learned head, stress test, negative results): docs/SUPPLEMENT.md. Open science: code (Apache-2.0, GitHub); per-contingency tables of every operating point, the result tables and the pre-registrations on Hugging Face; step-by-step guides per result in repro/; only released GENCO checkpoints (one case500 fine-tune aside) and data from public OpenGridFM releases or seeded gridfm-datakit runs. GitHub CI recomputes the headline numbers from the published data on every commit. AI use: we used Claude (Anthropic, via Claude Code) for code, analysis scripts, figures, reviews and text editing; every number comes from the published code and data.

Sign up or log in to comment