Large Language Models for Detecting Cyberattacks on Smart Grid Protective Relays

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Saber, Ahmad Mohammad, Jafari, Saeed, Ouyang, Zhengmao, Budnarain, Paul, Youssef, Amr, Kundur, Deepa
Format: Preprint
Publié: 2026
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866917229927333888
author Saber, Ahmad Mohammad
Jafari, Saeed
Ouyang, Zhengmao
Budnarain, Paul
Youssef, Amr
Kundur, Deepa
author_facet Saber, Ahmad Mohammad
Jafari, Saeed
Ouyang, Zhengmao
Budnarain, Paul
Youssef, Amr
Kundur, Deepa
contents This paper presents a large language model (LLM)-based framework that adapts and fine-tunes compact LLMs for detecting cyberattacks on transformer current differential relays (TCDRs), which can otherwise cause false tripping of critical power transformers. The core idea is to textualize multivariate time-series current measurements from TCDRs, across phases and input/output sides, into structured natural-language prompts that are then processed by compact, locally deployable LLMs. Using this representation, we fine-tune DistilBERT, GPT-2, and DistilBERT+LoRA to distinguish cyberattacks from genuine fault-induced disturbances while preserving relay dependability. The proposed framework is evaluated against a broad set of state-of-the-art machine learning and deep learning baselines under nominal conditions, complex cyberattack scenarios, and measurement noise. Our results show that LLM-based detectors achieve competitive or superior cyberattack detection performance, with DistilBERT detecting up to 97.62% of attacks while maintaining perfect fault detection accuracy. Additional evaluations demonstrate robustness to prompt formulation variations, resilience under combined time-synchronization and false-data injection attacks, and stable performance under realistic measurement noise levels. The attention mechanisms of LLMs further enable intrinsic interpretability by highlighting the most influential time-phase regions of relay measurements. These results demonstrate that compact LLMs provide a practical, interpretable, and robust solution for enhancing cyberattack detection in modern digital substations. We provide the full dataset used in this study for reproducibility.
format Preprint
id arxiv_https___arxiv_org_abs_2601_04443
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Large Language Models for Detecting Cyberattacks on Smart Grid Protective Relays
Saber, Ahmad Mohammad
Jafari, Saeed
Ouyang, Zhengmao
Budnarain, Paul
Youssef, Amr
Kundur, Deepa
Cryptography and Security
Machine Learning
Signal Processing
This paper presents a large language model (LLM)-based framework that adapts and fine-tunes compact LLMs for detecting cyberattacks on transformer current differential relays (TCDRs), which can otherwise cause false tripping of critical power transformers. The core idea is to textualize multivariate time-series current measurements from TCDRs, across phases and input/output sides, into structured natural-language prompts that are then processed by compact, locally deployable LLMs. Using this representation, we fine-tune DistilBERT, GPT-2, and DistilBERT+LoRA to distinguish cyberattacks from genuine fault-induced disturbances while preserving relay dependability. The proposed framework is evaluated against a broad set of state-of-the-art machine learning and deep learning baselines under nominal conditions, complex cyberattack scenarios, and measurement noise. Our results show that LLM-based detectors achieve competitive or superior cyberattack detection performance, with DistilBERT detecting up to 97.62% of attacks while maintaining perfect fault detection accuracy. Additional evaluations demonstrate robustness to prompt formulation variations, resilience under combined time-synchronization and false-data injection attacks, and stable performance under realistic measurement noise levels. The attention mechanisms of LLMs further enable intrinsic interpretability by highlighting the most influential time-phase regions of relay measurements. These results demonstrate that compact LLMs provide a practical, interpretable, and robust solution for enhancing cyberattack detection in modern digital substations. We provide the full dataset used in this study for reproducibility.
title Large Language Models for Detecting Cyberattacks on Smart Grid Protective Relays
topic Cryptography and Security
Machine Learning
Signal Processing
url https://arxiv.org/abs/2601.04443