Skip to main content

fdia-graph

Stealthy FDIA localization datasets for power grids, PyTorch-ready in one line. Eight IEEE systems (14 / 30 / 57 / 89 / 118 / 145 / 200 / 300 buses), 72,000 records each.

import fdia_graph as fg

ds = fg.load("ieee118", split="train")     # auto-downloads + caches
loader = ds.loader(batch_size=64)
for batch in loader:
    batch["node_x"], batch["edge_x"], batch["edge_index"], batch["y"], batch["family"]

New here? docs/ROADMAP.md — file map + how it all connects · docs/DATA_DICTIONARY.md — what every array means · docs/CONCEPTS_TO_CODE.md — paper equations → functions · docs/EXAMPLES.md — runnable baselines, streams, stats.

Install

pip install fdia-graph              # loader
pip install "fdia-graph[torch]"     # + PyTorch DataLoader
pip install "fdia-graph[pyg]"       # + torch_geometric
pip install "fdia-graph[generate]"  # + pandapower, to generate custom data

Data is pinned per SDK version and cached in ~/.cache/fdia_graph. Pin a version with fg.load(..., release="v0.7.1"); pip install --upgrade fdia-graph moves it forward.

Load

fg.load("ieee300", split="train")                              # 60/20/20 chronological split
fg.load("ieee118", split="test", families=["Aq","At","Al"])    # family subset
fg.load("ieee118", units="pu")                                 # per-unit + radians (default is physical)

Whole split at once: ds.to_numpy() / .to_torch() / .to_pandas(). Custom data: fg.generate(system, name, per_family=..., attack_intensity=..., ...) then fg.load(name). Continuous timeline for LSTM/TGN: fg.load_stream(system). Both in docs/EXAMPLES.md.

Data

Each record is a sparse measurement graph with N buses (nodes) and E branches (edges). Read a shape as "values per item": [N,4] = 4 numbers per bus, [E,8] = an 8-dim vector per branch, [2,E] = 2 rows × E branches. Full reference in docs/DATA_DICTIONARY.md.

node_x [N,4] = [ |V|, P_inj, Q_inj, theta ]      bus meters      node_m [N,4] = mask
edge_x [E,2] = [ P_from, Q_from ]                branch flow     edge_m [E,2] = mask
edge_index [2,E] = [ from_bus; to_bus ]          connectivity
edge_attr  [E,8] = [ r,x,b,g,gs,bs,tap,shift ]   static line physics  (ds.edge_attr)
y [N] = attacked (1) / clean (0)                 localization target
swing [N,2], temporal_delta [N,2]                temporal features

Attacks

Three stealthy families that evade classical bad-data detection, plus three detectable ones as a contrast set. Every per-bus change stays in a plausibility band (≈2% noise floor to 20% cap); meter error follows an accuracy-class model.

family attack classical BDD
Aq stealthy load rescale + AC re-solve evades
At slow temporal load ramp evades
Al targeted load redistribution (hides overloads) evades
Ad / As / Ar meter corruption / scaling / replay caught

Report per-family node-F1 with the false-alarm rate, not accuracy (clean buses dominate). A lightweight per-bus MLP reaches ~0.92 localization macro-F1; see docs/EXAMPLES.md.

Citation

Cite the attack- and measurement-model sources:

  • Yuan, Li & Ren, Modeling load redistribution attacks in power systems, IEEE T-SG 2(2), 2011. (LRA)
  • Haghshenas, Hasnat & Naeini, A Temporal GNN for Cyber Attack Detection and Localization in Smart Grids, IEEE ISGT 2023. (ramp)
  • Zaman & Lin, PING: Physics-Informed GNNs to Generalize FDIA Localization, NAPS 2025. (measurement model)
  • Asprou, Kyriakides & Albu, Variable Weights in a WLS State Estimator, IEEE T-IM 63, 2014. (meter noise)
  • Boyaci et al., Joint Detection and Localization of Stealth FDIA, IEEE T-SG, 2022. (protocol)

License

Data under CC BY 4.0, code under MIT (see LICENSE). Synthetic, from public IEEE cases — not for operational decisions.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fdia_graph-0.7.9.tar.gz (61.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fdia_graph-0.7.9-py3-none-any.whl (65.5 kB view details)

Uploaded Python 3

File details

Details for the file fdia_graph-0.7.9.tar.gz.

File metadata

  • Download URL: fdia_graph-0.7.9.tar.gz
  • Upload date:
  • Size: 61.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for fdia_graph-0.7.9.tar.gz
Algorithm Hash digest
SHA256 43443b16f3a28bd48033c2434d95ee98d338873de1d6865529b165948b58db39
MD5 1c854aff2c49367f2ccfc295ad68f4ca
BLAKE2b-256 262e3643f5ff95f02c6e1e6970b923bb935933adde317ff431f6c74ac61baa34

See more details on using hashes here.

Provenance

The following attestation bundles were made for fdia_graph-0.7.9.tar.gz:

Publisher: publish.yml on myersben9/fdia-graph

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fdia_graph-0.7.9-py3-none-any.whl.

File metadata

  • Download URL: fdia_graph-0.7.9-py3-none-any.whl
  • Upload date:
  • Size: 65.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for fdia_graph-0.7.9-py3-none-any.whl
Algorithm Hash digest
SHA256 5cac1becf5864fbb08d981d095ec6d73b8946a308d87818a42ea1da26ec0118c
MD5 5b0276dc4ca21174dcb1e58a8c2cc6fd
BLAKE2b-256 38fbf55ea02f5bcf3bf25377bb8a7f662e38dee2641756ffda6c1df72ed22a09

See more details on using hashes here.

Provenance

The following attestation bundles were made for fdia_graph-0.7.9-py3-none-any.whl:

Publisher: publish.yml on myersben9/fdia-graph

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.10.0

2 files

0.9.0

2 files

0.8.0

2 files

0.7.10

2 files

This release

0.7.9 This release

2 files

0.7.8

2 files

0.7.7

2 files

0.6.0

2 files

0.5.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page