Sampling High Throughput Data for Anomaly Detection of Data-Base Activity

Hagit Grushka-Cohen, Oded Sofer, Ofer Biller, Michael Dymshits, Lior Rokach, Bracha ShapiraarXiv 2017

In the world of cybersecurity, database activity is a high-velocity firehose. With production systems often processing upwards of 100,000 transactions per second, logging every single action isn't just expensive—it’s often technically impossible. This forces security teams into a difficult game of "pick and choose" through sampling.

In their paper, Sampling High Throughput Data for Anomaly Detection of Data-Base Activity, Grushka-Cohen and colleagues from Ben-Gurion University and IBM Research explore how to sample smarter. They move beyond simple random sampling to propose a "combined" approach that prioritizes risk without losing the context needed for real-world investigations.

TL;DR

High-throughput databases generate too much data to audit fully, necessitating sampling strategies that often miss critical threats. This research proposes a "combined sampling" method that uses Gibbs sampling to prioritize high-risk transactions while retaining enough low-risk data to provide essential context for security investigations.

What Problem Does This Paper Address?

Data Security and Data Privacy (DSDP) systems are designed to spot leaks and insider threats. However, the sheer volume of database transactions creates a massive storage and processing bottleneck.

Current solutions typically fall into two camps:

  1. Vanilla Sampling: Randomly save a small percentage of all traffic. This is fair but often misses rare, high-risk anomalies.
  2. Compression/Sketching: Use mathematical tricks to store "summaries" of data. While great for statistics, these methods are useless for a Security Officer (SO) who needs to see the actual, original log data to understand what happened during a breach.

The authors identify a critical "investigation gap": if you only sample high-risk events, you lose the baseline of "normal" activity. Without that baseline, an investigator can't tell if a suspicious query is a one-off error or part of a larger, dangerous pattern.

Methods

The researchers compared three distinct sampling strategies:

  • Vanilla: A standard random sample of a fixed portion of transactions.
  • Risky Only: Only transactions flagged as "risky" (via manual policy or ML ranking) are saved.
  • Combination Sampling (The Novel Approach): This method uses a Gibbs sampling approach to maintain a specific ratio of transaction classes. In their experiments, they tuned the system to aim for a sample composed of 80% high-risk and 20% low-risk transactions.

To test these, they built a simulation where users were modeled as Gaussian distributions. Anomalies were injected as data points from a different distribution, and a "mock" detection system used a standard 3-sigma rule (flagging anything more than three standard deviations from the mean) to identify threats.

Datasets

The study utilized two primary data sources:

  1. Production DSDP Data: 24 hours of real-world activity from 1,901 unique users. This was used to understand the "long tail" of user activity. As shown in Figure 1, the vast majority of users have very low activity, making them particularly sensitive to sampling errors.
  2. Simulated Evaluation Data: A controlled environment with 1,000 synthetic users. The data included a 1% anomaly rate and a 30% "risky" label rate (assigned independently to test the sampling logic).
Histogram of user activity showing that most users have relatively few transactions.

Key Insights and Ideas

  • The Context Necessity: The most striking insight is that "perfect" detection of risky events isn't enough for a human investigator. A Security Officer needs the "boring" low-risk data to assemble the full picture of a user's behavior.
  • The Risk-Recall Trade-off: While "Risky Only" sampling catches the most high-risk anomalies, it leaves the investigator blind to everything else. "Combination sampling" acts as a tunable middle ground.
  • Vulnerability of Low-Activity Users: For users with few transactions, losing even a few data points to sampling can completely break the anomaly detection model's ability to establish a reliable mean and standard deviation.

Key Results

The researchers evaluated the methods across different sampling proportions (from 20% to 35% of total traffic).

  • High-Risk Detection: "Risky Only" had the highest recall, but "Combination Sampling" followed closely behind, significantly outperforming the Vanilla method.
  • Low-Risk Detection: Vanilla sampling was the best at catching low-risk anomalies (which is expected), but "Combination Sampling" still captured a meaningful portion, whereas "Risky Only" captured zero.

As seen in the comparison below, the combination method (grey line) provides a balanced performance that ensures high-risk threats are caught while maintaining investigative resolution.

Comparison of recall for low-risk (left) and high-risk (right) anomalies across sampling methods.

Limitations and Future Work

The authors acknowledge that in this preliminary "Research in Progress," the risk labels were assigned randomly. In a real-world scenario, risk is often correlated with the very behavior the system is trying to detect, which could amplify the effectiveness of the sampling algorithm.

Moving forward, the team plans to:

  • Apply this analysis to real-world labeled datasets.
  • Test more complex anomaly detection algorithms beyond simple Gaussian models.
  • Conduct a usage study to see how different sampling levels actually impact the efficiency and decision-making of human Security Officers.

Summary updated

BibTeX
@misc{grushkacohen2017sampling,
  author = {Hagit Grushka-Cohen and Oded Sofer and Ofer Biller and Michael Dymshits and Lior Rokach and Bracha Shapira},
  title = {{Sampling High Throughput Data for Anomaly Detection of Data-Base Activity}},
  year = {2017},
  eprint = {1708.04278},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1708.04278},
}
Figure