Staleness-Aware Architecture Search for Edge Power-Flow Surrogates

Neural networks can now approximate the solution of AC optimal power flow, the non-convex problem of choosing generator outputs that meet demand at minimum cost without breaking voltage or line limits. They do it thousands of times faster than conventional solvers. These networks are judged by how close their answer is to the true optimum for a frozen snapshot of the grid, and they are timed on workstation GPUs. On a substation controller or an embedded board, a slower but more accurate network finishes later. Its dispatch is then applied to a grid whose loads and solar output have already moved. We propose to design these surrogates for the error that actually reaches the grid. The search target is how often the dispatch violates physical limits when evaluated against the grid state at the moment it is applied, with the delay drawn from latency distributions measured on the target chip under sustained operation.

The core idea is simple to state. Architecture search for grid surrogates should score each candidate by the violation it causes at application time rather than by snapshot accuracy under a latency cap. The search space should cover the whole compute pipeline, meaning the network plus any post-hoc feasibility repair, because repair steps spend the same time budget the network does. We expect this change of target, more than any new search algorithm, to change which architectures win. The expected winners also differ in ways that depend on how volatile the grid is and on the tail of the hardware's latency, not its mean.

Core Claim

Three lines of work each hold one piece of the problem, and none combines them.

The first line is physics-informed AC power-flow surrogates. GraphOPF uses a graph network with line impedances as edge features, plus an implicit LU-factorization layer to enforce physics. DeepOPF-V predicts bus voltages and reconstructs power injections, followed by a linearized correction. OPF-DNN trains with Lagrangian penalties on constraint violations. These methods reach optimality gaps of 0.03% and under 0.15% respectively for the first two. All of them fix the architecture by hand and treat inference time as free once it beats the solver.

The second line is hardware-aware architecture search. HGNAS searches graph-network designs for edge devices using a learned latency predictor. ConNAS and DUCCIO enforce hard latency and memory budgets during search. All three treat latency as a budget to satisfy, separate from task quality.

The third line addresses the gap between simulated and deployed behaviour. Air Learning shows that in closed-loop control, delays measured on real hardware must be injected into training because stale actions degrade behaviour. Latency mitigation cut its flight-time gap from 37.73% to 0.5%. However, Air Learning fixes the network rather than searching it.

Our claim is that for grid dispatch, latency and accuracy are not separable. Delay turns directly into physical error through the rate at which loads and renewables drift. Let $a$ be a candidate pipeline, $s_t$ the grid state observed at time $t$, $\hat{x}_a(s_t)$ the dispatch it outputs, and $D_h(a)$ the distribution of end-to-end latency of $a$ on hardware $h$ under continuous duty. Let $\mathcal{V}(x, s)$ be the constraint violation, in per-unit limit exceedance, of dispatch $x$ when an exact AC power flow is solved at true state $s$. The search target is

$$J_h(a) = \mathbb{E}_{t,\; d \sim D_h(a)}\big[\mathcal{V}(\hat{x}_a(s_t),\, s_{t+d})\big] + \mu\, \mathbb{E}\big[\mathrm{CostGap}\big],$$

subject to the pipeline fitting in device memory. Here $\mu$ is a single cost weight, reported as a sweep rather than tuned. When $d$ is replaced by zero, $J$ reduces to the usual snapshot objective.

We expect three things to hold. First, $J_h$ has an interior optimum over model size. Second, the optimum moves toward smaller networks with fewer repair steps as volatility rises or hardware slows. Third, ranking candidates by mean latency, or by a desktop-trained predictor, picks measurably worse pipelines than ranking by the measured tail under sustained load.

Research Program

Search space. We will build a search space over complete edge dispatch pipelines on a GraphOPF-style backbone. The architecture choices are number of message-passing layers, hidden width, Chebyshev filter order, and whether line parameters enter as edge features. The output can be either direct generator setpoints or voltages with physical reconstruction, following DeepOPF-V. After the network, the pipeline applies zero to three steps of feasibility repair: Newton power-flow iterations or DeepOPF-V's linearized correction. Numerical precision is either fp32 or int8.

The space is deliberately modest, in the low thousands of configurations. This allows direct on-device measurement of a large sample instead of depending entirely on a predictor. It also lets us enumerate the space exhaustively as a check on any search method.

Training. Candidates are trained with the Lagrangian violation loss of OPF-DNN. Weight sharing is used where it does not corrupt rankings; we will check this on a held-out subset trained from scratch.

Hardware measurement. We profile each sampled pipeline on the edge platforms already used by HGNAS and HAT (Raspberry Pi 3B+/4 and Jetson TX2). The profiling runs periodic inference at a fixed control cadence for long enough to reach thermal steady state. This captures throttling and contention that one-shot timing misses.

From these measurements we fit a latency-distribution predictor. Following the GemStone/Powmon recipe, it uses performance counters selected to avoid collinearity plus temperature and frequency inputs, not structural encodings alone. We also fit the same predictor without those inputs. This measures how much of HGNAS's reported ~19% Raspberry Pi error is due to sustained-duty effects.

