Skip to main content
QUICK REVIEW

[论文解读] Detecting Anomalies in Software Execution Logs with Siamese Network

Shayan Hashemi, Mika Mäntylä|arXiv (Cornell University)|Feb 2, 2021
Software System Performance and Reliability参考文献 32被引用 4
一句话总结

本文提出一种用于软件执行日志异常检测的孪生LSTM网络,通过对比学习将正常和异常序列嵌入到嵌入空间中,使相似序列在空间中彼此接近。在HDFS日志数据集上,该方法实现了SOTA的F1得分0.996,其新颖的配对生成方法将训练样本对数量减少了3000倍,同时保持了高精度,并引入了无监督的日志演化监控与可视化,以增强可解释性。

ABSTRACT

Logs are semi-structured text files that represent software's execution paths and states during its run-time. Therefore, detecting anomalies in software logs reflect anomalies in the software's execution path or state. So, it has become a notable concern in software engineering. We use LSTM like many prior works, and on top of LSTM, we propose a novel anomaly detection approach based on the Siamese network. This paper also provides an authentic validation of the approach on the Hadoop Distributed File System (HDFS) log dataset. To the best of our knowledge, the proposed approach outperforms other methods on the same dataset at the F1 score of 0.996, resulting in a new state-of-the-art performance on the dataset. Along with the primary method, we introduce a novel training pair generation algorithm that reduces generated training pairs by the factor of 3000 while maintaining the F1 score, merely a modest decay from 0.996 to 0.995. Additionally, we propose a hybrid model by combining the Siamese network with a traditional feedforward neural network to make end-to-end training possible, reducing engineering effort in setting up a deep-learning-based log anomaly detector. Furthermore, we examine our method's robustness to log evolutions by evaluating the model on synthetically evolved log sequences; we got the F1 score of 0.95 at the noise ratio of 20%. Finally, we dive deep into some of the side benefits of the Siamese network. Accordingly, we introduce a method of monitoring the evolutions of logs without label requirements at run-time. Additionally, we present a visualization technique that facilitates human administrations of log anomaly detection.

研究动机与目标

  • 解决日志异常检测数据集中异常样本稀少、正常样本占主导的不平衡问题。
  • 开发一种深度学习模型,能够有效利用正常和异常日志序列,而无需平衡的训练数据。
  • 通过优化的配对生成算法,降低孪生网络训练的计算成本。
  • 在实际生产系统中常见的日志演化背景下,实现鲁棒的异常检测。
  • 为人工参与的分析提供可解释的日志嵌入监控与可视化。

提出的方法

  • 采用孪生网络架构,两个相同的基于LSTM的编码器分别处理日志序列对,以学习共享的嵌入空间。
  • 通过对比损失进行模型训练,以最小化同类别序列(正常-正常或异常-异常)嵌入之间的距离,同时最大化异类序列之间的距离。
  • 提出一种受负采样启发的新型配对生成算法,将训练样本对数量减少3000倍,同时将F1得分保持在0.995的高水平。
  • 构建一种混合模型,将孪生网络与前馈神经网络结合,实现端到端训练,降低工程复杂度。
  • 引入无监督的适应度分数,通过测量训练数据高斯混合模型下嵌入序列的对数似然,实现对日志演化的监控。
  • 使用T-SNE、UMAP和PCA对高维嵌入进行可视化,使人类能够理解异常边界的分布。

实验结果

研究问题

  • RQ1基于孪生网络的方法是否能在HDFS数据集上超越现有的SOTA方法在日志异常检测中的表现?
  • RQ2如何在不牺牲性能的前提下,提升孪生网络在日志异常检测中的训练效率?
  • RQ3由于软件更新导致的日志序列演化,该方法在多大程度上具备鲁棒性?
  • RQ4学习到的嵌入空间是否可用于无标签数据检测日志演化?
  • RQ5嵌入日志序列的可视化是否能提升人类对异常检测的理解与监督能力?

主要发现

  • 所提出的孪生网络在HDFS日志数据集上实现了0.996的F1得分,创下新的SOTA性能记录。
  • 新型配对生成算法使训练样本对数量减少3000倍,F1得分仅从0.996轻微下降至0.995。
  • 该模型对日志演化表现出强鲁棒性,在合成演化日志序列中噪声比例达20%时,仍能保持0.95的F1得分。
  • 适应度分数指标成功实现了无标签条件下的日志演化检测,有助于在生产环境中做出主动再训练决策。
  • 使用T-SNE、UMAP和PCA的可视化结果在嵌入空间中清晰区分了正常与异常日志序列,证实了模型的判别能力。
  • 混合孪生-前馈神经网络模型支持端到端训练,提升了实际部署的可行性,其中孪生组件对实现高性能至关重要(无该组件时F1为0.973,有则为0.996)。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。