用小模型将电流数据转为文本,精准识别电网保护装置的网络攻击。
Large Language Models for Detecting Cyberattacks on Smart Grid Protective Relays
- 把多相电流时序数据转成自然语言提示,输入轻量级语言模型检测攻击。
- DistilBERT在真实噪声下仍能检测97.62%攻击,且故障识别准确率100%。
- 模型具备可解释性,能定位关键时间-相位区域,适合电力系统安全应用。
本文提出一种基于大语言模型(LLM)的框架,通过微调轻量级LLM检测变压器差动保护继电器(TCDR)面临的网络攻击,避免关键电力变压器误动作。核心思想是将多变量时序电流数据(跨相别与输入/输出侧)转化为结构化自然语言提示,由本地部署的紧凑型语言模型处理。在此表示下,对DistilBERT、GPT-2及DistilBERT+LoRA进行微调,以区分网络攻击与真实故障扰动,同时保障继电器可靠性。在正常工况、复杂攻击场景及测量噪声条件下,与多种先进机器学习与深度学习方法对比,结果显示基于LLM的检测器性能相当或更优:其中DistilBERT最高可检测97.62%攻击,且故障检测准确率保持100%。额外评估表明其对提示格式变化鲁棒,能抵御时间同步与虚假数据注入联合攻击,在真实测量噪声水平下表现稳定。此外,语言模型的注意力机制提供内在可解释性,可定位影响最大的时间-相位区域。结果证明,轻量级语言模型为现代数字化变电站提供了实用、可解释、鲁棒的攻击检测方案。研究提供完整数据集以支持复现。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。