Mycelium: A Generalizable Cross-Grid Multi-Task Model for Electrical Distribution Systems
Organizations: Stanford University · Pravāh
Abstract
Electrical distribution grid operations require inference across heterogeneous networks from sparse, noisy, and incomplete time series measurements. In this work, we identify challenges and explore solutions towards a unified model that can perform diverse tasks grounded in the physics of the electric grid and generalize to unseen distribution networks. We define a unified grid ontology that represents variable sized distribution networks as heterogeneous graphs while preserving native topology, asset types, and electrical relationships across networks. We develop a physics based data simulation pipeline that combines reference and procedurally generated distribution networks with network reconfigurations, fault scenarios, and configurable sensing conditions. We present Mycelium, a heterogeneous graph transformer with structure aware communication edges and electrical reference features that encode network position and nominal phase orientation, together with task specific temporal readouts which generate per task outputs. We train Mycelium on reference as well as synthetic grids, and study its generalization on benchmark networks completely excluded from training and validation. Mycelium is observed to outperform task specific neural baselines on most reported benchmark metrics. Architectural ablations and the aforementioned studies reveal Mycelium's capability to learn representations of the underlying physics which serves to enhance cross-task performance, thereby addressing a significant challenge in unified grid models.
Figures & tables
| Split | Networks |
|---|---|
| Train | SMART-DS AUS/SFO ( each); registered IEEE feeder; EPRI ckt5 , ckt24 ; D-Suite spd_r/s/u |
| Validation | SMART-DS AUS/SFO ( each); EPRI ckt7 ; D-Suite spm_s |
| Test | SMART-DS AUS/SFO ( each) and all GSO; D-Suite spm_r/u |
| Benchmark | Iowa 240- and 296-bus; European industrial, rural, and urban |
| State estimation | Phase | Switch | Fault | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Split | Baseline | Task | p.u. | (V) | (deg) | MAPE (%) | acc | prec | rec | F1 | det F1 | class 5 | loc | hop@1 | hop@2 | hop@3 |
| Test | CANOS ( Piloto et al., 2024 ) | State est. | 0.00221 | 2.86 | 0.576 | 0.136 | - | - | - | - | - | - | - | - | - | - |
| GraphSAGE-CPI ( Dande et al., 2025 ) | Phase | - | - | - | - | 0.3276 | - | - | - | - | - | - | - | - | - | |
| DGS-GNN ( Ebtia et al., 2024 ) | Switch | - | - | - | - | - | 0.0807 | 0.2399 | 0.1207 | - | - | - | - | - | - | |
| STGATv2 ( Karabulut et al., 2026 ) | Fault | - | - | - | - | - | - | - | - | - | - | 0.1349 | 0.2162 | 0.2683 | 0.3107 | |
| Mycelium 10k | All four | 0.00345 | 5.99 | 1.107 | 0.234 | 0.5713 | 0.9960 | 0.8137 | 0.8957 | 1.0000 | 0.4840 | 0.1710 | 0.2369 | 0.2999 | 0.3314 | |
| State estimation | Phase | Switch | Fault | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Split | Configuration | p.u. | (V) | (deg) | MAPE (%) | Acc. | Prec. | Rec. | F1 | Det. F1 | class 5 | Loc. | Hop@1 | Hop@2 | Hop@3 |
| (a) Test | No communication | 0.00370 | 4.99 | 1.286 | 0.240 | 0.6611 | 0.1950 | 0.9800 | 0.3253 | 1.0000 | 0.4540 | 0.1819 | 0.2743 | 0.3464 | 0.3822 |
| Random communication | 0.00316 | 5.24 | 1.083 | 0.230 | 0.6328 | 0.9631 | 0.9056 | 0.9334 | 1.0000 | 0.4241 | 0.1881 | 0.2628 | 0.3267 | 0.3583 | |
| Mycelium 10k | 0.00345 | 5.99 | 1.107 | 0.234 | 0.5713 | 0.9960 | 0.8137 | 0.8957 | 1.0000 | 0.4840 | 0.1710 | 0.2369 | 0.2999 | 0.3314 | |
| Benchmark | No communication | 0.01866 | 77.46 | 1.639 | 5.955 | 0.4256 | 0.7945 | 0.9968 | 0.8842 | 1.0000 | 0.7143 | 0.1878 | 0.2950 | 0.3492 | 0.4034 |
| Random communication | 0.01805 | 78.24 | 1.543 | 5.773 | 0.4231 | 0.8721 | 0.9910 | 0.9278 | 0.9993 | 0.6468 | 0.1971 | 0.2857 | 0.3135 | 0.3810 | |
| State estimation | Phase | Switch | Fault | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Split | Configuration | p.u. | (V) | (deg) | MAPE (%) | Acc. | Prec. | Rec. | F1 | Det. F1 | class 5 | Loc. | Hop@1 | Hop@2 | Hop@3 |
| (a) Test | Reference only | 0.00881 | 7.63 | 0.933 | 0.320 | 0.5846 | 0.9992 | 0.9178 | 0.9568 | 1.0000 | 0.3455 | 0.1526 | 0.2305 | 0.2899 | 0.3249 |
| +25% synthetic | 0.00302 | 4.45 | 1.116 | 0.197 | 0.5922 | 0.9806 | 0.9542 | 0.9672 | 1.0000 | 0.4708 | 0.1839 | 0.2820 | 0.3437 | 0.3721 | |
| Mycelium 10k | 0.00345 | 5.99 | 1.107 | 0.234 | 0.5713 | 0.9960 | 0.8137 | 0.8957 | 1.0000 | 0.4840 | 0.1710 | 0.2369 | 0.2999 | 0.3314 | |
| Benchmark | Reference only | 0.04025 | 148.88 | 2.388 | 7.714 | 0.3539 | 0.9445 | 0.9946 | 0.9689 | 1.0000 | 0.2937 | 0.1323 | 0.1799 | 0.2249 | 0.3016 |
| +25% synthetic | 0.01991 | 141.51 | 1.134 | 5.669 | 0.3886 | 0.9585 | 0.9958 | 0.9768 | 1.0000 | 0.6111 | 0.1429 | 0.2156 | 0.2500 | 0.3056 | |
| Run | State estimation | Phase | Switch | Fault | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Split | p.u. | (V) | (deg) | MAPE (%) | acc | prec | rec | F1 | det F1 | class 5 | exact | hop@1 | hop@2 | hop@3 | |
| Test | SE only | 0.00148 | 3.33 | 1.057 | 0.148 | - | - | - | - | - | - | - | - | - | - |
| Phase only | - | - | - | - | 0.5363 | - | - | - | - | - | - | - | - | - | |
| Switch only | - | - | - | - | - | 0.8325 | 0.9374 | 0.8818 | - | - | - | - | - | - | |
| Fault only | - | - | - | - | - | - | - | - | 0.7990 | 0.5322 | 0.1927 | 0.2731 | 0.3441 | 0.3768 | |
| Mycelium 10k | 0.00345 | 5.99 | 1.107 | 0.234 | 0.5713 | 0.9960 | 0.8137 | 0.8957 | 1.0000 | 0.4840 | 0.1710 | 0.2369 | 0.2999 | 0.3314 | |
Appendix figures & tables13 assets
Supplementary material from the paper’s appendix.
Appendix
| Trigger | Change to the proposed model | Repetition limit |
|---|---|---|
| Low snapshot voltage | Rebalance single-phase loads where connections permit; adjust transformer taps; add capacitors or regulators; add parallel conductors along affected paths; select a larger transformer. | Ordered passes; up to 4 conductor reinforcement and 2 transformer upgrade rounds. |
| High snapshot voltage | Enable inverter volt-var control, back off voltage boosting taps where the low voltage condition permits, reinforce conductors, or reduce affected DER output limits by 20%. | Up to 5 rounds. |
| Snapshot overload, with thermal enforcement | Add parallel conductor circuits, choose a larger transformer, add parallel substation units, or increase regulator capacity. | Up to 3 rounds. |
| Daily voltage violation | Adjust taps or reinforce affected paths for undervoltage; use inverter control, tap backoff, phase rebalancing, or DER curtailment for overvoltage. | Up to 2 undervoltage and 8 overvoltage rounds. |
| Task | ML formulation | Prediction scope |
|---|---|---|
| State estimation (SE) | Continuous regression | Magnitude and angle per (bus, phase, timestep) |
| Phase attribution | Three-class classification | One A/B/C assignment per eligible consumer and window |
| Switch state inference | Binary classification | One open/closed state per switch and window |
| Fault diagnosis | Six-class classification; conditional localization | Normal/fault class per window; equipment location for faulted windows |
| Type | Static inputs / connectivity | Temporal inputs |
|---|---|---|
| (a) Nodes | ||
| Bus | Base voltage; source bus indicator; normalized coordinates and coordinate validity flag. | Per phase voltage magnitude and angle; active power and reactive power . |
| Consumer | One-hot metering tier encoding. | Customer voltage channels for phase attribution and voltage derived from the metering tier; active and reactive power. |
| Substation | Positive- and zero-sequence source resistance and reactance; three-phase and single-phase short-circuit strengths; base voltage; voltage setpoint; source angle; frequency. | Feeder head voltage and active/reactive power when feeder head fusion is enabled. |
| Capacitor | Voltage and reactive power ratings; switching step count; delta connection and controller indicators; active step fraction. | – |
| DER | Device kind encoding for PV, generator, or storage; active/reactive power ratings; delta connection indicator. | – |
| Component | Setting |
|---|---|
| Transformer layers | 8 |
| Hidden dimension | 128 |
| Attention heads | 4 |
| Node type FFN hidden width | 256 |
| Temporal window | 24 hourly steps |
| Positional encoding | dimensions |
| Tier | Bus voltage | DT meter (joint ) | Branch flow | Customer / | of which |
|---|---|---|---|---|---|
| sparse | 1% | 60% | 0.5% | 10% | 20% |
| medium | 5% | 90% | 2% | 30% | 20% |
| dense | 15% | 100% | 5% | 70% | 20% |
| clean | 100% | 100% | 100% | 100% | 100% |
| Network | Policy | WLS | Ours | ||
|---|---|---|---|---|---|
| Result | Time | Result | Time | ||
| 240_bus | nm_dense | 34.0 (.0091) / .63 | 7s | 10.3 (.0022) / .67 | .4s |
| nm_medium | 11.4 (.0029) / .23 | 7s | 13.8 (.0026) / .81 | .4s | |
| nm_sparse | 18.8 (.0049) / .35 | 6s | 13.0 (.0028) / .80 | .4s | |
| ami_dense | 21.6 (.0057) / .40 | 7s | 12.4 (.0024) / .76 | .4s | |
| ami_medium | 34.0 (.0091) / .63 | 8s | 9.9 (.0022) / .65 | .4s | |
| CANOS | Ours | |||||||
|---|---|---|---|---|---|---|---|---|
| Policy | MAE (V) | MAE (p.u.) | MAE ( ∘ ) | MAPE | MAE (V) | MAE (p.u.) | MAE ( ∘ ) | MAPE |
| clean | 1.98 | .0017 | .63 | 0.35% | 18.71 | .0079 | 1.77 | 5.43% |
| nm_dense | 6.21 | .0100 | 3.83 | 4.97% | 116.36 | .0145 | 1.37 | 5.31% |
| nm_medium | 10.24 | .0205 | 4.15 | 6.28% | 135.07 | .0166 | 1.32 | 5.38% |
| nm_sparse | 12.96 | .0276 | 3.66 | 7.31% | 140.04 | .0186 | 1.36 | 5.58% |
| ami_dense | 8.74 | .0113 | 3.53 | 5.73% | 22.08 | .0063 | 1.99 | 5.25% |
| Method | Benchmark | Test |
|---|---|---|
| correlation-based ( ) | 0.3999 | 0.5741 |
| correlation-based ( ) | 0.4200 | 0.3637 |
| Mycelium 10k | 0.4001 | 0.5713 |
| Mycelium 20k | 0.4387 | 0.6150 |
| Policy | Model | Det. F1 | class 5 | Loc. | Hop@1 | Hop@2 | Hop@3 |
|---|---|---|---|---|---|---|---|
| clean | STGATv2 | - | - | 0.213 | 0.250 | 0.269 | 0.306 |
| Mycelium | 1.000 | 0.704 | 0.500 | 0.537 | 0.583 | 0.583 | |
| nm_dense | STGATv2 | - | - | 0.130 | 0.213 | 0.222 | 0.306 |
| Mycelium | 1.000 | 0.704 | 0.185 | 0.315 | 0.370 | 0.435 | |
| nm_medium | STGATv2 | - | - | 0.130 | 0.231 | 0.241 | 0.296 |
| Mycelium | 1.000 | 0.769 | 0.185 | 0.324 | 0.361 | 0.417 |
| Network | Model | Det. F1 | class 5 | Loc. | Hop@1 | Hop@2 | Hop@3 | |
|---|---|---|---|---|---|---|---|---|
| 240_bus | STGATv2 | 189 | - | - | 0.159 | 0.159 | 0.159 | 0.159 |
| Mycelium | 189 | 1.000 | 0.667 | 0.312 | 0.455 | 0.481 | 0.545 | |
| 296_bus | STGATv2 | 189 | - | - | 0.005 | 0.090 | 0.138 | 0.201 |
| Mycelium | 189 | 1.000 | 0.788 | 0.116 | 0.270 | 0.307 | 0.307 | |
| industrial | STGATv2 | 126 | - | - | 0.127 | 0.127 | 0.127 | 0.254 |
| Mycelium | 126 | 1.000 | 0.754 | 0.214 | 0.238 | 0.310 | 0.381 |
| State estimation | Phase | Switch | Fault | ||||||||||||
| Split | Configuration | p.u. | (V) | (deg) | MAPE (%) | Acc. | Prec. | Rec. | F1 | Det. F1 | class 5 | Loc. | Hop@1 | Hop@2 | Hop@3 |
| Benchmark | 240_bus ( ) | 0.0039 | 18.26 | 0.870 | 0.63 | – | – | – | – | 1.000 | 0.6667 | 0.3122 | 0.4550 | 0.4815 | 0.5450 |
| 296_bus ( ) | 0.0034 | 18.32 | 0.742 | 0.76 | – | – | – | – | 1.000 | 0.7884 | 0.1164 | 0.2698 | 0.3069 | 0.3069 | |
| industrial ( ) | 0.0097 | 40.66 | 1.213 | 60.92 | – | 0.9974 | 0.5955 | 0.7458 | 1.000 | 0.7540 | 0.2143 | 0.2381 | 0.3095 | 0.3810 | |
| rural ( ) | 0.0059 | 2.70 | 1.286 | 0.59 | 0.4898 | 0.9644 | 0.9564 | 0.9604 | 1.000 | 0.7831 | 0.1852 | 0.3175 | 0.3333 | 0.4444 | |
| urban ( ) | 0.0342 | 318.20 | 2.971 | 1.40 | 0.3782 | 0.9777 | 0.9714 | 0.9746 | 1.000 | 0.4286 | 0.0794 | 0.2063 | 0.2857 | 0.2857 | |
Power Systems
Power systems research studies the planning, operation, control, and protection of electrical grids and their integration with energy resources.
See all 231 papers