<?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">77521</article-id>
<article-id pub-id-type="doi">10.32604/cmc.2026.077521</article-id>
<article-categories>
<subj-group subj-group-type="heading">
<subject>Article</subject>
</subj-group>
</article-categories>
<title-group>
<article-title>Prototype Memory and Contrastive Learning Based Unsupervised Anomaly Detection for Time Series</article-title>
<alt-title alt-title-type="left-running-head">Prototype Memory and Contrastive Learning Based Unsupervised Anomaly Detection for Time Series</alt-title>
<alt-title alt-title-type="right-running-head">Prototype Memory and Contrastive Learning Based Unsupervised Anomaly Detection for Time Series</alt-title>
</title-group>
<contrib-group>
<contrib id="author-1" contrib-type="author">
<name name-style="western"><surname>Li</surname><given-names>Xi</given-names></name><xref ref-type="aff" rid="aff-1">1</xref></contrib>
<contrib id="author-2" contrib-type="author">
<name name-style="western"><surname>Chang</surname><given-names>Yingjie</given-names></name><xref ref-type="aff" rid="aff-1">1</xref></contrib>
<contrib id="author-3" contrib-type="author" corresp="yes">
<name name-style="western"><surname>Chen</surname><given-names>Peng</given-names></name><xref ref-type="aff" rid="aff-1">1</xref><xref rid="cor1" ref-type="corresp">&#x002A;</xref><email>chenpeng@mail.xhu.edu.cn</email></contrib>
<contrib id="author-4" contrib-type="author">
<name name-style="western"><surname>Bian</surname><given-names>Ang</given-names></name><xref ref-type="aff" rid="aff-1">1</xref></contrib>
<contrib id="author-5" contrib-type="author" corresp="yes">
<name name-style="western"><surname>Lu</surname><given-names>Ning</given-names></name><xref ref-type="aff" rid="aff-1">1</xref><xref ref-type="aff" rid="aff-2">2</xref><xref rid="cor1" ref-type="corresp">&#x002A;</xref><email>luning@mail.xhu.edu.cn</email></contrib>
<aff id="aff-1"><label>1</label><institution>School of Computer and Software Engineering, Xihua University</institution>, <addr-line>Chengdu</addr-line>, <country>China</country></aff>
<aff id="aff-2"><label>2</label><institution>School of Art and Design, Xihua University</institution>, <addr-line>Chengdu</addr-line>, <country>China</country></aff>
</contrib-group>
<author-notes>
<corresp id="cor1"><label>&#x002A;</label>Corresponding Authors: Peng Chen. Email: <email>chenpeng@mail.xhu.edu.cn</email>; Ning Lu. Email: <email>luning@mail.xhu.edu.cn</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>8</day><month>5</month><year>2026</year>
</pub-date>
<volume>88</volume>
<issue>1</issue>
<elocation-id>37</elocation-id>
<history>
<date date-type="received">
<day>11</day>
<month>12</month>
<year>2025</year>
</date>
<date date-type="accepted">
<day>11</day>
<month>03</month>
<year>2026</year>
</date>
</history>
<permissions>
<copyright-statement>&#x00A9; 2026 The Authors. Published by Tech Science Press.</copyright-statement>
<copyright-year>2026</copyright-year>
<copyright-holder>The Authors</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_77521.pdf"></self-uri>
<abstract>
<p>Multivariate time series anomaly detection (MTSAD) is a critical task for real-time risk control and fault diagnosis in industrial monitoring, aerospace, and financial domains. Unsupervised MTSAD confronts three core challenges: label scarcity in practical scenarios, diverse anomaly patterns that demand adaptive modeling, and weak feature discriminability between normal and anomalous samples. To address these challenges, we propose a Prototype Memory and Contrastive Learning Based Unsupervised Anomaly Detection for Multivariate Time Series method named PC-UAD. PC-UAD comprises three core modules with hierarchical functionalities: (1) A Temporal PatchEmbedder, which adopts learnable positional encoding for dynamic temporal representation and incorporates channel projection to model adaptive cross-sensor dependencies in multivariate data; (2) A Prototype Memory Encoder, which embeds a prototype attention mechanism to explicitly memorize typical normal patterns, forming a &#x201C;normal pattern dictionary&#x201D; that enhances the model&#x2019;s perception of normal behavioral boundaries; (3) A ContrastFusion module, which leverages contrastive learning to amplify feature distribution discrepancies between normal and anomalous data, strengthening the model&#x2019;s ability to distinguish subtle anomalies. Experiments on five public multivariate time series datasets demonstrate that our method achieves superior detection accuracy compared to eight state-of-the-art approaches, with the average F1-score and ROC-AUC both ranking first.</p>
</abstract>
<kwd-group kwd-group-type="author">
<kwd>Multivariate time series</kwd>
<kwd>unsupervised anomaly detection</kwd>
<kwd>prototype memory</kwd>
<kwd>contrastive learning</kwd>
<kwd>transformer</kwd>
</kwd-group>
<funding-group>
<award-group id="awg1">
<funding-source>National Natural Science Foundation of China</funding-source>
<award-id>62376043</award-id>
</award-group>
<award-group id="awg2">
<funding-source>Sichuan Provincial Natural Science Foundation</funding-source>
<award-id>2024NSFTD0008</award-id>
</award-group>
<award-group id="awg3">
<funding-source>Science and Technology Program of Sichuan Province</funding-source>
<award-id>2024ZHCG0016</award-id>
</award-group>
<award-group id="awg4">
<funding-source>Science and Technology Program of Chengdu</funding-source>
<award-id>2025-GH02-00020-HZ</award-id>
</award-group>
<award-group id="awg5">
<funding-source>Science and Technology Program of Quzhou</funding-source>
<award-id>2024K008</award-id>
</award-group>
<award-group id="awg6">
<funding-source>Open Project Program of the State Key Laboratory of CAD and CG</funding-source>
<award-id>A2509</award-id>
</award-group>
<award-group id="awg7">
<funding-source>Zhejiang University</funding-source>
</award-group>
</funding-group>
</article-meta>
</front>
<body>
<sec id="s1">
<label>1</label>
<title>Introduction</title>
<p>Multivariate time series data, characterized by its temporal continuity and sequential dependence, permeates nearly every corner of modern society&#x2014;from industrial sensor readings monitoring manufacturing equipment health, to financial transaction records tracking market fluctuations, and healthcare vital signs reflecting patient physiological states. Anomalies in such data, often manifesting as unexpected deviations from normal patterns, frequently signal critical events: a sudden spike in a turbine&#x2019;s vibration amplitude may precede mechanical failure, an abnormal sequence of financial transactions could indicate fraudulent activity, and erratic changes in a patient&#x2019;s heart rate might warn of life-threatening conditions. Consequently, multivariate time series anomaly detection (MTSAD), the task of identifying these rare yet high-impact deviations automatically, has become an indispensable cornerstone in fields requiring real-time risk control, fault diagnosis, and situational awareness.</p>
<p>Despite decades of research, unsupervised MTSAD remains a formidable challenge, primarily due to three inherent characteristics of real-world scenarios. First, label scarcity plagues most practical applications: anomalies are inherently rare, and manually annotating them requires domain expertise and enormous labor costs, making supervised learning paradigms impractical. Second, diversity of anomaly patterns complicates detection&#x2014;anomalies may present as instantaneous spikes, gradual drifts, cross-period deviations, or low-amplitude mutations, each demanding different temporal modeling capabilities. Third, complex data properties, such as non-stationarity, high dimensionality and noise interference, further obscure the boundary between normal and anomalous behaviors, placing strict demands on the robustness and generalization of detection models.</p>
<p>To address these challenges, researchers have proposed a spectrum of unsupervised and self-supervised methods, yet existing approaches still suffer from notable limitations that hinder their performance in complex real-world scenarios. Reconstruction-based methods (e.g., AutoEncoders, GANs) rely on the &#x201C;reconstruction assumption&#x201D;&#x2014;that models trained on normal data will fail to reconstruct anomalies&#x2014;but this assumption often collapses in high-capacity models, which may overgeneralize and reconstruct anomalies effectively. Prediction-based methods (e.g., LSTM, TCN) use future prediction errors as anomaly indicators, but their ability to capture long-range or slow-evolving anomalies is constrained by fixed window sizes and limited temporal dependency modeling. Transformer-based methods, while excelling at global context modeling, suffer from high computational complexity and lack explicit memory mechanisms for &#x201C;normal pattern prototypes,&#x201D; limiting their performance in sample-scarce industrial scenarios. Memory-augmented methods introduce external memory to memorize normal patterns, but they often lack active mechanisms to enhance the discriminability between normal and anomalous features, leading to suboptimal detection accuracy for subtle anomalies. Recent advances, such as diffusion models with self-conditioning guidance [<xref ref-type="bibr" rid="ref-1">1</xref>], adaptive bottleneck-based frameworks with dual adversarial decoders [<xref ref-type="bibr" rid="ref-2">2</xref>], and reconstruction trend-focused Transformer networks [<xref ref-type="bibr" rid="ref-3">3</xref>], have explored novel paradigms for representation learning and anomaly separation.</p>
<p>Contrastive learning has emerged as a powerful self-supervised framework for time series analysis, enhancing feature discriminability between normal and anomalous data by optimizing pairwise sample similarity. However, its reliance on pairwise comparisons without anchoring to stable &#x201C;normal patterns&#x201D; leaves it vulnerable to noise and subtle anomalies. In contrast, memory-augmented methods inherently leverage &#x201C;pattern memory&#x201D; to establish a stable reference for normal patterns, thereby effectively mitigating overgeneralization. Yet, these approaches typically lack explicit mechanisms to widen the discriminative margin between normal and anomalous samples in the feature space. The necessity of combining these two paradigms is thus compelling: pattern memory anchors the model&#x2019;s understanding of normal behavior, while contrastive learning strengthens anomaly discriminability.</p>
<p>To bridge these gaps, this paper proposes PC-UAD, a novel Transformer-based framework that integrates learnable prototype memory and contrastive fusion to address the core challenges of MTSAD. The key innovations and contributions of this work are summarized as follows:
<list list-type="simple">
<list-item><label>(1)</label><p>Enhanced Temporal Feature Extraction: A Temporal PatchEmbedder replaces fixed sinusoidal positional encoding with learnable positional encodings and adds a channel projection layer, enabling adaptive position representation learning and explicit modeling of cross-sensor dependencies in multivariate time series.</p></list-item>
<list-item><label>(2)</label><p>Explicit Normal Pattern Memorization: A Prototype Memory Encoder embeds learnable prototype matrices into the Transformer&#x2019;s multi-head attention, forming a &#x201C;normal pattern dictionary&#x201D; that fuses local patch features with global typical patterns, ensuring normal samples cluster tightly around prototypes while anomalies remain distinguishable.</p></list-item>
<list-item><label>(3)</label><p>Active Feature Discrimination: A ContrastFusion module generates negative samples via Gaussian noise injection and adopts asymmetric contrastive loss and denoising loss to actively expand feature distribution distances between normal and anomalous data, polarizing latent-space representations.</p></list-item>
<list-item><label>(4)</label><p>Comprehensive Validation: PC-UAD is evaluated on five real-world multivariate time series benchmark datasets covering aerospace, space station, internet service, water treatment, and micro-service scenarios. Experimental results confirm its superiority over state-of-the-art baselines in F1-score and ROC-AUC, verifying robustness across diverse anomaly patterns and data types.</p></list-item>
</list></p>
<p>In response to the three core challenges of unsupervised MTSAD outlined earlier: Label scarcity is addressed by the Prototype Memory Encoder, which memorizes typical normal patterns from unlabeled data to form a &#x201C;normal pattern dictionary&#x201D; and eliminates reliance on annotated anomalies; diverse anomaly patterns are tackled by the Temporal PatchEmbedder, whose learnable positional encodings and multi-scale patch modeling adaptively capture dynamic temporal dependencies and cross-sensor correlations; weak feature discriminability is resolved by the ContrastFusion Module, which leverages asymmetric contrastive loss to expand feature distribution gaps between normal and anomalous samples, enhancing the model&#x2019;s ability to distinguish subtle anomalies.</p>
<p>The remainder of this paper is structured as follows: <xref ref-type="sec" rid="s2">Section 2</xref> reviews related work on time series anomaly detection. <xref ref-type="sec" rid="s3">Section 3</xref> details the architectural design and mathematical formulation of PC-UAD. <xref ref-type="sec" rid="s4">Section 4</xref> presents comprehensive experiments, including performance comparisons, ablation studies, and sensitivity analyses. <xref ref-type="sec" rid="s5">Section 5</xref> concludes the paper and discusses future directions.</p>
</sec>
<sec id="s2">
<label>2</label>
<title>Related Work</title>
<p>In the past five years, unsupervised and self-supervised MTSAD methods have developed rapidly, with innovations focusing on model architecture optimization, representation learning enhancement, and multi-mechanism fusion.</p>
<sec id="s2_1">
<label>2.1</label>
<title>Reconstruction-Based Methods</title>
<p>Reconstruction-based methods are traditional and mainstream unsupervised MTSAD paradigms, whose core assumption is that models trained on normal data can accurately reconstruct normal samples but fail to reconstruct anomalous samples, with anomaly scores determined by reconstruction errors. In recent years, researchers have optimized this framework to address the overgeneralization problem of high-capacity models and the asynchronous correlation modeling of multivariate time series.</p>
<p>Dai and wang [<xref ref-type="bibr" rid="ref-4">4</xref>] proposed a hash memory network-enhanced autoencoder, which stores normal pattern features in hash-coded memory units and constrains the decoder to retrieve memory for reconstruction, reducing the model&#x2019;s ability to reconstruct anomalies. For microservice fault diagnosis scenarios, Li et al. proposed a parallel convolutional anomaly multi-classification model based on reconstruction principles, which achieves effective anomaly localization while ensuring detection accuracy [<xref ref-type="bibr" rid="ref-5">5</xref>].</p>
<p>However, reconstruction-based methods still face inherent bottlenecks: high-capacity models can still reconstruct subtle anomalies, leading to reduced detection accuracy; meanwhile, their ability to model long-range and multi-periodic temporal dependencies is limited by network depth and receptive field.</p>
</sec>
<sec id="s2_2">
<label>2.2</label>
<title>Transformer-Based Methods</title>
<p>The Transformer architecture has become a research hotspot in MTSAD due to its strong global temporal dependency modeling capability, especially for long-sequence and multivariate time series. In recent years, related work has focused on optimizing attention mechanisms and reducing computational complexity.</p>
<p>Anomaly Transformer [<xref ref-type="bibr" rid="ref-6">6</xref>] pioneered an association discrepancy-based anomaly attention mechanism, quantifying anomaly degrees by measuring attention weight inconsistency across positions and achieving state-of-the-art performance on MSL and PSM datasets. TranAD [<xref ref-type="bibr" rid="ref-7">7</xref>] proposed a two-stage self-conditioning inference framework for MTSAD: the first stage generates preliminary reconstructions and computes focus scores, while the second stage amplifies signals in high-error regions, and integrates adversarial training to enhance generalization under limited data. TimesNet [<xref ref-type="bibr" rid="ref-8">8</xref>] modeled time-series two-dimensional variations via temporal 2D convolution, providing an efficient feature extraction scheme for Transformer-based anomaly detection models.</p>
<p>Despite their advantages, Transformer-based methods have two critical limitations: vanilla self-attention incurs O(T<sup>2</sup>) computational complexity, making edge deployment infeasible; and the lack of explicit normal-pattern memory modules limits performance in sample-scarce industrial scenarios.</p>
</sec>
<sec id="s2_3">
<label>2.3</label>
<title>Memory-Augmented Methods</title>
<p>To address the overgeneralization problem of reconstruction and Transformer models, memory-augmented methods use external memory units or learnable prototypes to explicitly memorize normal patterns, forming a &#x201C;normal pattern dictionary&#x201D; to enhance anomaly discriminability.</p>
<p>Li et al. [<xref ref-type="bibr" rid="ref-9">9</xref>] proposed a prototype-oriented unsupervised method for MTSAD, which clusters normal features into prototype centers and calculates anomaly scores via feature-prototype distance, enabling effective detection of slow-evolving anomalies. Dai and Wang [<xref ref-type="bibr" rid="ref-4">4</xref>] integrated hash memory networks into autoencoders, using hash coding to store normal sub-patterns and retrieving memory during decoding to constrain reconstruction, significantly improving anomaly-normality distinguishability. In cloud application performance diagnosis, Xin et al. [<xref ref-type="bibr" rid="ref-10">10</xref>] reviewed trustworthy AI-based systems, noting that memory-augmented models are widely used for their ability to retain historical normal patterns, but require further optimization in real-time performance.</p>
<p>The main limitation of existing memory-augmented methods is the lack of active feature discrimination mechanisms: they can memorize normal patterns but cannot actively expand the feature distance between normal and anomalous samples, leading to low detection accuracy for subtle anomalies.</p>
</sec>
<sec id="s2_4">
<label>2.4</label>
<title>Contrastive Learning-Based Methods</title>
<p>Contrastive learning has brought breakthroughs to self-supervised anomaly detection in recent years, which enhances feature discriminability by constructing positive and negative sample pairs, and has become an important direction to solve the problem of poor feature separability in traditional methods.</p>
<p>Xiao et al. [<xref ref-type="bibr" rid="ref-11">11</xref>] explored dual-view graph structures for multivariate time series analysis, integrating graph and hypergraph representations into contrastive learning, then designed a cross-view contrastive loss to align and distinguish feature representations from both views. Xiao et al. [<xref ref-type="bibr" rid="ref-12">12</xref>] proposed the MulGad model, which introduces multi-granularity contrastive learning for MTSAD, extracting fine and coarse-grained temporal features to capture complex anomaly patterns and enhance the model&#x2019;s perception of diverse anomalies via cross-granularity sample pair construction and contrastive optimization.</p>
<p>The core challenge of contrastive methods lies in the construction of high-quality positive and negative pairs: improper pair design will lead to feature collapse or overfitting; at the same time, most methods lack explicit normal pattern memory mechanisms, resulting in a disconnect between feature discriminability and normal pattern memorization.</p>
</sec>
<sec id="s2_5">
<label>2.5</label>
<title>Research Gaps and Motivation of this Paper</title>
<p>Comprehensive analysis of existing methods reveals three core research gaps in current MTSAD: (1) Overgeneralization of reconstruction/Transformer models: High-capacity models can reconstruct subtle anomalies, and the lack of explicit normal pattern constraints reduces detection accuracy. (2) Disconnect between memory and contrastive mechanisms: Memory-augmented methods lack active feature discrimination, while contrastive learning methods lack normal pattern memorization, failing to balance &#x201C;pattern memorization&#x201D; and &#x201C;feature separation&#x201D;. (3) Insufficient modeling of multi-scale temporal features: Most methods focus on single-scale temporal dependencies and ignore the hybrid characteristics of real-world anomalies.</p>
<p>To address these gaps, this paper proposes PC-UAD, which integrates learnable prototype memory and contrastive fusion, achieving explicit normal pattern memorization and active feature discrimination, while enhancing multi-scale temporal feature extraction via learnable positional encoding and patch embedding. The framework draws on cross-domain research insights [<xref ref-type="bibr" rid="ref-6">6</xref>] to ensure robustness across diverse real-world scenarios.</p>
</sec>
</sec>
<sec id="s3">
<label>3</label>
<title>Methods</title>
<p>For a MTSAD task, assume an industrial system with <inline-formula id="ieqn-1"><mml:math id="mml-ieqn-1"><mml:mi>d</mml:mi></mml:math></inline-formula> sensors, where observations over.</p>
<p><italic>T</italic> time steps form a time series <inline-formula id="ieqn-2"><mml:math id="mml-ieqn-2"><mml:mi>X</mml:mi><mml:mo>=</mml:mo><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:mo>&#x2026;</mml:mo><mml:mo>,</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>T</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula>, with <inline-formula id="ieqn-3"><mml:math id="mml-ieqn-3"><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>T</mml:mi></mml:mrow></mml:msub><mml:mo>&#x2208;</mml:mo><mml:msup><mml:mrow><mml:mi mathvariant="double-struck">R</mml:mi></mml:mrow><mml:mrow><mml:mi>d</mml:mi></mml:mrow></mml:msup></mml:math></inline-formula> denoting the <italic>d</italic>-dimensional measurement vector at time <inline-formula id="ieqn-4"><mml:math id="mml-ieqn-4"><mml:mi>t</mml:mi></mml:math></inline-formula>. The goal is to predict an anomaly label sequence <inline-formula id="ieqn-5"><mml:math id="mml-ieqn-5"><mml:mi>y</mml:mi><mml:mo>&#x2208;</mml:mo><mml:mo fence="false" stretchy="false">{</mml:mo><mml:mn>0</mml:mn><mml:mo>,</mml:mo><mml:mn>1</mml:mn><mml:msup><mml:mo fence="false" stretchy="false">}</mml:mo><mml:mrow><mml:mi>T</mml:mi></mml:mrow></mml:msup></mml:math></inline-formula>, where <inline-formula id="ieqn-6"><mml:math id="mml-ieqn-6"><mml:msub><mml:mi>y</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:math></inline-formula> indicates an anomaly at time <inline-formula id="ieqn-7"><mml:math id="mml-ieqn-7"><mml:mi>i</mml:mi></mml:math></inline-formula>, and <inline-formula id="ieqn-8"><mml:math id="mml-ieqn-8"><mml:msub><mml:mi>y</mml:mi><mml:mrow><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mn>0</mml:mn></mml:math></inline-formula> denotes a normal state.</p>
<sec id="s3_1">
<label>3.1</label>
<title>Overview</title>
<p>PC-UAD consists of three core modules: the Temporal PatchEmbedder, the Prototype Memory Encoder, and the ContrastFusion Module. These modules respectively undertake the tasks of feature extraction, normal pattern memorization, and anomaly discrimination, forming a complete technical chain to address the core challenges of MTSAD. As illustrated in <xref ref-type="fig" rid="fig-1">Fig. 1</xref>, the Temporal PatchEmbedder first processes raw time series to generate structured patch features; the Prototype Memory Encoder then fuses these patch features with learnable normal prototypes to establish an explicit &#x201C;normal pattern reference&#x201D;; finally, the ContrastFusion Module enhances the separability of normal and anomalous features through contrastive learning. Specifically, the Temporal PatchEmbedder extracts patch-based time tokens from the input series. In each layer of the Prototype Memory Encoder, an attention mechanism integrates patch tokens from the previous layer to capture interdependencies between temporal features and prototype features. A single linear layer reconstructs the original features and computes anomaly scores based on reconstruction errors and contrastive similarity. The ContrastFusion module further optimizes feature distributions, thereby improving overall detection performance.</p>
<fig id="fig-1">
<label>Figure 1</label>
<caption>
<title>The overall architecture of PC-UAD. The framework integrates three key components: (<bold>I</bold>) Temporal PatchEmbedder with learnable positional encodings, (<bold>II</bold>) Prototype Memory Encoder for normal-pattern memorization, (<bold>III</bold>) ContrastFusion module for enhancing normal-anomaly discriminability.</title>
</caption>
<graphic mimetype="image" mime-subtype="tif" xlink:href="CMC_77521-fig-1.tif"/>
</fig>
</sec>
<sec id="s3_2">
<label>3.2</label>
<title>Temporal PatchEmbedder</title>
<p>To address the limitations of fixed positional encoding in adapting to dynamic temporal characteristics and the need to model cross-sensor correlations, the Temporal PatchEmbedder realizes adaptive feature extraction through three key steps: data normalization, enhanced positional embedding, and patch segmentation projection. In this module, we replace the classical Transformer positional encoding with a set of learnable positional encodings. After incorporating these encodings, a linear layer is applied to project the features at each time step across all channels, enabling the model to capture interdependencies (<xref ref-type="fig" rid="fig-2">Fig. 2</xref>).</p>
<fig id="fig-2">
<label>Figure 2</label>
<caption>
<title>Structure of temporal PatchEmbedder.</title>
</caption>
<graphic mimetype="image" mime-subtype="tif" xlink:href="CMC_77521-fig-2.tif"/>
</fig>
<p><list list-type="simple">
<list-item><label>(1)</label><p>Data Normalization: Raw time series <italic>X</italic> is processed with Reversible Instance Normalization [<xref ref-type="bibr" rid="ref-13">13</xref>] to mitigate distribution shift. This operation eliminates scale differences between sensor dimensions while retaining the original temporal trends.</p></list-item>
<list-item><label>(2)</label><p>Enhanced Positional Embedding: Learnable positional encodings (instead of fixed sinusoidal offsets) are adopted, which evolve into trainable parameters to adaptively learn optimal position representations. A linear transformation layer further models cross-channel relationship, achieving deep fusion of temporal position information and multi-sensor feature information.</p></list-item>
<list-item><label>(3)</label><p>Patch Segmentation and Projection: The normalized sequence <inline-formula id="ieqn-9"><mml:math id="mml-ieqn-9"><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>T</mml:mi></mml:mrow></mml:msub><mml:mo>&#x2208;</mml:mo><mml:msup><mml:mrow><mml:mi mathvariant="double-struck">R</mml:mi></mml:mrow><mml:mrow><mml:mi>T</mml:mi><mml:mo>&#x00D7;</mml:mo><mml:mi>C</mml:mi></mml:mrow></mml:msup></mml:math></inline-formula> (where <inline-formula id="ieqn-10"><mml:math id="mml-ieqn-10"><mml:mi>C</mml:mi></mml:math></inline-formula> is feature dimension) is segmented along the temporal dimension into <inline-formula id="ieqn-11"><mml:math id="mml-ieqn-11"><mml:mi>N</mml:mi></mml:math></inline-formula> patches of size <inline-formula id="ieqn-12"><mml:math id="mml-ieqn-12"><mml:mi>P</mml:mi></mml:math></inline-formula>, forming <inline-formula id="ieqn-13"><mml:math id="mml-ieqn-13"><mml:msup><mml:mi>N</mml:mi><mml:mrow><mml:mi mathvariant="normal">&#x2032;</mml:mi></mml:mrow></mml:msup><mml:mo>&#x2208;</mml:mo><mml:msup><mml:mrow><mml:mi mathvariant="double-struck">R</mml:mi></mml:mrow><mml:mrow><mml:mi>N</mml:mi><mml:mo>&#x00D7;</mml:mo><mml:mi>P</mml:mi><mml:mo>&#x00D7;</mml:mo><mml:mi>C</mml:mi></mml:mrow></mml:msup></mml:math></inline-formula>. This segmentation converts long time series into structured patch features, reducing computational complexity while preserving local temporal correlations. Patches are reshaped to <inline-formula id="ieqn-14"><mml:math id="mml-ieqn-14"><mml:mi>N</mml:mi><mml:mo>&#x00D7;</mml:mo><mml:mo stretchy="false">(</mml:mo><mml:mi>P</mml:mi><mml:mo>&#x22C5;</mml:mo><mml:mi>C</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula> and projected via a linear layer <italic>VE</italic> into a unified latent space of dimension <inline-formula id="ieqn-15"><mml:math id="mml-ieqn-15"><mml:mi>N</mml:mi><mml:mo>&#x00D7;</mml:mo><mml:mi>D</mml:mi></mml:math></inline-formula> (where <inline-formula id="ieqn-16"><mml:math id="mml-ieqn-16"><mml:mi>D</mml:mi></mml:math></inline-formula> represents the model dimension after projection), enabling processing of long temporal windows. The computational procedures are formalized as:<disp-formula id="eqn-1"><label>(1)</label><mml:math id="mml-eqn-1" display="block"><mml:mtable columnalign="right left right left right left right left right left right left" rowspacing="3pt" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true"><mml:mtr><mml:mtd /><mml:mtd><mml:msup><mml:mi>X</mml:mi><mml:mrow><mml:mi mathvariant="normal">&#x2032;</mml:mi></mml:mrow></mml:msup><mml:mo>=</mml:mo><mml:mi>P</mml:mi><mml:mi>E</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>R</mml:mi><mml:mi>e</mml:mi><mml:mi>v</mml:mi><mml:mi>I</mml:mi><mml:mi>N</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>X</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>
<disp-formula id="eqn-2"><label>(2)</label><mml:math id="mml-eqn-2" display="block"><mml:mtable columnalign="right left right left right left right left right left right left" rowspacing="3pt" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true"><mml:mtr><mml:mtd /><mml:mtd><mml:mi>N</mml:mi><mml:mo>=</mml:mo><mml:mi>V</mml:mi><mml:mi>E</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>P</mml:mi><mml:mi>a</mml:mi><mml:mi>t</mml:mi><mml:mi>c</mml:mi><mml:mi>h</mml:mi><mml:mi>i</mml:mi><mml:mi>n</mml:mi><mml:mi>g</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:msup><mml:mi>X</mml:mi><mml:mrow><mml:mi mathvariant="normal">&#x2032;</mml:mi></mml:mrow></mml:msup><mml:mo>)</mml:mo></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula></p></list-item>
</list>
</p>
</sec>
<sec id="s3_3">
<label>3.3</label>
<title>Prototype Memory Encoder</title>
<p>Building on the patch features output by the Temporal PatchEmbedder, the Prototype Memory Encoder embeds learnable prototypes into the Transformer attention mechanism to explicitly memorize normal patterns, addressing the overgeneralization problem of traditional models. This module forms the Prototype Memory Encoder (<xref ref-type="fig" rid="fig-3">Fig. 3</xref>), which aligns with memory-augmented autoencoders [<xref ref-type="bibr" rid="ref-4">4</xref>] and prototype-based detection methods for multivariate time series, aiming to: (1) adaptively fuse patch information with global typical patterns learned during training; and (2) provide a compact, learnable &#x201C;normal pattern dictionary,&#x201D; enabling normal samples to cluster within the prototype space while anomalous samples struggling to match with these prototypes.</p>
<fig id="fig-3">
<label>Figure 3</label>
<caption>
<title>Structure of prototype memory encoder.</title>
</caption>
<graphic mimetype="image" mime-subtype="tif" xlink:href="CMC_77521-fig-3.tif"/>
</fig>
<p>The module&#x2019;s backbone is a multi-layer Transformer encoder, with a learnable prototype matrix <inline-formula id="ieqn-17"><mml:math id="mml-ieqn-17"><mml:mi>G</mml:mi><mml:mo>&#x2208;</mml:mo><mml:msup><mml:mrow><mml:mi mathvariant="double-struck">R</mml:mi></mml:mrow><mml:mrow><mml:mi>M</mml:mi><mml:mo>&#x00D7;</mml:mo><mml:mi>D</mml:mi></mml:mrow></mml:msup></mml:math></inline-formula> (where <inline-formula id="ieqn-18"><mml:math id="mml-ieqn-18"><mml:mi>M</mml:mi></mml:math></inline-formula> is prototype count and <inline-formula id="ieqn-19"><mml:math id="mml-ieqn-19"><mml:mi>D</mml:mi></mml:math></inline-formula> is the model dimension) integrated into each layer&#x2019;s multi-head self-attention. The prototype matrix <inline-formula id="ieqn-20"><mml:math id="mml-ieqn-20"><mml:mi>p</mml:mi><mml:mi>r</mml:mi><mml:mi>o</mml:mi><mml:mi>t</mml:mi><mml:mi>o</mml:mi><mml:mi>t</mml:mi><mml:mi>y</mml:mi><mml:mi>p</mml:mi><mml:mi>e</mml:mi><mml:mo>&#x2208;</mml:mo><mml:msup><mml:mrow><mml:mi mathvariant="double-struck">R</mml:mi></mml:mrow><mml:mrow><mml:mi>M</mml:mi><mml:mo>&#x00D7;</mml:mo><mml:mi>D</mml:mi></mml:mrow></mml:msup></mml:math></inline-formula> is initialized using a zero-mean normal distribution with standard deviation 0.02, a standard initialization strategy for Transformer-based models to ensure stable training. It is registered as a trainable parameter via torch.nn.Parameter(), allowing end-to-end optimization through backpropagation to minimize normal-sample reconstruction loss, extracting vectors that characterize typical normal patterns. The learnable prototype matrix is optimized only by minimizing the reconstruction loss of normal samples, with its update coupled to the Transformer&#x2019;s layer-wise feature learning for regularization. This design constrains prototypes to capture universal normal patterns of the data, effectively avoiding overfitting to local noise.</p>
<p>Unlike conventional attention, values (<inline-formula id="ieqn-21"><mml:math id="mml-ieqn-21"><mml:mi>V</mml:mi></mml:math></inline-formula>) are computed separately for input sequences and prototypes, then concatenated into an extended value matrix <inline-formula id="ieqn-22"><mml:math id="mml-ieqn-22"><mml:mi>V</mml:mi><mml:mo>&#x2208;</mml:mo><mml:msup><mml:mrow><mml:mi mathvariant="double-struck">R</mml:mi></mml:mrow><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>N</mml:mi><mml:mo>+</mml:mo><mml:mi>M</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>&#x00D7;</mml:mo><mml:mi>D</mml:mi></mml:mrow></mml:msup></mml:math></inline-formula>. Attention scores are also extended to model interactions between input sequences and prototypes, enabling each token to fuse local contextual information with global prototype knowledge.</p>
<p>For the <inline-formula id="ieqn-23"><mml:math id="mml-ieqn-23"><mml:mi>i</mml:mi></mml:math></inline-formula> layer encoder, with input <inline-formula id="ieqn-24"><mml:math id="mml-ieqn-24"><mml:msup><mml:mi>X</mml:mi><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>i</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msup><mml:mo>&#x2208;</mml:mo><mml:msup><mml:mrow><mml:mi mathvariant="double-struck">R</mml:mi></mml:mrow><mml:mrow><mml:mi>N</mml:mi><mml:mo>&#x00D7;</mml:mo><mml:mi>D</mml:mi></mml:mrow></mml:msup></mml:math></inline-formula> (where the input to the first layer <inline-formula id="ieqn-25"><mml:math id="mml-ieqn-25"><mml:msup><mml:mi>X</mml:mi><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mn>1</mml:mn><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msup></mml:math></inline-formula> is the output of the Temporal PatchEmbedder), the query and key for the <inline-formula id="ieqn-26"><mml:math id="mml-ieqn-26"><mml:mi>K</mml:mi></mml:math></inline-formula> attention head are defined as <inline-formula id="ieqn-27"><mml:math id="mml-ieqn-27"><mml:msubsup><mml:mi>Q</mml:mi><mml:mrow><mml:mi>k</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>i</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mo>=</mml:mo><mml:msup><mml:mi>X</mml:mi><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>i</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msup><mml:msubsup><mml:mi>W</mml:mi><mml:mrow><mml:mi>k</mml:mi></mml:mrow><mml:mrow><mml:mi>Q</mml:mi></mml:mrow></mml:msubsup></mml:math></inline-formula> and <inline-formula id="ieqn-28"><mml:math id="mml-ieqn-28"><mml:msubsup><mml:mi>K</mml:mi><mml:mrow><mml:mi>k</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>i</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mo>=</mml:mo><mml:msup><mml:mi>X</mml:mi><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>i</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msup><mml:msubsup><mml:mi>W</mml:mi><mml:mrow><mml:mi>k</mml:mi></mml:mrow><mml:mrow><mml:mi>K</mml:mi></mml:mrow></mml:msubsup></mml:math></inline-formula>, with <inline-formula id="ieqn-29"><mml:math id="mml-ieqn-29"><mml:msubsup><mml:mi>W</mml:mi><mml:mrow><mml:mi>k</mml:mi></mml:mrow><mml:mrow><mml:mi>Q</mml:mi></mml:mrow></mml:msubsup><mml:mo>,</mml:mo><mml:msubsup><mml:mi>W</mml:mi><mml:mrow><mml:mi>k</mml:mi></mml:mrow><mml:mrow><mml:mi>K</mml:mi></mml:mrow></mml:msubsup><mml:mo>&#x2208;</mml:mo><mml:msup><mml:mrow><mml:mi mathvariant="double-struck">R</mml:mi></mml:mrow><mml:mrow><mml:mi>D</mml:mi><mml:mo>&#x00D7;</mml:mo><mml:mi>D</mml:mi></mml:mrow></mml:msup></mml:math></inline-formula>. Values (<inline-formula id="ieqn-30"><mml:math id="mml-ieqn-30"><mml:mi>V</mml:mi></mml:math></inline-formula>) are split into two components:
<list list-type="simple">
<list-item><label>(1)</label><p>Input-derived values: Consistent with the standard Transformer computation, <inline-formula id="ieqn-31"><mml:math id="mml-ieqn-31"><mml:msup><mml:mrow><mml:mtext>V</mml:mtext></mml:mrow><mml:mrow><mml:mrow><mml:mtext>full</mml:mtext></mml:mrow></mml:mrow></mml:msup><mml:mo>=</mml:mo><mml:msup><mml:mrow><mml:mtext>X</mml:mtext></mml:mrow><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mtext>i</mml:mtext></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msup><mml:msubsup><mml:mrow><mml:mtext>W</mml:mtext></mml:mrow><mml:mrow><mml:mrow><mml:mtext>k</mml:mtext></mml:mrow></mml:mrow><mml:mrow><mml:mrow><mml:mtext>V</mml:mtext></mml:mrow></mml:mrow></mml:msubsup></mml:math></inline-formula>, where <inline-formula id="ieqn-32"><mml:math id="mml-ieqn-32"><mml:msubsup><mml:mrow><mml:mtext>W</mml:mtext></mml:mrow><mml:mrow><mml:mrow><mml:mtext>k</mml:mtext></mml:mrow></mml:mrow><mml:mrow><mml:mrow><mml:mtext>V</mml:mtext></mml:mrow></mml:mrow></mml:msubsup><mml:mo>&#x2208;</mml:mo><mml:msup><mml:mrow><mml:mi mathvariant="double-struck">R</mml:mi></mml:mrow><mml:mrow><mml:mi>D</mml:mi><mml:mo>&#x00D7;</mml:mo><mml:mi>D</mml:mi></mml:mrow></mml:msup></mml:math></inline-formula>. For multi-head attention, <inline-formula id="ieqn-33"><mml:math id="mml-ieqn-33"><mml:mi>D</mml:mi></mml:math></inline-formula> is split into <inline-formula id="ieqn-34"><mml:math id="mml-ieqn-34"><mml:mi>H</mml:mi></mml:math></inline-formula> heads (each with dimension <inline-formula id="ieqn-35"><mml:math id="mml-ieqn-35"><mml:mi>d</mml:mi><mml:mo>=</mml:mo><mml:mi>D</mml:mi><mml:mrow><mml:mo>/</mml:mo></mml:mrow><mml:mi>H</mml:mi></mml:math></inline-formula>) and the <italic>k</italic>-th head&#x2019;s input value is <inline-formula id="ieqn-36"><mml:math id="mml-ieqn-36"><mml:msubsup><mml:mi>V</mml:mi><mml:mrow><mml:mi>o</mml:mi><mml:mi>r</mml:mi><mml:mi>i</mml:mi><mml:mi>g</mml:mi></mml:mrow><mml:mrow><mml:mi>k</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>i</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msubsup><mml:mo>=</mml:mo><mml:mi>R</mml:mi><mml:mi>e</mml:mi><mml:mi>a</mml:mi><mml:mi>r</mml:mi><mml:mi>r</mml:mi><mml:mi>a</mml:mi><mml:mi>n</mml:mi><mml:mi>g</mml:mi><mml:mi>e</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:msup><mml:mi>V</mml:mi><mml:mrow><mml:mi>f</mml:mi><mml:mi>u</mml:mi><mml:mi>l</mml:mi><mml:mi>l</mml:mi></mml:mrow></mml:msup><mml:mo>,</mml:mo><mml:mo stretchy="false">(</mml:mo><mml:mi>N</mml:mi><mml:mo>,</mml:mo><mml:mi>H</mml:mi><mml:mo>&#x22C5;</mml:mo><mml:mi>d</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo stretchy="false">&#x2192;</mml:mo><mml:mo stretchy="false">(</mml:mo><mml:mi>H</mml:mi><mml:mo>,</mml:mo><mml:mi>N</mml:mi><mml:mo>,</mml:mo><mml:mi>d</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula>.</p></list-item>
<list-item><label>(2)</label><p>Prototype-derived values: Obtained via linear transformation, <inline-formula id="ieqn-37"><mml:math id="mml-ieqn-37"><mml:msubsup><mml:mi>V</mml:mi><mml:mrow><mml:mi>p</mml:mi><mml:mi>r</mml:mi><mml:mi>o</mml:mi><mml:mi>t</mml:mi><mml:mi>o</mml:mi></mml:mrow><mml:mrow><mml:mi>f</mml:mi><mml:mi>u</mml:mi><mml:mi>l</mml:mi><mml:mi>l</mml:mi></mml:mrow></mml:msubsup><mml:mo>=</mml:mo><mml:mi>G</mml:mi><mml:msubsup><mml:mi>W</mml:mi><mml:mrow><mml:mi>k</mml:mi></mml:mrow><mml:mrow><mml:mi>V</mml:mi></mml:mrow></mml:msubsup></mml:math></inline-formula>, where <inline-formula id="ieqn-38"><mml:math id="mml-ieqn-38"><mml:msubsup><mml:mi>V</mml:mi><mml:mrow><mml:mi>p</mml:mi><mml:mi>r</mml:mi><mml:mi>o</mml:mi><mml:mi>t</mml:mi><mml:mi>o</mml:mi></mml:mrow><mml:mrow><mml:mi>f</mml:mi><mml:mi>u</mml:mi><mml:mi>l</mml:mi><mml:mi>l</mml:mi></mml:mrow></mml:msubsup><mml:mo>&#x2208;</mml:mo><mml:msup><mml:mrow><mml:mi mathvariant="double-struck">R</mml:mi></mml:mrow><mml:mrow><mml:mi>M</mml:mi><mml:mo>&#x00D7;</mml:mo><mml:mi>D</mml:mi></mml:mrow></mml:msup></mml:math></inline-formula>. The <italic>k</italic>-th head&#x2019;s prototype value is <inline-formula id="ieqn-39"><mml:math id="mml-ieqn-39"><mml:msubsup><mml:mi>V</mml:mi><mml:mrow><mml:mi>p</mml:mi><mml:mi>r</mml:mi><mml:mi>o</mml:mi><mml:mi>t</mml:mi><mml:mi>o</mml:mi></mml:mrow><mml:mrow><mml:mi>k</mml:mi></mml:mrow></mml:msubsup><mml:mo>=</mml:mo><mml:mi>R</mml:mi><mml:mi>e</mml:mi><mml:mi>a</mml:mi><mml:mi>r</mml:mi><mml:mi>r</mml:mi><mml:mi>a</mml:mi><mml:mi>n</mml:mi><mml:mi>g</mml:mi><mml:mi>e</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:msubsup><mml:mi>V</mml:mi><mml:mrow><mml:mi>p</mml:mi><mml:mi>r</mml:mi><mml:mi>o</mml:mi><mml:mi>t</mml:mi><mml:mi>o</mml:mi></mml:mrow><mml:mrow><mml:mi>f</mml:mi><mml:mi>u</mml:mi><mml:mi>l</mml:mi><mml:mi>l</mml:mi></mml:mrow></mml:msubsup><mml:mo stretchy="false">)</mml:mo><mml:mo>&#x2208;</mml:mo><mml:msup><mml:mrow><mml:mi mathvariant="double-struck">R</mml:mi></mml:mrow><mml:mrow><mml:mi>M</mml:mi><mml:mo>&#x00D7;</mml:mo><mml:mi>d</mml:mi></mml:mrow></mml:msup></mml:math></inline-formula>.</p></list-item>
</list></p>
<p>Concatenated the above values to for the final <italic>k</italic>-th head is:
<disp-formula id="eqn-3"><label>(3)</label><mml:math id="mml-eqn-3" display="block"><mml:msubsup><mml:mi>V</mml:mi><mml:mrow><mml:mi>k</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>i</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mo>=</mml:mo><mml:mrow><mml:mo>[</mml:mo><mml:msubsup><mml:mi>V</mml:mi><mml:mrow><mml:mi>p</mml:mi><mml:mi>r</mml:mi><mml:mi>o</mml:mi><mml:mi>t</mml:mi><mml:mi>o</mml:mi></mml:mrow><mml:mrow><mml:mi>k</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>i</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mo>,</mml:mo><mml:msubsup><mml:mi>V</mml:mi><mml:mrow><mml:mi>o</mml:mi><mml:mi>r</mml:mi><mml:mi>i</mml:mi><mml:mi>g</mml:mi></mml:mrow><mml:mrow><mml:mi>k</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>i</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mo>]</mml:mo></mml:mrow><mml:mo>&#x2208;</mml:mo><mml:msup><mml:mrow><mml:mi mathvariant="double-struck">R</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>N</mml:mi><mml:mo>+</mml:mo><mml:mi>M</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mo>&#x00D7;</mml:mo><mml:mi>d</mml:mi></mml:mrow></mml:msup></mml:math></disp-formula></p>
<p>Unlike conventional attention score, our method includes two attention modes: intra-sequence and sequence-prototype attention. First, the prototype key matrix is computed as: <inline-formula id="ieqn-40"><mml:math id="mml-ieqn-40"><mml:msubsup><mml:mi>K</mml:mi><mml:mrow><mml:mi>p</mml:mi><mml:mi>r</mml:mi><mml:mi>o</mml:mi><mml:mi>t</mml:mi><mml:mi>o</mml:mi><mml:mo>,</mml:mo><mml:mi>k</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>i</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mo>=</mml:mo><mml:msup><mml:mi>G</mml:mi><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>i</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msup><mml:msubsup><mml:mi>W</mml:mi><mml:mrow><mml:mi>k</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>K</mml:mi><mml:mrow><mml:mi>p</mml:mi><mml:mi>r</mml:mi><mml:mi>o</mml:mi><mml:mi>t</mml:mi><mml:mi>o</mml:mi><mml:mo>,</mml:mo></mml:mrow></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>i</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msubsup><mml:mo>&#x2208;</mml:mo><mml:msup><mml:mrow><mml:mi mathvariant="double-struck">R</mml:mi></mml:mrow><mml:mrow><mml:mi>M</mml:mi><mml:mo>&#x00D7;</mml:mo><mml:mi>d</mml:mi></mml:mrow></mml:msup></mml:math></inline-formula>. Then, the two types of attention scores are calculated separately:
<list list-type="simple">
<list-item><label>(1)</label><p>Intra-sequence attention: Measure correlations between different positions in the input sequence.
<disp-formula id="eqn-4"><label>(4)</label><mml:math id="mml-eqn-4" display="block"><mml:mi>A</mml:mi><mml:mi>t</mml:mi><mml:mi>t</mml:mi><mml:mi>n</mml:mi><mml:mi>S</mml:mi><mml:mi>c</mml:mi><mml:mi>o</mml:mi><mml:mi>r</mml:mi><mml:mi>e</mml:mi><mml:msubsup><mml:mi>s</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:mi>e</mml:mi><mml:mi>q</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>i</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:msubsup><mml:mi>Q</mml:mi><mml:mrow><mml:mi>k</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>i</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mo stretchy="false">(</mml:mo><mml:msubsup><mml:mi>K</mml:mi><mml:mrow><mml:mi>k</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>i</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:msup><mml:mo stretchy="false">)</mml:mo><mml:mrow><mml:mi mathvariant="normal">&#x22A4;</mml:mi></mml:mrow></mml:msup></mml:mrow><mml:msqrt><mml:mi>d</mml:mi></mml:msqrt></mml:mfrac><mml:mo>&#x2208;</mml:mo><mml:msup><mml:mrow><mml:mi mathvariant="double-struck">R</mml:mi></mml:mrow><mml:mrow><mml:mi>N</mml:mi><mml:mo>&#x00D7;</mml:mo><mml:mi>N</mml:mi></mml:mrow></mml:msup></mml:math></disp-formula></p></list-item>
<list-item><label>(2)</label><p>Sequence-prototype attention: Measures correlations between the input sequence and global prototypes.
<disp-formula id="eqn-5"><label>(5)</label><mml:math id="mml-eqn-5" display="block"><mml:mi>A</mml:mi><mml:mi>t</mml:mi><mml:mi>t</mml:mi><mml:mi>n</mml:mi><mml:mi>S</mml:mi><mml:mi>c</mml:mi><mml:mi>o</mml:mi><mml:mi>r</mml:mi><mml:mi>e</mml:mi><mml:msubsup><mml:mi>s</mml:mi><mml:mrow><mml:mi>p</mml:mi><mml:mi>r</mml:mi><mml:mi>o</mml:mi><mml:mi>t</mml:mi><mml:mi>o</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>i</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:msubsup><mml:mi>Q</mml:mi><mml:mrow><mml:mi>k</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>i</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mo stretchy="false">(</mml:mo><mml:msubsup><mml:mi>K</mml:mi><mml:mrow><mml:mi>p</mml:mi><mml:mi>r</mml:mi><mml:mi>o</mml:mi><mml:mi>t</mml:mi><mml:mi>o</mml:mi><mml:mo>,</mml:mo><mml:mi>k</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>i</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:msup><mml:mo stretchy="false">)</mml:mo><mml:mrow><mml:mi mathvariant="normal">&#x22A4;</mml:mi></mml:mrow></mml:msup></mml:mrow><mml:msqrt><mml:mi>d</mml:mi></mml:msqrt></mml:mfrac><mml:mo>&#x2208;</mml:mo><mml:msup><mml:mrow><mml:mi mathvariant="double-struck">R</mml:mi></mml:mrow><mml:mrow><mml:mi>N</mml:mi><mml:mo>&#x00D7;</mml:mo><mml:mi>M</mml:mi></mml:mrow></mml:msup></mml:math></disp-formula></p></list-item>
</list></p>
<p>Scores are concatenated and normalized via Softmax function, then multiplied by the value matrix to generate the attention output:
<disp-formula id="eqn-6"><label>(6)</label><mml:math id="mml-eqn-6" display="block"><mml:mi>A</mml:mi><mml:mi>t</mml:mi><mml:mi>t</mml:mi><mml:mi>n</mml:mi><mml:mi>S</mml:mi><mml:mi>c</mml:mi><mml:mi>o</mml:mi><mml:mi>r</mml:mi><mml:mi>e</mml:mi><mml:msup><mml:mi>s</mml:mi><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>i</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msup><mml:mo>=</mml:mo><mml:mrow><mml:mo>[</mml:mo><mml:mi>A</mml:mi><mml:mi>t</mml:mi><mml:mi>t</mml:mi><mml:mi>n</mml:mi><mml:mi>S</mml:mi><mml:mi>c</mml:mi><mml:mi>o</mml:mi><mml:mi>r</mml:mi><mml:mi>e</mml:mi><mml:msubsup><mml:mi>s</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:mi>e</mml:mi><mml:mi>q</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>i</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mo>,</mml:mo><mml:mi>A</mml:mi><mml:mi>t</mml:mi><mml:mi>t</mml:mi><mml:mi>n</mml:mi><mml:mi>S</mml:mi><mml:mi>c</mml:mi><mml:mi>o</mml:mi><mml:mi>r</mml:mi><mml:mi>e</mml:mi><mml:msubsup><mml:mi>s</mml:mi><mml:mrow><mml:mi>p</mml:mi><mml:mi>r</mml:mi><mml:mi>o</mml:mi><mml:mi>t</mml:mi><mml:mi>o</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>i</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mo>]</mml:mo></mml:mrow><mml:mo>&#x2208;</mml:mo><mml:msup><mml:mrow><mml:mi mathvariant="double-struck">R</mml:mi></mml:mrow><mml:mrow><mml:mi>N</mml:mi><mml:mo>&#x00D7;</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:mi>N</mml:mi><mml:mo>+</mml:mo><mml:mi>M</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msup></mml:math></disp-formula>
<disp-formula id="eqn-7"><label>(7)</label><mml:math id="mml-eqn-7" display="block"><mml:msubsup><mml:mi>Z</mml:mi><mml:mrow><mml:mi>k</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>i</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mo>=</mml:mo><mml:mi>S</mml:mi><mml:mi>o</mml:mi><mml:mspace width="negativethinmathspace" /><mml:mi>f</mml:mi><mml:mspace width="negativethinmathspace" /><mml:mi>t</mml:mi><mml:mi>m</mml:mi><mml:mi>a</mml:mi><mml:mi>x</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>A</mml:mi><mml:mi>t</mml:mi><mml:mi>t</mml:mi><mml:mi>n</mml:mi><mml:mi>S</mml:mi><mml:mi>c</mml:mi><mml:mi>o</mml:mi><mml:mi>r</mml:mi><mml:mi>e</mml:mi><mml:msup><mml:mi>s</mml:mi><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>i</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msup><mml:mo>)</mml:mo></mml:mrow><mml:mo>&#x22C5;</mml:mo><mml:msubsup><mml:mi>V</mml:mi><mml:mrow><mml:mi>k</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>i</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msubsup></mml:math></disp-formula></p>
<p>At the end of each layer, a linear layer aggregates output features <inline-formula id="ieqn-41"><mml:math id="mml-ieqn-41"><mml:msubsup><mml:mi>Z</mml:mi><mml:mrow><mml:mi>k</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>i</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msubsup></mml:math></inline-formula> from all attention heads to obtain <inline-formula id="ieqn-42"><mml:math id="mml-ieqn-42"><mml:msup><mml:mi>Z</mml:mi><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>i</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msup></mml:math></inline-formula>. After layer normalization, a Feed-Forward Network (FFN) applies transformation and another layer normalization. The result is applied to produce the next layer&#x2019;s input:
<disp-formula id="eqn-8"><label>(8)</label><mml:math id="mml-eqn-8" display="block"><mml:mtable columnalign="right left right left right left right left right left right left" rowspacing="3pt" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true"><mml:mtr><mml:mtd /><mml:mtd><mml:msup><mml:mi>X</mml:mi><mml:mrow><mml:msup><mml:mrow><mml:mo>(</mml:mo><mml:mi>i</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:mi mathvariant="normal">&#x2032;</mml:mi></mml:mrow></mml:msup></mml:mrow></mml:msup><mml:mo>=</mml:mo><mml:mi>L</mml:mi><mml:mi>a</mml:mi><mml:mi>y</mml:mi><mml:mi>e</mml:mi><mml:mi>r</mml:mi><mml:mi>N</mml:mi><mml:mi>o</mml:mi><mml:mi>r</mml:mi><mml:mi>m</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:msup><mml:mi>X</mml:mi><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>i</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msup><mml:mo>+</mml:mo><mml:msup><mml:mi>Z</mml:mi><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>i</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msup><mml:mo>)</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>
<disp-formula id="eqn-9"><label>(9)</label><mml:math id="mml-eqn-9" display="block"><mml:mtable columnalign="right left right left right left right left right left right left" rowspacing="3pt" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true"><mml:mtr><mml:mtd /><mml:mtd><mml:msup><mml:mi>X</mml:mi><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>i</mml:mi><mml:mo>+</mml:mo><mml:mn>1</mml:mn><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msup><mml:mo>=</mml:mo><mml:mi>L</mml:mi><mml:mi>a</mml:mi><mml:mi>y</mml:mi><mml:mi>e</mml:mi><mml:mi>r</mml:mi><mml:mi>N</mml:mi><mml:mi>o</mml:mi><mml:mi>r</mml:mi><mml:mi>m</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:msup><mml:mi>X</mml:mi><mml:mrow><mml:msup><mml:mrow><mml:mo>(</mml:mo><mml:mi>i</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:mi mathvariant="normal">&#x2032;</mml:mi></mml:mrow></mml:msup></mml:mrow></mml:msup><mml:mo>+</mml:mo><mml:mi>F</mml:mi><mml:mi>F</mml:mi><mml:mi>N</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:msup><mml:mi>X</mml:mi><mml:mrow><mml:msup><mml:mrow><mml:mo>(</mml:mo><mml:mi>i</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:mi mathvariant="normal">&#x2032;</mml:mi></mml:mrow></mml:msup></mml:mrow></mml:msup><mml:mo>)</mml:mo></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula></p>
<p>The Prototype Memory Encoder strengthens normal-pattern memorization and global context modeling, improving detection performance and generalization; meanwhile, during training, the model is optimized to fuse local patch features with global prototypes, forcing normal data to cluster tightly around prototypes. High-capacity models are thus constrained by prototype-based regularization and cannot freely reconstruct anomalies that deviate from normal patterns.</p>
</sec>
<sec id="s3_4">
<label>3.4</label>
<title>ContrastFusion Module</title>
<p>While the Prototype Memory Encoder establishes normal pattern references, it lacks active mechanisms to enhance feature discriminability between normal and anomalous samples. Inspired by contrastive learning [<xref ref-type="bibr" rid="ref-14">14</xref>], the ContrastFusion Module addresses this gap by integrating denoising reconstruction and asymmetric contrastive learning, actively expanding feature distribution distances between normal and anomalous data.</p>
<p>To generate negative samples for contrastive learning without introducing excessive prior knowledge, we use Gaussian noise to generate negative samples: <inline-formula id="ieqn-43"><mml:math id="mml-ieqn-43"><mml:msub><mml:mi>X</mml:mi><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mi>X</mml:mi><mml:mo>+</mml:mo><mml:mi>&#x03B1;</mml:mi><mml:mi>J</mml:mi></mml:math></inline-formula>, where <inline-formula id="ieqn-44"><mml:math id="mml-ieqn-44"><mml:mi>&#x03B1;</mml:mi></mml:math></inline-formula> controls the noise level and <inline-formula id="ieqn-45"><mml:math id="mml-ieqn-45"><mml:mi>J</mml:mi></mml:math></inline-formula> is sampled from a Gaussian distribution. Gaussian noise, as a widely used general perturbation method, simulates the &#x201C;universal abnormal deviations&#x201D; existing in most time series data [<xref ref-type="bibr" rid="ref-15">15</xref>]. Inspired by the work on Denoising Autoencoders [<xref ref-type="bibr" rid="ref-16">16</xref>], a denoising loss is added to the objective function to enforce the model&#x2019;s ability to recover clean data from noisy inputs:
<disp-formula id="eqn-10"><label>(10)</label><mml:math id="mml-eqn-10" display="block"><mml:msub><mml:mi>L</mml:mi><mml:mrow><mml:mi>d</mml:mi><mml:mi>e</mml:mi><mml:mi>n</mml:mi><mml:mi>o</mml:mi><mml:mi>i</mml:mi><mml:mi>s</mml:mi><mml:mi>e</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mi>M</mml:mi><mml:mi>S</mml:mi><mml:mi>E</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mrow><mml:mover><mml:mi>X</mml:mi><mml:mo stretchy="false">&#x005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:mi>X</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mo>+</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:mn>1</mml:mn><mml:mo>&#x2212;</mml:mo><mml:mi>C</mml:mi><mml:mi>o</mml:mi><mml:mi>s</mml:mi><mml:mi>i</mml:mi><mml:mi>n</mml:mi><mml:mi>e</mml:mi><mml:mi>S</mml:mi><mml:mi>i</mml:mi><mml:mi>m</mml:mi><mml:mi>i</mml:mi><mml:mi>l</mml:mi><mml:mi>a</mml:mi><mml:mi>r</mml:mi><mml:mi>i</mml:mi><mml:mi>t</mml:mi><mml:mi>y</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mrow><mml:mover><mml:mi>X</mml:mi><mml:mo stretchy="false">&#x005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:mi>X</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:math></disp-formula>where <inline-formula id="ieqn-46"><mml:math id="mml-ieqn-46"><mml:msub><mml:mrow><mml:mover><mml:mi>X</mml:mi><mml:mo stretchy="false">&#x005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> is the reconstruction of <inline-formula id="ieqn-47"><mml:math id="mml-ieqn-47"><mml:msub><mml:mi>X</mml:mi><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>, and <inline-formula id="ieqn-48"><mml:math id="mml-ieqn-48"><mml:mi>C</mml:mi><mml:mi>o</mml:mi><mml:mi>s</mml:mi><mml:mi>i</mml:mi><mml:mi>n</mml:mi><mml:mi>e</mml:mi><mml:mi>S</mml:mi><mml:mi>i</mml:mi><mml:mi>m</mml:mi><mml:mi>i</mml:mi><mml:mi>l</mml:mi><mml:mi>a</mml:mi><mml:mi>r</mml:mi><mml:mi>i</mml:mi><mml:mi>t</mml:mi><mml:mi>y</mml:mi></mml:math></inline-formula> denotes the cosine similarity function. This module uses two main synergistic processes: denoising reconstruction and feature contrast. Positive (normal) and negative (noisy) samples are fed into the PatchEmbedder and Prototype Memory Encoder to obtain latent representations <inline-formula id="ieqn-49"><mml:math id="mml-ieqn-49"><mml:mi>N</mml:mi></mml:math></inline-formula> and <inline-formula id="ieqn-50"><mml:math id="mml-ieqn-50"><mml:msub><mml:mi>N</mml:mi><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>. <inline-formula id="ieqn-51"><mml:math id="mml-ieqn-51"><mml:mi>N</mml:mi></mml:math></inline-formula> is then fed into a reconstruction projection layer <inline-formula id="ieqn-52"><mml:math id="mml-ieqn-52"><mml:msub><mml:mrow><mml:mi>&#x1D4AB;</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub></mml:math></inline-formula> and a contrastive projection layer <inline-formula id="ieqn-53"><mml:math id="mml-ieqn-53"><mml:msub><mml:mrow><mml:mi>&#x1D4AB;</mml:mi></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msub></mml:math></inline-formula> to obtain the reconstruction output <inline-formula id="ieqn-54"><mml:math id="mml-ieqn-54"><mml:msub><mml:mrow><mml:mover><mml:mi>X</mml:mi><mml:mo stretchy="false">&#x005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> and the low-dimensional hidden representation <inline-formula id="ieqn-55"><mml:math id="mml-ieqn-55"><mml:mi>H</mml:mi><mml:mo>=</mml:mo><mml:msub><mml:mrow><mml:mi>&#x1D4AB;</mml:mi></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>N</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>=</mml:mo><mml:mi>L</mml:mi><mml:mi>i</mml:mi><mml:mi>n</mml:mi><mml:mi>e</mml:mi><mml:mi>a</mml:mi><mml:mi>r</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>R</mml:mi><mml:mi>e</mml:mi><mml:mi>L</mml:mi><mml:mi>U</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>L</mml:mi><mml:mi>i</mml:mi><mml:mi>n</mml:mi><mml:mi>e</mml:mi><mml:mi>a</mml:mi><mml:mi>r</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>N</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo stretchy="false">)</mml:mo><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula>. Corresponding low-dimensional representations <inline-formula id="ieqn-56"><mml:math id="mml-ieqn-56"><mml:mi>H</mml:mi></mml:math></inline-formula> (normal) and <inline-formula id="ieqn-57"><mml:math id="mml-ieqn-57"><mml:msub><mml:mi>H</mml:mi><mml:mrow><mml:mrow><mml:mtext>n</mml:mtext></mml:mrow></mml:mrow></mml:msub></mml:math></inline-formula> (anomalous) are derived from <inline-formula id="ieqn-58"><mml:math id="mml-ieqn-58"><mml:mi>N</mml:mi></mml:math></inline-formula> and <inline-formula id="ieqn-59"><mml:math id="mml-ieqn-59"><mml:msub><mml:mi>N</mml:mi><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>. To avoid training collapse and ensure stable optimization, an asymmetric contrastive loss with Stop Gradient is introduced to generate dynamic targets:
<disp-formula id="eqn-11"><label>(11)</label><mml:math id="mml-eqn-11" display="block"><mml:mtable columnalign="right left right left right left right left right left right left" rowspacing="3pt" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true"><mml:mtr><mml:mtd /><mml:mtd><mml:msub><mml:mi>L</mml:mi><mml:mrow><mml:mi>c</mml:mi><mml:mi>o</mml:mi><mml:mi>n</mml:mi><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mi>M</mml:mi><mml:mi>S</mml:mi><mml:mi>E</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>H</mml:mi><mml:mo>,</mml:mo><mml:mi>S</mml:mi><mml:mi>t</mml:mi><mml:mi>o</mml:mi><mml:mi>p</mml:mi><mml:mi>G</mml:mi><mml:mi>r</mml:mi><mml:mi>a</mml:mi><mml:mi>d</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mi>H</mml:mi><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:msub><mml:mo>)</mml:mo></mml:mrow><mml:mo>)</mml:mo></mml:mrow><mml:mo>+</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:mn>1</mml:mn><mml:mo>&#x2212;</mml:mo><mml:mi>S</mml:mi><mml:mi>i</mml:mi><mml:mi>m</mml:mi><mml:mi>i</mml:mi><mml:mi>l</mml:mi><mml:mi>a</mml:mi><mml:mi>r</mml:mi><mml:mi>i</mml:mi><mml:mi>t</mml:mi><mml:mi>y</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>H</mml:mi><mml:mo>,</mml:mo><mml:mi>S</mml:mi><mml:mi>t</mml:mi><mml:mi>o</mml:mi><mml:mi>p</mml:mi><mml:mi>G</mml:mi><mml:mi>r</mml:mi><mml:mi>a</mml:mi><mml:mi>d</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mi>H</mml:mi><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:msub><mml:mo>)</mml:mo></mml:mrow><mml:mo>)</mml:mo></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd /><mml:mtd><mml:mi></mml:mi><mml:mspace width="1em" /><mml:mspace width="1em" /><mml:mspace width="1em" /><mml:mo>+</mml:mo><mml:mi>M</mml:mi><mml:mi>S</mml:mi><mml:mi>E</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mi>H</mml:mi><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:mi>S</mml:mi><mml:mi>t</mml:mi><mml:mi>o</mml:mi><mml:mi>p</mml:mi><mml:mi>G</mml:mi><mml:mi>r</mml:mi><mml:mi>a</mml:mi><mml:mi>d</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>H</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mo>)</mml:mo></mml:mrow><mml:mo>+</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:mn>1</mml:mn><mml:mo>&#x2212;</mml:mo><mml:mi>S</mml:mi><mml:mi>i</mml:mi><mml:mi>m</mml:mi><mml:mi>i</mml:mi><mml:mi>l</mml:mi><mml:mi>a</mml:mi><mml:mi>r</mml:mi><mml:mi>i</mml:mi><mml:mi>t</mml:mi><mml:mi>y</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mi>H</mml:mi><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:mi>S</mml:mi><mml:mi>t</mml:mi><mml:mi>o</mml:mi><mml:mi>p</mml:mi><mml:mi>G</mml:mi><mml:mi>r</mml:mi><mml:mi>a</mml:mi><mml:mi>d</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>H</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mo>)</mml:mo></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula></p>
<p>This loss creates a &#x201C;repulsive field&#x201D; in the latent space, maximizing discrepancies between normal and anomalous features to polarize representations. The final joint loss function is:<disp-formula id="eqn-12"><label>(12)</label><mml:math id="mml-eqn-12" display="block"><mml:mi>L</mml:mi><mml:mo>=</mml:mo><mml:msub><mml:mi>L</mml:mi><mml:mrow><mml:mi>r</mml:mi><mml:mi>e</mml:mi><mml:mi>c</mml:mi></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:msub><mml:mi>L</mml:mi><mml:mrow><mml:mi>d</mml:mi><mml:mi>e</mml:mi><mml:mi>n</mml:mi><mml:mi>o</mml:mi><mml:mi>i</mml:mi><mml:mi>s</mml:mi><mml:mi>e</mml:mi></mml:mrow></mml:msub><mml:mo>&#x2212;</mml:mo><mml:mi>&#x03B2;</mml:mi><mml:msub><mml:mi>L</mml:mi><mml:mrow><mml:mi>c</mml:mi><mml:mi>o</mml:mi><mml:mi>n</mml:mi><mml:mi>t</mml:mi></mml:mrow></mml:msub></mml:math></disp-formula>where <inline-formula id="ieqn-60"><mml:math id="mml-ieqn-60"><mml:msub><mml:mi>L</mml:mi><mml:mrow><mml:mi>r</mml:mi><mml:mi>e</mml:mi><mml:mi>c</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> is the reconstruction loss and <inline-formula id="ieqn-61"><mml:math id="mml-ieqn-61"><mml:mi>&#x03B2;</mml:mi></mml:math></inline-formula> balances the contrastive term. <inline-formula id="ieqn-62"><mml:math id="mml-ieqn-62"><mml:mi>&#x03B2;</mml:mi></mml:math></inline-formula> is dynamically adjusted during training to balance stability and performance: in the early stages, it is assigned a very small weight to prioritize normal pattern learning via reconstruction/denoising losses, thereby avoiding contrastive learning instability; in the later stages, it is fixed at 0.2 (the maximum value) to maximize the effects of contrastive learning.</p>
<p>The ContrastFusion module breaks through the limitations of reconstruction-only models, enabling the model to not only reconstruct normal patterns but also actively recognize fundamental feature differences between normal and anomalous samples, significantly enhancing generalization for unknown anomalies. Even if high-capacity models attempt to reconstruct subtle anomalies, the contrastive constraint ensures anomalous features remain distinguishable from normal prototypes in the latent space.</p>
</sec>
</sec>
<sec id="s4">
<label>4</label>
<title>Experiment</title>
<sec id="s4_1">
<label>4.1</label>
<title>Dataset</title>
<p>PC-UAD is evaluated on five real-world multivariate time series datasets covering diverse domains. <bold>NIPS_TS_Swan</bold> (Swan): Telemetry data from the NASA International Space Station, a benchmark for the NeurIPS 2021 Time Series Competition; <bold>PSM</bold>: Production server monitoring data from eBay, reflecting the operational status of large-scale internet services. Related microservice monitoring work is reported in our previous study [<xref ref-type="bibr" rid="ref-17">17</xref>]. <bold>SWaT</bold>: Sensor and actuator data from a real-world water treatment plant, containing anomalies from physical constraints and attack scenarios. <bold>MSL</bold>: Spacecraft subsystem operational parameters under Martian extreme conditions, widely used to validate MTSAD algorithms for high-reliability aerospace scenarios. <bold>SMD</bold>: collected from a large internet company, recording resource utilization of computer clusters with 38 dimensions and posing challenges for capturing dynamic data trends. The five public datasets were screened for high diversity in anomaly types, data scale, dimensionality, anomaly rates and application backgrounds, covering a wide spectrum of real-world multivariate time series scenarios and anomaly patterns.</p>
</sec>
<sec id="s4_2">
<label>4.2</label>
<title>Baseline Model</title>
<p>PC-UAD is compared with eight state-of-the-art unsupervised MTSAD models:</p>
<p><bold>SimAD</bold> [<xref ref-type="bibr" rid="ref-18">18</xref>]: A dissimilarity-based method that uses enhanced feature extraction, normal-pattern embedding, and contrastive fusion for anomaly discrimination.</p>
<p><bold>TranAD</bold> [<xref ref-type="bibr" rid="ref-7">7</xref>]: A Transformer-based encoder-decoder model with a two-stage self-conditioning inference mechanism to amplify anomaly signals, integrated with adversarial training for robustness.</p>
<p><bold>DAGMM</bold> [<xref ref-type="bibr" rid="ref-19">19</xref>]: An end-to-end model combining deep autoencoders with Gaussian Mixture Models, enabling anomaly detection via low-dimensional representation and probability estimation.</p>
<p><bold>OmniAnomaly</bold> [<xref ref-type="bibr" rid="ref-20">20</xref>]: A stochastic recurrent neural network model that learns normal data distributions in the latent space, using reconstruction probability as the anomaly score.</p>
<p><bold>USAD</bold> [<xref ref-type="bibr" rid="ref-21">21</xref>]: An adversarial autoencoder model with one encoder and two decoders, which learns normal patterns via an adversarial game between reconstruction and error-amplification decoders.</p>
<p><bold>DADA</bold> [<xref ref-type="bibr" rid="ref-2">2</xref>]: A general time series anomaly detector with adaptive bottlenecks and dual adversarial decoders. It achieves zero-shot anomaly detection.</p>
<p><bold>RTdetector</bold> [<xref ref-type="bibr" rid="ref-3">3</xref>]: A Transformer-based model leveraging reconstruction trends, incorporating a global attention mechanism based on reconstruction trends and a self-conditioning Transformer with reconstruction trend enhancement.</p>
<p><bold>AnomalyTransformer</bold> [<xref ref-type="bibr" rid="ref-6">6</xref>]: A Transformer-based model proposing an association discrepancy-based Anomaly-Attention mechanism, quantifying anomaly degrees by measuring attention weight inconsistency across positions.</p>
</sec>
<sec id="s4_3">
<label>4.3</label>
<title>Evaluation Metrics</title>
<p>To ensure rigorous and unbiased evaluation, F1-score and Area Under the ROC Curve (ROC-AUC) are adopted as core metrics:</p>
<p><bold>F1-score</bold>: Requires accurate classification of each independent timestamp, avoiding the overestimation bias of point adjustment (PA) and providing a strict measure of per-time-step discriminability;</p>
<p><bold>ROC-AUC</bold>: Insensitive to decision thresholds, evaluating the model&#x2019;s overall ability to rank normal and anomalous samples, offering a robust benchmark for cross-model comparison.</p>
</sec>
<sec id="s4_4">
<label>4.4</label>
<title>Experiment Result</title>
<p>As shown in <xref ref-type="table" rid="table-1">Table 1</xref> and <xref ref-type="fig" rid="fig-4">Fig. 4a</xref>, PC-UAD achieves optimal or sub-optimal performance in terms of F1-score and ROC-AUC across all five datasets, and demonstrates robust adaptability to different anomaly patterns and data characteristics.</p>
<table-wrap id="table-1">
<label>Table 1</label>
<caption>
<title>Anomaly detection performance (F1-score, top; ROC-AUC, bottom) on public datasets.</title>
</caption>
<table>
<colgroup>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center" width="12mm"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center" width="17mm"/>
<col align="center"/> </colgroup>
<thead>
<tr>
<th>Dataset</th>
<th>SimAD</th>
<th>TranAD</th>
<th>DAGMM</th>
<th>Omni Anomaly</th>
<th>USAD</th>
<th>PC-UAD</th>
<th>DADA</th>
<th>Anomaly Transformer</th>
<th>RTdetector</th>
</tr>
</thead>
<tbody>
<tr>
<td>MSL</td>
<td>22.36</td>
<td>14.56</td>
<td>13.50</td>
<td>10.95</td>
<td>12.10</td>
<td>23.98</td>
<td><bold>33.50</bold></td>
<td>9.69</td>
<td>16.49</td>
</tr>
<tr>
<td>Swan</td>
<td>67.53</td>
<td>29.47</td>
<td>25.56</td>
<td>23.97</td>
<td>15.67</td>
<td><bold>70.62</bold></td>
<td>49.17</td>
<td>11.69</td>
<td>29.18</td>
</tr>
<tr>
<td>PSM</td>
<td>46.59</td>
<td>40.21</td>
<td>38.65</td>
<td>26.65</td>
<td>34.69</td>
<td><bold>47.62</bold></td>
<td>46.88</td>
<td>36.42</td>
<td>39.47</td>
</tr>
<tr>
<td>SWaT</td>
<td>78.5</td>
<td>59.93</td>
<td>62.06</td>
<td>77.52</td>
<td>65.14</td>
<td><bold>79.08</bold></td>
<td>53.56</td>
<td>56.85</td>
<td>62.17</td>
</tr>
<tr>
<td>SMD</td>
<td>21.91</td>
<td><bold>24.62</bold></td>
<td>21.99</td>
<td>19.57</td>
<td>23.63</td>
<td>22.15</td>
<td>19.35</td>
<td>16.08</td>
<td>22.74</td>
</tr>
<tr>
<td>MSL</td>
<td>57.73</td>
<td>53.77</td>
<td>51.98</td>
<td>51.48</td>
<td>52.03</td>
<td>62.54</td>
<td><bold>75.09</bold></td>
<td>51.03</td>
<td>54.81</td>
</tr>
<tr>
<td>Swan</td>
<td>81.67</td>
<td>57.57</td>
<td>54.38</td>
<td>56.55</td>
<td>53.27</td>
<td><bold>84.66</bold></td>
<td>53.21</td>
<td>52.18</td>
<td>57.52</td>
</tr>
<tr>
<td>PSM</td>
<td>66.64</td>
<td>60.32</td>
<td>59.84</td>
<td>56.34</td>
<td>59.12</td>
<td><bold>68.54</bold></td>
<td>56.83</td>
<td>60.96</td>
<td>60.83</td>
</tr>
<tr>
<td>SWaT</td>
<td><bold>91.20</bold></td>
<td>71.41</td>
<td>72.61</td>
<td>82.02</td>
<td>80.35</td>
<td>91.00</td>
<td>82.81</td>
<td>60.72</td>
<td>72.58</td>
</tr>
<tr>
<td>SMD</td>
<td>77.52</td>
<td>57.16</td>
<td>56.22</td>
<td>55.42</td>
<td>56.11</td>
<td><bold>77.77</bold></td>
<td>72.08</td>
<td>52.36</td>
<td>56.45</td>
</tr>
</tbody>
</table>
<table-wrap-foot>
<fn id="table-1fn1" fn-type="other">
<p>Note: The best score in each experiment is in bold.</p>
</fn>
</table-wrap-foot>
</table-wrap><fig id="fig-4">
<label>Figure 4</label>
<caption>
<title>Experiment result: (<bold>a</bold>) The F1 score of the comparison model on the datasets; (<bold>b</bold>) Ablation experiment results.</title>
</caption>
<graphic mimetype="image" mime-subtype="tif" xlink:href="CMC_77521-fig-4.tif"/>
</fig>
 
