基于并行Transformer-LSTM的IoT时间序列异常检测方法

    IoT time series anomaly detection method based on parallel Transformer-LSTM

    • 摘要: 针对物联网复杂时间序列的异常检测问题,本研究提出了一种基于Transformer和长短期记忆网络(Long Short-Term Memory, LSTM)优化的并行Transformer-LSTM混合模型。利用沙普利加解释值对特征重要性进行评估,进而筛选出关键特征,同时采用滑动切片技术对时间序列数据进行重构,以增强模型对时域特征的捕捉能力。此外,引入集成层对不同特征进行整合并自动调整其权重,从而优化异常检测性能。实验部分使用均方误差和二元交叉熵作为损失函数,分别对LSTM、串联Transformer-LSTM模型及并行Transformer-LSTM模型进行训练,最终通过加权方式获取异常分值。实验结果表明,所提出的模型在真实数据集上表现出色,与现有方法相比,在准确率、精确度、召回率等关键指标上均有显著提升。进一步的消融实验验证了模型各组成部分的有效性,即使在异常率仅为1%的Fridge数据集,检测准确率仍可以达到99.93%,充分证明了该模型在复杂时间序列异常检测任务中的优越性能。

       

      Abstract: A parallel Transformer-LSTM( Long Short-Term Memory) hybrid model is proposed for complex Io T time series data.The model achieves real-time anomaly detection by optimizing the fusion of Transformer and LSTM networks. The model uses Shapley additive explanations to evaluate feature importance to identify key features,and uses sliding window segmentation to reconstruct time series data to enhance the extraction of temporal features. In addition,the model introduces a fusion layer to automatically fuse different features and adjust their weights to optimize anomaly detection performance. In the experiment,the mean square error and binary cross entropy are used as loss functions to train the LSTM model,serial Transformer-LSTM model,and parallel Transformer-LSTM model,respectively,and the final anomaly score is obtained by weighted aggregation. The experimental results show that the model achieves excellent performance on real datasets. Compared with existing methods,key indicators such as accuracy,precision,and recall are significantly improved. The effectiveness of each component is verified through ablation studies. Even on the Fridge dataset containing only 1% anomalies,the detection accuracy can be maintained at 99.93%,demonstrating the excellent ability of the model to monitor anomalies in complex time series.

       

    /

    返回文章
    返回