fdia-graph
A Python package that builds attacked measurement timelines on power-grid test systems, with a second toolkit to analyse them. Download a ready timeline or generate your own.
A timeline is the meter readings of one grid, frame by frame, with false data injection attacks (FDIA) placed in it and labelled per bus.
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.
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))
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.
Metadata
Release files for fdia-graph 0.22.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fdia_graph-0.22.0.tar.gz | 309.0 kB | With provenance | Details for fdia_graph-0.22.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fdia_graph-0.22.0-py3-none-any.whl | Python 3 | none | any | Details for fdia_graph-0.22.0-py3-none-any.whl |
Total release size: 572.1 kB
Release files / fdia_graph-0.22.0.tar.gz
| Download URL | fdia_graph-0.22.0.tar.gz |
|---|---|
| Size | 309.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4d0ad0d75debbcfdebdbda272ff3e72ada544d847be3dcb9785a51144c45ab95
|
|
BLAKE2b-256 checksum How to use checksums |
9b08d571693dfad9d75295b498bc965fd450010ecb0ac20ed69af56f333001ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.
Transparency logRelease files / fdia_graph-0.22.0-py3-none-any.whl
| Download URL | fdia_graph-0.22.0-py3-none-any.whl |
|---|---|
| Size | 263.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7357b2ef2763812544bd8c3c0dfa2860b45311adcbae9af0e7d93599a35d29bc
|
|
BLAKE2b-256 checksum How to use checksums |
a81a127d86da1f5077b35b434ec165eb7e3ffe6facd42dcc206b939baeee5c00
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.
Transparency logSecurity for fdia-graph 0.22.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for fdia_graph-0.22.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.