Grid dynamics. We drive PGLib/NESTA cases (IEEE 118, IEEE 300, and GOC-2312 as the stress case) with load and renewable trajectories. These are synthesized from autoregressive processes whose volatility we control. No time-series dataset for these cases appears in our sources, so the volatility levels will be reported as an explicit experimental axis rather than presented as realistic by assumption.

Evaluation. Each dispatch is applied after a latency sampled from the measured distribution. It is then checked by exact AC power flow at the true state at application time.

Baselines

Naive reference. The do-nothing reference holds the previous interval's dispatch until a fresh one arrives. A second naive reference runs DC-OPF on the device, since it is the linear approximation operators already trust. Both set the floor that any learned pipeline must beat under staleness. OPF-DNN reports beating DC-OPF by two orders of magnitude in snapshot accuracy, but whether that margin survives delay is exactly what is untested.

Classical solver. A warm-started interior-point solver (MIPS/Pypower) running on the same device, with the previous solution as the start point, is the classical competitor. It will be allotted the same control cadence and will report violations from its own measured solve times.

Strongest existing surrogate. The strongest existing method is a GraphOPF-architecture surrogate trained with our data and loss and deployed unchanged. GraphOPF reports an optimality gap as low as 0.03% and over 99% feasibility on the Korea-4492 grid (GraphOPF). DeepOPF-V reports under 0.15% gap and up to 16,000x speedup on a 2000-bus system. No reported result was found on Lacuna for either method's violation rate under deployment latency on edge hardware; establishing that number is part of our contribution. Beating this baseline means a lower application-time violation rate at equal or better cost gap on the same device and trajectories.

Strongest search competitor. The strongest search competitor is HGNAS-style or ConNAS-style search over our identical space. It optimizes snapshot violation subject to a mean-latency cap set to the control interval, with the same number of trained candidates and the same device-hours. Beating it means selecting a pipeline with lower $J_h$, confirmed on held-out trajectories and on a second device.

Ablations. Three ablations isolate the key ingredients. The first replaces measured latency distributions with their mean. The second removes repair steps from the search space. The third replaces sustained-duty measurements with one-shot timing.

Why not just…?

Why not just sweep GraphOPF's width and depth on the device and pick the most accurate model that meets the deadline? This is the most serious threat, and our design absorbs it rather than argues against it. Because the space is small, exhaustive on-device sweeping is our reference search procedure, and the claimed contribution is the objective, not a clever optimizer. The decisive question is whether "most accurate under the deadline" and "lowest $J_h$" pick different pipelines. If they coincide across volatility levels and devices, then staleness-aware search adds nothing and we will report that.

Why not just tighten the constraints by a safety margin to absorb drift, as DeepOPF+ does? DeepOPF+ reaches 100% DC feasibility by tightening limits 3.5% to 7%, at up to 1.94% extra cost. A fixed margin could also cover staleness, so we include margin-tightened versions of the strongest surrogate, sweeping the margin. The test is whether, at matched violation rate, the staleness-searched pipeline pays less cost. A margin has to cover the worst latency tail everywhere, whereas a faster pipeline shrinks the tail itself. We expect the gap between the two approaches to grow with volatility, and it may vanish on calm trajectories.

Why not just run the solver centrally, or use DC-OPF locally? DC-OPF drops reactive power and voltage. We keep it as a baseline so its failure under stress is measured rather than asserted. Central solving is out of scope when local controllers must act through communication dropouts, the setting validated in the SGTL study. That study also found that fast PV variation left transformer overloads only 10.45% reduced, which is the kind of drift our metric targets.

Why not just use a desktop latency predictor or a layer lookup table? HGNAS's predictor erred by about 19% on a Raspberry Pi. Our ablation measures whether errors of that size actually reorder the chosen pipeline under $J_h$, which matters more than the raw error itself.

Proposed Experiments

The primary experiment crosses three grid cases, three volatility levels, and two devices. For each combination it reports application-time violation rate, violation magnitude, cost gap relative to the offline optimum at the true state, and 99th-percentile latency under sustained duty, for every baseline above.

Decisive check one. Rank correlation between snapshot-objective rankings and $J_h$ rankings across the enumerated space. If correlation stays near one everywhere, the proposal's premise fails.

Decisive check two. Whether the $J_h$-optimal pipeline shifts toward smaller models and fewer repair steps as volatility rises. Such a shift would make it an operating-condition-dependent design rather than a single best network.

Decisive check three. Cross-device transfer. Does the pipeline chosen on the Jetson remain near-optimal on the Raspberry Pi, or must search be repeated per device, as HAT's finding that GPUs and CPUs favour different shapes would predict?

Decisive check four. Whether sustained-duty, counter-and-temperature-calibrated latency models change the selected pipeline relative to one-shot timing. This separates the practical importance of the simulation-to-silicon gap from its mere existence.