GridAnchor: Specialized Multi-Agent AI for Safeguarding Autonomous Energy Systems Against Cyber-Physical Hallucinations
Organizations: Computer Science and Applied Mathematics Laboratory (LIMA), Faculty of Science and Technology, Chadli Bendjedid University, P.O. Box 73, El Tarf, 36000, Algeria · Center for Smart Mobility and Logistics (IRC-SML), King Fahd University of Petroleum & Minerals, Dhahran, 31261, Saudi Arabia · Department of Industrial and Systems Engineering, King Fahd University of Petroleum & Minerals, Dhahran, 31261, Saudi Arabia
Abstract
Autonomous energy systems increasingly chain specialized learned agents, such as a forecaster, a state estimator and a dispatcher that may be a language model. These agents can emit confident outputs that contradict physics, and downstream agents may act on them. We define such cyber-physical hallucinations and their cascades, organize them in eight types, and build CPH-Bench, a generator of labeled episodes on SimBench feeders. We propose GridAnchor, a verification layer whose Physics-Residual Graph Transformer scores every claim from residuals between the claims, the measurements and a linearized grid model. Mondrian conformal p-values with the Benjamini-Hochberg procedure turn the scores into decisions, a root head attributes cascades, and a quadratic program repairs unsafe actions with a voltage margin calibrated at repaired steps. On a simulated rural medium-voltage feeder, GridAnchor reaches a message-level area under the precision-recall curve of 0.846, against 0.837 for the strongest of six baselines, a difference within the confidence interval. It leads on estimates and actions, whereas a self-consistency check that knows the label tolerances reaches 0.874 by leading on forecasts. The false-alarm rate stays within 0.17 percentage points of the nominal level on steps without injected hallucinations. In closed loop, GridAnchor leaves no bus outside the voltage band on the test days, against 0.0700% of the bus-steps without protection, and simpler detectors with the same mitigation come close. Stale but coherent messages and single-bus forecast errors remain mostly undetected.
Figures & tables
| Line of work | PG | CA | LD | FG | RA | AR |
| Bad-data tests [ abur2004power ] | ✓ | ✗ | ✗ | ✗ | ✗ | ✗ |
| False data injection detection [ liu2011false , musleh2020survey ] | ✓ | ✗ | ✓ | ✗ | ✗ | ✗ |
| LLM hallucination detection [ manakul2023selfcheckgpt , farquhar2024detecting , huang2025survey ] | ✗ | ✗ | ✓ | ✗ | ✗ | ✗ |
| Multi-agent failures, verifiers [ cemri2025why , kambhampati2024llms ] | ✗ | ✓ | ✗ | ✗ | ✗ | ✗ |
| LLM agents with power tools [ yan2024realtime , jia2025enhancing ] | ✓ | ✗ | ✗ | ✗ | ✗ | ✗ |
| Safety filters, safe learning [ wabersich2021predictive , chen2022reinforcement ] | ✓ | ✗ | ✗ | ✗ | ✗ | ✓ |
| Definition | Language-model analogue | Agents | Severity (low, medium, high) | |
| H1 | Confabulated value: claim replaced by a draw from its training marginal | fabricated fact | F, E, D | 1, 5, 20 buses or 1, 2, 3 zones |
| H2 | Unit or scale slip: claim multiplied by 10, 0.1 or 1000 | unit or magnitude error | F, D | 1, 5, 20 buses or 1, 2, 3 zones |
| H3 | Sign inversion of storage power or of the voltage deviation from 1 p.u. | negation error | E, D | 1, 5, 20 buses or 1, 2, 3 zones |
| H4 | Stale replay: value of the same claim 4 or 96 steps earlier | outdated knowledge | F, E, D | one zone at lag 4; whole message at lag 4; at lag 96 |
| H5 | Entity swap: values of two buses or two zones exchanged | entity confusion | F, E, D | 1, 3, 8 bus pairs or 1, 1, 2 zone pairs |
| H6 | Physically impossible: output above the envelope, negative load, voltage above 1.15 p.u., power beyond the rating | logical contradiction | F, E, D | 1, 5, 20 buses or 1, 2, 3 zones |
| Feeders (SimBench) | |
| Main | 1-MV-rural: 99 buses (97 at 20 kV), 45.7 MW curtailable renewables, 27.5 MWh storage, 31.0% of steps with a voltage violation without control |
| Transfer | 1-MV-semiurb: 122 buses (120 at 20 kV), 60.8 MW curtailable renewables, 58.7 MWh storage, 2.4% of steps with a violation without control |
| Agents and verifier (main feeder) | |
| F | shared MLP, two hidden layers of 128 units, bus embedding; 22.7k parameters; trained in 53 s; validation RMSE 1.5% of the rating |
| E | MLP, three hidden layers of 256 units; 221k parameters; trained in 57 s; validation RMSE 0.40 p.u. |
| D | decoder-only Transformer, 4 layers, width 128, context 256; 0.83M parameters; 82 min; 99.9% parsable outputs, storage error 0.11% of rating, curtailment error 0.16 points |
| Rate (%), tolerance scale | Flagged | |||
| Agent and form | (%) | |||
| F, load value | 3.315 | 0.463 | 0.016 | 26.9 5.4 |
| F, renewable value | 0.090 | 0.003 | 0.000 | 85.7 11.7 |
| E, voltage value | 0.000 | 0.000 | 0.000 | none |
| D, device limit | 0.000 | 0.000 | 0.000 | none |
| D, unsafe action | 0.020 | 0.020 | 0.000 | 100.0 0.0 |
| AUPRC | TPR at | FAR at | FDR at | Latency | |||||
| Detector | AUROC | all | F | E | D | 1% FAR | (ms) | ||
| B1 Rules | 0.883 0.006 | 0.742 0.019 | 0.673 0.034 | 0.839 0.004 | 0.739 0.097 | 0.717 0.007 | 0.054 0.001 | 0.146 0.002 | 0.9 |
| B2 WLS-BDD | 0.924 0.004 | 0.576 0.038 | 0.357 0.061 | 0.874 0.071 | 0.605 0.052 | 0.576 0.008 | 0.051 0.001 | 0.110 0.007 | 1.5 |
| B3 IsoForest | 0.866 0.000 | 0.547 0.038 | 0.514 0.043 | 0.685 0.052 | 0.436 0.113 | 0.494 0.078 | 0.050 0.000 | 0.073 0.002 | 33.5 |
| B4 Autoencoder | 0.976 0.005 | 0.837 0.014 | 0.889 0.012 | 0.940 0.005 | 0.672 0.015 | 0.774 0.043 | 0.051 0.001 | 0.206 0.010 | 1.7 |
| B5 Self-consist. | 0.979 0.001 | 0.830 0.033 | 0.986 0.001 | 0.912 0.026 | 0.689 0.082 | 0.678 0.028 | 0.052 0.000 | 0.199 0.004 | 99.7 |