Intrusion Detection Using Cost-Sensitive Classification

Aikaterini Mitrokotsa, Christos Dimitrakakis, Christos DouligerisarXiv 2008

Abstract

Standard Intrusion Detection Systems (IDS) often prioritize overall accuracy, ignoring the disproportionate costs of false negatives compared to false positives. This paper proposes a cost-sensitive classification framework that minimizes the total expected cost of security errors. By integrating a cost matrix into probabilistic models, the authors demonstrate improved detection rates for rare and dangerous attacks, even in the presence of novel threats not seen during training.

Introduction

Standard machine learning classifiers are usually designed to minimize the total number of errors, effectively maximizing accuracy. However, in cybersecurity, not all errors are created equal. A false alarm (False Positive) might waste a few minutes of a security analyst's time, whereas missing an actual attack (False Negative) can lead to a catastrophic data breach. This paper addresses the gap between theoretical classification and practical risk management by investigating how to embed real-world costs directly into the decision-making process.

Methods

The authors move away from simple "most likely class" predictions toward a formal statistical decision framework where the system chooses the action that minimizes Expected Cost. The core approach involves:

  1. Probability Estimation: Using models to estimate the conditional probability of each class (Normal, DoS, Probe, etc.) given the network data.
  2. Cost Matrix Integration: Applying a $k \times k$ matrix $C(i, j)$ that defines the penalty for predicting class $i$ when the true class is $j$.
  3. Model Comparison: Testing four distinct models: Multilayer Perceptron (MLP), Linear Models, Gaussian Mixture Models (GMM), and Naïve Bayes.
The cost matrix used to define penalties for misclassification.

Unlike previous work that used "wrapper" algorithms like MetaCost to modify training data, this study focuses on modifying the decision rule at the output stage based on the cost matrix shown above.

Datasets

The study utilizes the KDD Cup 1999 dataset, a benchmark for network intrusion detection. The researchers evaluated performance across three distinct sets to test robustness against novel attacks.

Distribution of attack types and normal traffic across the training and test datasets.
  • Training: A 10% subset of the KDD data.
  • Test Dataset 1: The standard test set, which is notoriously difficult because it contains 17 types of attacks (such as new R2L and U2R attacks) that never appeared in the training set.
  • Test Dataset 2: A modified version of the test set that excludes these novel attacks, used to evaluate performance under more favorable conditions.

Key Insights and Results

  • GMMs Excel at Cost-Sensitivity: The GMM and Linear models showed clear benefits from the cost-sensitive approach. Because these models provide nuanced probability estimates, the cost matrix can effectively "nudge" the decision toward safety. In contrast, the MLP was often "too confident" (outputting probabilities near 0 or 1), leaving little room for cost-weighting to influence the outcome.
  • The Price of Safety is Low: One of the most encouraging findings was the trade-off ratio. By increasing the penalty for missing rare, dangerous attacks (like User-to-Root), the authors increased detection rates by 20% while only increasing the false alarm rate by a negligible 0.2%.
  • Robustness to Novelty: Even when the test distribution shifted significantly (Test Dataset 1), the cost-sensitive logic provided a performance edge. For the GMM model on the standard test set, the expected cost was reduced from 0.2538 to 0.2420.
  • Detection Gains: For the MLP, increasing the cost of false negatives led to a significant rise in the Detection Rate (DR) for difficult categories. U2R attack detection rose from ~18% to over 32%, and R2L detection rose from ~6% to ~11% in Dataset 1.

Limitations and Future Work

The authors note that the MLP's limited improvement suggests a need for better probability calibration—ensuring that a model's confidence level accurately reflects its accuracy. Furthermore, the failure of Naïve Bayes highlights that simple feature independence assumptions are insufficient for complex network data.

Future work should move beyond predicting "labels" (e.g., "DoS attack") and instead predict "actions" (e.g., "Block this IP"), which may have different costs than the classes themselves. Additionally, moving toward sequential decision-making, where the IDS considers the history of packets rather than isolated events, remains a critical next step.

Summary updated

BibTeX
@misc{mitrokotsa2008intrusion,
  author = {Aikaterini Mitrokotsa and Christos Dimitrakakis and Christos Douligeris},
  title = {{Intrusion Detection Using Cost-Sensitive Classification}},
  year = {2008},
  eprint = {0807.2043},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/0807.2043},
}
Figure