TwinGridShield: Consequence-Aware Runtime Authorization for LLM Grid-Agent Actions
Organizations: Lane Department of Computer Science and Electrical Engineering, West Virginia University, Morgantown, WV, USA, 26505
Abstract
Large language model (LLM)-assisted energy-management tools can translate natural-language context into structured grid commands, but syntactic validity does not imply physical admissibility. This paper presents TwinGridShield, a model-independent runtime authorization layer that evaluates each proposed action in a deterministic network twin before release. The prototype checks connectivity, branch-flow, generator, and load-shedding invariants and records each decision in a hash-chained log. A controlled IEEE 14-bus study evaluates single-step switching, redispatch, and load-shedding actions using DC power flow and experimentally assigned branch ratings. In the matched-model experiment, a stochastic proposal source configured to select an unsafe action with probability p=0.84 produced 421 unsafe proposals in 500 attacked-condition trials, a realized rate of 84.2%. This value characterizes the configured surrogate and is not an empirical measurement of LLM prompt-injection susceptibility. TwinGridShield produced 0 unsafe releases in those 500 trials. Because action labeling and authorization used the same DC model, system state, branch ratings, and encoded constraints, this result verifies conformance of the implementation to its encoded authorization predicate rather than safety under model error. The principal robustness evaluation therefore introduces model mismatch. Unsafe acceptance reached 5.63% under bounded +20% and -20% per-bus load-measurement error and 30.09% when actual branch ratings were 20% below modeled ratings.
Figures & tables
| System | Primary task | Action- | Runtime |
|---|---|---|---|
| executing? | safety gate? | ||
| GAIA [ 1 ] | Dispatch optimization | Yes | No explicit |
| PowerAgent [ 12 ] | Agentic grid workflow | Yes | No explicit |
| Grid-Agent [ 13 ] | Violation remediation | Yes | LM sandbox |
| GridMind [ 14 ] | System analysis | Yes | No explicit |
| ChatGrid [ 15 ] | Visualization / Q&A | No | N/A |
| Defense | Injection | Physical | Formal | Grid- |
|---|---|---|---|---|
| blocked? | check? | claim? | aware? | |
| Direct execution | — | No | None | No |
| Schema validation | Struct. only | No | None | No |
| Text filter | Keyword | No | None | No |
| LM sandbox [ 9 ] | Partial | Emulated | None | Opt. |
| TwinGridShield | Conseq. | Yes | Prop. 1 | Yes |
| Action | Parameters | Selected consequence checks |
|---|---|---|
| Redispatch | generator, MW | generator and branch limits |
| Open branch | branch ID | solvability, islands, branch limits |
| Shed load | bus, fraction | critical and total shedding budgets |
| No-op | none | current-state feasibility |
| Defense | Unsafe | Unsafe releases | False | p95 |
|---|---|---|---|---|
| exec. (%) | /500 attacked | block (%) | (ms) | |
| Direct | 46.1 | 421/500 | 0.0 | 0.31 |
| Schema | 46.1 | 421/500 | 0.0 | 0.48 |
| Text filter | 25.0 | 210/500 | 0.0 | 0.41 |
| TwinGridShield | 0.0 | 0/500 | 0.0 | 0.44 |
Tool Access Control for LLM Agents
Tool access control for LLM agents limits which tools, resources, and actions agents may use, and under what conditions.
See all 208 papers