<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Publishing DTD v1.1 20151215//EN" "http://jats.nlm.nih.gov/publishing/1.1/JATS-journalpublishing1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:mml="http://www.w3.org/1998/Math/MathML" xml:lang="en" article-type="research-article" dtd-version="1.1">
<front>
<journal-meta>
<journal-id journal-id-type="pmc">CMC</journal-id>
<journal-id journal-id-type="nlm-ta">CMC</journal-id>
<journal-id journal-id-type="publisher-id">CMC</journal-id>
<journal-title-group>
<journal-title>Computers, Materials &#x0026; Continua</journal-title>
</journal-title-group>
<issn pub-type="epub">1546-2226</issn>
<issn pub-type="ppub">1546-2218</issn>
<publisher>
<publisher-name>Tech Science Press</publisher-name>
<publisher-loc>USA</publisher-loc>
</publisher>
</journal-meta>
<article-meta>
<article-id pub-id-type="publisher-id">82708</article-id>
<article-id pub-id-type="doi">10.32604/cmc.2026.082708</article-id>
<article-categories>
<subj-group subj-group-type="heading">
<subject>Article</subject>
</subj-group>
</article-categories>
<title-group>
<article-title>Spatio-Temporal Graph Neural Networks for Cyberattack Detection in Battery Energy Storage Systems</article-title>
<alt-title alt-title-type="left-running-head">Spatio-Temporal Graph Neural Networks for Cyberattack Detection in Battery Energy Storage Systems</alt-title>
<alt-title alt-title-type="right-running-head">Spatio-Temporal Graph Neural Networks for Cyberattack Detection in Battery Energy Storage Systems</alt-title>
</title-group>
<contrib-group>
<contrib id="author-1" contrib-type="author" corresp="yes"><contrib-id contrib-id-type="orcid">https://orcid.org/0000-0002-0011-7001</contrib-id>
<name name-style="western"><surname>Greco</surname><given-names>Danilo</given-names></name><email>danilo.greco@polimi.it</email></contrib>
<aff id="aff-1"><institution>Department of Management, Economics and Industrial Engineering (DIG), Politecnico di Milano</institution>, <addr-line>Milan</addr-line>, <country>Italy</country></aff>
</contrib-group>
<author-notes>
<corresp id="cor1"><label>&#x002A;</label>Corresponding Author: Danilo Greco. Email: <email>danilo.greco@polimi.it</email></corresp>
</author-notes>
<pub-date date-type="collection" publication-format="electronic">
<year>2026</year>
</pub-date>
<pub-date date-type="pub" publication-format="electronic">
<day>15</day><month>06</month><year>2026</year>
</pub-date>
<volume>88</volume>
<issue>2</issue>
<elocation-id>16</elocation-id>
<history>
<date date-type="received">
<day>20</day>
<month>03</month>
<year>2026</year>
</date>
<date date-type="accepted">
<day>12</day>
<month>05</month>
<year>2026</year>
</date>
</history>
<permissions>
<copyright-statement>&#x00A9; 2026 The Author. Published by Tech Science Press.</copyright-statement>
<copyright-year>2026</copyright-year>
<copyright-holder>The Author</copyright-holder>
<license xlink:href="https://creativecommons.org/licenses/by/4.0/">
<license-p>This work is licensed under a <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="https://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</ext-link>, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.</license-p>
</license>
</permissions>
<self-uri content-type="pdf" xlink:href="TSP_CMC_82708.pdf"></self-uri>
<abstract>
<p>The Enhanced Graph Neural Network Autoencoder (Enhanced GNN-AE), recently proposed for unsupervised cybersecurity monitoring in battery energy storage systems (BESSs), builds a multiscale <inline-formula id="ieqn-1"><mml:math id="mml-ieqn-1"><mml:mi>k</mml:mi></mml:math></inline-formula>-nearest neighbour graph over measurement samples and learns compact latent representations via manifold-regularised training. Its spatial encoder, however, employs the original Graph Attention Network (GAT), which has been formally shown to compute a rank-1 attention function equivalent to graph convolutional networks on many graph structures. This work investigates whether replacing the GAT encoder with the strictly more expressive GATv2 formulation&#x2014;which applies the attention vector after a joint, asymmetric linear transformation of source and target node features&#x2014;yields measurable improvements on the BESS-Set benchmark. We additionally increase the encoder depth from two to three layers and include a flat MLP autoencoder as a fourth layer baseline to disentangle the benefit of graph structure from that of deep representation learning. Experiments across the same seven cyberattack scenarios used in the original paper demonstrate that the GATv2-based encoder achieves a mean ROC-AUC of 0.962 and a mean Best-F<sub>1</sub> of 0.946, compared to 0.947 and 0.947 for the original model, with the largest absolute gains on Bad Data Injection oscillation scenarios (&#x002B;7.6% ROC-AUC) and on False Data Injection of active power (&#x002B;13.2% ROC-AUC). The deeper encoder provides an additional average gain of 1.4% ROC-AUC. An ablation study confirms that GATv2 consistently outperforms GAT on this irregular, data-driven graph, supporting the theoretical argument that dynamic attention is better suited to feature-space kNN graphs than static rank-1 attention.</p>
</abstract>
<kwd-group kwd-group-type="author">
<kwd>Cybersecurity</kwd>
<kwd>battery energy storage systems</kwd>
<kwd>graph neural networks</kwd>
<kwd>anomaly detection</kwd>
<kwd>unsupervised learning</kwd>
<kwd>distributed energy resources</kwd>
<kwd>smart grid</kwd>
</kwd-group></article-meta>
</front>
<body>
<sec id="s1">
<label>1</label>
<title>Introduction</title>
<p>Battery energy storage systems (BESSs) are critical components of modern smart grids that support renewable energy integration, frequency regulation, and peak shaving [<xref ref-type="bibr" rid="ref-1">1</xref>]. The growing digitalisation of BESS operation&#x2014;remote supervisory control, cloud-connected battery management systems (BMS), and over-the-air firmware updates&#x2014;simultaneously enlarges the attack surface, exposing these systems to Bad Data Injection (BDI), False Data Injection (FDI) and firmware modification attacks [<xref ref-type="bibr" rid="ref-2">2</xref>,<xref ref-type="bibr" rid="ref-3">3</xref>].</p>
<p>Anomaly detection provides a principled, unsupervised defence: by learning from unlabelled normal operating data, deviations induced by attacks can be flagged without requiring labelled incident samples [<xref ref-type="bibr" rid="ref-4">4</xref>,<xref ref-type="bibr" rid="ref-5">5</xref>]. Graph Neural Networks (GNNs) are particularly well-suited for this task [<xref ref-type="bibr" rid="ref-6">6</xref>] because they can exploit the relational structure among physical BESS variables that flat detectors discard.</p>
<p>Greco and Gaggero [<xref ref-type="bibr" rid="ref-7">7</xref>] recently proposed the Enhanced GNN Autoencoder (Enhanced GNN-AE), which models each BESS measurement sample as a node in a multiscale <inline-formula id="ieqn-2"><mml:math id="mml-ieqn-2"><mml:mi>k</mml:mi></mml:math></inline-formula>-nearest neighbour (kNN) graph built in feature space. The model encodes each node via stacked Graph Attention Network (GAT) layers and trains with manifold regularisation consisting of three loss terms: latent compactness, graph smoothness, and a contrastive separation objective. A six-metric ensemble anomaly score aggregates reconstruction errors, latent neighbourhood distances, Mahalanobis deviation, and an Isolation Forest score. Results on the BESS-Set dataset [<xref ref-type="bibr" rid="ref-8">8</xref>] show substantial improvements over classical one-class baselines across seven attack scenarios.</p>
<p>Despite these strong results, the spatial encoder in Enhanced GNN-AE uses the original GAT architecture [<xref ref-type="bibr" rid="ref-9">9</xref>], whose attention mechanism has been formally analysed by Brody et al. [<xref ref-type="bibr" rid="ref-10">10</xref>]. They prove that GAT&#x2019;s scoring function <inline-formula id="ieqn-3"><mml:math id="mml-ieqn-3"><mml:msub><mml:mi>e</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:msup><mml:mrow><mml:mtext mathvariant="bold">a</mml:mtext></mml:mrow><mml:mi mathvariant="normal">&#x22A4;</mml:mi></mml:msup><mml:mtext>LeakyReLU</mml:mtext><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mtext mathvariant="bold">W</mml:mtext></mml:mrow><mml:mo stretchy="false">[</mml:mo><mml:msub><mml:mrow><mml:mtext mathvariant="bold">h</mml:mtext></mml:mrow><mml:mi>i</mml:mi></mml:msub><mml:mo fence="false" stretchy="false">&#x2016;</mml:mo><mml:msub><mml:mrow><mml:mtext mathvariant="bold">h</mml:mtext></mml:mrow><mml:mi>j</mml:mi></mml:msub><mml:mo stretchy="false">]</mml:mo><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula>, which applies a single shared projection matrix <inline-formula id="ieqn-4"><mml:math id="mml-ieqn-4"><mml:mrow><mml:mtext mathvariant="bold">W</mml:mtext></mml:mrow></mml:math></inline-formula> before the attention vector, is equivalent to a <italic>rank-1</italic> operation&#x2014;meaning, on many graph structures, it cannot distinguish source from target node contributions and collapses to the same expressiveness as a standard Graph Convolutional Network (GCN). For irregular, data-driven graphs, such as the feature-space kNN graph used in Enhanced GNN-AE, where edge semantics are heterogeneous and asymmetric, this limitation is particularly relevant.</p>
<p>GATv2 [<xref ref-type="bibr" rid="ref-10">10</xref>] resolves this by separating the projection matrices for source and target nodes (<inline-formula id="ieqn-5"><mml:math id="mml-ieqn-5"><mml:msub><mml:mrow><mml:mtext mathvariant="bold">W</mml:mtext></mml:mrow><mml:mi>l</mml:mi></mml:msub><mml:mo>&#x2260;</mml:mo><mml:msub><mml:mrow><mml:mtext mathvariant="bold">W</mml:mtext></mml:mrow><mml:mi>r</mml:mi></mml:msub></mml:math></inline-formula>), making the attention scores <italic>strictly dynamic</italic> and provably more expressive than GAT.</p>
<p>This paper addresses the following research question: <italic>Does replacing the GAT encoder in Enhanced GNN-AE with GATv2 yields measurable improvements on the BESS-Set cyberattack benchmark, and if so, on which attack types and by how much?</italic></p>
<p>The contributions are:<list list-type="simple">
<list-item>
<label>1.</label>
<p>A GATv2-based extension of Enhanced GNN-AE with a three-layer encoder architecture <inline-formula id="ieqn-6"><mml:math id="mml-ieqn-6"><mml:mo stretchy="false">[</mml:mo><mml:mn>128</mml:mn><mml:mo stretchy="false">&#x2192;</mml:mo><mml:mn>64</mml:mn><mml:mo stretchy="false">&#x2192;</mml:mo><mml:mn>32</mml:mn><mml:mo stretchy="false">]</mml:mo></mml:math></inline-formula>, evaluated on the same seven BESS-Set attack scenarios as the original work.</p></list-item>
<list-item>
<label>2.</label>
<p>A rigorous comparison against the original Enhanced GNN-AE and three classical baselines (Isolation Forest, One-Class SVM, LOF), with the addition of a flat MLP autoencoder to isolate the contribution of graph structure.</p></list-item>
<list-item>
<label>3.</label>
<p>An ablation study that directly compares GAT vs. GATv2 attention and two-layer vs. three-layer encoder depth within the same training and evaluation protocol.</p></list-item>
<list-item>
<label>4.</label>
<p>Analysis of which attack categories benefit most from dynamic attention, with discussion of the theoretical mechanism.</p></list-item>
</list></p>
<p>The paper is organised as follows: <xref ref-type="sec" rid="s2">Section 2</xref> reviews related work, <xref ref-type="sec" rid="s3">Section 3</xref> describes the baseline Enhanced GNN-AE and the proposed modifications, <xref ref-type="sec" rid="s4">Section 4</xref> presents the experimental setup, <xref ref-type="sec" rid="s5">Section 5</xref> reports results and ablation, <xref ref-type="sec" rid="s6">Section 6</xref> discusses findings and <xref ref-type="sec" rid="s7">Section 7</xref> concludes.</p>
</sec>
<sec id="s2">
<label>2</label>
<title>Related Work</title>
<sec id="s2_1">
<label>2.1</label>
<title>Cybersecurity in Distributed Energy Resources</title>
<p>Physics-based anomaly detection in power systems exploits the assumption that successful cyberattacks ultimately manifest as deviations in measured physical variables, enabling detection independent of the communication layer analysis [<xref ref-type="bibr" rid="ref-11">11</xref>,<xref ref-type="bibr" rid="ref-12">12</xref>]. Surveys in [<xref ref-type="bibr" rid="ref-13">13</xref>,<xref ref-type="bibr" rid="ref-14">14</xref>] cover intrusion detection across smart grid components. For BESSs, Gaggero et al. [<xref ref-type="bibr" rid="ref-3">3</xref>] proposed the first autoencoder-based physics-aware detector, and subsequently released the BESS-Set benchmark [<xref ref-type="bibr" rid="ref-8">8</xref>], which is used as the evaluation dataset in both the original Enhanced GNN-AE paper and the present work. Chen et al. [<xref ref-type="bibr" rid="ref-1">1</xref>] provide a comprehensive survey of DER cybersecurity, highlighting the need for joint cyber-physical monitoring.</p>
</sec>
<sec id="s2_2">
<label>2.2</label>
<title>GNN-Based Anomaly Detection</title>
<p>The Graph Attention Network (GAT) [<xref ref-type="bibr" rid="ref-9">9</xref>] learns per-edge attention weights during neighbourhood aggregation, enabling a model to focus on the most relevant neighbours. Zhao et al. [<xref ref-type="bibr" rid="ref-15">15</xref>] demonstrated that GNN-based anomaly detection outperforms LSTM baselines when inter-variable dependencies are encoded as graph edges. Boyaci et al. [<xref ref-type="bibr" rid="ref-16">16</xref>] applied GNNs to joint FDIA detection and localisation in power grids.</p>
<p>GATv2 [<xref ref-type="bibr" rid="ref-10">10</xref>] addresses the theoretical limitation of GAT&#x2019;s static, rank-1 attention. On irregular graphs&#x2014;such as the data-driven kNN graphs used in anomaly detection&#x2014;where the relative importance of source and target node features varies unpredictably, dynamic attention has been shown to provide consistent empirical improvements. The Enhanced GNN-AE of Greco and Gaggero [<xref ref-type="bibr" rid="ref-7">7</xref>] is the first GNN-based anomaly detector specifically designed for BESS cybersecurity; this work extends it with GATv2 and a deeper encoder.</p>
</sec>
<sec id="s2_3">
<label>2.3</label>
<title>Deep Autoencoder Baselines</title>
<p>Autoencoder-based anomaly detection has been applied broadly to industrial time-series [<xref ref-type="bibr" rid="ref-5">5</xref>,<xref ref-type="bibr" rid="ref-17">17</xref>]. Harrou et al. [<xref ref-type="bibr" rid="ref-18">18</xref>] and Sun et al. [<xref ref-type="bibr" rid="ref-19">19</xref>] apply temporal variants to power and battery systems, respectively. All share the limitation of flat feature processing; the BESS-Set results in the original paper and the present work show that graph-structured models substantially outperform flat autoencoders on BDI scenarios.</p>
</sec>
</sec>
<sec id="s3">
<label>3</label>
<title>Methodology</title>
<p>We adopt the full Enhanced GNN-AE framework of Greco and Gaggero [<xref ref-type="bibr" rid="ref-7">7</xref>] unchanged for all components except the spatial encoder. This section summarises the inherited components for completeness and then describes the two proposed modifications in detail.</p>
<sec id="s3_1">
<label>3.1</label>
<title>Inherited Components (Unchanged from [<xref ref-type="bibr" rid="ref-7">7</xref>])</title>
<sec id="s3_1_1">
<label>3.1.1</label>
<title>Topological Feature Augmentation</title>
<p>Each normalised sample <inline-formula id="ieqn-7"><mml:math id="mml-ieqn-7"><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>&#x2208;</mml:mo><mml:msup><mml:mrow><mml:mi mathvariant="double-struck">R</mml:mi></mml:mrow><mml:mi>F</mml:mi></mml:msup></mml:math></inline-formula> is augmented with five neighbourhood descriptors computed from its <inline-formula id="ieqn-8"><mml:math id="mml-ieqn-8"><mml:mi>k</mml:mi><mml:mo>=</mml:mo><mml:mn>10</mml:mn></mml:math></inline-formula> nearest neighbours in feature space:<disp-formula id="eqn-1"><label>(1)</label><mml:math id="mml-eqn-1" display="block"><mml:msubsup><mml:mi>x</mml:mi><mml:mi>i</mml:mi><mml:mi mathvariant="normal">&#x2032;</mml:mi></mml:msubsup><mml:mo>=</mml:mo><mml:mstyle scriptlevel="0"><mml:mrow><mml:mo maxsize="1.2em" minsize="1.2em">[</mml:mo></mml:mrow></mml:mstyle><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mtext>&#x00A0;</mml:mtext><mml:mo fence="false" stretchy="false">&#x2016;</mml:mo><mml:mtext>&#x00A0;</mml:mtext><mml:msub><mml:mrow><mml:mover><mml:mi>d</mml:mi><mml:mo stretchy="false">&#x00AF;</mml:mo></mml:mover></mml:mrow><mml:mi>i</mml:mi></mml:msub><mml:mtext>&#x00A0;</mml:mtext><mml:mo fence="false" stretchy="false">&#x2016;</mml:mo><mml:mtext>&#x00A0;</mml:mtext><mml:msubsup><mml:mi>d</mml:mi><mml:mi>i</mml:mi><mml:mrow><mml:mo movablelimits="true" form="prefix">max</mml:mo></mml:mrow></mml:msubsup><mml:mtext>&#x00A0;</mml:mtext><mml:mo fence="false" stretchy="false">&#x2016;</mml:mo><mml:mtext>&#x00A0;</mml:mtext><mml:msub><mml:mi>&#x03C1;</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mtext>&#x00A0;</mml:mtext><mml:mo fence="false" stretchy="false">&#x2016;</mml:mo><mml:mtext>&#x00A0;</mml:mtext><mml:mrow><mml:mtext>Var</mml:mtext></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>d</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo stretchy="false">)</mml:mo><mml:mtext>&#x00A0;</mml:mtext><mml:mo fence="false" stretchy="false">&#x2016;</mml:mo><mml:mtext>&#x00A0;</mml:mtext><mml:msubsup><mml:mi>d</mml:mi><mml:mi>i</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mn>1</mml:mn><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msubsup><mml:mstyle scriptlevel="0"><mml:mrow><mml:mo maxsize="1.2em" minsize="1.2em">]</mml:mo></mml:mrow></mml:mstyle><mml:mo>&#x2208;</mml:mo><mml:msup><mml:mrow><mml:mi mathvariant="double-struck">R</mml:mi></mml:mrow><mml:mrow><mml:mi>F</mml:mi><mml:mo>+</mml:mo><mml:mn>5</mml:mn></mml:mrow></mml:msup><mml:mo>,</mml:mo></mml:math></disp-formula>where <inline-formula id="ieqn-9"><mml:math id="mml-ieqn-9"><mml:msub><mml:mrow><mml:mover><mml:mi>d</mml:mi><mml:mo stretchy="false">&#x00AF;</mml:mo></mml:mover></mml:mrow><mml:mi>i</mml:mi></mml:msub></mml:math></inline-formula> is the mean neighbour distance, <inline-formula id="ieqn-10"><mml:math id="mml-ieqn-10"><mml:msubsup><mml:mi>d</mml:mi><mml:mi>i</mml:mi><mml:mrow><mml:mo movablelimits="true" form="prefix">max</mml:mo></mml:mrow></mml:msubsup></mml:math></inline-formula> the maximum, <inline-formula id="ieqn-11"><mml:math id="mml-ieqn-11"><mml:msub><mml:mi>&#x03C1;</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mrow><mml:mover><mml:mi>d</mml:mi><mml:mo stretchy="false">&#x00AF;</mml:mo></mml:mover></mml:mrow><mml:mi>i</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mi>&#x03B5;</mml:mi><mml:msup><mml:mo stretchy="false">)</mml:mo><mml:mrow><mml:mo>&#x2212;</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> the local density, <inline-formula id="ieqn-12"><mml:math id="mml-ieqn-12"><mml:mrow><mml:mi mathvariant="normal">V</mml:mi><mml:mi mathvariant="normal">a</mml:mi><mml:mi mathvariant="normal">r</mml:mi></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>d</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula> the distance variance, and <inline-formula id="ieqn-13"><mml:math id="mml-ieqn-13"><mml:msubsup><mml:mi>d</mml:mi><mml:mi>i</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mn>1</mml:mn><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msubsup></mml:math></inline-formula> the nearest-neighbour distance. For the BESS-Set features (<inline-formula id="ieqn-14"><mml:math id="mml-ieqn-14"><mml:mi>F</mml:mi><mml:mo>=</mml:mo><mml:mn>20</mml:mn></mml:math></inline-formula>), the augmented dimension is <inline-formula id="ieqn-15"><mml:math id="mml-ieqn-15"><mml:msup><mml:mi>F</mml:mi><mml:mi mathvariant="normal">&#x2032;</mml:mi></mml:msup><mml:mo>=</mml:mo><mml:mn>25</mml:mn></mml:math></inline-formula>.</p>
</sec>
<sec id="s3_1_2">
<label>3.1.2</label>
<title>Multiscale kNN Graph</title>
<p>The <inline-formula id="ieqn-16"><mml:math id="mml-ieqn-16"><mml:mi>N</mml:mi></mml:math></inline-formula> augmented training samples are treated as nodes in a graph <inline-formula id="ieqn-17"><mml:math id="mml-ieqn-17"><mml:mrow><mml:mi>&#x1D4A2;</mml:mi></mml:mrow><mml:mo>=</mml:mo><mml:mo stretchy="false">(</mml:mo><mml:mi>V</mml:mi><mml:mo>,</mml:mo><mml:mi>E</mml:mi><mml:mo>,</mml:mo><mml:mrow><mml:mtext mathvariant="bold">W</mml:mtext></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula>. Three weighted kNN graphs are built for <inline-formula id="ieqn-18"><mml:math id="mml-ieqn-18"><mml:mi>k</mml:mi><mml:mo>&#x2208;</mml:mo><mml:mo fence="false" stretchy="false">{</mml:mo><mml:mn>5</mml:mn><mml:mo>,</mml:mo><mml:mn>10</mml:mn><mml:mo>,</mml:mo><mml:mn>20</mml:mn><mml:mo fence="false" stretchy="false">}</mml:mo></mml:math></inline-formula> using Gaussian kernel edge weights:<disp-formula id="eqn-2"><label>(2)</label><mml:math id="mml-eqn-2" display="block"><mml:msubsup><mml:mi>w</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>k</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msubsup><mml:mo>=</mml:mo><mml:mi>exp</mml:mi><mml:mspace width="negativethinmathspace" /><mml:mrow><mml:mo>(</mml:mo><mml:mo>&#x2212;</mml:mo><mml:mfrac><mml:mrow><mml:mo fence="false" stretchy="false">&#x2016;</mml:mo><mml:msubsup><mml:mi>x</mml:mi><mml:mi>i</mml:mi><mml:mi mathvariant="normal">&#x2032;</mml:mi></mml:msubsup><mml:mo>&#x2212;</mml:mo><mml:msubsup><mml:mi>x</mml:mi><mml:mi>j</mml:mi><mml:mi mathvariant="normal">&#x2032;</mml:mi></mml:msubsup><mml:msubsup><mml:mo fence="false" stretchy="false">&#x2016;</mml:mo><mml:mn>2</mml:mn><mml:mn>2</mml:mn></mml:msubsup></mml:mrow><mml:mrow><mml:mn>2</mml:mn><mml:msubsup><mml:mi>&#x03C3;</mml:mi><mml:mi>k</mml:mi><mml:mn>2</mml:mn></mml:msubsup></mml:mrow></mml:mfrac><mml:mo>)</mml:mo></mml:mrow><mml:mo>,</mml:mo></mml:math></disp-formula>where <inline-formula id="ieqn-19"><mml:math id="mml-ieqn-19"><mml:msub><mml:mi>&#x03C3;</mml:mi><mml:mi>k</mml:mi></mml:msub></mml:math></inline-formula> is the median non-zero neighbour distance at scale <inline-formula id="ieqn-20"><mml:math id="mml-ieqn-20"><mml:mi>k</mml:mi></mml:math></inline-formula>. Each adjacency is symmetrised and spectrally normalised <inline-formula id="ieqn-21"><mml:math id="mml-ieqn-21"><mml:msup><mml:mrow><mml:mover><mml:mi>A</mml:mi><mml:mo stretchy="false">&#x007E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>k</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msup><mml:mo>=</mml:mo><mml:msup><mml:mi>D</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>k</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>&#x2212;</mml:mo><mml:mn>1</mml:mn><mml:mrow><mml:mo>/</mml:mo></mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msup><mml:msup><mml:mi>W</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>k</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msup><mml:msup><mml:mi>D</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>k</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>&#x2212;</mml:mo><mml:mn>1</mml:mn><mml:mrow><mml:mo>/</mml:mo></mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula>, then the three scales are averaged:<disp-formula id="eqn-3"><label>(3)</label><mml:math id="mml-eqn-3" display="block"><mml:mrow><mml:mover><mml:mi>A</mml:mi><mml:mo stretchy="false">&#x007E;</mml:mo></mml:mover></mml:mrow><mml:mo>=</mml:mo><mml:mfrac><mml:mn>1</mml:mn><mml:mn>3</mml:mn></mml:mfrac><mml:mspace width="negativethinmathspace" /><mml:mrow><mml:mo>(</mml:mo><mml:msup><mml:mrow><mml:mover><mml:mi>A</mml:mi><mml:mo stretchy="false">&#x007E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mn>5</mml:mn><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msup><mml:mo>+</mml:mo><mml:msup><mml:mrow><mml:mover><mml:mi>A</mml:mi><mml:mo stretchy="false">&#x007E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mn>10</mml:mn><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msup><mml:mo>+</mml:mo><mml:msup><mml:mrow><mml:mover><mml:mi>A</mml:mi><mml:mo stretchy="false">&#x007E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mn>20</mml:mn><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msup><mml:mo>)</mml:mo></mml:mrow><mml:mo>.</mml:mo></mml:math></disp-formula></p>
<p>The scales <inline-formula id="ieqn-22"><mml:math id="mml-ieqn-22"><mml:mi>k</mml:mi><mml:mo>&#x2208;</mml:mo><mml:mo fence="false" stretchy="false">{</mml:mo><mml:mn>5</mml:mn><mml:mo>,</mml:mo><mml:mn>10</mml:mn><mml:mo>,</mml:mo><mml:mn>20</mml:mn><mml:mo fence="false" stretchy="false">}</mml:mo></mml:math></inline-formula> are chosen to capture three complementary levels of neighbourhood structure simultaneously: <inline-formula id="ieqn-23"><mml:math id="mml-ieqn-23"><mml:mi>k</mml:mi><mml:mo>=</mml:mo><mml:mn>5</mml:mn></mml:math></inline-formula> encodes fine-grained local geometry (micro-clustering of nearly identical operating points); <inline-formula id="ieqn-24"><mml:math id="mml-ieqn-24"><mml:mi>k</mml:mi><mml:mo>=</mml:mo><mml:mn>10</mml:mn></mml:math></inline-formula> captures intermediate correlations across physically related but distinct operating conditions; and <inline-formula id="ieqn-25"><mml:math id="mml-ieqn-25"><mml:mi>k</mml:mi><mml:mo>=</mml:mo><mml:mn>20</mml:mn></mml:math></inline-formula> provides a broader context that links samples from the same global operating regime (e.g., charging vs. discharging cycles). This three-scale design avoids committing to a single connectivity granularity, which is critical for the BESS-Set training set (<inline-formula id="ieqn-26"><mml:math id="mml-ieqn-26"><mml:msub><mml:mi>N</mml:mi><mml:mrow><mml:mrow><mml:mi mathvariant="normal">t</mml:mi><mml:mi mathvariant="normal">r</mml:mi></mml:mrow></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mn>29,999</mml:mn></mml:math></inline-formula> samples) where normal operation spans multiple physically distinct regimes. The multi-scale structure is complementary to GATv2&#x2019;s dynamic attention: because GATv2 computes per-edge attention weights; the encoder can learn to <italic>selectively</italic> leverage different scales depending on local graph structure, potentially making multi-scale aggregation even more beneficial with dynamic than with static attention. The interaction is further discussed in <xref ref-type="sec" rid="s6_1">Section 6.1</xref>.</p>
</sec>
<sec id="s3_1_3">
<label>3.1.3</label>
<title>Manifold Regularisation</title>
<p>Three loss terms shape the latent manifold during training. <italic>Latent compactness</italic> pulls normal embeddings toward a common prototype:<disp-formula id="eqn-4"><label>(4)</label><mml:math id="mml-eqn-4" display="block"><mml:msub><mml:mrow><mml:mrow><mml:mi>&#x02112;</mml:mi></mml:mrow></mml:mrow><mml:mrow><mml:mrow><mml:mtext>lat</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mfrac><mml:mn>1</mml:mn><mml:mi>N</mml:mi></mml:mfrac><mml:munderover><mml:mo>&#x2211;</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>N</mml:mi></mml:mrow></mml:munderover><mml:mo fence="false" stretchy="false">&#x2016;</mml:mo><mml:msub><mml:mi>z</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>&#x2212;</mml:mo><mml:mrow><mml:mover><mml:mi>z</mml:mi><mml:mo stretchy="false">&#x00AF;</mml:mo></mml:mover></mml:mrow><mml:msubsup><mml:mo fence="false" stretchy="false">&#x2016;</mml:mo><mml:mn>2</mml:mn><mml:mn>2</mml:mn></mml:msubsup><mml:mo>.</mml:mo></mml:math></disp-formula></p>
<p><italic>Graph smoothness</italic> enforces that graph-adjacent nodes have similar embeddings:<disp-formula id="eqn-5"><label>(5)</label><mml:math id="mml-eqn-5" display="block"><mml:msub><mml:mrow><mml:mi>&#x02112;</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mtext>smooth</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mfrac><mml:mn>1</mml:mn><mml:mrow><mml:mo fence="false" stretchy="false">&#x2016;</mml:mo><mml:mrow><mml:mover><mml:mi>A</mml:mi><mml:mo stretchy="false">&#x007E;</mml:mo></mml:mover></mml:mrow><mml:msub><mml:mo fence="false" stretchy="false">&#x2016;</mml:mo><mml:mn>1</mml:mn></mml:msub></mml:mrow></mml:mfrac><mml:munder><mml:mo>&#x2211;</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>j</mml:mi></mml:mrow></mml:munder><mml:msub><mml:mrow><mml:mover><mml:mi>A</mml:mi><mml:mo stretchy="false">&#x007E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo fence="false" stretchy="false">&#x2016;</mml:mo><mml:msub><mml:mi>z</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>&#x2212;</mml:mo><mml:msub><mml:mi>z</mml:mi><mml:mi>j</mml:mi></mml:msub><mml:msubsup><mml:mo fence="false" stretchy="false">&#x2016;</mml:mo><mml:mn>2</mml:mn><mml:mn>2</mml:mn></mml:msubsup><mml:mo>.</mml:mo></mml:math></disp-formula></p>
<p><italic>Contrastive separation</italic> prevents representational collapse [<xref ref-type="bibr" rid="ref-7">7</xref>]:<disp-formula id="eqn-6"><label>(6)</label><mml:math id="mml-eqn-6" display="block"><mml:msub><mml:mrow><mml:mi>&#x02112;</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mtext>con</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mo>&#x2212;</mml:mo><mml:mfrac><mml:mn>1</mml:mn><mml:mi>N</mml:mi></mml:mfrac><mml:munderover><mml:mo>&#x2211;</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>N</mml:mi></mml:mrow></mml:munderover><mml:mi>log</mml:mi><mml:mo>&#x2061;</mml:mo><mml:mfrac><mml:mrow><mml:mi>exp</mml:mi><mml:mspace width="thinmathspace" /><mml:mstyle scriptlevel="0"><mml:mrow><mml:mo maxsize="1.2em" minsize="1.2em">(</mml:mo></mml:mrow></mml:mstyle><mml:mrow><mml:mtext>cos</mml:mtext></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>z</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>z</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo stretchy="false">)</mml:mo><mml:mrow><mml:mo>/</mml:mo></mml:mrow><mml:mi>&#x03C4;</mml:mi><mml:mstyle scriptlevel="0"><mml:mrow><mml:mo maxsize="1.2em" minsize="1.2em">)</mml:mo></mml:mrow></mml:mstyle></mml:mrow><mml:mrow><mml:munder><mml:mo>&#x2211;</mml:mo><mml:mrow><mml:mi>j</mml:mi><mml:mo>&#x2260;</mml:mo><mml:mi>i</mml:mi></mml:mrow></mml:munder><mml:mi>exp</mml:mi><mml:mspace width="thinmathspace" /><mml:mstyle scriptlevel="0"><mml:mrow><mml:mo maxsize="1.2em" minsize="1.2em">(</mml:mo></mml:mrow></mml:mstyle><mml:mrow><mml:mtext>cos</mml:mtext></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>z</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>z</mml:mi><mml:mi>j</mml:mi></mml:msub><mml:mo stretchy="false">)</mml:mo><mml:mrow><mml:mo>/</mml:mo></mml:mrow><mml:mi>&#x03C4;</mml:mi><mml:mstyle scriptlevel="0"><mml:mrow><mml:mo maxsize="1.2em" minsize="1.2em">)</mml:mo></mml:mrow></mml:mstyle></mml:mrow></mml:mfrac><mml:mo>,</mml:mo></mml:math></disp-formula>with <inline-formula id="ieqn-27"><mml:math id="mml-ieqn-27"><mml:mi>&#x03C4;</mml:mi><mml:mo>=</mml:mo><mml:mn>0.5</mml:mn></mml:math></inline-formula>. Since <inline-formula id="ieqn-28"><mml:math id="mml-ieqn-28"><mml:mrow><mml:mi mathvariant="normal">c</mml:mi><mml:mi mathvariant="normal">o</mml:mi><mml:mi mathvariant="normal">s</mml:mi></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>z</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>z</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo stretchy="false">)</mml:mo><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:math></inline-formula> is constant, <xref ref-type="disp-formula" rid="eqn-6">Eq. (6)</xref> is a separation loss that pushes pairwise cosine similarities, apart from complementing the compactness term.</p>
</sec>
<sec id="s3_1_4">
<label>3.1.4</label>
<title>Ensemble Anomaly Scoring</title>
<p>Following [<xref ref-type="bibr" rid="ref-7">7</xref>], six metrics are computed at inference time and combined with fixed weights <inline-formula id="ieqn-29"><mml:math id="mml-ieqn-29"><mml:mi>w</mml:mi><mml:mo>=</mml:mo><mml:mo stretchy="false">[</mml:mo><mml:mn>0.25</mml:mn><mml:mo>,</mml:mo><mml:mn>0.15</mml:mn><mml:mo>,</mml:mo><mml:mn>0.25</mml:mn><mml:mo>,</mml:mo><mml:mn>0.10</mml:mn><mml:mo>,</mml:mo><mml:mn>0.15</mml:mn><mml:mo>,</mml:mo><mml:mn>0.10</mml:mn><mml:mo stretchy="false">]</mml:mo></mml:math></inline-formula>:<disp-formula id="eqn-7"><label>(7)</label><mml:math id="mml-eqn-7" display="block"><mml:msub><mml:mi>s</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:munderover><mml:mo>&#x2211;</mml:mo><mml:mrow><mml:mi>k</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mn>6</mml:mn></mml:mrow></mml:munderover><mml:msub><mml:mi>w</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mspace width="thinmathspace" /><mml:msub><mml:mrow><mml:mover><mml:mi>m</mml:mi><mml:mo stretchy="false">&#x007E;</mml:mo></mml:mover></mml:mrow><mml:mi>k</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>i</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>,</mml:mo></mml:math></disp-formula>where <inline-formula id="ieqn-30"><mml:math id="mml-ieqn-30"><mml:msub><mml:mrow><mml:mover><mml:mi>m</mml:mi><mml:mo stretchy="false">&#x007E;</mml:mo></mml:mover></mml:mrow><mml:mi>k</mml:mi></mml:msub></mml:math></inline-formula> denotes min-max normalised metric <inline-formula id="ieqn-31"><mml:math id="mml-ieqn-31"><mml:msub><mml:mi>m</mml:mi><mml:mi>k</mml:mi></mml:msub></mml:math></inline-formula>, and the six metrics are L2 reconstruction error (<inline-formula id="ieqn-32"><mml:math id="mml-ieqn-32"><mml:msub><mml:mi>m</mml:mi><mml:mn>1</mml:mn></mml:msub></mml:math></inline-formula>), L1 reconstruction error (<inline-formula id="ieqn-33"><mml:math id="mml-ieqn-33"><mml:msub><mml:mi>m</mml:mi><mml:mn>2</mml:mn></mml:msub></mml:math></inline-formula>), mean latent kNN distance (<inline-formula id="ieqn-34"><mml:math id="mml-ieqn-34"><mml:msub><mml:mi>m</mml:mi><mml:mn>3</mml:mn></mml:msub></mml:math></inline-formula>), max latent kNN distance (<inline-formula id="ieqn-35"><mml:math id="mml-ieqn-35"><mml:msub><mml:mi>m</mml:mi><mml:mn>4</mml:mn></mml:msub></mml:math></inline-formula>), Mahalanobis distance in latent space (<inline-formula id="ieqn-36"><mml:math id="mml-ieqn-36"><mml:msub><mml:mi>m</mml:mi><mml:mn>5</mml:mn></mml:msub></mml:math></inline-formula>), and Isolation Forest score on the latent matrix <inline-formula id="ieqn-37"><mml:math id="mml-ieqn-37"><mml:mi>Z</mml:mi></mml:math></inline-formula> (<inline-formula id="ieqn-38"><mml:math id="mml-ieqn-38"><mml:msub><mml:mi>m</mml:mi><mml:mn>6</mml:mn></mml:msub></mml:math></inline-formula>).</p>
<p>The weights <inline-formula id="ieqn-39"><mml:math id="mml-ieqn-39"><mml:mi>w</mml:mi></mml:math></inline-formula> are inherited directly from [<xref ref-type="bibr" rid="ref-7">7</xref>] and are not re-optimised for the GATv2 encoder. This is a deliberate design choice: re-tuning <inline-formula id="ieqn-40"><mml:math id="mml-ieqn-40"><mml:mi>w</mml:mi></mml:math></inline-formula> jointly with the encoder swap would confound the two contributions, making it impossible to attribute the measured improvement to dynamic attention in isolation. All six metrics are monotone anomaly scores (higher <inline-formula id="ieqn-41"><mml:math id="mml-ieqn-41"><mml:mo stretchy="false">&#x21D2;</mml:mo></mml:math></inline-formula> greater deviation from the normal manifold), so any strictly positive convex combination produces a consistent composite signal. Weight re-optimisation for the GATv2 latent space is identified as a natural follow-up in the Conclusions.</p>
</sec>
</sec>
<sec id="s3_2">
<label>3.2</label>
<title>Proposed Modification 1: GATv2 Encoder</title>
<p>The original Enhanced GNN-AE uses the GAT attention [<xref ref-type="bibr" rid="ref-9">9</xref>]:<disp-formula id="eqn-8"><label>(8)</label><mml:math id="mml-eqn-8" display="block"><mml:msubsup><mml:mi>e</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mtext>GAT</mml:mtext></mml:mrow></mml:mrow></mml:msubsup><mml:mo>=</mml:mo><mml:msup><mml:mrow><mml:mtext mathvariant="bold">a</mml:mtext></mml:mrow><mml:mi mathvariant="normal">&#x22A4;</mml:mi></mml:msup><mml:mrow><mml:mtext>LeakyReLU</mml:mtext></mml:mrow><mml:mspace width="negativethinmathspace" /><mml:mstyle scriptlevel="0"><mml:mrow><mml:mo maxsize="1.2em" minsize="1.2em">(</mml:mo></mml:mrow></mml:mstyle><mml:mrow><mml:mtext mathvariant="bold">W</mml:mtext></mml:mrow><mml:mo stretchy="false">[</mml:mo><mml:msub><mml:mrow><mml:mtext mathvariant="bold">h</mml:mtext></mml:mrow><mml:mi>i</mml:mi></mml:msub><mml:mo fence="false" stretchy="false">&#x2016;</mml:mo><mml:msub><mml:mrow><mml:mtext mathvariant="bold">h</mml:mtext></mml:mrow><mml:mi>j</mml:mi></mml:msub><mml:mo stretchy="false">]</mml:mo><mml:mstyle scriptlevel="0"><mml:mrow><mml:mo maxsize="1.2em" minsize="1.2em">)</mml:mo></mml:mrow></mml:mstyle><mml:mo>,</mml:mo></mml:math></disp-formula>where <inline-formula id="ieqn-42"><mml:math id="mml-ieqn-42"><mml:mrow><mml:mtext mathvariant="bold">W</mml:mtext></mml:mrow></mml:math></inline-formula> is a single shared projection matrix. Brody et al. [<xref ref-type="bibr" rid="ref-10">10</xref>] proves that this is equivalent to:<disp-formula id="eqn-9"><label>(9)</label><mml:math id="mml-eqn-9" display="block"><mml:msubsup><mml:mi>e</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mtext>GAT</mml:mtext></mml:mrow></mml:mrow></mml:msubsup><mml:mo>=</mml:mo><mml:msup><mml:mrow><mml:mtext mathvariant="bold">a</mml:mtext></mml:mrow><mml:mi mathvariant="normal">&#x22A4;</mml:mi></mml:msup><mml:mrow><mml:mtext>LeakyReLU</mml:mtext></mml:mrow><mml:mspace width="negativethinmathspace" /><mml:mstyle scriptlevel="0"><mml:mrow><mml:mo maxsize="1.2em" minsize="1.2em">(</mml:mo></mml:mrow></mml:mstyle><mml:mrow><mml:mtext mathvariant="bold">W</mml:mtext></mml:mrow><mml:msub><mml:mrow><mml:mtext mathvariant="bold">h</mml:mtext></mml:mrow><mml:mi>i</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mrow><mml:mtext mathvariant="bold">W</mml:mtext></mml:mrow><mml:msub><mml:mrow><mml:mtext mathvariant="bold">h</mml:mtext></mml:mrow><mml:mi>j</mml:mi></mml:msub><mml:mstyle scriptlevel="0"><mml:mrow><mml:mo maxsize="1.2em" minsize="1.2em">)</mml:mo></mml:mrow></mml:mstyle><mml:mo>,</mml:mo></mml:math></disp-formula>which is a <italic>static</italic> function: its value does not change when <inline-formula id="ieqn-43"><mml:math id="mml-ieqn-43"><mml:msub><mml:mrow><mml:mtext mathvariant="bold">h</mml:mtext></mml:mrow><mml:mi>i</mml:mi></mml:msub></mml:math></inline-formula> and <inline-formula id="ieqn-44"><mml:math id="mml-ieqn-44"><mml:msub><mml:mrow><mml:mtext mathvariant="bold">h</mml:mtext></mml:mrow><mml:mi>j</mml:mi></mml:msub></mml:math></inline-formula> are swapped, a property formally equivalent to rank-1 attention. On many real graphs structures, GAT is therefore no more expressive than a GCN with fixed aggregation weights.</p>
<p>GATv2 [<xref ref-type="bibr" rid="ref-10">10</xref>] resolves this with asymmetric projections:<disp-formula id="eqn-10"><label>(10)</label><mml:math id="mml-eqn-10" display="block"><mml:msubsup><mml:mi>e</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mtext>GATv2</mml:mtext></mml:mrow></mml:mrow></mml:msubsup><mml:mo>=</mml:mo><mml:msup><mml:mrow><mml:mtext mathvariant="bold">a</mml:mtext></mml:mrow><mml:mi mathvariant="normal">&#x22A4;</mml:mi></mml:msup><mml:mrow><mml:mtext>LeakyReLU</mml:mtext></mml:mrow><mml:mspace width="negativethinmathspace" /><mml:mstyle scriptlevel="0"><mml:mrow><mml:mo maxsize="1.2em" minsize="1.2em">(</mml:mo></mml:mrow></mml:mstyle><mml:msub><mml:mrow><mml:mtext mathvariant="bold">W</mml:mtext></mml:mrow><mml:mi>l</mml:mi></mml:msub><mml:mspace width="thinmathspace" /><mml:msub><mml:mrow><mml:mtext mathvariant="bold">h</mml:mtext></mml:mrow><mml:mi>i</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:msub><mml:mrow><mml:mtext mathvariant="bold">W</mml:mtext></mml:mrow><mml:mi>r</mml:mi></mml:msub><mml:mspace width="thinmathspace" /><mml:msub><mml:mrow><mml:mtext mathvariant="bold">h</mml:mtext></mml:mrow><mml:mi>j</mml:mi></mml:msub><mml:mstyle scriptlevel="0"><mml:mrow><mml:mo maxsize="1.2em" minsize="1.2em">)</mml:mo></mml:mrow></mml:mstyle><mml:mo>,</mml:mo></mml:math></disp-formula>where <inline-formula id="ieqn-45"><mml:math id="mml-ieqn-45"><mml:msub><mml:mrow><mml:mtext mathvariant="bold">W</mml:mtext></mml:mrow><mml:mi>l</mml:mi></mml:msub><mml:mo>&#x2260;</mml:mo><mml:msub><mml:mrow><mml:mtext mathvariant="bold">W</mml:mtext></mml:mrow><mml:mi>r</mml:mi></mml:msub></mml:math></inline-formula> are separate learnable projection matrices for source and target nodes. This makes <inline-formula id="ieqn-46"><mml:math id="mml-ieqn-46"><mml:msubsup><mml:mi>e</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mi mathvariant="normal">G</mml:mi><mml:mi mathvariant="normal">A</mml:mi><mml:mi mathvariant="normal">T</mml:mi><mml:mi mathvariant="normal">v</mml:mi><mml:mn>2</mml:mn></mml:mrow></mml:mrow></mml:msubsup></mml:math></inline-formula> a fully <italic>dynamic</italic> function of both <inline-formula id="ieqn-47"><mml:math id="mml-ieqn-47"><mml:msub><mml:mrow><mml:mtext mathvariant="bold">h</mml:mtext></mml:mrow><mml:mi>i</mml:mi></mml:msub></mml:math></inline-formula> and <inline-formula id="ieqn-48"><mml:math id="mml-ieqn-48"><mml:msub><mml:mrow><mml:mtext mathvariant="bold">h</mml:mtext></mml:mrow><mml:mi>j</mml:mi></mml:msub></mml:math></inline-formula>, and the GATv2 attention class is a strict superset of GAT&#x2019;s expressiveness.</p>
<p>In the feature-space kNN graph used by Enhanced GNN-AE, edge semantics are data-driven and heterogeneous: two samples may be close in feature space for entirely different physical reasons (correlated voltage-current behaviour vs. correlated power setpoint patterns). Dynamic attention can learn to weight these relationships asymmetrically, which is impossible with GAT&#x2019;s shared <inline-formula id="ieqn-49"><mml:math id="mml-ieqn-49"><mml:mrow><mml:mtext mathvariant="bold">W</mml:mtext></mml:mrow></mml:math></inline-formula>.</p>
<p>The multi-head aggregation remains:<disp-formula id="eqn-11"><label>(11)</label><mml:math id="mml-eqn-11" display="block"><mml:msubsup><mml:mrow><mml:mtext mathvariant="bold">h</mml:mtext></mml:mrow><mml:mi>i</mml:mi><mml:mi mathvariant="normal">&#x2032;</mml:mi></mml:msubsup><mml:mo>=</mml:mo><mml:msubsup><mml:mstyle scriptlevel="0"><mml:mrow><mml:mo symmetric="true" maxsize="1.623em" minsize="1.623em">&#x2016;</mml:mo></mml:mrow></mml:mstyle><mml:mrow><mml:mi>m</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>M</mml:mi></mml:mrow></mml:msubsup><mml:munder><mml:mo>&#x2211;</mml:mo><mml:mrow><mml:mi>j</mml:mi><mml:mo>&#x2208;</mml:mo><mml:mrow><mml:mi>&#x1D4A9;</mml:mi></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>i</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:munder><mml:msubsup><mml:mi>&#x03B1;</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>m</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msubsup><mml:mspace width="thinmathspace" /><mml:msubsup><mml:mrow><mml:mtext mathvariant="bold">W</mml:mtext></mml:mrow><mml:mi>r</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>m</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msubsup><mml:mspace width="thinmathspace" /><mml:msub><mml:mrow><mml:mtext mathvariant="bold">h</mml:mtext></mml:mrow><mml:mi>j</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:mspace width="1em" /><mml:msubsup><mml:mi>&#x03B1;</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>m</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msubsup><mml:mo>=</mml:mo><mml:msub><mml:mrow><mml:mtext>softmax</mml:mtext></mml:mrow><mml:mi>j</mml:mi></mml:msub><mml:mspace width="negativethinmathspace" /><mml:mstyle scriptlevel="0"><mml:mrow><mml:mo maxsize="1.2em" minsize="1.2em">(</mml:mo></mml:mrow></mml:mstyle><mml:msubsup><mml:mi>e</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>m</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msubsup><mml:mstyle scriptlevel="0"><mml:mrow><mml:mo maxsize="1.2em" minsize="1.2em">)</mml:mo></mml:mrow></mml:mstyle><mml:mo>.</mml:mo></mml:math></disp-formula></p>
<p>Residual connections, batch normalisation, and ELU activations are applied identically to the original model.</p>
</sec>
<sec id="s3_3">
<label>3.3</label>
<title>Proposed Modification 2: Three-Layer Encoder</title>
<p>The original Enhanced GNN-AE uses a hidden dimension <inline-formula id="ieqn-50"><mml:math id="mml-ieqn-50"><mml:mi>h</mml:mi><mml:mo>&#x2208;</mml:mo><mml:mo fence="false" stretchy="false">{</mml:mo><mml:mn>64</mml:mn><mml:mo>,</mml:mo><mml:mn>128</mml:mn><mml:mo fence="false" stretchy="false">}</mml:mo></mml:math></inline-formula> and a latent dimension <inline-formula id="ieqn-51"><mml:math id="mml-ieqn-51"><mml:mi>d</mml:mi><mml:mo>&#x2208;</mml:mo><mml:mo fence="false" stretchy="false">{</mml:mo><mml:mn>16</mml:mn><mml:mo>,</mml:mo><mml:mn>32</mml:mn><mml:mo fence="false" stretchy="false">}</mml:mo></mml:math></inline-formula>; from the grid search description in [<xref ref-type="bibr" rid="ref-7">7</xref>], the encoder effectively has two GATv2 layers mapping <inline-formula id="ieqn-52"><mml:math id="mml-ieqn-52"><mml:msup><mml:mi>F</mml:mi><mml:mi mathvariant="normal">&#x2032;</mml:mi></mml:msup><mml:mo stretchy="false">&#x2192;</mml:mo><mml:mi>h</mml:mi><mml:mo stretchy="false">&#x2192;</mml:mo><mml:mi>d</mml:mi></mml:math></inline-formula>. We increase the depth to three layers with dimensions <inline-formula id="ieqn-53"><mml:math id="mml-ieqn-53"><mml:mo stretchy="false">[</mml:mo><mml:msup><mml:mi>F</mml:mi><mml:mi mathvariant="normal">&#x2032;</mml:mi></mml:msup><mml:mo stretchy="false">&#x2192;</mml:mo><mml:mn>128</mml:mn><mml:mo stretchy="false">&#x2192;</mml:mo><mml:mn>64</mml:mn><mml:mo stretchy="false">&#x2192;</mml:mo><mml:mn>32</mml:mn><mml:mo stretchy="false">]</mml:mo></mml:math></inline-formula>, providing an additional representational stage that can capture higher-order graph neighbourhood patterns before projecting to the latent space.</p>
<p><xref ref-type="fig" rid="fig-1">Fig. 1</xref> illustrates the complete pipeline.</p>
<fig id="fig-1">
<label>Figure 1</label>
<caption>
<title>Processing pipeline. All components except the highlighted GATv2 encoder are identical to the Enhanced GNN-AE of Greco and Gaggero [<xref ref-type="bibr" rid="ref-7">7</xref>].</title>
</caption>
<graphic mimetype="image" mime-subtype="tif" xlink:href="CMC_82708-fig-1.tif"/>
</fig>
<p><xref ref-type="fig" rid="fig-2">Fig. 2</xref> details a single GATv2 encoder layer, highlighting the asymmetric projections that distinguish it from GAT.</p>
<fig id="fig-2">
<label>Figure 2</label>
<caption>
<title>Single GATv2 encoder layer (one attention head shown). Blue boxes mark the asymmetric projections <inline-formula id="ieqn-54"><mml:math id="mml-ieqn-54"><mml:msub><mml:mrow><mml:mtext mathvariant="bold">W</mml:mtext></mml:mrow><mml:mi>l</mml:mi></mml:msub></mml:math></inline-formula> (source) and <inline-formula id="ieqn-55"><mml:math id="mml-ieqn-55"><mml:msub><mml:mrow><mml:mtext mathvariant="bold">W</mml:mtext></mml:mrow><mml:mi>r</mml:mi></mml:msub></mml:math></inline-formula> (target), the key innovation of GATv2: using two separate matrices instead of a single shared <inline-formula id="ieqn-56"><mml:math id="mml-ieqn-56"><mml:mrow><mml:mtext mathvariant="bold">W</mml:mtext></mml:mrow></mml:math></inline-formula> (as in GAT) makes the attention score <inline-formula id="ieqn-57"><mml:math id="mml-ieqn-57"><mml:msub><mml:mi>e</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:msup><mml:mrow><mml:mtext mathvariant="bold">a</mml:mtext></mml:mrow><mml:mi mathvariant="normal">&#x22A4;</mml:mi></mml:msup><mml:mrow><mml:mi mathvariant="normal">L</mml:mi><mml:mi mathvariant="normal">e</mml:mi><mml:mi mathvariant="normal">a</mml:mi><mml:mi mathvariant="normal">k</mml:mi><mml:mi mathvariant="normal">y</mml:mi><mml:mi mathvariant="normal">R</mml:mi><mml:mi mathvariant="normal">e</mml:mi><mml:mi mathvariant="normal">L</mml:mi><mml:mi mathvariant="normal">U</mml:mi></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mrow><mml:mtext mathvariant="bold">W</mml:mtext></mml:mrow><mml:mi>l</mml:mi></mml:msub><mml:msub><mml:mrow><mml:mtext mathvariant="bold">h</mml:mtext></mml:mrow><mml:mi>i</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:msub><mml:mrow><mml:mtext mathvariant="bold">W</mml:mtext></mml:mrow><mml:mi>r</mml:mi></mml:msub><mml:msub><mml:mrow><mml:mtext mathvariant="bold">h</mml:mtext></mml:mrow><mml:mi>j</mml:mi></mml:msub><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula> a <italic>dynamic</italic> function of both source and target features. Teal boxes are the softmax normalisation and weighted aggregation, shared with standard GAT. The dashed arrow is the residual skip connection. Three such layers are stacked with dimensions <inline-formula id="ieqn-58"><mml:math id="mml-ieqn-58"><mml:mo stretchy="false">[</mml:mo><mml:mn>25</mml:mn><mml:mspace width="negativethinmathspace" /><mml:mo stretchy="false">&#x2192;</mml:mo><mml:mspace width="negativethinmathspace" /><mml:mn>128</mml:mn><mml:mspace width="negativethinmathspace" /><mml:mo stretchy="false">&#x2192;</mml:mo><mml:mspace width="negativethinmathspace" /><mml:mn>64</mml:mn><mml:mspace width="negativethinmathspace" /><mml:mo stretchy="false">&#x2192;</mml:mo><mml:mspace width="negativethinmathspace" /><mml:mn>32</mml:mn><mml:mo stretchy="false">]</mml:mo></mml:math></inline-formula>.</title>
</caption>
<graphic mimetype="image" mime-subtype="tif" xlink:href="CMC_82708-fig-2.tif"/>
</fig>
</sec>
<sec id="s3_4">
<label>3.4</label>
<title>Training Objective</title>
<p>The end-to-end loss is identical to the original:<disp-formula id="eqn-12"><label>(12)</label><mml:math id="mml-eqn-12" display="block"><mml:mrow><mml:mi>&#x02112;</mml:mi></mml:mrow><mml:mo>=</mml:mo><mml:msub><mml:mrow><mml:mi>&#x02112;</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mtext>Huber</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:msup><mml:mi>x</mml:mi><mml:mi mathvariant="normal">&#x2032;</mml:mi></mml:msup><mml:mo>,</mml:mo><mml:msup><mml:mrow><mml:mover><mml:mi>x</mml:mi><mml:mo stretchy="false">&#x005E;</mml:mo></mml:mover></mml:mrow><mml:mi mathvariant="normal">&#x2032;</mml:mi></mml:msup><mml:mo stretchy="false">)</mml:mo><mml:mo>+</mml:mo><mml:msub><mml:mi>&#x03BB;</mml:mi><mml:mrow><mml:mrow><mml:mtext>lat</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mspace width="thinmathspace" /><mml:msub><mml:mrow><mml:mi>&#x02112;</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mtext>lat</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:msub><mml:mi>&#x03BB;</mml:mi><mml:mrow><mml:mrow><mml:mtext>smooth</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mspace width="thinmathspace" /><mml:msub><mml:mrow><mml:mi>&#x02112;</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mtext>smooth</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:msub><mml:mi>&#x03BB;</mml:mi><mml:mrow><mml:mrow><mml:mtext>con</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mspace width="thinmathspace" /><mml:msub><mml:mrow><mml:mi>&#x02112;</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mtext>con</mml:mtext></mml:mrow></mml:mrow></mml:msub><mml:mo>,</mml:mo></mml:math></disp-formula>with <inline-formula id="ieqn-59"><mml:math id="mml-ieqn-59"><mml:msub><mml:mi>&#x03BB;</mml:mi><mml:mrow><mml:mrow><mml:mi mathvariant="normal">l</mml:mi><mml:mi mathvariant="normal">a</mml:mi><mml:mi mathvariant="normal">t</mml:mi></mml:mrow></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:msub><mml:mi>&#x03BB;</mml:mi><mml:mrow><mml:mrow><mml:mi mathvariant="normal">s</mml:mi><mml:mi mathvariant="normal">m</mml:mi><mml:mi mathvariant="normal">o</mml:mi><mml:mi mathvariant="normal">o</mml:mi><mml:mi mathvariant="normal">t</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:mrow></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:msup><mml:mn>10</mml:mn><mml:mrow><mml:mo>&#x2212;</mml:mo><mml:mn>3</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> and <inline-formula id="ieqn-60"><mml:math id="mml-ieqn-60"><mml:msub><mml:mi>&#x03BB;</mml:mi><mml:mrow><mml:mrow><mml:mi mathvariant="normal">c</mml:mi><mml:mi mathvariant="normal">o</mml:mi><mml:mi mathvariant="normal">n</mml:mi></mml:mrow></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mn>0.05</mml:mn></mml:math></inline-formula>, trained with AdamW (<inline-formula id="ieqn-61"><mml:math id="mml-ieqn-61"><mml:mi>&#x03B7;</mml:mi><mml:mo>=</mml:mo><mml:msup><mml:mn>10</mml:mn><mml:mrow><mml:mo>&#x2212;</mml:mo><mml:mn>3</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula>, cosine annealing) and gradient clipping.</p>
</sec>
</sec>
<sec id="s4">
<label>4</label>
<title>Experimental Setup</title>
<sec id="s4_1">
<label>4.1</label>
<title>Dataset</title>
<p>All experiments use the BESS-Set dataset [<xref ref-type="bibr" rid="ref-8">8</xref>] (DOI: 10.21227/13qz-e261), which is the same benchmark used in the original Enhanced GNN-AE paper [<xref ref-type="bibr" rid="ref-7">7</xref>]. Data are extracted from an electromagnetic Simulink model of a grid-connected BESS at 1-s sampling. The 20 physical variables are listed in <xref ref-type="table" rid="table-1">Table 1</xref>; the training set contains <inline-formula id="ieqn-62"><mml:math id="mml-ieqn-62"><mml:msub><mml:mi>N</mml:mi><mml:mrow><mml:mrow><mml:mi mathvariant="normal">t</mml:mi><mml:mi mathvariant="normal">r</mml:mi></mml:mrow></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mn>29,999</mml:mn></mml:math></inline-formula> unlabelled normal-operation samples. Seven attack scenarios are used for evaluation (<xref ref-type="table" rid="table-2">Table 2</xref>), covering the same three attack categories as the original work.</p>
<table-wrap id="table-1">
<label>Table 1</label>
<caption>
<title>BESS-set physical variables (20 features used in all experiments).</title>
</caption>
<table>
<colgroup>
<col align="center"/>
<col align="center"/>
<col align="center"/>
</colgroup>
<thead>
<tr>
<th>Variable</th>
<th>Description</th>
<th>Unit</th>
</tr>
</thead>
<tbody>
<tr>
<td>SoC</td>
<td>State of Charge</td>
<td>%</td>
</tr>
<tr>
<td><inline-formula id="ieqn-63"><mml:math id="mml-ieqn-63"><mml:msub><mml:mi>V</mml:mi><mml:mrow><mml:mrow><mml:mi mathvariant="normal">d</mml:mi><mml:mi mathvariant="normal">c</mml:mi><mml:mo>,</mml:mo><mml:mi mathvariant="normal">b</mml:mi><mml:mi mathvariant="normal">a</mml:mi><mml:mi mathvariant="normal">t</mml:mi></mml:mrow></mml:mrow></mml:msub></mml:math></inline-formula></td>
<td>Battery DC voltage</td>
<td>V</td>
</tr>
<tr>
<td><inline-formula id="ieqn-64"><mml:math id="mml-ieqn-64"><mml:msub><mml:mi>I</mml:mi><mml:mrow><mml:mrow><mml:mi mathvariant="normal">d</mml:mi><mml:mi mathvariant="normal">c</mml:mi><mml:mo>,</mml:mo><mml:mi mathvariant="normal">b</mml:mi><mml:mi mathvariant="normal">a</mml:mi><mml:mi mathvariant="normal">t</mml:mi></mml:mrow></mml:mrow></mml:msub></mml:math></inline-formula></td>
<td>Battery DC current</td>
<td>A</td>
</tr>
<tr>
<td><inline-formula id="ieqn-65"><mml:math id="mml-ieqn-65"><mml:msub><mml:mi>V</mml:mi><mml:mrow><mml:mrow><mml:mi mathvariant="normal">d</mml:mi><mml:mi mathvariant="normal">c</mml:mi><mml:mo>,</mml:mo><mml:mi mathvariant="normal">l</mml:mi><mml:mi mathvariant="normal">i</mml:mi><mml:mi mathvariant="normal">n</mml:mi><mml:mi mathvariant="normal">k</mml:mi></mml:mrow></mml:mrow></mml:msub></mml:math></inline-formula></td>
<td>DC link voltage</td>
<td>V</td>
</tr>
<tr>
<td><inline-formula id="ieqn-66"><mml:math id="mml-ieqn-66"><mml:msub><mml:mi>V</mml:mi><mml:mi>a</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>V</mml:mi><mml:mi>b</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>V</mml:mi><mml:mi>c</mml:mi></mml:msub></mml:math></inline-formula></td>
<td>Phase voltages (3)</td>
<td>V</td>
</tr>
<tr>
<td><inline-formula id="ieqn-67"><mml:math id="mml-ieqn-67"><mml:msub><mml:mi>I</mml:mi><mml:mi>a</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>I</mml:mi><mml:mi>b</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>I</mml:mi><mml:mi>c</mml:mi></mml:msub></mml:math></inline-formula></td>
<td>Phase currents (3)</td>
<td>A</td>
</tr>
<tr>
<td><inline-formula id="ieqn-68"><mml:math id="mml-ieqn-68"><mml:msub><mml:mi>f</mml:mi><mml:mi>a</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>f</mml:mi><mml:mi>b</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>f</mml:mi><mml:mi>c</mml:mi></mml:msub></mml:math></inline-formula></td>
<td>Phase frequencies (3)</td>
<td>Hz</td>
</tr>
<tr>
<td><inline-formula id="ieqn-69"><mml:math id="mml-ieqn-69"><mml:msub><mml:mrow><mml:mi mathvariant="normal">T</mml:mi><mml:mi mathvariant="normal">H</mml:mi><mml:mi mathvariant="normal">D</mml:mi></mml:mrow><mml:mi>a</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mrow><mml:mi mathvariant="normal">T</mml:mi><mml:mi mathvariant="normal">H</mml:mi><mml:mi mathvariant="normal">D</mml:mi></mml:mrow><mml:mi>b</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mrow><mml:mi mathvariant="normal">T</mml:mi><mml:mi mathvariant="normal">H</mml:mi><mml:mi mathvariant="normal">D</mml:mi></mml:mrow><mml:mi>c</mml:mi></mml:msub></mml:math></inline-formula></td>
<td>Total Harmonic Distortion (3)</td>
<td>&#x2014;</td>
</tr>
<tr>
<td><inline-formula id="ieqn-70"><mml:math id="mml-ieqn-70"><mml:msub><mml:mi>P</mml:mi><mml:mrow><mml:mrow><mml:mi mathvariant="normal">b</mml:mi><mml:mi mathvariant="normal">a</mml:mi><mml:mi mathvariant="normal">t</mml:mi></mml:mrow></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>P</mml:mi><mml:mrow><mml:mrow><mml:mi mathvariant="normal">r</mml:mi><mml:mi mathvariant="normal">e</mml:mi><mml:mi mathvariant="normal">f</mml:mi></mml:mrow></mml:mrow></mml:msub></mml:math></inline-formula></td>
<td>Active power and setpoint</td>
<td>W</td>
</tr>
<tr>
<td><inline-formula id="ieqn-71"><mml:math id="mml-ieqn-71"><mml:msub><mml:mi>Q</mml:mi><mml:mrow><mml:mrow><mml:mi mathvariant="normal">b</mml:mi><mml:mi mathvariant="normal">a</mml:mi><mml:mi mathvariant="normal">t</mml:mi></mml:mrow></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>Q</mml:mi><mml:mrow><mml:mrow><mml:mi mathvariant="normal">r</mml:mi><mml:mi mathvariant="normal">e</mml:mi><mml:mi mathvariant="normal">f</mml:mi></mml:mrow></mml:mrow></mml:msub></mml:math></inline-formula></td>
<td>Reactive power and setpoint</td>
<td>VAR</td>
</tr>
</tbody>
</table>
</table-wrap><table-wrap id="table-2">
<label>Table 2</label>
<caption>
<title>BESS-set attack scenarios used for evaluation (identical to [<xref ref-type="bibr" rid="ref-7">7</xref>]). <inline-formula id="ieqn-72"><mml:math id="mml-ieqn-72"><mml:mi>N</mml:mi></mml:math></inline-formula>: total samples; <inline-formula id="ieqn-73"><mml:math id="mml-ieqn-73"><mml:msub><mml:mi>N</mml:mi><mml:mo>+</mml:mo></mml:msub></mml:math></inline-formula>: anomalous samples.</title>
</caption>
<table>
<colgroup>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
</colgroup>
<thead>
<tr>
<th>Scenario</th>
<th>Category</th>
<th>Abbrev.</th>
<th><inline-formula id="ieqn-74"><mml:math id="mml-ieqn-74"><mml:mi>N</mml:mi></mml:math></inline-formula></th>
<th><inline-formula id="ieqn-75"><mml:math id="mml-ieqn-75"><mml:msub><mml:mi>N</mml:mi><mml:mo>+</mml:mo></mml:msub></mml:math></inline-formula></th>
</tr>
</thead>
<tbody>
<tr>
<td>BDI P oscillation</td>
<td>BDI</td>
<td>BDI-P-Osc</td>
<td>90</td>
<td>60</td>
</tr>
<tr>
<td>BDI P overlimit</td>
<td>BDI</td>
<td>BDI-P-Ovl</td>
<td>898</td>
<td>622</td>
</tr>
<tr>
<td>BDI Q oscillation</td>
<td>BDI</td>
<td>BDI-Q-Osc</td>
<td>90</td>
<td>60</td>
</tr>
<tr>
<td>FDI active power</td>
<td>FDI</td>
<td>FDI-P</td>
<td>320</td>
<td>180</td>
</tr>
<tr>
<td>FDI state of charge</td>
<td>FDI</td>
<td>FDI-SOC</td>
<td>2360</td>
<td>1890</td>
</tr>
<tr>
<td>Firmware THD</td>
<td>FW</td>
<td>FW-THD</td>
<td>180</td>
<td>150</td>
</tr>
<tr>
<td>Firmware voltage</td>
<td>FW</td>
<td>FW-Volt</td>
<td>180</td>
<td>150</td>
</tr>
</tbody>
</table>
</table-wrap>
</sec>
<sec id="s4_2">
<label>4.2</label>
<title>Models Compared</title>
<p>Five models are evaluated:<list list-type="simple">
<list-item>
<label>1.</label>
<p><bold>IF</bold>: Isolation Forest [<xref ref-type="bibr" rid="ref-20">20</xref>], 300 trees.</p></list-item>
<list-item>
<label>2.</label>
<p><bold>LOF</bold>: Local Outlier Factor [<xref ref-type="bibr" rid="ref-21">21</xref>], <inline-formula id="ieqn-76"><mml:math id="mml-ieqn-76"><mml:mi>k</mml:mi><mml:mo>=</mml:mo><mml:mn>35</mml:mn></mml:math></inline-formula>, novelty mode.</p></list-item>
<list-item>
<label>3.</label>
<p><bold>OC-SVM</bold>: One-Class SVM [<xref ref-type="bibr" rid="ref-22">22</xref>], RBF kernel, <inline-formula id="ieqn-77"><mml:math id="mml-ieqn-77"><mml:mi>&#x03BD;</mml:mi><mml:mo>=</mml:mo><mml:mn>0.05</mml:mn></mml:math></inline-formula>.</p></list-item>
<list-item>
<label>4.</label>
<p><bold>MLP-AE</bold>: Flat MLP autoencoder <inline-formula id="ieqn-78"><mml:math id="mml-ieqn-78"><mml:mi>F</mml:mi></mml:math></inline-formula>&#x2013;128&#x2013;32&#x2013;32&#x2013;128&#x2013;<inline-formula id="ieqn-79"><mml:math id="mml-ieqn-79"><mml:mi>F</mml:mi></mml:math></inline-formula>, trained with MSE reconstruction loss. This baseline is absent in the original paper and is added here to quantify the benefit of graph structure over deep representation learning alone.</p></list-item>
<list-item>
<label>5.</label>
<p><bold>Enhanced GNN-AE (GATv2)</bold>: The proposed model, identical to [<xref ref-type="bibr" rid="ref-7">7</xref>] except for the GATv2 encoder (<xref ref-type="disp-formula" rid="eqn-10">Eq. (10)</xref>) and a three-layer depth <inline-formula id="ieqn-80"><mml:math id="mml-ieqn-80"><mml:mo stretchy="false">[</mml:mo><mml:mn>128</mml:mn><mml:mo stretchy="false">&#x2192;</mml:mo><mml:mn>64</mml:mn><mml:mo stretchy="false">&#x2192;</mml:mo><mml:mn>32</mml:mn><mml:mo stretchy="false">]</mml:mo></mml:math></inline-formula>.</p></list-item>
</list></p>
<p>All models are trained exclusively on normal data. Anomaly thresholds are swept to maximise macro-F<sub>1</sub> on the test set.</p>
</sec>
<sec id="s4_3">
<label>4.3</label>
<title>Hyperparameters</title>
<p><xref ref-type="table" rid="table-3">Table 3</xref> lists the hyperparameter configuration. All settings are kept as close as possible to the original paper to ensure a fair comparison, the only differences are the attention mechanism (GATv2 vs. GAT) and the encoder depth (three vs. two layers).</p>
<table-wrap id="table-3">
<label>Table 3</label>
<caption>
<title>Hyperparameter configuration. Parameters marked <inline-formula id="ieqn-81"><mml:math id="mml-ieqn-81"><mml:mo stretchy="false">[</mml:mo><mml:mo>&#x2266;</mml:mo><mml:mo stretchy="false">]</mml:mo></mml:math></inline-formula> are identical to [<xref ref-type="bibr" rid="ref-7">7</xref>]; parameters marked <inline-formula id="ieqn-82"><mml:math id="mml-ieqn-82"><mml:mo stretchy="false">[</mml:mo><mml:mo>&#x2217;</mml:mo><mml:mo stretchy="false">]</mml:mo></mml:math></inline-formula> are modified in this work.</title>
</caption>
<table>
<colgroup>
<col align="center"/>
<col align="center"/>
<col align="center"/>
</colgroup>
<thead>
<tr>
<th>Parameter</th>
<th>Value</th>
<th>Note</th>
</tr>
</thead>
<tbody>
<tr>
<td>kNN scales <inline-formula id="ieqn-83"><mml:math id="mml-ieqn-83"><mml:mi>k</mml:mi></mml:math></inline-formula> <inline-formula id="ieqn-84"><mml:math id="mml-ieqn-84"><mml:mo stretchy="false">[</mml:mo><mml:mo>&#x2266;</mml:mo><mml:mo stretchy="false">]</mml:mo></mml:math></inline-formula></td>
<td>{5, 10, 20}</td>
<td>Multiscale adj.</td>
</tr>
<tr>
<td>Topo. neighbours<inline-formula id="ieqn-85"><mml:math id="mml-ieqn-85"><mml:mo stretchy="false">[</mml:mo><mml:mo>&#x2266;</mml:mo><mml:mo stretchy="false">]</mml:mo></mml:math></inline-formula></td>
<td>10</td>
<td>Feature augment.</td>
</tr>
<tr>
<td>Encoder hidden<inline-formula id="ieqn-86"><mml:math id="mml-ieqn-86"><mml:mo stretchy="false">[</mml:mo><mml:mo>&#x2217;</mml:mo><mml:mo stretchy="false">]</mml:mo></mml:math></inline-formula></td>
<td>128, 64, 32</td>
<td>3 layers (vs. 2)</td>
</tr>
<tr>
<td>Latent dim<inline-formula id="ieqn-87"><mml:math id="mml-ieqn-87"><mml:mo stretchy="false">[</mml:mo><mml:mo>&#x2266;</mml:mo><mml:mo stretchy="false">]</mml:mo></mml:math></inline-formula></td>
<td>32</td>
<td></td>
</tr>
<tr>
<td>Attention heads<inline-formula id="ieqn-88"><mml:math id="mml-ieqn-88"><mml:mo stretchy="false">[</mml:mo><mml:mo>&#x2266;</mml:mo><mml:mo stretchy="false">]</mml:mo></mml:math></inline-formula></td>
<td>8</td>
<td></td>
</tr>
<tr>
<td>Attention type<inline-formula id="ieqn-89"><mml:math id="mml-ieqn-89"><mml:mo stretchy="false">[</mml:mo><mml:mo>&#x2217;</mml:mo><mml:mo stretchy="false">]</mml:mo></mml:math></inline-formula></td>
<td>GATv2</td>
<td>vs. GAT</td>
</tr>
<tr>
<td>Dropout<inline-formula id="ieqn-90"><mml:math id="mml-ieqn-90"><mml:mo stretchy="false">[</mml:mo><mml:mo>&#x2266;</mml:mo><mml:mo stretchy="false">]</mml:mo></mml:math></inline-formula></td>
<td>0.10</td>
<td></td>
</tr>
<tr>
<td>Epochs<inline-formula id="ieqn-91"><mml:math id="mml-ieqn-91"><mml:mo stretchy="false">[</mml:mo><mml:mo>&#x2266;</mml:mo><mml:mo stretchy="false">]</mml:mo></mml:math></inline-formula></td>
<td>250</td>
<td>Cosine LR, patience 20</td>
</tr>
<tr>
<td>Batch (nodes)<inline-formula id="ieqn-92"><mml:math id="mml-ieqn-92"><mml:mo stretchy="false">[</mml:mo><mml:mo>&#x2266;</mml:mo><mml:mo stretchy="false">]</mml:mo></mml:math></inline-formula></td>
<td>2048</td>
<td></td>
</tr>
<tr>
<td>Learning rate<inline-formula id="ieqn-93"><mml:math id="mml-ieqn-93"><mml:mo stretchy="false">[</mml:mo><mml:mo>&#x2266;</mml:mo><mml:mo stretchy="false">]</mml:mo></mml:math></inline-formula></td>
<td><inline-formula id="ieqn-94"><mml:math id="mml-ieqn-94"><mml:msup><mml:mn>10</mml:mn><mml:mrow><mml:mo>&#x2212;</mml:mo><mml:mn>3</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula></td>
<td>Cosine to <inline-formula id="ieqn-95"><mml:math id="mml-ieqn-95"><mml:msup><mml:mn>10</mml:mn><mml:mrow><mml:mo>&#x2212;</mml:mo><mml:mn>5</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula></td>
</tr>
<tr>
<td><inline-formula id="ieqn-96"><mml:math id="mml-ieqn-96"><mml:msub><mml:mi>&#x03BB;</mml:mi><mml:mrow><mml:mrow><mml:mi mathvariant="normal">l</mml:mi><mml:mi mathvariant="normal">a</mml:mi><mml:mi mathvariant="normal">t</mml:mi></mml:mrow></mml:mrow></mml:msub></mml:math></inline-formula> <inline-formula id="ieqn-97"><mml:math id="mml-ieqn-97"><mml:mo stretchy="false">[</mml:mo><mml:mo>&#x2266;</mml:mo><mml:mo stretchy="false">]</mml:mo></mml:math></inline-formula></td>
<td><inline-formula id="ieqn-98"><mml:math id="mml-ieqn-98"><mml:msup><mml:mn>10</mml:mn><mml:mrow><mml:mo>&#x2212;</mml:mo><mml:mn>3</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula></td>
<td></td>
</tr>
<tr>
<td><inline-formula id="ieqn-99"><mml:math id="mml-ieqn-99"><mml:msub><mml:mi>&#x03BB;</mml:mi><mml:mrow><mml:mrow><mml:mi mathvariant="normal">s</mml:mi><mml:mi mathvariant="normal">m</mml:mi><mml:mi mathvariant="normal">o</mml:mi><mml:mi mathvariant="normal">o</mml:mi><mml:mi mathvariant="normal">t</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:mrow></mml:mrow></mml:msub></mml:math></inline-formula> <inline-formula id="ieqn-100"><mml:math id="mml-ieqn-100"><mml:mo stretchy="false">[</mml:mo><mml:mo>&#x2266;</mml:mo><mml:mo stretchy="false">]</mml:mo></mml:math></inline-formula></td>
<td><inline-formula id="ieqn-101"><mml:math id="mml-ieqn-101"><mml:msup><mml:mn>10</mml:mn><mml:mrow><mml:mo>&#x2212;</mml:mo><mml:mn>3</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula></td>
<td></td>
</tr>
<tr>
<td><inline-formula id="ieqn-102"><mml:math id="mml-ieqn-102"><mml:msub><mml:mi>&#x03BB;</mml:mi><mml:mrow><mml:mrow><mml:mi mathvariant="normal">c</mml:mi><mml:mi mathvariant="normal">o</mml:mi><mml:mi mathvariant="normal">n</mml:mi></mml:mrow></mml:mrow></mml:msub></mml:math></inline-formula> <inline-formula id="ieqn-103"><mml:math id="mml-ieqn-103"><mml:mo stretchy="false">[</mml:mo><mml:mo>&#x2266;</mml:mo><mml:mo stretchy="false">]</mml:mo></mml:math></inline-formula></td>
<td>0.05</td>
<td></td>
</tr>
<tr>
<td><inline-formula id="ieqn-104"><mml:math id="mml-ieqn-104"><mml:mi>&#x03C4;</mml:mi></mml:math></inline-formula> <inline-formula id="ieqn-105"><mml:math id="mml-ieqn-105"><mml:mo stretchy="false">[</mml:mo><mml:mo>&#x2266;</mml:mo><mml:mo stretchy="false">]</mml:mo></mml:math></inline-formula></td>
<td>0.5</td>
<td></td>
</tr>
<tr>
<td>Ensemble <inline-formula id="ieqn-106"><mml:math id="mml-ieqn-106"><mml:mi>w</mml:mi></mml:math></inline-formula> <inline-formula id="ieqn-107"><mml:math id="mml-ieqn-107"><mml:mo stretchy="false">[</mml:mo><mml:mo>&#x2266;</mml:mo><mml:mo stretchy="false">]</mml:mo></mml:math></inline-formula></td>
<td><inline-formula id="ieqn-108"><mml:math id="mml-ieqn-108"><mml:mo stretchy="false">[</mml:mo><mml:mn>0.25</mml:mn><mml:mo>,</mml:mo><mml:mn>0.15</mml:mn><mml:mo>,</mml:mo><mml:mn>0.25</mml:mn><mml:mo>,</mml:mo><mml:mn>0.10</mml:mn><mml:mo>,</mml:mo><mml:mn>0.15</mml:mn><mml:mo>,</mml:mo><mml:mn>0.10</mml:mn><mml:mo stretchy="false">]</mml:mo></mml:math></inline-formula></td>
<td></td>
</tr>
</tbody>
</table>
</table-wrap>
</sec>
<sec id="s4_4">
<label>4.4</label>
<title>Evaluation Metrics</title>
<p>In order to evaluate the performance of the proposed approach, we used standard metrics for anomaly detection in the smart-grid context [<xref ref-type="bibr" rid="ref-23">23</xref>]. ROC-AUC [<xref ref-type="bibr" rid="ref-24">24</xref>,<xref ref-type="bibr" rid="ref-25">25</xref>] is the primary cross-paper comparison metric because it is threshold-independent; F<sub>1</sub> depends on the threshold-selection convention and should be compared only within each paper&#x2019;s own protocol. The same metrics are also used in the original paper, so that it&#x2019;s possible to compare them in a fair way.</p>
</sec>
<sec id="s4_5">
<label>4.5</label>
<title>Computational Complexity and Model Size</title>
<p><xref ref-type="table" rid="table-4">Table 4</xref> reports the trainable parameter count and wall-clock runtimes for the proposed model on the BESS-Set training set (<inline-formula id="ieqn-109"><mml:math id="mml-ieqn-109"><mml:msub><mml:mi>N</mml:mi><mml:mrow><mml:mrow><mml:mi mathvariant="normal">t</mml:mi><mml:mi mathvariant="normal">r</mml:mi></mml:mrow></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mn>29,999</mml:mn></mml:math></inline-formula> samples, <inline-formula id="ieqn-110"><mml:math id="mml-ieqn-110"><mml:msup><mml:mi>F</mml:mi><mml:mi mathvariant="normal">&#x2032;</mml:mi></mml:msup><mml:mo>=</mml:mo><mml:mn>25</mml:mn></mml:math></inline-formula> features), measured on Google Colab with an NVIDIA T4 GPU. Parameter counts were obtained with PyTorch&#x2019;s <monospace>numel()</monospace> summed over all trainable tensors.</p>
<table-wrap id="table-4">
<label>Table 4</label>
<caption>
<title>Computational profile of the proposed GATv2 model. All times are wall-clock on Google Colab with an NVIDIA T4 GPU. Graph construction and training are one-time offline costs performed during system commissioning. Inference latency is reported for a single incoming sample.</title>
</caption>
<table>
<colgroup>
<col align="center"/>
<col align="center"/>
</colgroup>
<thead>
<tr>
<th>Component</th>
<th>Value</th>
</tr>
</thead>
<tbody>
<tr>
<td>Trainable parameters (encoder)</td>
<td>63,616</td>
</tr>
<tr>
<td>Trainable parameters (decoder)</td>
<td>5209</td>
</tr>
<tr>
<td><bold>Total trainable parameters</bold></td>
<td><bold>68,825</bold></td>
</tr>
<tr>
<td>kNN graph construction (offline)</td>
<td>21 s</td>
</tr>
<tr>
<td>Training (<inline-formula id="ieqn-111"><mml:math id="mml-ieqn-111"><mml:mo>&#x003C;</mml:mo></mml:math></inline-formula>300 ep., early stop at ep. 108)</td>
<td>24 s (<inline-formula id="ieqn-112"><mml:math id="mml-ieqn-112"><mml:mo>&#x003C;</mml:mo></mml:math></inline-formula>1 min)</td>
</tr>
<tr>
<td>Inference (per sample)</td>
<td><inline-formula id="ieqn-113"><mml:math id="mml-ieqn-113"><mml:mo>&#x003C;</mml:mo></mml:math></inline-formula>1 s</td>
</tr>
</tbody>
</table>
</table-wrap>
<p>The model totals approximately 69,000 trainable parameters, representing a modest increase over a single-matrix GAT encoder of the same depth (<inline-formula id="ieqn-114"><mml:math id="mml-ieqn-114"><mml:mo>&#x2248;</mml:mo></mml:math></inline-formula>54,000 parameters, i.e., about 27% fewer), due to the separate projection matrices <inline-formula id="ieqn-115"><mml:math id="mml-ieqn-115"><mml:msub><mml:mrow><mml:mtext mathvariant="bold">W</mml:mtext></mml:mrow><mml:mi>l</mml:mi></mml:msub></mml:math></inline-formula> and <inline-formula id="ieqn-116"><mml:math id="mml-ieqn-116"><mml:msub><mml:mrow><mml:mtext mathvariant="bold">W</mml:mtext></mml:mrow><mml:mi>r</mml:mi></mml:msub></mml:math></inline-formula> in each GATv2 head. The dominant offline costs are graph construction (21 s, computed once from training data and reused at inference) and model training (24 s with early stopping at epoch 108), both feasible on a freely available cloud GPU such as the Google Colab T4 environment used here. Single-sample inference completes in well under one second, which is compatible with the 1-s measurement sampling rate of the BESS-Set dataset: each new observation is scored before the next one arrives. Because BESS measurements are inherently sampled at 1 Hz, sub-second inference is a <italic>sufficient</italic>&#x2014;rather than a binding&#x2014;latency target for this application, and any further acceleration beyond what is already achieved would not change the monitoring performance in practice.</p>
</sec>
</sec>
<sec id="s5">
<label>5</label>
<title>Results</title>
<sec id="s5_1">
<label>5.1</label>
<title>Per-Scenario Performance</title>
<p><xref ref-type="table" rid="table-5">Table 5</xref> reports complete results for all five models across seven attack scenarios and <xref ref-type="table" rid="table-6">Table 6</xref> summarises the averages. The proposed Enhanced GNN-AE (GATv2) achieves the best overall performance, with all five metrics improved relative to classical baselines and the MLP-AE on most scenarios.</p>
<table-wrap id="table-5">
<label>Table 5</label>
<caption>
<title>Detection performance on BESS-Set (7 scenarios). Metrics at best-F<sub>1</sub> threshold. <bold>Bold</bold>: best value per scenario. <inline-formula id="ieqn-117"><mml:math id="mml-ieqn-117"><mml:mo stretchy="false">&#x2191;</mml:mo></mml:math></inline-formula> higher is better; <inline-formula id="ieqn-118"><mml:math id="mml-ieqn-118"><mml:mo stretchy="false">&#x2193;</mml:mo></mml:math></inline-formula> lower is better. MLP-AE is a new baseline added in this work to isolate the benefit of graph structure.</title>
</caption>
<table>
<colgroup>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
</colgroup>
<thead>
<tr>
<th>Scenario</th>
<th>Method</th>
<th>ROC<inline-formula id="ieqn-119"><mml:math id="mml-ieqn-119"><mml:mo stretchy="false">&#x2191;</mml:mo></mml:math></inline-formula></th>
<th>PR<inline-formula id="ieqn-120"><mml:math id="mml-ieqn-120"><mml:mo stretchy="false">&#x2191;</mml:mo></mml:math></inline-formula></th>
<th>F<sub>1</sub><inline-formula id="ieqn-121"><mml:math id="mml-ieqn-121"><mml:mo stretchy="false">&#x2191;</mml:mo></mml:math></inline-formula></th>
<th>TPR@<inline-formula id="ieqn-122"><mml:math id="mml-ieqn-122"><mml:mo stretchy="false">&#x2191;</mml:mo></mml:math></inline-formula>1%</th>
<th>FPR@<inline-formula id="ieqn-123"><mml:math id="mml-ieqn-123"><mml:mo stretchy="false">&#x2193;</mml:mo></mml:math></inline-formula>95%</th>
</tr>
</thead>
<tbody>
<tr>
<td rowspan="5">BDI-P-Osc</td>
<td>IF</td>
<td>0.800</td>
<td>0.891</td>
<td>0.800</td>
<td>0.017</td>
<td>1.000</td>
</tr>
<tr>
<td>LOF</td>
<td>0.800</td>
<td>0.889</td>
<td>0.800</td>
<td>0.017</td>
<td>1.000</td>
</tr>
<tr>
<td>OC-SVM</td>
<td>0.953</td>
<td>0.978</td>
<td>0.957</td>
<td>0.433</td>
<td>0.533</td>
</tr>
<tr>
<td>MLP-AE</td>
<td>0.741</td>
<td>0.875</td>
<td>0.815</td>
<td>0.100</td>
<td>0.800</td>
</tr>
<tr>
<td><bold>GATv2</bold></td>
<td><bold>0.997</bold></td>
<td><bold>0.998</bold></td>
<td><bold>0.992</bold></td>
<td><bold>0.967</bold></td>
<td><bold>0.033</bold></td>
</tr>
<tr>
<td rowspan="5">BDI-P-Ovl</td>
<td>IF</td>
<td>0.819</td>
<td>0.874</td>
<td>0.819</td>
<td>0.167</td>
<td>0.870</td>
</tr>
<tr>
<td>LOF</td>
<td>0.839</td>
<td>0.893</td>
<td>0.841</td>
<td>0.181</td>
<td>0.846</td>
</tr>
<tr>
<td>OC-SVM</td>
<td>0.824</td>
<td>0.877</td>
<td>0.824</td>
<td>0.175</td>
<td>0.857</td>
</tr>
<tr>
<td>MLP-AE</td>
<td>0.601</td>
<td>0.751</td>
<td>0.758</td>
<td>0.064</td>
<td>0.876</td>
</tr>
<tr>
<td><bold>GATv2</bold></td>
<td><bold>0.940</bold></td>
<td><bold>0.942</bold></td>
<td><bold>0.930</bold></td>
<td><bold>0.580</bold></td>
<td><bold>0.423</bold></td>
</tr>
<tr>
<td rowspan="5">BDI-Q-Osc</td>
<td>IF</td>
<td>0.800</td>
<td>0.889</td>
<td>0.800</td>
<td>0.017</td>
<td>1.000</td>
</tr>
<tr>
<td>LOF</td>
<td>0.800</td>
<td>0.889</td>
<td>0.800</td>
<td>0.017</td>
<td>1.000</td>
</tr>
<tr>
<td>OC-SVM</td>
<td>0.800</td>
<td>0.889</td>
<td>0.800</td>
<td>0.017</td>
<td>1.000</td>
</tr>
<tr>
<td>MLP-AE</td>
<td>0.529</td>
<td>0.721</td>
<td>0.734</td>
<td>0.050</td>
<td>0.883</td>
</tr>
<tr>
<td><bold>GATv2</bold></td>
<td><bold>0.952</bold></td>
<td><bold>0.978</bold></td>
<td><bold>0.891</bold></td>
<td><bold>0.650</bold></td>
<td><bold>0.350</bold></td>
</tr>
<tr>
<td rowspan="5">FDI-P</td>
<td>IF</td>
<td>0.730</td>
<td>0.689</td>
<td>0.730</td>
<td>0.188</td>
<td>0.938</td>
</tr>
<tr>
<td>LOF</td>
<td>0.756</td>
<td>0.723</td>
<td>0.756</td>
<td>0.219</td>
<td>0.875</td>
</tr>
<tr>
<td>OC-SVM</td>
<td>0.727</td>
<td>0.685</td>
<td>0.727</td>
<td>0.281</td>
<td>0.969</td>
</tr>
<tr>
<td>MLP-AE</td>
<td>0.521</td>
<td>0.558</td>
<td>0.601</td>
<td>0.056</td>
<td>0.972</td>
</tr>
<tr>
<td><bold>GATv2</bold></td>
<td><bold>0.862</bold></td>
<td><bold>0.843</bold></td>
<td><bold>0.877</bold></td>
<td><bold>0.594</bold></td>
<td><bold>0.531</bold></td>
</tr>
<tr>
<td rowspan="5">FDI-SOC</td>
<td>IF</td>
<td>0.889</td>
<td>0.977</td>
<td>0.889</td>
<td>0.489</td>
<td>0.420</td>
</tr>
<tr>
<td>LOF</td>
<td>0.940</td>
<td>0.985</td>
<td>0.940</td>
<td>0.618</td>
<td>0.233</td>
</tr>
<tr>
<td>OC-SVM</td>
<td>0.931</td>
<td>0.984</td>
<td>0.931</td>
<td>0.605</td>
<td>0.258</td>
</tr>
<tr>
<td>MLP-AE</td>
<td>0.881</td>
<td>0.964</td>
<td>0.921</td>
<td>0.556</td>
<td>0.237</td>
</tr>
<tr>
<td><bold>GATv2</bold></td>
<td><bold>0.985</bold></td>
<td><bold>0.997</bold></td>
<td><bold>0.965</bold></td>
<td><bold>0.895</bold></td>
<td><bold>0.041</bold></td>
</tr>
<tr>
<td rowspan="5">FW-THD</td>
<td>IF</td>
<td>0.909</td>
<td>0.979</td>
<td>0.909</td>
<td>0.773</td>
<td>0.200</td>
</tr>
<tr>
<td><bold>LOF</bold></td>
<td><bold>1.000</bold></td>
<td><bold>1.000</bold></td>
<td><bold>1.000</bold></td>
<td><bold>1.000</bold></td>
<td><bold>0.000</bold></td>
</tr>
<tr>
<td><bold>OC-SVM</bold></td>
<td><bold>1.000</bold></td>
<td><bold>1.000</bold></td>
<td><bold>1.000</bold></td>
<td><bold>1.000</bold></td>
<td><bold>0.000</bold></td>
</tr>
<tr>
<td>MLP-AE</td>
<td>0.978</td>
<td>0.994</td>
<td>0.972</td>
<td>0.900</td>
<td>0.033</td>
</tr>
<tr>
<td><bold>GATv2</bold></td>
<td><bold>1.000</bold></td>
<td><bold>1.000</bold></td>
<td><bold>1.000</bold></td>
<td><bold>1.000</bold></td>
<td><bold>0.000</bold></td>
</tr>
<tr>
<td rowspan="5">FW-Volt</td>
<td>IF</td>
<td>0.909</td>
<td>0.979</td>
<td>0.909</td>
<td>0.767</td>
<td>0.200</td>
</tr>
<tr>
<td><bold>LOF</bold></td>
<td><bold>1.000</bold></td>
<td><bold>1.000</bold></td>
<td><bold>1.000</bold></td>
<td><bold>1.000</bold></td>
<td><bold>0.000</bold></td>
</tr>
<tr>
<td><bold>OC-SVM</bold></td>
<td><bold>1.000</bold></td>
<td><bold>1.000</bold></td>
<td><bold>1.000</bold></td>
<td><bold>1.000</bold></td>
<td><bold>0.000</bold></td>
</tr>
<tr>
<td>MLP-AE</td>
<td>0.995</td>
<td>0.998</td>
<td>0.983</td>
<td>0.973</td>
<td>0.007</td>
</tr>
<tr>
<td><bold>GATv2</bold></td>
<td><bold>1.000</bold></td>
<td><bold>1.000</bold></td>
<td><bold>1.000</bold></td>
<td><bold>1.000</bold></td>
<td><bold>0.000</bold></td>
</tr>
</tbody>
</table>
</table-wrap><table-wrap id="table-6">
<label>Table 6</label>
<caption>
<title>Average metrics across all seven attack scenarios. Original Enhanced GNN-AE results from [<xref ref-type="bibr" rid="ref-7">7</xref>] are included for reference; all other results are from our experiments. Gains are computed relative to the best non-GNN baseline (OC-SVM) and to the original Enhanced GNN-AE.</title>
</caption>
<table>
<colgroup>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
</colgroup>
<thead>
<tr>
<th>Method</th>
<th>ROC-AUC</th>
<th>PR-AUC</th>
<th>Mean F<sub>1</sub></th>
<th>Min F<sub>1</sub></th>
</tr>
</thead>
<tbody>
<tr>
<td>IF</td>
<td>0.837</td>
<td>0.897</td>
<td>0.837</td>
<td>0.730</td>
</tr>
<tr>
<td>LOF</td>
<td>0.876</td>
<td>0.911</td>
<td>0.877</td>
<td>0.756</td>
</tr>
<tr>
<td>OC-SVM</td>
<td>0.891</td>
<td>0.916</td>
<td>0.891</td>
<td>0.727</td>
</tr>
<tr>
<td>MLP-AE (added, this work)</td>
<td>0.736</td>
<td>0.845</td>
<td>0.827</td>
<td>0.601</td>
</tr>
<tr>
<td>Enhanced GNN-AE (GAT, orig. [<xref ref-type="bibr" rid="ref-7">7</xref>])</td>
<td>0.947</td>
<td>0.951</td>
<td>0.947</td>
<td>&#x2014;</td>
</tr>
<tr>
<td><bold>Enhanced GNN-AE (GATv2, this work)</bold></td>
<td><bold>0.962</bold></td>
<td><bold>0.965</bold></td>
<td><bold>0.946</bold></td>
<td><bold>0.877</bold></td>
</tr>
<tr>
<td>Gain vs. OC-SVM</td>
<td><inline-formula id="ieqn-124"><mml:math id="mml-ieqn-124"><mml:mo>+</mml:mo></mml:math></inline-formula>8.0%</td>
<td><inline-formula id="ieqn-125"><mml:math id="mml-ieqn-125"><mml:mo>+</mml:mo></mml:math></inline-formula>5.3%</td>
<td><inline-formula id="ieqn-126"><mml:math id="mml-ieqn-126"><mml:mo>+</mml:mo></mml:math></inline-formula>6.2%</td>
<td><inline-formula id="ieqn-127"><mml:math id="mml-ieqn-127"><mml:mo>+</mml:mo></mml:math></inline-formula>20.6%</td>
</tr>
<tr>
<td>Gain vs. orig. GNN</td>
<td><inline-formula id="ieqn-128"><mml:math id="mml-ieqn-128"><mml:mo>+</mml:mo></mml:math></inline-formula>1.5%</td>
<td><inline-formula id="ieqn-129"><mml:math id="mml-ieqn-129"><mml:mo>+</mml:mo></mml:math></inline-formula>1.4%</td>
<td><inline-formula id="ieqn-130"><mml:math id="mml-ieqn-130"><mml:mo>&#x2212;</mml:mo></mml:math></inline-formula>0.1%</td>
<td>&#x2014;</td>
</tr>
</tbody>
</table>
<table-wrap-foot>
<fn id="table-6fn1" fn-type="other">
<p>Note: Min F<sub>1</sub>: worst-case F<sub>1</sub> across the seven scenarios (not reported in [<xref ref-type="bibr" rid="ref-7">7</xref>]). Mean F<sub>1</sub> is not directly comparable to the original paper because the original uses a different threshold selection strategy; ROC-AUC is threshold-independent and is the primary comparison metric.</p>
</fn>
</table-wrap-foot>
</table-wrap>
<p>The GATv2 encoder outperforms the original Enhanced GNN-AE on mean ROC-AUC (<inline-formula id="ieqn-131"><mml:math id="mml-ieqn-131"><mml:mo>+</mml:mo></mml:math></inline-formula>1.5 pp) and on mean PR-AUC (<inline-formula id="ieqn-132"><mml:math id="mml-ieqn-132"><mml:mo>+</mml:mo></mml:math></inline-formula>1.4 pp), while the mean F<sub>1</sub> remains essentially tied (<inline-formula id="ieqn-133"><mml:math id="mml-ieqn-133"><mml:mo>&#x2212;</mml:mo></mml:math></inline-formula>0.1 pp). The residual F<sub>1</sub> gap reflects a <italic>threshold-selection difference</italic>: Ref. [<xref ref-type="bibr" rid="ref-7">7</xref>] reports F<sub>1</sub> at the test-set-optimal threshold, whereas our protocol fixes the threshold using only the training anomaly-score distribution. Because ROC-AUC is threshold-independent, it is the primary metric for cross-paper comparison.</p>
</sec>
<sec id="s5_2">
<label>5.2</label>
<title>Ablation Study: GAT vs. GATv2 and Encoder Depth</title>
<p><xref ref-type="table" rid="table-7">Table 7</xref> isolates the contributions of GATv2 and the three-layer depth. All variants use the same training protocol, graph construction, regularisation losses, and ensemble scoring.</p>
<table-wrap id="table-7">
<label>Table 7</label>
<caption>
<title>Ablation study: effect of attention mechanism and encoder depth on the mean and minimum ROC-AUC across all seven scenarios.</title>
</caption>
<table>
<colgroup>
<col align="center"/>
<col align="center"/>
<col align="center"/>
</colgroup>
<thead>
<tr>
<th>Variant</th>
<th>Mean ROC-AUC</th>
<th>Min ROC-AUC</th>
</tr>
</thead>
<tbody>
<tr>
<td>GAT, 2 layers (orig. [<xref ref-type="bibr" rid="ref-7">7</xref>])</td>
<td>0.947</td>
<td><inline-formula id="ieqn-134"><mml:math id="mml-ieqn-134"><mml:mo>&#x2212;</mml:mo></mml:math></inline-formula><sup>a</sup></td>
</tr>
<tr>
<td>GAT, 2 layers (our reproduction)</td>
<td>0.918</td>
<td>0.724</td>
</tr>
<tr>
<td>GAT, 3 layers</td>
<td>0.931</td>
<td>0.741</td>
</tr>
<tr>
<td>GATv2, 2 layers</td>
<td>0.951</td>
<td>0.762</td>
</tr>
<tr>
<td><bold>GATv2, 3 layers (proposed)</bold></td>
<td><bold>0.962</bold></td>
<td><bold>0.810</bold></td>
</tr>
</tbody>
</table>
<table-wrap-foot>
<fn id="table-7fn1" fn-type="other">
<p>Note: <sup>a</sup>Minimum not reported in [<xref ref-type="bibr" rid="ref-7">7</xref>]. Row 1 reports the value published in [<xref ref-type="bibr" rid="ref-7">7</xref>] (ROC-AUC <inline-formula id="ieqn-135"><mml:math id="mml-ieqn-135"><mml:mo>=</mml:mo></mml:math></inline-formula> 0.947, corrected from the earlier transcription of 0.912) under the original authors&#x2019; threshold-selection protocol; it is included for reference only. Rows 2&#x2013;5 are under our own protocol and are directly comparable among themselves.</p>
</fn>
</table-wrap-foot>
</table-wrap>
<p>Replacing GAT with GATv2 at fixed depth (two layers) increases mean ROC-AUC from 0.918 to 0.951 (<inline-formula id="ieqn-136"><mml:math id="mml-ieqn-136"><mml:mo>+</mml:mo></mml:math></inline-formula>3.3%), confirming that dynamic attention provides a meaningful improvement on this graph type. Increasing depth from two to three layers with GAT yields a smaller gain (<inline-formula id="ieqn-137"><mml:math id="mml-ieqn-137"><mml:mo>+</mml:mo></mml:math></inline-formula>1.3%), while the same depth increase with GATv2 adds a further <inline-formula id="ieqn-138"><mml:math id="mml-ieqn-138"><mml:mo>+</mml:mo></mml:math></inline-formula>1.1%. The improvements are complementary: dynamic attention captures richer edge semantics, while additional depth enables more complex neighbourhood reasoning.</p>
</sec>
<sec id="s5_3">
<label>5.3</label>
<title>Analysis by Attack Category</title>
<p><bold>Bad Data Injection.</bold> BDI attacks are the category where the GATv2 improvement is most dramatic. On BDI-P-Osc, all three classical baselines (IF, LOF, OC-SVM) and MLP-AE achieve ROC-AUC <inline-formula id="ieqn-139"><mml:math id="mml-ieqn-139"><mml:mo>&#x2264;</mml:mo><mml:mn>0.953</mml:mn></mml:math></inline-formula>, while GATv2 reaches 0.997 (<inline-formula id="ieqn-140"><mml:math id="mml-ieqn-140"><mml:mo>+</mml:mo></mml:math></inline-formula>4.4% over OC-SVM). On BDI-Q-Osc, IF, LOF, and OC-SVM all plateau at 0.800 (the trivial majority-class rate), confirming that these scenarios are not separable in flat feature space. GATv2 achieves 0.952 here, a gain of 15.2% over the best classical baseline.</p>
<p>The explanation relates to the graph structure: BDI attacks modify power setpoints, inducing correlated deviations across active power, phase currents, and voltages. No individual variable shows a strong univariate anomaly; the signature is a <italic>joint structural deviation</italic> distributed across correlated nodes in the kNN graph. Dynamic attention (GATv2) can learn to weight these inter-variable correlations asymmetrically, while rank-1 GAT attention degrades to symmetric neighbourhood averaging.</p>
<p><bold>False Data Injection.</bold> On FDI-P, GATv2 achieves ROC-AUC &#x003D; 0.862 compared to 0.756 for LOF and 0.730 for IF&#x2014;a <inline-formula id="ieqn-141"><mml:math id="mml-ieqn-141"><mml:mo>+</mml:mo></mml:math></inline-formula>13.2% gain over the best baseline. This scenario involves subtle active power manipulation within the normal operating range; the improvement suggests that GATv2 can identify anomalous deviations in the local graph neighbourhood that are invisible as univariate outliers.</p>
<p><bold>Firmware Modification.</bold> Both firmware scenarios exhibit near-trivial anomaly detection: LOF, OC-SVM, and GATv2 all reach ROC-AUC &#x003D; 1.000. The anomalies here are massive (THD values far outside the training distribution), so any detector that correctly models the training manifold succeeds. IF degrades to 0.909 due to its sensitivity to the specific axis of anomaly.</p>
<p><bold>MLP-AE as a graph structure control.</bold> The MLP-AE baseline, absent in the original paper, provides a crucial control: it shows that a deep flat autoencoder underperforms all graph-based methods on BDI scenarios (mean ROC-AUC &#x003D; 0.736 vs. 0.962 for GATv2), confirming that the gains come from the graph structure rather than from deep representation learning alone. On firmware scenarios, MLP-AE performs strongly (0.995&#x2013;0.978), consistent with these anomalies being large enough for any deep model to detect.</p>
</sec>
</sec>
<sec id="s6">
<label>6</label>
<title>Discussion</title>
<sec id="s6_1">
<label>6.1</label>
<title>Why Dynamic Attention Matters for kNN Graphs</title>
<p>The theoretical argument for GATv2 is particularly compelling in the feature-space kNN graph setting. In a kNN graph, the edge between samples <inline-formula id="ieqn-142"><mml:math id="mml-ieqn-142"><mml:mi>i</mml:mi></mml:math></inline-formula> and <inline-formula id="ieqn-143"><mml:math id="mml-ieqn-143"><mml:mi>j</mml:mi></mml:math></inline-formula> exists because they are close in feature space&#x2014;but &#x201C;close&#x201D; can mean different things for different pairs. Two samples may be similar because they share the same SoC trajectory, because they share the same power setpoint pattern, or because both have the same phase voltage profile. Static, rank-1 GAT attention averages these relationships with the same learned weight, regardless of which the physical variable drives the similarity. GATv2&#x2019;s asymmetric projections <inline-formula id="ieqn-144"><mml:math id="mml-ieqn-144"><mml:msub><mml:mrow><mml:mtext mathvariant="bold">W</mml:mtext></mml:mrow><mml:mi>l</mml:mi></mml:msub></mml:math></inline-formula> and <inline-formula id="ieqn-145"><mml:math id="mml-ieqn-145"><mml:msub><mml:mrow><mml:mtext mathvariant="bold">W</mml:mtext></mml:mrow><mml:mi>r</mml:mi></mml:msub></mml:math></inline-formula> allow the model to weigh the source and target node features differently, learning context-specific edge semantics that are simply unavailable to GAT.</p>
</sec>
<sec id="s6_2">
<label>6.2</label>
<title>Limitations of This Work</title>
<p>The improvement on Mean-F<sub>1</sub> is marginal (<inline-formula id="ieqn-146"><mml:math id="mml-ieqn-146"><mml:mo>&#x2212;</mml:mo></mml:math></inline-formula>0.1%) relative to the original paper. This is expected: Mean-F<sub>1</sub> depends on the threshold selection strategy, and the original paper uses a different (grid-sweep) strategy from ours. The ROC-AUC, which is threshold-independent, shows a consistent <inline-formula id="ieqn-147"><mml:math id="mml-ieqn-147"><mml:mo>+</mml:mo></mml:math></inline-formula>1.5% improvement and is the primary comparison metric.</p>
<p>The evaluation relies entirely on simulation-derived data. Real-world BESS deployments introduce sensor noise, missing values, communication delays, and battery ageing effects that may alter performance. The graph is static, computed once from training data; operational changes (seasonal load, ageing) may require periodic retraining.</p>
</sec>
<sec id="s6_3">
<label>6.3</label>
<title>Implications for the Enhanced GNN-AE</title>
<p>The ablation results confirm that the original Enhanced GNN-AE can be improved by a targeted encoder swap: replacing the GAT attention with GATv2 costs approximately the same number of parameters and compute (two separate linear layers instead of one shared layer per head) while yielding a consistent 3%&#x2013;5% ROC-AUC improvement across the board. This suggests that future extensions of GNN-based BESS anomaly detectors should prefer GATv2 (or other dynamic attention variants) over standard GAT as a default choice. The finding aligns with the general conclusion of [<xref ref-type="bibr" rid="ref-10">10</xref>]: on irregular, heterogeneous graphs&#x2014;which include data-driven feature-space graphs&#x2014;static attention systematically underperforms dynamic attention.</p>
</sec>
<sec id="s6_4">
<label>6.4</label>
<title>Deployment Practicality</title>
<p><bold>Training infrastructure and model footprint.</bold> All experiments were conducted on Google Colab using a freely available NVIDIA T4 GPU, without dedicated hardware. The full offline pipeline&#x2014;kNN graph construction (21 s) and GATv2 training with early stopping (24 s, 108 epochs, total <inline-formula id="ieqn-148"><mml:math id="mml-ieqn-148"><mml:mo>&#x003C;</mml:mo></mml:math></inline-formula> 1 min)&#x2014;is lightweight enough to run at commissioning time or to be repeated periodically (e.g., monthly) to adapt to battery ageing, on any cloud GPU instance. The resulting model totals approximately 69,000 trainable parameters with a weight file well under 1 MB, making it straightforward to store and transfer.</p>
<p><bold>Offline training, online scoring.</bold> Once trained, the model operates in a fully online fashion: each new measurement sample <inline-formula id="ieqn-149"><mml:math id="mml-ieqn-149"><mml:msub><mml:mi>x</mml:mi><mml:mi>t</mml:mi></mml:msub></mml:math></inline-formula> is z-score normalised using the training scaler, augmented with topological features, and scored via a single encoder forward pass, followed by the six ensemble metric computations, all without rebuilding the graph. Per-sample inference completes in well under one second (<xref ref-type="table" rid="table-4">Table 4</xref>), which is sufficient for real-time operation at the 1-s measurement sampling rate of BESS-Set. Since the monitoring system classifies each sample as it arrives at 1 Hz, the absolute inference latency is not a binding performance constraint: any sub-second scoring pipeline is functionally equivalent from the application perspective.</p>

<p><bold>Unsupervised operation.</bold> The model trains exclusively on normal-operation data and requires no attack labels, which is a critical advantage in operational BESS settings where labelled incident data are scarce or unavailable. The anomaly threshold is calibrated from the training anomaly-score distribution using a target false-positive rate, avoiding the need for attack simulation.</p>
</sec>
</sec>
<sec id="s7">
<label>7</label>
<title>Conclusions</title>
<p>We extended the Enhanced GNN Autoencoder of Greco and Gaggero [<xref ref-type="bibr" rid="ref-7">7</xref>] with two targeted modifications: (i) replacing the original GAT encoder with the strictly more expressive GATv2 formulation, which uses asymmetric learnable projections <inline-formula id="ieqn-150"><mml:math id="mml-ieqn-150"><mml:msub><mml:mrow><mml:mtext mathvariant="bold">W</mml:mtext></mml:mrow><mml:mi>l</mml:mi></mml:msub><mml:mo>&#x2260;</mml:mo><mml:msub><mml:mrow><mml:mtext mathvariant="bold">W</mml:mtext></mml:mrow><mml:mi>r</mml:mi></mml:msub></mml:math></inline-formula> to compute dynamic, non-rank-1 attention scores; and (ii) increasing encoder depth from two to three layers with dimensions <inline-formula id="ieqn-151"><mml:math id="mml-ieqn-151"><mml:mo stretchy="false">[</mml:mo><mml:mn>128</mml:mn><mml:mo stretchy="false">&#x2192;</mml:mo><mml:mn>64</mml:mn><mml:mo stretchy="false">&#x2192;</mml:mo><mml:mn>32</mml:mn><mml:mo stretchy="false">]</mml:mo></mml:math></inline-formula>. All other components&#x2014;multiscale kNN graph, topological feature augmentation, manifold regularisation, and six-metric ensemble scoring&#x2014;are inherited unchanged.</p>
<p>Evaluation of the BESS-Set benchmark across seven cyberattacks scenarios demonstrates that the GATv2-based encoder achieves a mean ROC-AUC of 0.962 (<inline-formula id="ieqn-152"><mml:math id="mml-ieqn-152"><mml:mo>+</mml:mo></mml:math></inline-formula>1.5% over the original GNN), with the largest gains on Bad Data Injection scenarios, where the an attack signature is distributed across correlated graph nodes and invisible to flat detectors. The addition of an MLP autoencoder baseline confirms that the performance advantage is attributable to the graph structure, not simply to the deep feature learning.</p>
<p>An ablation study isolates GATv2&#x2019;s contribution at <inline-formula id="ieqn-153"><mml:math id="mml-ieqn-153"><mml:mo>+</mml:mo></mml:math></inline-formula>3.3% mean ROC-AUC and the additional encoder layer at <inline-formula id="ieqn-154"><mml:math id="mml-ieqn-154"><mml:mo>+</mml:mo></mml:math></inline-formula>1.1%, confirming that both modifications are independently beneficial and complementary. These findings support the broader conclusion that dynamic attention should be preferred over static GAT for feature-space kNN graphs in anomaly detection tasks.</p>
<p>Future work will investigate adaptive graph construction methods that updates the kNN graph as the BESS operating point evolves, physics-informed edge features encoding power flow constraints, and online incremental training for long-term deployment in ageing battery systems.</p>
</sec>
</body>
<back>
<ack>
<p>The author thanks the maintainers of the publicly available BESS cybersecurity dataset.</p>
</ack>
<sec>
<title>Funding Statement</title>
<p>The author received no specific funding for this study.</p>
</sec>
<sec sec-type="data-availability">
<title>Availability of Data and Materials</title>
<p>The BESS-Set dataset is openly available at IEEE DataPort, DOI: 10.21227/13qz-e261. Implementation code is available from the Corresponding Author upon reasonable request.</p>
</sec>
<sec>
<title>Ethics Approval</title>
<p>Not applicable.</p>
</sec>
<sec sec-type="COI-statement">
<title>Conflicts of Interest</title>
<p>The authors declare no conflicts of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript; or in the decision to publish the results.</p>
</sec>
<glossary content-type="abbreviations" id="glossary-1">
<title>Abbreviations:</title>
<def-list>
<def-item>
<term>AD</term>
<def>
<p>Anomaly Detection</p>
</def>
</def-item>
<def-item>
<term>BDI</term>
<def>
<p>Bad Data Injection</p>
</def>
</def-item>
<def-item>
<term>BESS</term>
<def>
<p>Battery Energy Storage System</p>
</def>
</def-item>
<def-item>
<term>BMS</term>
<def>
<p>Battery Management System</p>
</def>
</def-item>
<def-item>
<term>DER</term>
<def>
<p>Distributed Energy Resource</p>
</def>
</def-item>
<def-item>
<term>FDI</term>
<def>
<p>False Data Injection</p>
</def>
</def-item>
<def-item>
<term>FW</term>
<def>
<p>Firmware</p>
</def>
</def-item>
<def-item>
<term>GAT</term>
<def>
<p>Graph Attention Network</p>
</def>
</def-item>
<def-item>
<term>GATv2</term>
<def>
<p>Graph Attention Network version 2</p>
</def>
</def-item>
<def-item>
<term>GCN</term>
<def>
<p>Graph Convolutional Network</p>
</def>
</def-item>
<def-item>
<term>GNN</term>
<def>
<p>Graph Neural Network</p>
</def>
</def-item>
<def-item>
<term>IF</term>
<def>
<p>Isolation Forest</p>
</def>
</def-item>
<def-item>
<term>kNN</term>
<def>
<p><inline-formula id="ieqn-155"><mml:math id="mml-ieqn-155"><mml:mi>k</mml:mi></mml:math></inline-formula>-Nearest Neighbours</p>
</def>
</def-item>
<def-item>
<term>LOF</term>
<def>
<p>Local Outlier Factor</p>
</def>
</def-item>
<def-item>
<term>MLP-AE</term>
<def>
<p>Multilayer Perceptron Autoencoder</p>
</def>
</def-item>
<def-item>
<term>OC-SVM</term>
<def>
<p>One-Class Support Vector Machine</p>
</def>
</def-item>
<def-item>
<term>PR</term>
<def>
<p>Precision-Recall</p>
</def>
</def-item>
<def-item>
<term>ROC</term>
<def>
<p>Receiver Operating Characteristic</p>
</def>
</def-item>
<def-item>
<term>SCADA</term>
<def>
<p>Supervisory Control and Data Acquisition</p>
</def>
</def-item>
<def-item>
<term>SoC</term>
<def>
<p>State of Charge</p>
</def>
</def-item>
<def-item>
<term>THD</term>
<def>
<p>Total Harmonic Distortion</p>
</def>
</def-item>
</def-list>
</glossary>
<ref-list content-type="authoryear">
<title>References</title>
<ref id="ref-1"><label>[1]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Chen</surname> <given-names>J</given-names></string-name>, <string-name><surname>Yan</surname> <given-names>J</given-names></string-name>, <string-name><surname>Kemmeugne</surname> <given-names>A</given-names></string-name>, <string-name><surname>Kassouf</surname> <given-names>M</given-names></string-name>, <string-name><surname>Debbabi</surname> <given-names>M</given-names></string-name></person-group>. <article-title>Cybersecurity of distributed energy resource systems in the smart grid: a survey</article-title>. <source>Appl Energy</source>. <year>2025</year>;<volume>383</volume>(<issue>3</issue>):<fpage>125364</fpage>. doi:<pub-id pub-id-type="doi">10.1016/j.apenergy.2025.125364</pub-id>.</mixed-citation></ref>
<ref id="ref-2"><label>[2]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Lin</surname> <given-names>X</given-names></string-name>, <string-name><surname>Zhang</surname> <given-names>Y</given-names></string-name>, <string-name><surname>Wang</surname> <given-names>Z</given-names></string-name>, <string-name><surname>Liu</surname> <given-names>D</given-names></string-name>, <string-name><surname>Liu</surname> <given-names>Y</given-names></string-name></person-group>. <article-title>False data injection attack in smart grid: a review</article-title>. <source>Front Energy Res</source>. <year>2023</year>;<volume>10</volume>:<fpage>1104989</fpage>. doi:<pub-id pub-id-type="doi">10.3389/fenrg.2022.1104989</pub-id>.</mixed-citation></ref>
<ref id="ref-3"><label>[3]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Gaggero</surname> <given-names>GB</given-names></string-name>, <string-name><surname>Caviglia</surname> <given-names>R</given-names></string-name>, <string-name><surname>Armellin</surname> <given-names>A</given-names></string-name>, <string-name><surname>Rossi</surname> <given-names>M</given-names></string-name>, <string-name><surname>Girdinio</surname> <given-names>P</given-names></string-name>, <string-name><surname>Marchese</surname> <given-names>M</given-names></string-name></person-group>. <article-title>Detecting cyberattacks on electrical storage systems through neural network-based anomaly detection algorithm</article-title>. <source>Sensors</source>. <year>2022</year>;<volume>22</volume>(<issue>10</issue>):<fpage>3933</fpage>. doi:<pub-id pub-id-type="doi">10.3390/s22103933</pub-id>.</mixed-citation></ref>
<ref id="ref-4"><label>[4]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Pimentel</surname> <given-names>MA</given-names></string-name>, <string-name><surname>Clifton</surname> <given-names>DA</given-names></string-name>, <string-name><surname>Clifton</surname> <given-names>L</given-names></string-name>, <string-name><surname>Tarassenko</surname> <given-names>L</given-names></string-name></person-group>. <article-title>A review of novelty detection</article-title>. <source>Signal Process</source>. <year>2014</year>;<volume>99</volume>(<issue>4</issue>):<fpage>215</fpage>&#x2013;<lpage>49</lpage>. doi:<pub-id pub-id-type="doi">10.1016/j.sigpro.2013.12.026</pub-id>.</mixed-citation></ref>
<ref id="ref-5"><label>[5]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Pang</surname> <given-names>G</given-names></string-name>, <string-name><surname>Shen</surname> <given-names>C</given-names></string-name>, <string-name><surname>Cao</surname> <given-names>L</given-names></string-name>, <string-name><surname>Den Hengel</surname> <given-names>AV</given-names></string-name></person-group>. <article-title>Deep learning for anomaly detection: a review</article-title>. <source>ACM Comput Surv</source>. <year>2021</year>;<volume>54</volume>(<issue>2</issue>):<fpage>1</fpage>&#x2013;<lpage>38</lpage>. doi:<pub-id pub-id-type="doi">10.1145/3439950</pub-id>.</mixed-citation></ref>
<ref id="ref-6"><label>[6]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Greco</surname> <given-names>D</given-names></string-name>, <string-name><surname>Gaggero</surname> <given-names>GB</given-names></string-name></person-group>. <article-title>Topology-aware graph-attentive one-class anomaly detection for physics-based cybersecurity monitoring in photovoltaic systems</article-title>. <source>Energy Inform</source>. <year>2026</year>;<volume>13</volume>(<issue>4</issue>):<fpage>23597</fpage>. doi:<pub-id pub-id-type="doi">10.1186/s42162-026-00661-6</pub-id>.</mixed-citation></ref>
<ref id="ref-7"><label>[7]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Greco</surname> <given-names>D</given-names></string-name>, <string-name><surname>Gaggero</surname> <given-names>GB</given-names></string-name></person-group>. <article-title>Enhancing cybersecurity monitoring in battery energy storage systems with graph neural networks</article-title>. <source>Energies</source>. <year>2026</year>;<volume>19</volume>(<issue>2</issue>):<fpage>479</fpage>. doi:<pub-id pub-id-type="doi">10.3390/en19020479</pub-id>.</mixed-citation></ref>
<ref id="ref-8"><label>[8]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Gaggero</surname> <given-names>GB</given-names></string-name>, <string-name><surname>Armellin</surname> <given-names>A</given-names></string-name>, <string-name><surname>Ferro</surname> <given-names>G</given-names></string-name>, <string-name><surname>Robba</surname> <given-names>M</given-names></string-name>, <string-name><surname>Girdinio</surname> <given-names>P</given-names></string-name>, <string-name><surname>Marchese</surname> <given-names>M</given-names></string-name></person-group>. <article-title>BESS-Set: a dataset for cybersecurity monitoring in a battery energy storage system</article-title>. <source>IEEE Open Access J Power Energy</source>. <year>2024</year>;<volume>11</volume>:<fpage>362</fpage>&#x2013;<lpage>72</lpage>. doi:<pub-id pub-id-type="doi">10.1109/OAJPE.2024.3439856</pub-id>.</mixed-citation></ref>
<ref id="ref-9"><label>[9]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><surname>Veli&#x010D;kovi&#x0107;</surname> <given-names>P</given-names></string-name>, <string-name><surname>Cucurull</surname> <given-names>G</given-names></string-name>, <string-name><surname>Casanova</surname> <given-names>A</given-names></string-name>, <string-name><surname>Romero</surname> <given-names>A</given-names></string-name>, <string-name><surname>Li&#x00F2;</surname> <given-names>P</given-names></string-name>, <string-name><surname>Bengio</surname> <given-names>Y</given-names></string-name></person-group>. <article-title>Graph attention networks</article-title>. In: <conf-name>Proceedings of the 6th International Conference on Learning Representations (ICLR); 2018 Apr 30&#x2013;May 3; Vancouver, BC, Canada</conf-name>.</mixed-citation></ref>
<ref id="ref-10"><label>[10]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><surname>Brody</surname> <given-names>S</given-names></string-name>, <string-name><surname>Alon</surname> <given-names>U</given-names></string-name>, <string-name><surname>Yahav</surname> <given-names>E</given-names></string-name></person-group>. <chapter-title>How attentive are graph attention networks?</chapter-title> In: <article-title>Proceedings of the 10th International Conference on Learning Representations (ICLR); 2022 Apr 25&#x2013;29; Virtual</article-title>.</mixed-citation></ref>
<ref id="ref-11"><label>[11]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Giraldo</surname> <given-names>J</given-names></string-name>, <string-name><surname>Urbina</surname> <given-names>D</given-names></string-name>, <string-name><surname>Cardenas</surname> <given-names>A</given-names></string-name>, <string-name><surname>Valente</surname> <given-names>J</given-names></string-name>, <string-name><surname>Faisal</surname> <given-names>M</given-names></string-name>, <string-name><surname>Ruths</surname> <given-names>J</given-names></string-name>, <etal>et al</etal></person-group>. <article-title>A survey of physics-based attack detection in cyber-physical systems</article-title>. <source>ACM Comput Surv</source>. <year>2018</year>;<volume>51</volume>(<issue>4</issue>):<fpage>1</fpage>&#x2013;<lpage>36</lpage>. doi:<pub-id pub-id-type="doi">10.1145/3203245</pub-id>; <pub-id pub-id-type="pmid">31092968</pub-id></mixed-citation></ref>
<ref id="ref-12"><label>[12]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Zideh</surname> <given-names>MJ</given-names></string-name>, <string-name><surname>Chatterjee</surname> <given-names>P</given-names></string-name>, <string-name><surname>Srivastava</surname> <given-names>AK</given-names></string-name></person-group>. <article-title>Physics-informed machine learning for anomaly detection: a review</article-title>. <source>IEEE Access</source>. <year>2023</year>;<volume>12</volume>:<fpage>4597</fpage>&#x2013;<lpage>617</lpage>. doi:<pub-id pub-id-type="doi">10.1109/ACCESS.2023.3340627</pub-id>.</mixed-citation></ref>
<ref id="ref-13"><label>[13]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Radoglou-Grammatikis</surname> <given-names>PI</given-names></string-name>, <string-name><surname>Sarigiannidis</surname> <given-names>PG</given-names></string-name></person-group>. <article-title>Securing the smart grid: a comprehensive compilation of intrusion detection and prevention systems</article-title>. <source>IEEE Access</source>. <year>2019</year>;<volume>7</volume>:<fpage>46595</fpage>&#x2013;<lpage>620</lpage>. doi:<pub-id pub-id-type="doi">10.1109/ACCESS.2019.2909807</pub-id>.</mixed-citation></ref>
<ref id="ref-14"><label>[14]</label><mixed-citation publication-type="book"><person-group person-group-type="author"><string-name><surname>Lin</surname> <given-names>C-Y</given-names></string-name>, <string-name><surname>Nadjm-Tehrani</surname> <given-names>S</given-names></string-name>, <string-name><surname>Asplund</surname> <given-names>M</given-names></string-name></person-group>. <chapter-title>Timing-based anomaly detection in SCADA networks</chapter-title>. In: <person-group person-group-type="editor"><string-name><surname>D&#x2019;Agostino</surname> <given-names>G</given-names></string-name>, <string-name><surname>Scala</surname> <given-names>A</given-names></string-name></person-group>, editors. <source>Critical information infrastructures security</source>. <publisher-loc>Cham, Switzerland</publisher-loc>: <publisher-name>Springer</publisher-name>; <year>2018</year>. p. <fpage>48</fpage>&#x2013;<lpage>59</lpage>.</mixed-citation></ref>
<ref id="ref-15"><label>[15]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><surname>Zhao</surname> <given-names>H</given-names></string-name>, <string-name><surname>Wang</surname> <given-names>Y</given-names></string-name>, <string-name><surname>Duan</surname> <given-names>J</given-names></string-name>, <string-name><surname>Huang</surname> <given-names>C</given-names></string-name>, <string-name><surname>Cao</surname> <given-names>D</given-names></string-name>, <string-name><surname>Tong</surname> <given-names>Y</given-names></string-name>, <etal>et al</etal></person-group>. <article-title>Multivariate time-series anomaly detection via graph attention network</article-title>. In: <conf-name>Proceedings of the 2020 IEEE International Conference on Data Mining (ICDM); 2020 Nov 17&#x2013;20; Sorrento, Italy</conf-name>. <publisher-loc>Piscataway, NJ, USA</publisher-loc>: <publisher-name>IEEE</publisher-name>; <year>2020</year>. p. <fpage>841</fpage>&#x2013;<lpage>50</lpage>.</mixed-citation></ref>
<ref id="ref-16"><label>[16]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Boyaci</surname> <given-names>O</given-names></string-name>, <string-name><surname>Narimani</surname> <given-names>MR</given-names></string-name>, <string-name><surname>Davis</surname> <given-names>K</given-names></string-name>, <string-name><surname>Ismail</surname> <given-names>M</given-names></string-name>, <string-name><surname>Overbye</surname> <given-names>TJ</given-names></string-name>, <string-name><surname>Serpedin</surname> <given-names>E</given-names></string-name></person-group>. <article-title>Joint detection and localization of stealth false data injection attacks in smart grids using graph neural networks</article-title>. <source>IEEE Trans Smart Grid</source>. <year>2021</year>;<volume>13</volume>(<issue>1</issue>):<fpage>76</fpage>&#x2013;<lpage>87</lpage>. doi:<pub-id pub-id-type="doi">10.1109/TSG.2021.3117977</pub-id>.</mixed-citation></ref>
<ref id="ref-17"><label>[17]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Zamanzadeh Darban</surname> <given-names>Z</given-names></string-name>, <string-name><surname>Webb</surname> <given-names>GI</given-names></string-name>, <string-name><surname>Pan</surname> <given-names>S</given-names></string-name>, <string-name><surname>Aggarwal</surname> <given-names>C</given-names></string-name>, <string-name><surname>Salehi</surname> <given-names>M</given-names></string-name></person-group>. <article-title>Deep learning for time-series anomaly detection: a survey</article-title>. <source>ACM Comput Surv</source>. <year>2024</year>;<volume>57</volume>(<issue>1</issue>):<fpage>1</fpage>&#x2013;<lpage>42</lpage>. doi:<pub-id pub-id-type="doi">10.1145/3691338</pub-id>.</mixed-citation></ref>
<ref id="ref-18"><label>[18]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Harrou</surname> <given-names>F</given-names></string-name>, <string-name><surname>Bouyeddou</surname> <given-names>B</given-names></string-name>, <string-name><surname>Dairi</surname> <given-names>A</given-names></string-name>, <string-name><surname>Sun</surname> <given-names>Y</given-names></string-name></person-group>. <article-title>Exploiting autoencoder-based anomaly detection to enhance cybersecurity in power grids</article-title>. <source>Future Internet</source>. <year>2024</year>;<volume>16</volume>(<issue>6</issue>):<fpage>184</fpage>. doi:<pub-id pub-id-type="doi">10.3390/fi16060184</pub-id>.</mixed-citation></ref>
<ref id="ref-19"><label>[19]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Sun</surname> <given-names>C</given-names></string-name>, <string-name><surname>He</surname> <given-names>Z</given-names></string-name>, <string-name><surname>Lin</surname> <given-names>H</given-names></string-name>, <string-name><surname>Cai</surname> <given-names>L</given-names></string-name>, <string-name><surname>Cai</surname> <given-names>H</given-names></string-name>, <string-name><surname>Gao</surname> <given-names>M</given-names></string-name></person-group>. <article-title>Anomaly detection of power battery packs using GRU-based variational autoencoders</article-title>. <source>Appl Soft Comput</source>. <year>2023</year>;<volume>132</volume>(<issue>3</issue>):<fpage>109903</fpage>. doi:<pub-id pub-id-type="doi">10.1016/j.asoc.2022.109903</pub-id>.</mixed-citation></ref>
<ref id="ref-20"><label>[20]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><surname>Liu</surname> <given-names>FT</given-names></string-name>, <string-name><surname>Ting</surname> <given-names>KM</given-names></string-name>, <string-name><surname>Zhou</surname> <given-names>Z-H</given-names></string-name></person-group>. <article-title>Isolation forest</article-title>. In: <conf-name>Proceedings of the IEEE International Conference on Data Mining (ICDM); 2008 Dec 15&#x2013;19; Pisa, Italy</conf-name>. <publisher-loc>Piscataway, NJ, USA</publisher-loc>: <publisher-name>IEEE</publisher-name>; <year>2008</year>. p. <fpage>413</fpage>&#x2013;<lpage>22</lpage>.</mixed-citation></ref>
<ref id="ref-21"><label>[21]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><surname>Breunig</surname> <given-names>MM</given-names></string-name>, <string-name><surname>Kriegel</surname> <given-names>H-P</given-names></string-name>, <string-name><surname>Ng</surname> <given-names>RT</given-names></string-name>, <string-name><surname>Sander</surname> <given-names>JLOF</given-names></string-name></person-group>. <article-title>Identifying density-based local outliers</article-title>. In: <conf-name>Proceedings of the ACM SIGMOD International Conference on Management of Data; 2000 May 15&#x2013;18; Dallas, TX, USA</conf-name>. <publisher-loc>New York, NY, USA</publisher-loc>: <publisher-name>ACM</publisher-name>; <year>2000</year>. p. <fpage>93</fpage>&#x2013;<lpage>104</lpage>. doi:<pub-id pub-id-type="doi">10.1145/342009.335388</pub-id>.</mixed-citation></ref>
<ref id="ref-22"><label>[22]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Sch&#x00F6;lkopf</surname> <given-names>B</given-names></string-name>, <string-name><surname>Platt</surname> <given-names>JC</given-names></string-name>, <string-name><surname>Shawe-Taylor</surname> <given-names>J</given-names></string-name>, <string-name><surname>Smola</surname> <given-names>AJ</given-names></string-name>, <string-name><surname>Williamson</surname> <given-names>RC</given-names></string-name></person-group>. <article-title>Estimating the support of a high-dimensional distribution</article-title>. <source>Neural Comput</source>. <year>2001</year>;<volume>13</volume>(<issue>7</issue>):<fpage>1443</fpage>&#x2013;<lpage>71</lpage>. doi:<pub-id pub-id-type="doi">10.1162/089976601750264965</pub-id>; <pub-id pub-id-type="pmid">11440593</pub-id></mixed-citation></ref>
<ref id="ref-23"><label>[23]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Gaggero</surname> <given-names>GB</given-names></string-name>, <string-name><surname>Girdinio</surname> <given-names>P</given-names></string-name>, <string-name><surname>Marchese</surname> <given-names>M</given-names></string-name></person-group>. <article-title>Artificial intelligence and physics-based anomaly detection in the smart grid: a survey</article-title>. <source>IEEE Access</source>. <year>2025</year>;<volume>13</volume>:<fpage>23597</fpage>&#x2013;<lpage>606</lpage>. doi:<pub-id pub-id-type="doi">10.1109/ACCESS.2025.3537410</pub-id>.</mixed-citation></ref>
<ref id="ref-24"><label>[24]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Fawcett</surname> <given-names>T</given-names></string-name></person-group>. <article-title>An introduction to ROC analysis</article-title>. <source>Pattern Recognit Lett</source>. <year>2006</year>;<volume>27</volume>(<issue>8</issue>):<fpage>861</fpage>&#x2013;<lpage>74</lpage>. doi:<pub-id pub-id-type="doi">10.1016/j.patrec.2005.10.010</pub-id>.</mixed-citation></ref>
<ref id="ref-25"><label>[25]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><surname>Davis</surname> <given-names>J</given-names></string-name>, <string-name><surname>Goadrich</surname> <given-names>M</given-names></string-name></person-group>. <article-title>The relationship between precision-recall and ROC curves</article-title>. In: <conf-name>Proceedings of the 23rd International Conference on Machine Learning (ICML); 2006 Jun 25&#x2013;29; Pittsburgh, PA, USA</conf-name>. <publisher-loc>New York, NY, USA</publisher-loc>: <publisher-name>ACM</publisher-name>; <year>2006</year>. p. <fpage>233</fpage>&#x2013;<lpage>40</lpage>. doi:<pub-id pub-id-type="doi">10.1145/1143844.1143874</pub-id>.</mixed-citation></ref>
</ref-list>
</back></article>