[Paper Review] Anomaly Sequences Detection from Logs Based on Compression
This paper proposes a novel anomaly detection method for log sequences using grammar-based compression to measure strangeness without relying on statistics or Markov assumptions. By training on normal sequences and measuring the increase in compressed size when suspicious sequences are added, the method effectively identifies high-level and low-level anomalies, achieving strong results in bug detection and intrusion detection on real system call traces.
Mining information from logs is an old and still active research topic. In recent years, with the rapid emerging of cloud computing, log mining becomes increasingly important to industry. This paper focus on one major mission of log mining: anomaly detection, and proposes a novel method for mining abnormal sequences from large logs. Different from previous anomaly detection systems which based on statistics, probabilities and Markov assumption, our approach measures the strangeness of a sequence using compression. It first trains a grammar about normal behaviors using grammar-based compression, then measures the information quantities and densities of questionable sequences according to incrementation of grammar length. We have applied our approach on mining some real bugs from fine grained execution logs. We have also tested its ability on intrusion detection using some publicity available system call traces. The experiments show that our method successfully selects the strange sequences which related to bugs or attacking.
Motivation & Objective
- To address the challenge of detecting non-deterministic system failures in large-scale logs, especially in cloud computing environments.
- To overcome limitations of traditional anomaly detection methods that rely on Markov assumptions or probabilistic models, which often miss high-level misbehavior.
- To develop a lightweight, structure-aware method that leverages compression to detect unusual log sequences based on information content.
- To evaluate the method on real-world logs for both bug detection and intrusion detection, demonstrating its effectiveness across diverse system behaviors.
Proposed method
- The method uses grammar-based compression (specifically, the SEQUITUR algorithm) to learn normal behavior patterns from training log sequences.
- It measures the strangeness of a candidate sequence by computing the increase in compressed size ($I_n = Q_n - Q_0$) when the sequence is added to the training set.
- The core idea is that abnormal sequences cause a larger increase in compressed size due to their low compressibility and structural deviation from normal patterns.
- The approach avoids statistical modeling by relying on the information-theoretic principle that compressibility reflects structural regularity and predictability.
- A prefix tree data structure is used to optimize the matching of candidate sequences against existing grammar rules for efficiency.
- The method evaluates sequences based on both the absolute increase in compressed size ($I_n$) and information density ($D_n = I_n / \text{sequence length}$) to rank anomalies.
Experimental results
Research questions
- RQ1Can compression-based anomaly detection effectively identify high-level misbehavior in fine-grained execution logs without relying on statistical models?
- RQ2How well does the method detect known intrusions in system call traces compared to traditional Markov-based approaches?
- RQ3Can the method distinguish between benign and malicious process behaviors in real system call traces using only structural and compressibility features?
- RQ4What is the performance overhead of the method when applied to large-scale log data from production systems?
Key findings
- The method successfully detected 2 out of 2 known exploited processes in the xlock dataset, with information density ($D$) values 2× higher than the top normal sequences.
- In the named dataset, the method identified 3 of the 5 most anomalous sequences, with information density values significantly higher than normal sequences.
- For the xlock dataset, the top 5 normal sequences had $I_n$ values between 46 and 776, while the two exploited sequences had $I_n = 183$ and $176$, indicating strong anomaly signals.
- The method achieved high throughput: 85,409.5 entries per second on memcached logs and 585.4 entries per second on the large named dataset.
- The algorithm correctly identified that sequences with $I_n = 1$ were likely duplicates of training sequences, indicating robustness in handling repeated patterns.
- The approach outperformed traditional Markov-based models in detecting high-level anomalies, as it captures structural patterns beyond local state transitions.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.