Rethinking Streaming Machine Learning Evaluation

Shreya Shankar, Bernease Herman, Aditya G. ParameswaranarXiv 2022 · DOI

Abstract

In the controlled environment of a research lab, evaluating a machine learning model is straightforward: you split a static dataset into training, validation, and test sets, and calculate an aggregate accuracy score. However, once a model is deployed into a real-world environment where data arrives in an unbounded, timestamped stream, this batch-processing paradigm becomes insufficient. This paper identifies three major pitfalls in current streaming evaluation—window sensitivity, representation shifts, and label delay—and advocates for a multi-faceted monitoring strategy involving class representation tracking, importance-weighted estimates, and loss percentiles.

Introduction

Most machine learning practitioners monitor deployed models using sliding windows (e.g., "What was the accuracy over the last 7 days?"). In their position paper, "Rethinking Streaming Machine Learning Evaluation," Shreya Shankar, Bernease Herman, and Aditya G. Parameswaran argue that these standard methods are dangerously incomplete. They demonstrate how standard metrics like "sliding window accuracy" can mask catastrophic failures and propose a more nuanced toolkit for the streaming era.

The Pitfalls of Current Evaluation

The authors identify three primary reasons why standard batch-style evaluation fails in streaming contexts:

  1. Window Sensitivity: The choice of window size is often arbitrary. A large cumulative window might hide a recent performance crash, while a small daily window might be too noisy to be actionable.
  2. Representation Shifts: Changes in the "positive class" frequency can cause accuracy drops that reflect data changes rather than model failure. For example, if fewer people tip during a recession, accuracy might drop simply because the underlying population shifted.
  3. The Label Delay Gap: Real-world systems often experience significant delays in obtaining ground truth labels (e.g., loan defaults), making real-time accuracy calculation impossible without a proxy strategy.

Proposed Monitoring Strategy

Rather than a single algorithm, the authors advocate for a multi-faceted approach to understand model health:

  • Multi-Window Comparison: Tracking performance across different temporal scales (daily, weekly, cumulative) to distinguish noise from genuine trends.
  • Importance Weighting (IW): Using IW to estimate current accuracy by weighting known training performance of subgroups by their current frequency in the live stream. This allows practitioners to estimate performance even before new labels arrive.
  • Loss Percentile Tracking: Monitoring the distribution of model loss (e.g., 70th or 90th percentile) to identify if specific data sub-segments are causing struggles.

Case Study: NYC Taxi Data

The paper utilizes the New York City Taxi and Limousine Coalition (TLC) Trip Record Data from 2020 to predict if a rider will leave a tip of more than 10%. This dataset covers the onset of the COVID-19 pandemic, providing a real-world example of a massive "concept shift" where rider behavior changed abruptly.

Key Results and Insights

Window Blindness

A critical finding is that cumulative metrics are often useless for detecting sudden shifts. In the NYC Taxi experiment, a cumulative window barely registered the performance drop in March 2020, remaining near 73%, while a 7-day sliding window showed a crash down to 60%.

Comparison of accuracy metrics across different window sizes.

The "Aha" of IW Divergence

The authors demonstrate that the divergence between Importance-Weighted (estimated) accuracy and real accuracy serves as a "smoking gun" for concept shift. When these metrics diverge, it indicates that the relationship between features and labels has changed, not just the frequency of certain features.

Comparison of estimated accuracy via importance weighting versus real accuracy.

Conclusion

While this position paper identifies critical gaps in streaming evaluation, it also highlights areas for future work, such as automated subgroup selection for Importance Weighting and defining specific retraining triggers. Tracking high-percentile losses and IW estimates adds complexity to production stacks but provides the necessary visibility to maintain model health in dynamic environments.

Summary updated

BibTeX
@misc{shankar2022rethinking,
  author = {Shreya Shankar and Bernease Herman and Aditya G. Parameswaran},
  title = {{Rethinking Streaming Machine Learning Evaluation}},
  year = {2022},
  eprint = {2205.11473},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2205.11473},
}
Figure