<p>In terms of average F1, the proposed PC-UAD ranks first among all the compared models:</p>
<p>MSL Dataset: Characterized by aerospace subsystem operational parameters with a low anomaly rate (10.72%), subtle deviations are hard to detect. PC-UAD achieves an F1-score of 23.98%, outperforming mainstream baselines but lower than DADA. This indicates DADA&#x2019;s advantage in capturing subtle anomalies via multi-domain pre-training.</p>
<p>On the Swan dataset, PC-UAD reaches an F1-score of 70.62%, surpassing the closest baseline SimAD by 3.09%, and significantly outperforming AnomalyTransformer and RTdetector by a large margin, reflecting its superiority in modeling multi-type short-term anomalies.</p>
<p>On the PSM dataset (A large-scale internet service monitoring dataset with high noise), PC-UAD achieves the highest F1 of 47.62%, highlighting the prototype memory&#x2019;s ability to resist noise interference.</p>
<p>On the SWaT dataset, PC-UAD obtains an F1-score of 79.08%, exceeding SimAD and OmniAnomaly, and demonstrating strong capability in detecting anomalies with complex spatio-temporal dependencies.</p>
<p>On the SMD, PC-UAD&#x2019;s F1-score is lower than that of TranAD and USAD. The specific reasons were revealed in the ablation experiment. But it still performs closely to RTdetector and outperforms other baselines.</p>
<p>PC-UAD maintains leading ROC-AUC performance across most of the datasets: On MSL, it ranks second only to DADA but outperforms most baselines. On Swan, its score exceeds SimAD and is far higher than the others. On SWaT, it reaches 91.00%, slightly lower than SimAD but surpassing the others. On SMD (low anomaly rate: 4.16%, scattered weak anomalies) and PSM (high anomaly rate: 27.76%, concentrated severe anomalies), it outperforms other baselines, demonstrating the global discrimination capability to scattered anomalies and stability without being overwhelmed by high anomaly density.</p>
<p>Cross-Scenario Robustness: Across datasets with varying anomaly rates, PC-UAD maintains leading ROC-AUC and competitive F1-score, verifying its robustness to both weak and severe anomalies.</p>
</sec>
<sec id="s4_5">
<label>4.5</label>
<title>Ablation Analysis</title>
<p>Ablation experiments investigate the contribution of PC-UAD&#x2019;s three core components: Temporal PatchEmbedder (TP), Prototype Memory (PM) Encoder and ContrastFusion (CF) Module. Results in <xref ref-type="table" rid="table-2">Table 2</xref>, and <xref ref-type="fig" rid="fig-4">Fig. 4b</xref> shows that the complete PC-UAD model achieves the highest average F1-score of 38.92%, confirming the synergistic effect of the three modules.</p>
<table-wrap id="table-2">
<label>Table 2</label>
<caption>
<title>Performance of PC-UAD with key components removed (F1-score).</title>
</caption>
<table>
<colgroup>
<col align="center" width="12mm"/>
<col align="center" width="12mm"/>
<col align="center" width="12mm"/>
<col align="center" width="15mm"/>
<col align="center" width="15mm"/>
<col align="center" width="15mm"/>
<col align="center" width="18mm"/> </colgroup>
<thead>
<tr>
<th>TP</th>
<th>PM</th>
<th>CF</th>
<th>MSL</th>
<th>Swan</th>
<th>SMD</th>
<th>Average F1</th>
</tr>
</thead>
<tbody>
<tr>
<td>&#x00D7;</td>
<td>&#x00D7;</td>
<td>&#x221A;</td>
<td>22.36</td>
<td>67.53</td>
<td>21.91</td>
<td>37.27</td>
</tr>
<tr>
<td>&#x00D7;</td>
<td>&#x221A;</td>
<td>&#x221A;</td>
<td>21.78</td>
<td>68.66</td>
<td><bold>22.60</bold></td>
<td>37.68</td>
</tr>
<tr>
<td>&#x221A;</td>
<td>&#x00D7;</td>
<td>&#x221A;</td>
<td>22.62</td>
<td>68.26</td>
<td>21.36</td>
<td>37.41</td>
</tr>
<tr>
<td>&#x221A;</td>
<td>&#x00D7;</td>
<td>&#x00D7;</td>
<td>22.19</td>
<td>68.11</td>
<td>21.21</td>
<td>37.17</td>
</tr>
<tr>
<td>&#x221A;</td>
<td>&#x221A;</td>
<td>&#x00D7;</td>
<td>23.47</td>
<td>69.23</td>
<td>21.66</td>
<td>38.12</td>
</tr>
<tr>
<td>&#x00D7;</td>
<td>&#x221A;</td>
<td>&#x00D7;</td>
<td>21.17</td>
<td>67.94</td>
<td>21.25</td>
<td>36.79</td>
</tr>
<tr>
<td>&#x221A;</td>
<td>&#x221A;</td>
<td>&#x221A;</td>
<td><bold>23.98</bold></td>
<td><bold>70.62</bold></td>
<td>22.15</td>
<td><bold>38.92</bold></td>
</tr>
</tbody>
</table>
<table-wrap-foot>
<fn id="table-2fn1" fn-type="other">
<p>Note: The best score in each experiment is in bold.</p>
</fn>
</table-wrap-foot>
</table-wrap>
<p>Removing the PM module causes the most significant average F1 drop (1.51%, 38.92%&#x2192;37.41%), highlighting its core role in anchoring normal patterns and mitigating overgeneralization. Without the PM module&#x2019;s &#x201C;normal pattern dictionary&#x201D;, the model loses explicit normal feature references, blurring the boundary between normal and anomalous samples, especially for subtle anomalies in low-anomaly-rate datasets (e.g., MSL).</p>
<p>Disabling the CF module leads to an average F1 reduction of 0.80% (38.92%&#x2192;38.12%), verifying its effectiveness in actively enhancing normal-anomaly feature discriminability. Lacking the CF module&#x2019;s asymmetric contrastive loss and Gaussian noise-based negative sampling, the model can only rely on reconstruction errors, which is insufficient for identifying anomalies with small reconstruction deviations (e.g., Swan).</p>
<p>Removing the TP module results in a 1.24% average F1 decrease (38.92%&#x2192;37.68%), validating its value in adaptive temporal and cross-sensor feature extraction. The loss of learnable positional encoding and channel projection makes the model unable to effectively capture dynamic temporal dependencies and multi-scale features of multivariate time series, leading to the loss of key anomaly-discriminative information.</p>
<p>Notably, the TP module shows a unique trend on the SMD dataset: the model with TP disabled achieves a higher F1-score (22.60%) than with TP enabled. This is due to SMD&#x2019;s characteristics (scattered sparse anomalies, stable cross-sensor dependencies)&#x2014;the TP module&#x2019;s adaptive feature extraction overfits to local temporal fluctuations and redundant sensor correlations, masking weak anomaly signals, while simple direct feature extraction better preserves sparse anomaly integrity.</p>
<p>Models with two modules removed show more severe performance degradation (average F1 &#x003C; 37.30%), confirming each module is irreplaceable. Their synergistic integration enables PC-UAD to target the three core challenges of unsupervised MTSAD, achieving superior detection performance across diverse datasets.</p>
</sec>
<sec id="s4_6">
<label>4.6</label>
<title>Parameter Sensitivity Analysis</title>
<p><list list-type="simple">
<list-item><label>(1)</label><p>Impact of Prototype Count: Model performance is tested with varying prototype counts (<xref ref-type="fig" rid="fig-5">Fig. 5a</xref>). The optimal average performance is achieved when the prototype count (<italic>M</italic>) is set to 200 for most datasets, while excessive prototypes increase overfitting risk.</p>
</list-item>
<list-item><label>(2)</label><p>Impact of Patch Size: Patch size directly affects temporal granularity (<xref ref-type="fig" rid="fig-5">Fig. 5b</xref>). For the Swan dataset, smaller patches (size &#x003D; 32) perform better. This dataset contains more instantaneous anomalies and local patterns, and these fine-grained temporal features are diluted in larger patches, whereas smaller patches preserve the fine granularity to enable accurate capture of short-term anomalous signals. For other datasets, medium patch sizes (size &#x003D; 64&#x2013;128) achieve stable performance by balancing local fluctuation and global trend modeling.</p>
</list-item>
</list></p>
<fig id="fig-5">
<label>Figure 5</label>
<caption>
<title>Parameter sensitivity analysis: (<bold>a</bold>) F1-score vs. prototype count; (<bold>b</bold>) F1-score vs. patch size.</title>
</caption>
<graphic mimetype="image" mime-subtype="tif" xlink:href="CMC_77521-fig-5.tif"/>
</fig>
</sec>
<sec id="s4_7">
<label>4.7</label>
<title>Inference Speed and Memory Consumption Analysis</title>
<p>To validate the practical deployability of PC-UAD in real-time monitoring scenarios, we evaluate its inference speed and memory consumption with a batch size of 1 (worst-case latency for real-time processing). As shown in <xref ref-type="table" rid="table-3">Table 3</xref>, PC-UAD achieves low-latency inference speed across all five multivariate datasets, with single-sample processing time ranging from 15.42 to 22.36 &#x03BC;s. This performance meets the real-time requirements of most industrial monitoring and microservice diagnosis scenarios, outperforming federated learning-based methods [<xref ref-type="bibr" rid="ref-22">22</xref>], which often incur additional communication latency.</p>
<table-wrap id="table-3">
<label>Table 3</label>
<caption>
<title>Single sample inference speed and memory consumption.</title>
</caption>
<table>
<colgroup>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center"/>
<col align="center" width="11mm"/>
<col align="center" width="17mm"/>
<col align="center" width="20mm"/>
<col align="center" width="20mm"/>
<col align="center" width="30mm"/> </colgroup>
<thead>
<tr>
<th>Dataset</th>
<th>Train Size</th>
<th>Test Size</th>
<th>Dimension</th>
<th>Anomaly Rate</th>
<th>Time/Sample (&#x03BC;s)</th>
<th>Peak GPU Memory (MB)</th>
<th>Peak CPU Memory (MB)</th>
<th>GPU Memory/Sample (MB)</th>
</tr>
</thead>
<tbody>
<tr>
<td>MSL</td>
<td>58,317</td>
<td>73,729</td>
<td>55</td>
<td>10.72%</td>
<td>18.65</td>
<td>120.23</td>
<td>1063.22</td>
<td>120.23</td>
</tr>
<tr>
<td>Swan</td>
<td>587,000</td>
<td>425,000</td>
<td>38</td>
<td>12.5%</td>
<td>19.73</td>
<td>116.73</td>
<td>1020.87</td>
<td>116.73</td>
</tr>
<tr>
<td>PSM</td>
<td>132,481</td>
<td>87,841</td>
<td>25</td>
<td>27.76%</td>
<td>15.42</td>
<td>115.57</td>
<td>1037.13</td>
<td>115.57</td>
</tr>
<tr>
<td>SWAT</td>
<td>496,800</td>
<td>449,919</td>
<td>51</td>
<td>11.98%</td>
<td>16.10</td>
<td>119.68</td>
<td>2031.09</td>
<td>119.68</td>
</tr>
<tr>
<td>SMD</td>
<td>708,405</td>
<td>708,420</td>
<td>38</td>
<td>4.16%</td>
<td>22.36</td>
<td>116.73</td>
<td>1365.47</td>
<td>116.73</td>
</tr>
</tbody>
</table>
</table-wrap>
<p>PC-UAD exhibits lightweight memory usage, with peak GPU memory consumption ranging from 115.57 to 120.23 MB across datasets. Per-sample GPU memory overhead is consistent at approximately 116&#x2013;120 MB, indicating that the model&#x2019;s memory usage is not significantly affected by data volume or dimensionality. Peak CPU memory consumption ranges from 1020.87 to 2031.09 MB, which is manageable for standard computing hardware and does not hinder deployment in resource-constrained environments.</p>
<p>Key hyperparameters of PC-UAD are configured as follows: the input time series window length is set to 2048; the dimension of the Transformer model embedding <inline-formula id="ieqn-63"><mml:math id="mml-ieqn-63"><mml:mi>D</mml:mi></mml:math></inline-formula> is 512; the number of learnable prototypes in the memory encoder <inline-formula id="ieqn-64"><mml:math id="mml-ieqn-64"><mml:mi>M</mml:mi></mml:math></inline-formula> is 200; the number of multi-head attention heads is 8; the noise intensity <inline-formula id="ieqn-65"><mml:math id="mml-ieqn-65"><mml:mi>&#x03B1;</mml:mi></mml:math></inline-formula> for Gaussian noise injection in the ContrastFusion module is 0.1; the initial learning rate of the Adam optimizer is 1e&#x2212;4; and the total training epochs are set to 20.</p>
</sec>
</sec>
<sec id="s5">
<label>5</label>
<title>Conclusion</title>
<p>This paper proposes PC-UAD, a novel framework that systematically addresses three key challenges of MTSAD: limited temporal context modeling, insufficient normal-pattern retention, and weak normal-anomaly feature discriminability. PC-UAD&#x2019;s innovations include a Temporal PatchEmbedder with learnable positional encoding, a Prototype Memory Encoder for explicit normal-pattern memorization, and a ContrastFusion module for active feature polarization. Extensive experiments on five real-world datasets demonstrate that PC-UAD outperforms state-of-the-art baselines in F1-score and ROC-AUC, with particular advantages for complex datasets with subtle anomalies. The current negative sample construction relies on Gaussian noise, which may not fully capture complex real-world anomalies (e.g., system-level faults). Future work will focus on: integrating domain knowledge to design hybrid negative sample generation strategies that simulate scenario-specific rare anomalies, introducing few-shot learning mechanisms to enable rapid adaptation to new anomaly patterns with limited labeled data, and exploring cross-domain transfer learning via multi-source pre-training to enhance the model&#x2019;s adaptability to heterogeneous unseen scenarios. These efforts aim to further expand PC-UAD&#x2019;s practical applicability in complex real-world monitoring systems.</p>
</sec>
</body>
<back>
<ack>
<p>Not applicable.</p>
</ack>
<sec>
<title>Funding Statement</title>
<p>This research is supported by the National Natural Science Foundation of China under Grant No. 62376043, Sichuan Provincial Natural Science Foundation under Grant No. 2024NSFTD0008, Science and Technology Program of Sichuan Province under Grant No. 2024ZHCG0016, Science and Technology Program of Chengdu under Grant No. 2025-GH02-00020-HZ, Science and Technology Program of Quzhou under Grant No. 2024K008, and the Open Project Program of the State Key Laboratory of CAD and CG(Grant No. A2509), Zhejiang University.</p>
</sec>
<sec>
<title>Author Contributions</title>
<p>The authors confirm contribution to the paper as follows: Conceptualization, Xi Li and Peng Chen; methodology and writing, Xi Li and Yingjie Chang; software, Yingjie Chang; validation, Ang Bian; project administration and funding acquisition, Peng Chen and Ning Lu. All authors reviewed and approved the final version of the manuscript.</p>
</sec>
<sec sec-type="data-availability">
<title>Availability of Data and Materials</title>
<p>The authors confirm that the data supporting the findings of this study are available within the article.</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.</p>
</sec>
<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>Li</surname> <given-names>Y</given-names></string-name>, <string-name><surname>Wen</surname> <given-names>Z</given-names></string-name>, <string-name><surname>Chen</surname> <given-names>Z</given-names></string-name>, <string-name><surname>Mei</surname> <given-names>J</given-names></string-name>, <string-name><surname>Lin</surname> <given-names>M</given-names></string-name>, <string-name><surname>Zhu</surname> <given-names>M</given-names></string-name></person-group>. <article-title>Diffusion models with self-conditioning guidance for multivariate time series anomaly detection</article-title>. <source>Knowl Based Syst</source>. <year>2025</year>;<volume>330</volume>(<issue>7</issue>):<fpage>114511</fpage>. doi:<pub-id pub-id-type="doi">10.1016/j.knosys.2025.114511</pub-id>.</mixed-citation></ref>
<ref id="ref-2"><label>[2]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><surname>Shentu</surname> <given-names>Q</given-names></string-name>, <string-name><surname>Li</surname> <given-names>B</given-names></string-name>, <string-name><surname>Zhao</surname> <given-names>K</given-names></string-name>, <string-name><surname>Shu</surname> <given-names>Y</given-names></string-name>, <string-name><surname>Rao</surname> <given-names>Z</given-names></string-name>, <string-name><surname>Pan</surname> <given-names>L</given-names></string-name>, <etal>et al.</etal></person-group> <article-title>Towards a general time series anomaly detector with adaptive bottlenecks and dual adversarial decoders</article-title>. In: <conf-name>Proceedings of the Thirteenth International Conference on Learning Representations (ICLR); 2025 Apr 24&#x2013;28; Singapore</conf-name>.</mixed-citation></ref>
<ref id="ref-3"><label>[3]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><surname>Liu</surname> <given-names>X</given-names></string-name>, <string-name><surname>Li</surname> <given-names>X</given-names></string-name>, <string-name><surname>Li</surname> <given-names>Y</given-names></string-name>, <string-name><surname>Tang</surname> <given-names>F</given-names></string-name>, <string-name><surname>Zhao</surname> <given-names>M</given-names></string-name></person-group>. <article-title>RTdetector: deep transformer networks for time series anomaly detection based on reconstruction trend</article-title>. In: <conf-name>Proceedings of the Thirty-Fourth International Joint Conference on Artificial Intelligence; 2025 Aug 16&#x2013;22; Montreal, QC, Canada</conf-name>. p. <fpage>5788</fpage>&#x2013;<lpage>96</lpage>. doi:<pub-id pub-id-type="doi">10.24963/ijcai.2025/644</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>Dai</surname> <given-names>J</given-names></string-name>, <string-name><surname>Wang</surname> <given-names>YZ</given-names></string-name></person-group>. <article-title>Autoencoder anomaly detection method enhanced by hash memory network</article-title>. <source>J Chin Comput Syst</source>. <year>2024</year>;<volume>45</volume>(<issue>6</issue>):<fpage>1301</fpage>&#x2013;<lpage>10</lpage>. <comment>(In Chinese)</comment>.</mixed-citation></ref>
<ref id="ref-5"><label>[5]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Li</surname> <given-names>X</given-names></string-name>, <string-name><surname>Song</surname> <given-names>W</given-names></string-name>, <string-name><surname>Chen</surname> <given-names>P</given-names></string-name>, <string-name><surname>Xi</surname> <given-names>Q</given-names></string-name>, <string-name><surname>He</surname> <given-names>H</given-names></string-name></person-group>. <article-title>An efficient semi-supervised multivariate time series classification model based on multiple prime convolution kernels with adaptive attentions</article-title>. <source>Intell Data Anal Int J</source>. <year>2025</year>;<volume>30</volume>:<fpage>1195</fpage>. doi:<pub-id pub-id-type="doi">10.1177/1088467x251387619</pub-id>.</mixed-citation></ref>
<ref id="ref-6"><label>[6]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><surname>Xu</surname> <given-names>J</given-names></string-name>, <string-name><surname>Wu</surname> <given-names>H</given-names></string-name>, <string-name><surname>Wang</surname> <given-names>J</given-names></string-name>, <string-name><surname>Long</surname> <given-names>M</given-names></string-name></person-group>. <article-title>Anomaly Transformer: time series anomaly detection with association discrepancy</article-title>. In: <conf-name>Proceedings of the Tenth International Conference on Learning Representations (ICLR); 2022 Apr 25&#x2013;29; Virtual</conf-name>.</mixed-citation></ref>
<ref id="ref-7"><label>[7]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Tuli</surname> <given-names>S</given-names></string-name>, <string-name><surname>Casale</surname> <given-names>G</given-names></string-name>, <string-name><surname>Jennings</surname> <given-names>NR</given-names></string-name></person-group>. <article-title>TranAD: deep transformer networks for anomaly detection in multivariate time series data</article-title>. <source>Proc VLDB Endow</source>. <year>2022</year>;<volume>15</volume>(<issue>6</issue>):<fpage>1201</fpage>&#x2013;<lpage>14</lpage>. doi:<pub-id pub-id-type="doi">10.14778/3514061.3514067</pub-id>.</mixed-citation></ref>
<ref id="ref-8"><label>[8]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><surname>Wu</surname> <given-names>H</given-names></string-name>, <string-name><surname>Hu</surname> <given-names>T</given-names></string-name>, <string-name><surname>Liu</surname> <given-names>Y</given-names></string-name>, <string-name><surname>Zhou</surname> <given-names>H</given-names></string-name>, <string-name><surname>Wang</surname> <given-names>J</given-names></string-name>, <string-name><surname>Long</surname> <given-names>M</given-names></string-name></person-group>. <article-title>TimesNet: temporal 2D-variation modeling for general time series analysis</article-title>. In: <conf-name>Proceedings of the Eleventh International Conference on Learning Representations (ICLR); 2023 May 1&#x2013;5; Kigali, Rwanda</conf-name>.</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>Li</surname> <given-names>Y</given-names></string-name>, <string-name><surname>Chen</surname> <given-names>W</given-names></string-name>, <string-name><surname>Chen</surname> <given-names>B</given-names></string-name>, <string-name><surname>Wang</surname> <given-names>D</given-names></string-name>, <string-name><surname>Tian</surname> <given-names>L</given-names></string-name>, <string-name><surname>Zhou</surname> <given-names>M</given-names></string-name></person-group>. <article-title>Prototype-oriented unsupervised anomaly detection for multivariate time series</article-title>. In: <conf-name>Proceedings of the 40th International Conference on Machine Learning (ICML); 2023 Jul 23&#x2013;29; Honolulu, HI, USA</conf-name>.</mixed-citation></ref>
<ref id="ref-10"><label>[10]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Xin</surname> <given-names>R</given-names></string-name>, <string-name><surname>Wang</surname> <given-names>J</given-names></string-name>, <string-name><surname>Chen</surname> <given-names>P</given-names></string-name>, <string-name><surname>Zhao</surname> <given-names>Z</given-names></string-name></person-group>. <article-title>Trustworthy AI-based performance diagnosis systems for cloud applications: a review</article-title>. <source>ACM Comput Surv</source>. <year>2025</year>;<volume>57</volume>(<issue>5</issue>):<fpage>1</fpage>&#x2013;<lpage>37</lpage>. doi:<pub-id pub-id-type="doi">10.1145/3701740</pub-id>.</mixed-citation></ref>
<ref id="ref-11"><label>[11]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><surname>Xiao</surname> <given-names>Z</given-names></string-name>, <string-name><surname>Luo</surname> <given-names>C</given-names></string-name>, <string-name><surname>Hu</surname> <given-names>J</given-names></string-name>, <string-name><surname>Sa</surname> <given-names>G</given-names></string-name>, <string-name><surname>Wang</surname> <given-names>Y</given-names></string-name></person-group>. <article-title>Exploring dual-view graph structures: contrastive learning with graph and hypergraph for multivariate time series classification</article-title>. <source>Neural Netw</source>. <year>2025</year>;<volume>192</volume>(<issue>10</issue>):<fpage>107859</fpage>. doi:<pub-id pub-id-type="doi">10.1016/j.neunet.2025.107859</pub-id>; <pub-id pub-id-type="pmid">40700796</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>Xiao</surname> <given-names>BW</given-names></string-name>, <string-name><surname>Xing</surname> <given-names>HJ</given-names></string-name>, <string-name><surname>Li</surname> <given-names>CG</given-names></string-name></person-group>. <article-title>MulGad: multi-granularity contrastive learning for multivariate time series anomaly detection</article-title>. <source>Inf Fusion</source>. <year>2025</year>;<volume>119</volume>(<issue>332</issue>):<fpage>103008</fpage>. doi:<pub-id pub-id-type="doi">10.1016/j.inffus.2025.103008</pub-id>.</mixed-citation></ref>
<ref id="ref-13"><label>[13]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><surname>Kim</surname> <given-names>T</given-names></string-name>, <string-name><surname>Kim</surname> <given-names>J</given-names></string-name>, <string-name><surname>Tae</surname> <given-names>Y</given-names></string-name>, <string-name><surname>Park</surname> <given-names>C</given-names></string-name>, <string-name><surname>Choi</surname> <given-names>J</given-names></string-name>, <string-name><surname>Choo</surname> <given-names>J</given-names></string-name></person-group>. <article-title>Reversible instance normalization for accurate time-series fore-casting against distribution shift</article-title>. In: <conf-name>Proceedings of the Tenth International Conference on Learning Representations (ICLR); 2022 Apr 25&#x2013;29; Virtual</conf-name>.</mixed-citation></ref>
<ref id="ref-14"><label>[14]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><surname>Chen</surname> <given-names>T</given-names></string-name>, <string-name><surname>Kornblith</surname> <given-names>S</given-names></string-name>, <string-name><surname>Norouzi</surname> <given-names>M</given-names></string-name>, <string-name><surname>Hinton</surname> <given-names>G</given-names></string-name></person-group>. <article-title>A simple framework for contrastive learning of visual representations</article-title>. In: <conf-name>Proceedings of the 37th International Conference on Machine Learning (ICML); 2020 Jul 13&#x2013;18; Virtual</conf-name>. p. <fpage>1597</fpage>&#x2013;<lpage>607</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>Zhou</surname> <given-names>S</given-names></string-name>, <string-name><surname>Zha</surname> <given-names>D</given-names></string-name>, <string-name><surname>Shen</surname> <given-names>X</given-names></string-name>, <string-name><surname>Huang</surname> <given-names>X</given-names></string-name>, <string-name><surname>Zhang</surname> <given-names>R</given-names></string-name>, <string-name><surname>Chung</surname> <given-names>K</given-names></string-name></person-group>. <article-title>Denoising-aware contrastive learning for noisy time series</article-title>. In: <conf-name>Proceedings of the 33rd International Joint Conference on Artificial Intelligence (IJCAI); 2024 Aug 3&#x2013;9; Jeju, Republic of Korea</conf-name>. p. <fpage>5644</fpage>&#x2013;<lpage>52</lpage>. doi:<pub-id pub-id-type="doi">10.24963/ijcai.2024/624</pub-id>.</mixed-citation></ref>
<ref id="ref-16"><label>[16]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><surname>Lea</surname> <given-names>C</given-names></string-name>, <string-name><surname>Flynn</surname> <given-names>MD</given-names></string-name>, <string-name><surname>Vidal</surname> <given-names>R</given-names></string-name>, <string-name><surname>Reiter</surname> <given-names>A</given-names></string-name>, <string-name><surname>Hager</surname> <given-names>GD</given-names></string-name></person-group>. <article-title>Temporal convolutional networks for action segmentation and detection</article-title>. In: <conf-name>Proceedings of the 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR); 2017 Jul 21&#x2013;26; Honolulu, HI, USA</conf-name>. p. <fpage>1003</fpage>&#x2013;<lpage>12</lpage>. doi:<pub-id pub-id-type="doi">10.1109/CVPR.2017.113</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>Li</surname> <given-names>X</given-names></string-name>, <string-name><surname>Wen</surname> <given-names>P</given-names></string-name>, <string-name><surname>Chen</surname> <given-names>P</given-names></string-name>, <string-name><surname>Chen</surname> <given-names>J</given-names></string-name>, <string-name><surname>Wen</surname> <given-names>X</given-names></string-name>, <string-name><surname>Xia</surname> <given-names>Y</given-names></string-name></person-group>. <article-title>An effective parallel convolutional anomaly multi-classification model for fault diagnosis in microservice system</article-title>. <source>Softw Qual J</source>. <year>2024</year>;<volume>32</volume>(<issue>3</issue>):<fpage>921</fpage>&#x2013;<lpage>38</lpage>. doi:<pub-id pub-id-type="doi">10.1007/s11219-024-09672-6</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>Zhong</surname> <given-names>Z</given-names></string-name>, <string-name><surname>Yu</surname> <given-names>Z</given-names></string-name>, <string-name><surname>Xi</surname> <given-names>X</given-names></string-name>, <string-name><surname>Xu</surname> <given-names>Y</given-names></string-name>, <string-name><surname>Cao</surname> <given-names>W</given-names></string-name>, <string-name><surname>Yang</surname> <given-names>Y</given-names></string-name>, <etal>et al</etal></person-group>. <article-title>SimAD: a simple dissimilarity-based approach for time-series anomaly detection</article-title>. <source>IEEE Trans Neural Netw Learn Syst</source>. <year>2025</year>;<volume>36</volume>(<issue>11</issue>):<fpage>19669</fpage>&#x2013;<lpage>80</lpage>. doi:<pub-id pub-id-type="doi">10.1109/TNNLS.2025.3590220</pub-id>; <pub-id pub-id-type="pmid">40729708</pub-id></mixed-citation></ref>
<ref id="ref-19"><label>[19]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><surname>Zong</surname> <given-names>B</given-names></string-name>, <string-name><surname>Song</surname> <given-names>Q</given-names></string-name>, <string-name><surname>Min</surname> <given-names>MR</given-names></string-name>, <string-name><surname>Cheng</surname> <given-names>W</given-names></string-name>, <string-name><surname>Lumezanu</surname> <given-names>C</given-names></string-name>, <string-name><surname>Cho</surname> <given-names>D</given-names></string-name>, <etal>et al.</etal></person-group> <article-title>Deep autoencoding gaussian mixture model for unsupervised anomaly detection</article-title>. In: <conf-name>Proceedings of the International Conference on Learning Representations; 2018 Apr 30&#x2013;May 3; Vancouver, BC, Canada</conf-name>.</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>Su</surname> <given-names>Y</given-names></string-name>, <string-name><surname>Zhao</surname> <given-names>Y</given-names></string-name>, <string-name><surname>Niu</surname> <given-names>C</given-names></string-name>, <string-name><surname>Liu</surname> <given-names>R</given-names></string-name>, <string-name><surname>Sun</surname> <given-names>W</given-names></string-name>, <string-name><surname>Pei</surname> <given-names>D</given-names></string-name></person-group>. <article-title>Robust anomaly detection for multivariate time series through stochastic recurrent neural network</article-title>. In: <conf-name>Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery &#x0026; Data Mining; 2019 Aug 4&#x2013;8; Anchorage, AK, USA</conf-name>. p. <fpage>2828</fpage>&#x2013;<lpage>37</lpage>. doi:<pub-id pub-id-type="doi">10.1145/3292500.3330672</pub-id>.</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>Audibert</surname> <given-names>J</given-names></string-name>, <string-name><surname>Michiardi</surname> <given-names>P</given-names></string-name>, <string-name><surname>Guyard</surname> <given-names>F</given-names></string-name>, <string-name><surname>Marti</surname> <given-names>S</given-names></string-name>, <string-name><surname>Zuluaga</surname> <given-names>MA</given-names></string-name></person-group>. <article-title>USAD: UnSupervised anomaly detection on multivariate time series</article-title>. In: <conf-name>Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery &#x0026; Data Mining; 2020 Jul 6&#x2013;10; Virtual</conf-name>. p. <fpage>3395</fpage>&#x2013;<lpage>404</lpage>. doi:<pub-id pub-id-type="doi">10.1145/3394486.3403392</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>Hao</surname> <given-names>J</given-names></string-name>, <string-name><surname>Chen</surname> <given-names>P</given-names></string-name>, <string-name><surname>Chen</surname> <given-names>J</given-names></string-name>, <string-name><surname>Li</surname> <given-names>X</given-names></string-name></person-group>. <article-title>Effectively detecting and diagnosing distributed multivariate time series anomalies via Unsupervised Federated Hypernetwork</article-title>. <source>Inf Process Manag</source>. <year>2025</year>;<volume>62</volume>(<issue>4</issue>):<fpage>104107</fpage>. doi:<pub-id pub-id-type="doi">10.1016/j.ipm.2025.104107</pub-id>.</mixed-citation></ref>
</ref-list>
</back></article>