Detecting Zero-Day Attacks in Digital Substations via In-Context Learning

Faizan Manzoor, Vanshaj Khattar, Akila Herath, Clifton Black, Matthew C Nielsen, Junho Hong, Chen-Ching Liu, Ming Jin · 2025

Read Detecting Zero-Day Attacks in Digital Substations via In-Context Learning by Faizan Manzoor, Vanshaj Khattar, Akila Herath, Clifton Black, Matthew C Nielsen, Junho Hong, Chen-Ching Liu, Ming Jin (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2501-16453.txt.

Introduction

Faizan Manzoor and co-authors present a way to spot brand-new cyberattacks on power sites in this 2025 paper. Digital substations use a standard protocol to talk, and attacks on power grids grow each year with new tricks. Past detectors, built on rules or on learning from known attacks, often fail on attacks they have never seen.

Their method uses a skill of transformer models: learning from a few examples shown in the prompt, with no retraining. That lets the model spot a new attack after seeing just a few cases of it. On a standard data set for this protocol, the method caught more than 85 percent of new attacks, while leading prior methods failed.

Catalog record

CREATORFaizan Manzoor, Vanshaj Khattar, Akila Herath, Clifton Black, Matthew C Nielsen, Junho Hong, Chen-Ching Liu, Ming Jin
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE51 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2501-16453

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

Detecting Zero-Day Attacks in Digital Substations via In-Context Learning Faizan Manzoor, Vanshaj Khattar, Akila Herath, Clifton Black, Matthew C Nielsen, Junho Hong, Chen-Ching Liu, Ming Jin Abstract The occurrences of cyber attacks on the power grids have been increasing every year, with novel attack techniques emerging every year. In this paper, we address the critical challenge of detecting novel/zero-day attacks in digital substations that employ the IEC-61850 communication protocol. While many heuristic and machine learning (ML)-based methods have been proposed for attack detection in IEC-61850 digital substations, generalization to novel or zero-day attacks remains challenging. We propose an approach that leverages the in-context learning (ICL) capability of the transformer architecture, the fundamental building block of large language models. The ICL approach enables the model to detect zero-day attacks and learn from a few examples of that attack without explicit retraining. Our experiments on the IEC-61850 dataset demonstrate that the proposed method achieves more than 85 % 85\% detection accuracy on zero-day attacks while the existing state-of-the-art baselines fail. This work paves the way for building more secure and resilient digital substations of the future. keywords In-context learning, IEC-61850, intrusion detection systems, zero-day attacks, GPT-2 transformer 1 Introduction The modern-day power grids continuously face the possibility of being disrupted by cyber attacks. This is evident from the recent increase in the cases of cyber attacks on power grids worldwide. For example, in 2015, a coordinated cyber-attack was responsible for the mass-scale power outages in Ukraine Assante (2016) . In 2016, another cyber-attack in Ukraine also led to a mass power outage and affected the SCADA system at the transmission level Case (2016) . Intrusion Detection Systems (IDSs) play an important role in detecting potential cyber-attacks on substations so that timely action can be taken. However, most of the existing IDS methods, heuristic or machine learning-based, struggle when they encounter a novel or an unseen attack. We refer to these kinds of attacks as zero-day attacks as they present themselves for the first time. A recent study showed that millions of new cyber-attacks were detected annually worldwide from 2015 to 2020 [ 3 ] . This highlights the importance of developing IDSs that can effectively detect zero-day attacks. As a consequence, cybersecurity of digital substations against zero-day attacks has recently been a focus for many researchers Duman et al. (2017) . In this paper, we specifically consider IEC-61850 digital substations Lozano et al. (2023) ; Girdhar et al. (2024) . Although IDS techniques are well-explored for traditional TCP/IP-based substation communication networks Stefanov and Liu (2012) , the specific requirements and unique communication protocols of IEC–61850 substations have not been adequately addressed. The IEC–61850 communication protocol is commonly used in digital substations to communicate between Intelligent Electronic Devices (IEDs) and Merging Units (MUs). It allows for efficient connectivity and control in digital substations Commission et al. (2013) , however, there are numerous vulnerabilities that an attacker can exploit to disrupt the operation of these digital substations Otuoze (2018) . Many existing IDS methods, whether heuristic-based Hong et al. (2014) or machine learning (ML)-based Sahani et al. (2023) ; Park et al. (2024) , are designed for specific attacks, which can limit their ability to generalize to zero-day attacks. Heuristic-based methods use a predefined set of rules to determine if the incoming data packet is a specific attack or not. In Hong et al. (2014) , the authors use timestamp and sequence numbers to detect a replay attack. In Rajkumar (2020) , authors investigated the injected spoofing attack on the IEC-61850-based standard. However, the proposed model was specifically designed for spoofing attacks and may have limited applicability to other types of attacks. The work in Yang (2016) develops an IDS for the IEC-61850 protocol, but they only consider information carried within sampled value messages, which restricts its application to other message-sharing protocols, such as GOOSE. In El Hariri (2019) , the authors use a neural network-based approach to detect spoofed packets. Another work improved the previous approach using the decision trees and random forests et.al. (2021) . However, many of these existing ML-based methods focus on specific attack cases and do not generalize to novel attacks. Therefore, we propose a generalizable IDS framework for the IEC-61850 communication protocol that can detect zero-day attacks on digital substations. Our method leverages the “in-context learning” (ICL) ability of transformer architectures et.al. (2017) , which are a basic building block of large language models (LLMs) Brown (2020) . In-context learning is the ability to generalize rapidly from a few examples of a new task that have not been previously seen, without any updates to the model, a key characteristic of many large language models (LLMs) Brown (2020) ; Min et al. (2022) . For example, consider the following context examples of network packets provided to an LLM: Packet1=Normal;Packet2=Normal;Packet3=Attack . Then, if the query sample to the LLM is Packet4 , which shares similar characteristics with Packet3 , the LLM may output “Attack” as it is able to understand through the in-context examples that packets with certain features are classified as attacks. This ability of LLMs to understand the context and adapt their outputs accordingly without any additional training motivates the following question: “Can this in-context learning ability be leveraged for zero-day attack detection?” In this paper, we answer the above question in the affirmative and show that the transformer architecture could use the incoming data packets in a digital substation as in-context examples to infer if the next incoming packet is an attack or not. We begin by splitting the dataset into in-distribution (ID) (known dataset) and out-of-distribution (OOD) (zero-day attacks) subsets, using the ID portion for training and reserving the OOD data exclusively for testing. To expand the variety of potential attack classes within the ID set, we employ the multi-mixing Manzoor et al. (2024) strategy to generate additional attack classes. Next, we train neural network–based weak classifiers on the augmented ID dataset. These weak classifiers provide weak-labels—either as hard labels (Lab) or probability distributions (Dist)—that our transformer architectures use during both training and inference. Specifically, the models process historical packet data and their Lab/Dist (in-context data) alongside the latest packet (the query), leveraging ICL to predict whether the query packet is anomalous. We instantiate two main transformer variants: 1. Simple Transformer (TF) , which conditions on hard labels, and 2. Distributional Transformer (DTF) , which conditions on label distributions. Both variants are trained using standard cross-entropy loss, but with two distinct strategies for handling in-context Lab/Dist: (1) using only the weak classifier, or (2) mixing the weak classifier with ground-truth Lab/Dist for the entire in-context data. This yields four specific training strategies: 1. Weak Classifier Trained Simple Transformer (WCTF) : TF trained with in-context hard labels generated from weak classifiers. 2. Mixed Trained Simple Transformer (MTF) : TF trained with in-context hard labels generated from weak classifiers and ground truth. 3. Weak Classifier Trained Distributional Transformer (WCDTF) : DTF trained with in-context label distribution generated from the weak classifiers. 4. Mixed Trained Distributional Transformer (MDTF) : DTF trained with in-context label distribution generated from weak classifiers and ground truth. In real-world scenarios, ground-truth labels are not available; hence, during testing, Lab/Dist for in-context data are generated

Read the complete text