arXiv:2611.07760cs.SENov 2026

Manuscript Offprint

arXiv:2611.07760

Fast Unsupervised Anomaly Detection Methods on Software Logs - An Empirical Study

Jesse Nyyssölä, Mika Mäntylä, Yuqing Wang

Abstract

Context: Anomaly detection on software logs ensures system reliability through failure identification, root cause analysis and fault localization. While supervised models show excellent performance, in a practical setting there rarely are labeled training data available. This calls for the use of unsupervised models.

Objectives: We study effects of data preprocessing, anomaly detection method, and the dataset. For preprocessing, we examine three options: The use of anomaly-free training data, using randomized as opposed to chronologically selected training data, and the use of a custom loader to extract log message from the log line. Regarding anomaly detection we use four models (KMeans, IsolationForest, RarityModel, Out-Of-Vocabulary Detector) and three representations (Words, trigrams, and parsed events). We evaluate these approaches on seven datasets: BGL, HDFS, Hadoop, Spirit, Thunderbird, Liberty, and LO2Token.

Methods: We run each combination of the selected factors and measure performance with AUCROC and F1-score metrics. Then we utilize a generalized linear model to establish relationships between the factors. Furthermore, we address execution times.

Results: Our evidence reveals large variability across all datasets, preventing us from making recommendations that apply universally. For instance, log parsing enhances performance on some datasets but reduces it on others. The evidence suggests that using anomaly-free data for training unsupervised models can improve anomaly detection performance, though this requires extra effort to identify such data. Previous work has argued that shuffling data leads to unrealistic model performance (data leakage). Yet, our results show this does not hold for the unsupervised models we tested, while it remains true for supervised models in the same setup. Regarding execution time, the results are clear. For fast execution of the pipeline, use word representation and avoid IsolationForest model.

Conclusion: We encourage practitioners to be aware of dataset-specific differences, and study what has worked for similar datasets in the past.

Keywords: Anomaly Detection, Log Analysis, Machine Learning, Unsupervised

1. Introduction

Software log anomaly detection has two contrasting approaches. First is based on deep-learning, which is emphasized on research publications [1], [2], while the second is based on simple rule-based detectors and often used in industry [3]. Computationally intensive deep-learning approaches, while gaining performance improvements, are practically

harder to utilize in practice due to their complexity, heavy computational cost, and reliance on preprocessing [4], [5], [6], [7]. On the other hand, simple rule-based detectors, such as sequence length, have been shown to reach good detection performance on commonly used HDFS dataset in anomaly detection research [8].

In industrial settings, there are often large amounts of data, but little time, which makes simple detectors much more sought after. Additionally, labeled data is rare because the process is labor intensive, so it is better if our detectors can utilize the data in its rawest form. This study addresses

*Corresponding author Email addresses: jesse.nyssola@helsinki.fi (Jesse Nyyssölä), mika.mantyla@helsinki.fi (Mika Mäntylä), yuqing.wang@helsinki.fi (Yuqing Wang) several factors when one has to operate with label free datasets.

Conducting anomaly detection on software logs contains various options that a practitioner can choose from. These options include everything from data selection to model utilization. Studies on the topic generally select certain settings and compare only one selected factor, e.g., model selection [1]. This makes it difficult to compare results across studies as the other settings of the studies are different. In this study we, aim to conduct empirical evaluation across various factors to examine the impact that individual factors might introduce. As such, this study is also heavily motivated by challenges in practical settings where the practitioner is presented with various options and does not know what to choose. This study aims to provide insights and guidelines on which approaches work well given the characteristics of the data.

Past work in unsupervised log anomaly detection is limited as we only found a handful of papers that give due consideration to preprocessing and data selection. For example, a recent study that aimed to provide a comprehensive view on techniques for log-based anomaly detection admits that the lack of preprocessing optimization can affect detection accuracy and generalizability of results [9]. A second major gap in existing work is on the data representations, that is, in what format it is given to the model. Past work has shown that traditional machine learning (ML) models work better with classical log representation techniques, while deep learning models work better with semantic-based representations [5]. This study will focus on lightweight representations on lightweight models as we are optimizing for speed. A more thorough summary of previous work is given in Section 2.

This study extends our previous paper [10]. The previous paper had 4 datasets; here we introduce 3 new ones. We also include two new preprocessing approaches which results in four times more experiments than previously. In total we have 672 experimental setups which are the result of iterating across six factors (dataset, model, representation, and three preprocessing options). Furthermore, this extension of experimental setups enables us to use generalized linear models that make the evidence in this paper far more robust than what we presented previously. These extensions makes this paper the most comprehensive study regarding anomaly detection on software logs with fast unsupervised methods. We formulate the following research questions.

  • RQ1: What effect do the model, representation and preprocessing options have on anomaly detection performance on software logs?

  • RQ2: To what extent is the variability explained by the dataset?

  • RQ3: How do the computational costs of different models, representations, and preprocessing approaches compare?

The distinction between these two research questions is that in RQ1, we address factors that the practitioner might be able to affect, e.g., they could change the model. However, data is what they want to analyze in the first place. Therefore, our dataset-specific analysis in RQ2 will focus on examining the variability and generalizability of the results between datasets in relation to the selection in RQ1. RQ3 aims to address the practical reality of the execution times throughout the anomaly detection pipeline while considering the different factors in this study.

This study will proceed by providing an overview of the related work regarding unsupervised anomaly detection on software logs in Section 2. In the Research Methods section (Section 3) we describe the preprocessing, datasets, metrics and models in more detail as well as give an overview of the statistical approaches used in the study. The Results section (Section 4) presents the results by starting from a generic overview and proceeding to more specific findings. The findings along with their implications and key contributions are discussed in the Discussion section (Section 5). Finally, we conclude the study in Section 6.

References (35)