Temporal Sequence Learning and Data Reduction for Anomaly Detection

Terran Lane, Carla E. BrodleyACM Trans. Inf. Syst. Secur 1999 · DOI

TL;DR

This paper introduces an instance-based learning approach for anomaly detection in user command sequences, focusing on long-term, low-profile attacks. It proposes novel data reduction techniques (instance selection and clustering) to manage the growing size of user profiles, demonstrating that clustering offers a more robust degradation of performance compared to instance selection.

What Problem Does This Paper Address?

The core challenge addressed is anomaly detection in user behavior, specifically within sequences of discrete events like shell commands. Traditional anomaly detection often relies on signature matching for known attacks, which is insufficient for detecting novel, long-term, or subtle malicious activities. The authors frame this as a machine learning problem: learning a model of "normal" user behavior from historical data and flagging deviations. This is particularly difficult because:

  • Vast Data: User activity generates enormous amounts of data.
  • Subtlety: Attacks can be low-profile, long-term, and human-generated, making them hard to distinguish from normal variations.
  • Dynamic Behavior: User behavior evolves over time (concept drift), requiring adaptive models.
  • Privacy: Using user data for training raises privacy concerns.
  • Instance-Based Learning Overhead: Instance-based learning (IBL) methods, while powerful, require storing a large "instance dictionary" (user profile), leading to significant memory and computational costs.

Methods

The paper proposes an anomaly detection system based on Instance-Based Learning (IBL). The key components are:

  • Feature Extraction: UNIX shell command data is tokenized. A crucial step is reducing the alphabet size by, for example, replacing specific filenames with a count of filenames, which surprisingly improved performance.
  • Temporal Encoding: Discrete command sequences are represented as fixed-length vectors.
  • Similarity Measure: A novel similarity measure is defined for token sequences, which assigns higher similarity to matching subsequences and penalizes mismatches. This measure is designed to capture temporal dependencies.
  • Noise Suppression: An instantaneous similarity stream is noisy, so a trailing window mean-value filter is used to smooth it.
  • Classification: A threshold-based decision module classifies sequences as normal or anomalous. The threshold is set based on a "false alarm rate" heuristic, rather than a Bayes-optimal approach, which was found to be too sensitive.
  • Data Reduction Techniques:
    • Instance Selection: Methods like Least Recently Used (LRU), First-In-First-Out (FIFO), and Least Frequently Used (LFU) are explored to prune the profile by keeping a fixed number of instances.
  • Clustering: A greedy clustering algorithm is proposed to represent groups of similar instances by a single cluster center. This method builds clusters sequentially, aiming to maximize mean intracluster distance.

Datasets

The authors used shell command data collected from eight different UNIX users over more than two years. For experimental uniformity and computational constraints, they employed a subset of 7,000 tokens per user, representing approximately three months of usage. This data was split into training, parameter selection, and testing sets. The paper notes the difficulty in obtaining real misuse data, so their "anomalous" scenarios were simulated by testing one legitimate user's profile against another legitimate user's command data.

Key Insights and Ideas

  • Clustering is More Robust than Instance Selection: While both data reduction methods reduce profile size, clustering degrades performance more gracefully. Instance selection methods tend to overgeneralize, leading to a "nobody is the profiled user" concept, while clustering maintains a better characterization of the user's actual behavior.
  • Greedy Clustering Outperforms K-Centers: The proposed greedy clustering algorithm was more effective than K-centers in this domain, primarily due to K-centers's slow convergence for large numbers of clusters.
  • False Alarm Rate as a Heuristic: Setting decision thresholds based on constraining the false alarm rate proved more practical and effective than Bayes-optimal methods, which were too sensitive to the profiled user.
  • Temporal Dependencies Matter: The custom similarity measure, which accounts for sequential matching, is crucial for capturing meaningful patterns in command sequences.
  • Data Reduction is Critical for IBL: The paper strongly emphasizes that for IBL to be practical in anomaly detection, effective data reduction is essential due to the inherent storage requirements.

Key Results

  • Base System Performance: The base system (without data reduction) showed generally high accuracy, but the authors highlighted the need for data reduction for practical deployment.
  • Instance Selection: These methods showed a trade-off: improved true detection rates at the cost of decreased true accept rates. They tended to over-reject novel behaviors.
  • Greedy Clustering: Achieved significant storage reduction (e.g., 70% reduction in profile size with a specific setting) with only a small loss in accuracy. It demonstrated superior performance to K-centers in terms of both accuracy and convergence.
  • Impersonation Rates: The greedy clustering system, with a false alarm rate of 0.005, made impersonations difficult, with an approximate 1 in 6 chance of success overall. This rate improved significantly when the false alarm rate was relaxed.
  • Time to Alarm (TTA): True alarms (adversary detection) occurred much faster than false alarms (valid user misclassification), which is a desirable characteristic.

Limitations and Future Work

  • Lack of Real Misuse Data: The study relied on simulated anomalies (legitimate users impersonating each other), acknowledging that real misuse data would be needed for broader validation.
  • Batch Mode Training: The experiments used batch mode training to isolate data reduction effects. The authors note that online training is crucial for adapting to concept drift and improving performance in real-world scenarios.
  • Similarity Measure Coarseness: The current similarity measure is relatively coarse. Future work includes investigating more sophisticated measures like edit distance and hidden Markov models.
  • Feature Engineering: The study primarily used command line data. Incorporating other data sources (file names, login times, network activity, GUI events) could enhance discrimination.
  • Automatic Parameter Selection: The system has several parameters that were set manually. Automating parameter adaptation per user is a promising direction.
  • Metalearning and Hierarchical Classifiers: Combining multiple sensors or classifiers could improve robustness.
  • Domain Knowledge: Incorporating expert security knowledge could improve performance, though it might reduce generality.

Summary updated

BibTeX
@article{lane1999temporal,
  author = {Terran Lane and Carla E. Brodley},
  title = {{Temporal Sequence Learning and Data Reduction for Anomaly Detection}},
  journal = {ACM Trans. Inf. Syst. Secur},
  year = {1999},
  doi = {10.1145/322510.322526},
}
Figure