作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程

• •    

渐进式潜扩散驱动的多元时间序列异常检测

  • 发布日期:2026-08-27

Progressive Latent Diffusion-Driven Anomaly Detection for Multivariate Time Series

  • Published:2026-08-27

摘要: 针对生成式多元时间序列异常检测中局部序列重构与全局分布拟合难以协调,以及模型容易高保真重构异常信号导致正常样本与异常样本间重构误差差异缩小的问题,本文提出一种渐进式潜扩散驱动的多元时间序列异常检测框架(Progressive Latent Diffusion-Driven Anomaly Detection,PLDAD)。该框架采用由掩码函数自编码器预训练、潜先验学习和端到端联合微调构成的三阶段渐进式训练范式,分阶段完成基础特征表示、正常先验建模和全局协同优化。首先,在掩码函数自编码器(Masked Function Autoencoder,MFAE)阶段,对输入序列进行元素级独立掩码,并利用双支路编码结构分别提取变量间关联和多尺度时间依赖;随后,通过自注意力机制融合时空特征,并利用基于交叉注意力的连续时间解码器重构完整序列,从而构建平滑且紧凑的潜特征空间。其次,在潜先验学习(Latent Prior Learning,LPL)阶段,冻结预训练编码器,将无掩码完整序列映射为初始潜特征,并在潜空间中建立前向加噪和逆向去噪过程。不同于传统扩散模型以高斯噪声为预测目标,本文利用潜特征扩散模型(Latent Feature Diffusion Model,LFDM)直接预测生成潜特征,使受扰动表示在正常数据先验约束下向正常特征流形靠拢,以降低异常信息被传递至解码器并被高保真重构的可能。最后,在联合微调(Joint Fine-Tuning,JFT)阶段,解冻编码器、LFDM和解码器,通过重构损失与扩散损失构成的联合目标进行端到端优化,使局部序列恢复与全局先验约束相互协调。推理时,根据真实观测与重构结果之间的平方误差计算逐时间点异常分数。本文在ASD、MSL、PSM、SMAP、SMD和SWaT共6个公开基准数据集上开展实验,数据规模超过340万个观测值,并与11种代表性方法进行比较。实验采用F1分数和接收者操作特征曲线下面积(Area Under the Receiver Operating Characteristic Curve,AUC-ROC)对模型性能进行综合评价。结果表明,PLDAD在6个数据集上的F1和AUC-ROC均取得最优结果,平均F1达到94.31%,说明该方法在不同数据分布和异常模式下均具有较稳定的检测能力;其在ASD、MSL、PSM、SMAP、SMD和SWaT上的F1分别达到95.12%、94.01%、96.51%、88.12%、95.67%和96.40%,在ASD、PSM和SMD上的AUC-ROC分别达到88.13%、80.12%和83.27%,表明模型在异常区间检出与异常分数整体区分方面具有较好的综合性能。统计显著性分析显示,PLDAD获得1.0000的最高平均排名,进一步验证了其相对于各基线方法的稳定优势;消融实验表明,渐进式训练、潜先验学习、LFDM、联合微调和特征净化机制均能提升检测性能;潜特征可视化结果显示,完整模型中正常样本与异常样本的分布边界更加清晰。时间效率实验表明,PLDAD在保持较高检测精度的同时具有可接受的计算开销。综上,PLDAD能够缓解局部序列重构与全局分布拟合之间的优化冲突,降低异常信号被高保真重构的倾向,在复杂多元时间序列场景下表现出较好的检测准确性、稳定性和应用潜力。

Abstract: To address the difficulty of coordinating local sequence reconstruction with global distribution fitting in generative multivariate time-series anomaly detection, as well as the tendency of such models to reconstruct anomalous signals with high fidelity, thereby narrowing the reconstruction-error gap between normal and anomalous samples, this paper proposes a Progressive Latent Diffusion-Driven Anomaly Detection framework for multivariate time series, termed PLDAD. The framework adopts a three-stage progressive training paradigm consisting of Masked Function Autoencoder pretraining, Latent Prior Learning, and end-to-end Joint Fine-Tuning, which progressively accomplishes basic feature representation, normal-prior modeling, and global collaborative optimization. First, during the Masked Function Autoencoder (MFAE) stage, element-wise independent masking is applied to the input sequence, and a dual-branch encoding structure is employed to extract inter-variable correlations and multiscale temporal dependencies, respectively. The resulting spatiotemporal features are subsequently fused through a self-attention mechanism, and the complete sequence is reconstructed using a cross-attention-based continuous-time decoder, thereby constructing a smooth and compact latent feature space. Second, during the Latent Prior Learning (LPL) stage, the pretrained encoder is frozen, and the complete unmasked sequence is mapped into initial latent features. A forward noising process and a reverse denoising process are then established in the latent space. Unlike conventional diffusion models that take Gaussian noise as the prediction target, the proposed Latent Feature Diffusion Model (LFDM) directly predicts generated latent features, guiding perturbed representations toward the normal feature manifold under the constraint of the normal-data prior. This reduces the likelihood that anomalous information is propagated to the decoder and reconstructed with high fidelity. Finally, during the Joint Fine-Tuning (JFT) stage, the encoder, LFDM, and decoder are unfrozen and optimized end to end using a joint objective composed of reconstruction loss and diffusion loss, enabling local sequence recovery and global prior constraints to be coordinated. During inference, a point-wise anomaly score is calculated from the squared error between the actual observations and their reconstructed values. Experiments are conducted on six public benchmark datasets, namely ASD, MSL, PSM, SMAP, SMD, and SWaT, comprising more than 3.4 million observations, and the proposed method is compared with 11 representative approaches. Model performance is comprehensively evaluated using the F1-score and the Area Under the Receiver Operating Characteristic Curve (AUC-ROC). The results show that PLDAD achieves the best F1-score and AUC-ROC results on all six datasets, with an average F1-score of 94.31%, demonstrating stable detection performance across different data distributions and anomaly patterns. Its F1-scores on ASD, MSL, PSM, SMAP, SMD, and SWaT reach 95.12%, 94.01%, 96.51%, 88.12%, 95.67%, and 96.40%, respectively, while its AUC-ROC values on ASD, PSM, and SMD reach 88.13%, 80.12%, and 83.27%, respectively, indicating favorable overall performance in both anomaly-segment detection and the global discrimination of anomaly scores. Statistical significance analysis shows that PLDAD obtains the highest average rank of 1.0000, further confirming its stable advantages over the baseline methods. Ablation experiments demonstrate that progressive training, latent prior learning, LFDM, joint fine-tuning, and the feature purification mechanism all contribute to improved detection performance. Latent-feature visualization further reveals a clearer distribution boundary between normal and anomalous samples in the complete model. Time-efficiency experiments show that PLDAD maintains acceptable computational overhead while preserving high detection accuracy. In summary, PLDAD can alleviate the optimization conflict between local sequence reconstruction and global distribution fitting, reduce the tendency to reconstruct anomalous signals with high fidelity, and achieve favorable detection accuracy, stability, and application potential in complex multivariate time-series scenarios.