fdia-graph¶
Labelled cyber-attack data for power-grid research, and the code that makes it.
fdia-graph builds timelines of meter readings on power-grid test systems, places false data
injection attacks (FDIA) in them, and labels the buses each attack targets. The generator solves
every attack it makes on the AC power-flow equations, around the buses it targets. Download a ready
timeline, or generate your own.

One overload attack in a generated IEEE-14 timeline, as an operator would see it. Over 60 frames the
flow meters of two branches report a flow that climbs to the rating, while the flow without the
attack stays near where it was.
python examples/first_look.py makes this figure,
fdia-graph in five cells is a notebook that generates the same timeline and
draws the same flows, and
Follow one attack through the code explains every step behind it.
Three steps¶
1. Load a released dataset.
import fdia_graph as fg
# downloads the IEEE-118 timeline once, then caches it
train = fg.load("ieee118", split="train")
arrays = train.export()
print(arrays["node_x"].shape, arrays["y"].shape)
2. Generate your own, then load it by name.
# needs fdia-graph[generate]
# downloads the IEEE-14 pool of solved operating points
# about five minutes on a laptop
fg.generate("ieee14", name="my_run", frames=2000)
mine = fg.load("my_run", split="train")
3. Analyse it with an estimator.
# needs fdia-analysis[se]
from fdia_analysis.se.methods import WLS
test = fg.load("ieee118", split="test")
est = WLS().fit(train)
print(est.score(test))
Two toolkits¶
| Toolkit | Package | What it does |
|---|---|---|
fdia-graph |
fdia_graph |
generates a timeline and loads it |
fdia-analysis |
fdia_analysis |
runs estimators and localizers on a timeline |
fdia-analysis holds state estimation, attack localization, federated training, trusted-meter
selection and a results store. It depends on fdia-graph. fdia-graph never imports it.
Test systems¶
| System | Buses | Data |
|---|---|---|
| IEEE and other public cases | 14, 30, 57, 89, 118, 145, 200, 300 | released datasets, downloaded by fg.load |
| New York grid | 140 | case file in the package; you build the dataset |
Each released dataset is one timeline of 72,000 frames. The New York grid is a MATPOWER case file with 140 buses and 227 branches. It goes through the same generator, and Build the operating points starts its dataset.
The generator makes two attack families: At, a slow load ramp, and Am, a line overload. The
released files hold seven families: five that the generator does not make (Aq, Ad, As, Ar,
Al), and an Am that drives no line to its limit.
The attack families has the details.
How it flows¶

Install¶
| Command | Gives |
|---|---|
pip install fdia-graph |
the loader: opens a timeline, exports splits as numpy arrays |
pip install "fdia-graph[torch]" |
adds PyTorch: single records, batches and the DataLoader |
pip install "fdia-graph[generate]" |
adds pandapower, to generate timelines |
pip install "fdia-analysis[se]" |
the analysis toolkit with state estimation |
Every extra of both toolkits is listed in Install and data versions.
Where next¶
- Tutorials: load a dataset, generate a timeline, analyse a timeline
- Guides: generate a timeline, follow one attack through the code, build the operating points, add a design family or a test system, troubleshooting
- Concepts: how the package flows, the test systems, solving, meters and noise, the attack families, layers and labels
- Data dictionary: what every array means
- Runnable baselines and dataset statistics
- Analysis pages: state estimation, localization, trusted meters, federated training
- Contributing: rules, pull requests, releases
Citation¶
Al(released files) and the load bound ofAm: Yuan, Li & Ren, Modeling load redistribution attacks in power systems, IEEE T-SG 2(2), 2011.At: Haghshenas, Hasnat & Naeini, A Temporal GNN for Cyber Attack Detection and Localization in Smart Grids, IEEE ISGT 2023.- Measurement model: Zaman & Lin, PING: Physics-Informed GNNs to Generalize FDIA Localization, NAPS 2025.
- Meter noise: Asprou, Kyriakides & Albu, Variable Weights in a WLS State Estimator, IEEE T-IM 63, 2014.
- Protocol: Boyaci et al., Joint Detection and Localization of Stealth FDIA, IEEE T-SG, 2022.
- Local false states,
Am, trusted meters: Wu, Wang, Hu, Ye & Tang, Dynamic PMU configuration for stealthy multi-snapshot FDIA mitigation, IEEE T-SG 17(1), 2026.
License¶
Data under CC BY 4.0, code under MIT (see LICENSE). Synthetic, from public IEEE cases. Not for
operational decisions.