Skip to main content
QUICK REVIEW

[Paper Review] Model Assertions for Monitoring and Improving ML Models

Daniel Kang, Deepti Raghavan|arXiv (Cornell University)|Mar 3, 2020
Formal Methods in VerificationComputer Science56 references17 citations
TL;DR

This paper introduces model assertions—user-defined functions over model inputs and outputs that detect systematic errors in ML models. By enabling runtime monitoring, active learning, and weak supervision, model assertions reduce labeling costs by up to 40% and improve model quality by up to 46%, particularly in detecting high-confidence erroneous predictions that uncertainty-based methods miss.

ABSTRACT

ML models are increasingly deployed in settings with real world interactions such as vehicles, but unfortunately, these models can fail in systematic ways. To prevent errors, ML engineering teams monitor and continuously improve these models. We propose a new abstraction, model assertions, that adapts the classical use of program assertions as a way to monitor and improve ML models. Model assertions are arbitrary functions over a model's input and output that indicate when errors may be occurring, e.g., a function that triggers if an object rapidly changes its class in a video. We propose methods of using model assertions at all stages of ML system deployment, including runtime monitoring, validating labels, and continuously improving ML models. For runtime monitoring, we show that model assertions can find high confidence errors, where a model returns the wrong output with high confidence, which uncertainty-based monitoring techniques would not detect. For training, we propose two methods of using model assertions. First, we propose a bandit-based active learning algorithm that can sample from data flagged by assertions and show that it can reduce labeling costs by up to 40% over traditional uncertainty-based methods. Second, we propose an API for generating "consistency assertions" (e.g., the class change example) and weak labels for inputs where the consistency assertions fail, and show that these weak labels can improve relative model quality by up to 46%. We evaluate model assertions on four real-world tasks with video, LIDAR, and ECG data.

Motivation & Objective

  • To address the challenge of detecting systematic, repeatable errors in deployed ML models, especially those missed by uncertainty-based monitoring.
  • To provide a practical, model-agnostic abstraction for ML engineers to specify and monitor known failure patterns.
  • To improve model quality through active learning and weak supervision using assertions as signal sources.
  • To enable continuous monitoring and improvement of ML systems in real-world deployments like autonomous vehicles and medical diagnostics.

Proposed method

  • Model assertions are defined as arbitrary functions over model inputs and outputs that return a Boolean or continuous severity score to flag potential errors.
  • For runtime monitoring, assertions log anomalous behavior or trigger corrective actions, especially detecting high-confidence erroneous predictions.
  • A bandit-based active learning algorithm uses assertions to prioritize data samples for labeling, reducing labeling costs by selecting only high-impact examples.
  • An API generates consistency assertions (e.g., object class stability over time) and weak labels from failed assertions, improving model generalization.
  • The method integrates with existing ML pipelines and is evaluated across video, LIDAR, and ECG data using real-world deployment workloads.
  • The OMG library implements model assertions and supports deployment in production systems with minimal performance overhead.

Experimental results

Research questions

  • RQ1Can model assertions detect high-confidence erroneous predictions that uncertainty-based monitoring fails to catch?
  • RQ2Can assertions be used to reduce labeling costs in active learning by prioritizing informative samples?
  • RQ3Can weak labels derived from assertion failures improve model performance without full human annotation?
  • RQ4How effective are model assertions in real-world, high-stakes ML deployments such as autonomous vehicles and medical diagnostics?
  • RQ5Can assertions be generalized across diverse modalities like video, LIDAR, and ECG data?

Key findings

  • Model assertions detected high-confidence errors—where models are highly confident in incorrect outputs—that uncertainty-based monitoring would miss.
  • The bandit-based active learning method reduced labeling costs by up to 40% compared to traditional uncertainty-based sampling.
  • Weak labels generated from failed consistency assertions improved model quality by up to 46% on benchmark tasks.
  • Model assertions were effective across diverse real-world tasks, including video object detection, LIDAR perception, and ECG analysis.
  • The OMG library enabled practical deployment of assertions in production systems, with minimal performance overhead.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.