Adaptive Testing of Computer Vision Models

Irena Gao, Gabriel Ilharco, Scott M. Lundberg, Marco Túlio Ribeiro

Introduction

Even computer vision models with near-perfect benchmark scores exhibit systematic "blind spots." These models may fail consistently on specific edge cases, such as stop signs obscured by snow or misidentifying objects due to spurious correlations. Identifying these coherent failure modes is a significant challenge; standard static benchmarks often lack the "long-tail" scenarios necessary to reveal where a model truly breaks. Furthermore, as models reach high accuracy levels, finding meaningful error patterns in standard validation sets becomes increasingly difficult.

To address this, researchers from Microsoft, Stanford, and the University of Washington developed AdaVision, an interactive tool that facilitates a collaborative "hill-climbing" process between human testers and AI to surface and fix systematic model failures.

The AdaVision Framework

AdaVision operates through two primary interactive loops designed to efficiently explore the vast space of potential model errors using the LAION-5B dataset (a pool of 5 billion images).

1. The Test Generation Loop

In this loop, a user proposes a topic (e.g., "stop sign"). AdaVision uses CLIP embeddings to retrieve relevant images. As the user labels these images as "pass" or "fail," the system adaptively refines its search. It performs a semantic "hill-climb" toward high-error regions by interpolating between the original topic text and the embeddings of images the model failed to process correctly. To minimize manual labor, a lightweight Support Vector Classifier (SVC) is trained on-the-fly to re-rank results, placing likely failures at the front of the queue.

2. The Topic Generation Loop

To prevent "tester's block," AdaVision leverages GPT-3 to brainstorm new testing scenarios. By analyzing topics with high failure rates, the LLM suggests creative variations—such as "stop sign with graffiti" or "Japanese stop sign"—helping users explore corners of the data distribution they might not have considered.

The AdaVision system utilizes a dual-loop approach: a Test Generation Loop for refining image retrieval based on user feedback and a Topic Generation Loop for brainstorming new scenarios using LLMs.

Experimental Results

AdaVision was evaluated across three major vision tasks: image classification, object detection, and image captioning. The results demonstrate that human-in-the-loop adaptive testing is significantly more effective than fully automated or non-adaptive methods.

  • Higher Yield: User studies revealed that AdaVision users found approximately 2x more failures than those using a non-adaptive baseline.
  • Coherent Failure Discovery: The failure modes identified by AdaVision had error rates 2-3x higher than those surfaced by state-of-the-art automated error clustering methods like Domino.
  • Effective Model Patching: The data discovered via AdaVision is highly effective for "patching" models. Finetuning a ViT-H/14 model on just 600 images from 30 discovered failure modes boosted accuracy on those specific slices from 72.6% to 91.2%.
  • Improved Robustness: Crucially, this targeted finetuning also improved average accuracy across five different out-of-distribution (OOD) ImageNet datasets (ImageNet-V2, -A, -Sketch, -R, and ObjectNet) without degrading performance on the standard benchmark.
AdaVision significantly outperforms non-adaptive baselines in identifying total failures across image classification, object detection, and image captioning tasks.

Discussion and Limitations

AdaVision demonstrates that human intuition is essential for identifying coherent bugs that generalize, rather than just overfitting to individual strange images. However, the system's efficacy is currently bounded by the diversity of the retrieval pool (LAION-5B) and the semantic capabilities of the underlying CLIP embeddings. While the tool excels at finding bugs in complex tasks like detection and captioning, fixing those bugs remains more labor-intensive due to the complexity of the required labels (e.g., bounding boxes vs. simple classification).

Future work will explore automating the "patching" process once a human has verified a failure mode, further closing the gap between bug discovery and model deployment.

Summary updated

Abstract

Vision models often fail systematically on groups of data that share common semantic characteristics (e.g., rare objects or unusual scenes), but identifying these failure modes is a challenge. We introduce AdaVision, an interactive process for testing vision models which helps users identify and fix coherent failure modes. Given a natural language description of a coherent group, AdaVision retrieves relevant images from LAION-5B with CLIP. The user then labels a small amount of data for model correctness, which is used in successive retrieval rounds to hill-climb towards high-error regions, refining the group definition. Once a group is saturated, AdaVision uses GPT-3 to suggest new group descriptions for the user to explore. We demonstrate the usefulness and generality of AdaVision in user studies, where users find major bugs in state-of-the-art classification, object detection, and image captioning models. These user-discovered groups have failure rates 2-3x higher than those surfaced by automatic error clustering methods. Finally, finetuning on examples found with AdaVision fixes the discovered bugs when evaluated on unseen examples, without degrading in-distribution accuracy, and while also improving performance on out-of-distribution datasets.
BibTeX
@inproceedings{gao2022adaptive,
  author = {Irena Gao and Gabriel Ilharco and Scott M. Lundberg and Marco Túlio Ribeiro},
  title = {{Adaptive Testing of Computer Vision Models}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2022},
  url = {https://openreview.net/forum?id=APv8wRH7AK},
}
Figure