Author Login Chief Editor Login Reviewer Login Editor Login Remote Office

Computer Engineering

   

Multivariate Time Series Anomaly Detection Based on Multi-Distribution and Multi-Scale Prior Mechanisms

  

  • Published:2026-07-09

基于多分布多尺度先验机制的多元时序异常检测

Abstract: A Multi-distribution and Multi-scale Adaptive Prior Transformer for Anomaly Detection (MMAPT-AD) is proposed to address the limitations of existing multivariate time series anomaly detection methods in modeling complex temporal dependencies, multi-scale dynamic patterns, and prior information utilization. The model employs a data embedding module to obtain unified representations of multivariate time series from both temporal and variable dimensions, enhancing the representation of variable coupling relationships and dynamic temporal patterns. A multi-distribution and multi-scale prior generation mechanism is further introduced by jointly incorporating Gaussian, Laplace, and Cauchy distributions under different temporal scales to model latent correlation structures within the sequence. Specifically, the Gaussian distribution characterizes stationary variation patterns, the Laplace distribution captures local abrupt changes, and the Cauchy distribution improves the adaptability to long-tail anomalies and complex fluctuation patterns. To describe heterogeneous temporal dependencies across different scales, prior correlation matrices are generated at multiple temporal granularities for joint modeling of local dependencies and global temporal structures. Learnable fusion weights are adopted to integrate heterogeneous prior information from different distributions and scales, improving the representation capability for complex statistical characteristics and dynamic patterns. Based on the generated priors, a prior-guided anomaly attention mechanism is designed by incorporating multi-scale prior information into the attention weight computation process. The proposed mechanism introduces structural prior constraints while learning temporal correlation features and guides the model to focus on anomaly-related temporal segments and variable channels, thereby improving the detection capability for local anomalies, sparse anomalies, and complex structural anomalies. To enhance anomaly discrimination capability, a joint optimization objective combining reconstruction error, attention-prior discrepancy constraints, and multi-scale inconsistency constraints is constructed. In addition, a comprehensive anomaly scoring strategy integrating reconstruction error, attention distribution discrepancy, and multi-scale structural deviation is developed for time-step-level anomaly detection. Experiments on five public datasets, including SMD, MSL, SWaT, SMAP, and PSM, show that MMAPT-AD achieves F1 scores of 93.40%, 94.99%, 96.06%, 96.67%, and 98.06%, respectively. On the SMD dataset, the proposed method improves the F1 score by 7.18 percentage points and 1.07 percentage points compared with InterFusion and Anomaly Transformer, respectively. On the MSL dataset, MMAPT-AD achieves an F1 score of 94.99%, outperforming TransDe by 0.63 percentage points. On the SMAP dataset, the Recall reaches 99.35%, indicating strong anomaly coverage capability. Ablation studies demonstrate that multi-distribution prior modeling, multi-scale structural constraints, and the joint optimization strategy all contribute to performance improvement. Robustness experiments further verify the stability and generalization capability of the model under different input perturbation conditions. Experimental results demonstrate that MMAPT-AD effectively integrates multi-distribution statistical characteristics and multi-scale temporal dependencies, exhibiting strong anomaly detection capability and structural adaptability in complex dynamic scenarios.

摘要: 针对现有多元时间序列异常检测方法在复杂时序依赖建模、多尺度动态特征刻画以及先验信息利用方面存在的不足,提出一种多分布多尺度自适应先验Transformer异常检测模型MMAPT-AD(Multi-distribution and Multi-scale Adaptive Prior Transformer for Anomaly Detection)。模型首先通过数据嵌入模块对输入多元时间序列进行统一表示,从时间维度与变量维度提取基础时序特征,以增强对变量间耦合关系与动态变化模式的表达能力。随后构建多分布多尺度先验生成机制,在不同时间尺度下联合引入高斯分布、拉普拉斯分布与柯西分布,对序列潜在关联结构进行建模。其中,高斯分布用于描述平稳变化特征,拉普拉斯分布用于增强对局部突变模式的刻画能力,柯西分布用于提高模型对长尾异常及复杂波动模式的适应能力。针对不同尺度下时序依赖关系存在差异的问题,模型在多个时间尺度下生成先验关联矩阵,对局部依赖关系与全局时序结构进行联合建模。同时,引入可学习权重实现多分布先验融合,以增强模型对复杂统计特征与异构动态模式的表征能力。在此基础上,设计先验引导的异常注意力机制,将多尺度先验信息融入注意力权重计算过程。该机制在学习时序关联特征的同时引入结构先验约束,引导模型关注潜在异常相关的关键时间片段与变量通道,从而提升对局部异常、稀疏异常及复杂结构异常的识别能力。为提高模型对复杂异常模式的区分能力,在模型优化阶段结合重构误差、注意力先验差异约束以及多尺度不一致性约束构建联合损失函数,并融合重构误差、注意力分布差异及多尺度结构偏离信息构建综合异常评分,实现时间步级异常判定。为验证模型性能,本文在SMD、MSL、SWaT、SMAP及PSM五个公开数据集上进行了实验。实验结果表明,MMAPT-AD在五个数据集上分别取得93.40%、94.99%、96.06%、96.67%和98.06%的F1值,在多个数据集上达到最优或接近最优的检测性能。其中,在SMD数据集上,F1值较InterFusion与Anomaly Transformer分别提升7.18个百分点和1.07个百分点;在MSL数据集上,较TransDe提升0.63个百分点;在SMAP数据集上,Recall达到99.35%,表现出较强的异常覆盖能力。进一步的消融实验与鲁棒性实验验证了多分布先验建模、多尺度结构约束以及联合优化策略对性能提升的有效性,同时表明模型在输入扰动条件下仍具有较好的稳定性与泛化能力。综上,MMAPT-AD能够有效融合多分布统计特征与多尺度时序依赖信息,在复杂动态场景下表现出良好的异常检测性能与结构适应性。