Greenhouse: A Zero-Positive Machine Learning System for Time-Series Anomaly Detection

Tae Jun Lee, Justin Gottschlich, Nesime Tatbul, Eric Metcalf, Stan ZdonikarXiv 2018

TL;DR

Greenhouse is a "zero-positive" machine learning system designed to detect anomalies in IoT time-series data without requiring any labeled anomalous samples for training. By combining LSTM-based sequence prediction with multivariate statistical modeling, it achieves competitive precision and $F_1$ scores while using significantly less training data than traditional supervised approaches.

What Problem Does This Paper Address?

The Internet of Things (IoT) generates a staggering volume of numerical time-series data from sensors. Detecting anomalies—patterns that deviate from expected behavior—is critical for everything from industrial automation to self-driving cars.

However, traditional machine learning approaches for anomaly detection often require "positive" samples (labeled anomalies) to train effectively. In the real world, anomalies are rare, varied, and difficult to label, making it nearly impossible to build a comprehensive training set. The authors propose Greenhouse to bridge this gap by focusing on "zero-positive" learning: a system that learns what "normal" looks like and flags anything else as a potential anomaly.

Methods

Greenhouse utilizes a two-phase approach: a Training Phase to model normal behavior and an Inference Phase to detect deviations.

  1. LSTM Prediction Model: At its core, Greenhouse uses a Long Short-Term Memory (LSTM) neural network. LSTMs are well-suited for time-series because they can capture both short-term and long-term dependencies. The model uses a "Look-Back" window ($B$) of past values to predict a "Predict-Forward" window ($F$) of future values.
  2. Error Vector Modeling: Instead of looking at a single point's error, Greenhouse computes an Error Vector for each time point $t$. Because the sliding window approach generates multiple predictions for the same time point, the error vector captures the differences between all these predictions and the actual observed value.
  3. Statistical Thresholding:
    • The system fits these error vectors into a multi-variate normal distribution ($N$).
  4. It then calculates Mahalanobis distances (M-distances), which measure how many standard deviations a point is from the mean of the distribution.
  5. Finally, it determines an anomaly threshold ($\tau$) based on a user-specified percentile of the M-distance distribution.
Figure 1: Training and Inference Phases in Greenhouse

Datasets

The authors evaluated Greenhouse using real-world datasets from the Numenta Anomaly Benchmark (NAB), a standard for time-series anomaly detection. Specifically, they highlight results from:

  • Twitter_AAPL: Twitter mentions of Apple Inc.
  • nyc_taxi: New York City taxi passenger counts.

Key Insights and Ideas

  • The "Zero-Positive" Advantage: By only requiring "normal" data, Greenhouse is much easier to deploy in practical IoT settings where anomalous data is scarce.
  • Multi-Prediction Robustness: By predicting a window forward (as shown in the table below), each time point receives multiple predictions. This creates a richer error signal (the error vector) than simple point-to-point forecasting, making the system more robust to noise.
  • Data Efficiency: Greenhouse achieved its results using significantly smaller training sets—roughly 25% to 55% of the data required by the baseline LSTM-AD model.
Table 1: Predictions and Error Vectors for an example time- series (time, value) = [ (1,v1), (2,v2), (3,v3), (4,v4), (5,v5), ... ]

Key Results

Greenhouse was compared against LSTM-AD, a standard LSTM-based anomaly detection system that does require anomalous samples for training.

  • Higher Precision: On the Twitter_AAPL dataset, Greenhouse achieved a precision of 0.49, more than double the 0.22 of LSTM-AD. This means Greenhouse had far fewer false positives.
  • Competitive $F_1$ Scores: Despite having lower recall (missing more anomalies) and using much less training data, Greenhouse maintained $F_1$ scores (a balance of precision and recall) that were remarkably close to the supervised baseline.
Table 2: Greenhouse vs. LSTM-AD [14]

Limitations and Future Work

As a "short paper" describing ongoing research, the authors acknowledge several areas for improvement:

  • Real-Time Capabilities: The current framework is optimized for "offline" analysis of finite datasets. The team is working on an "online" mode for low-latency inferencing on live streams.
  • Range-Based Anomalies: Many anomalies occur over a duration rather than a single point. The authors are extending Greenhouse to handle these collective anomalies more effectively.
  • Human Feedback: They plan to incorporate reinforcement learning to allow the system to "course-correct" based on human validation of its anomaly flags.
  • Distributed Deployment: Future versions will explore how to split the workload between low-power edge devices and the cloud.

Summary updated

BibTeX
@misc{lee2018greenhouse,
  author = {Tae Jun Lee and Justin Gottschlich and Nesime Tatbul and Eric Metcalf and Stan Zdonik},
  title = {{Greenhouse: A Zero-Positive Machine Learning System for Time-Series Anomaly Detection}},
  year = {2018},
  eprint = {1801.03168},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1801.03168},
}
Figure