Software log analysis can be laborious and time consuming. Time and labeled data are usually lacking in industrial settings. This paper studies unsupervised and time efficient methods for anomaly detection. We study two custom and two established models. The custom models are: an OOV (Out-Of-Vocabulary) detector, which counts the terms in the test data that are not present in the training data, and the Rarity Model (RM), which calculates a rarity score for terms based on their infrequency. The established models are KMeans and Isolation Forest. The models are evaluated on four public datasets (BGL, Thunderbird, Hadoop, HDFS) with three different representation techniques for the log messages (Words, character Trigrams, Parsed events). For training, we used both normal-only data, which is free of all anomalies, and unfiltered data, which contains both normal and anomalous instances. We used primarily the AUC-ROC metric for evaluation due to challenges in setting a threshold but we also include F1-scores for further insight. Different configurations are advised based on specific requirements. When training data is unfiltered, includes both normal and anomalous instances, the most effective combination is the Isolation Forest with event representation, achieving an AUC-ROC of 0.829. If it's possible to create a normal-only training dataset, combining the Out-Of-Vocabulary (OOV) detector with trigram representation yields the highest AUC-ROC of 0.846. For speed considerations, the OOV detector is optimal for filtered data, while the Rarity Model is the best choice for unfiltered data.
Pinpointing Anomaly Events in Logs from Stability Testing -- N-Grams vs. Deep-Learning
由于稳定性测试执行日志可能很长,软件工程师需要帮助定位异常事件。我们开发并评估了两个模型,用于对单个日志事件进行评分,即N-Gram模型和具有LSTM(长短期记忆)的深度学习模型。两者都只在正常的日志序列上训练。我们评估的模型与长日志序列的Android稳定性测试在我们公司的情况下,和短日志序列的HDFS(Hadoop分布式文件系统)的公共数据集。我们评估下一个事件的预测精度和计算效率。LSTM模型在稳定性测试日志中更准确(0.848 vs 0.865),而在HDFS日志中,N-Gram稍微更准确(0.904 vs 0.900)。与Deep模型相比,N-Gram模型具有更高的计算效率(4到13秒vs 16分钟到近4小时),使其成为我们案例公司的首选。对单个日志事件的错误性进行评分似乎是对失败测试用例的根本原因分析的一个很好的帮助,我们的案例公司计划将其添加到其在线服务中。尽管最近在软件系统异常检测中使用深度学习的浪潮激增,但我们发现这样做的好处有限。然而,未来的工作应该考虑我们的发现是否适用于不同的LSTM模型超参数,其他数据集,以及其他深度学习方法,这些方法比基于LSTM的模型具有更好的准确性和计算效率。
School of Software;Microelectronics Peking University Beijing, China;Institute for Artificial Intelligence Peking University Beijing, China;National Engineering Research Center for Software Engineering Peking University Beijing, China
本文提出 ZeroLog,一种系统无关的表示元学习方法,结合无监督域自适应与对抗训练,在目标系统零标签条件下实现跨系统日志异常检测,并在三个公开数据集上取得超过 80% 的 F1 分数。
LogAction: Consistent Cross-system Anomaly Detection through Logs via Active Domain Adaptation
School of Software(软件学院);Institute for Artificial Intelligence, Peking University, Beijing, China(人工智能研究院,北京大学,北京,中国);National Engineering Research Center for Software Engineering, Peking University, Beijing, China(软件工程国家工程研究中心,北京大学,北京,中国);National Key Laboratory of Data Space Technology(数据空间技术与系统国家重点实验室)
MINES: Explainable Anomaly Detection through Web API Invariant Inference
National University of Singapore(国立新加坡大学);Shanghai Jiao Tong University(上海交通大学);Singapore Management University(新加坡管理学院);GovTech Singapore(新加坡政府科技局);Chongqing University(重庆大学)