Source-linked AI summary

Adaptive Testing of Computer Vision Models

Irena Gao, Gabriel Ilharco, Scott Lundberg, Marco Tulio Ribeiro

arXiv:2212.02774v2cs.CV

TL;DR

Vision models can fail on coherent groups of images that are difficult to identify using existing evaluation methods. AdaVision combines natural-language image retrieval, user feedback, and adaptive testing to find such failures. User studies report stronger failure discovery than baselines, and fine-tuning on discovered examples improves measured performance.

  • Problem

    Finding semantically coherent groups where vision models fail is difficult because evaluation sets often lack annotations for grouping errors, and existing clustering can produce incoherent groups or miss out-of-distribution vulnerabilities.

    Source: §1 · p. 1
  • Method

    AdaVision retrieves images matching a natural-language topic, adapts retrieval using a small number of user correctness labels, and uses GPT-3 to suggest additional topics.

    Source: §1 · pp. 1–2
  • Results

    Users found bugs across classification, object detection, and image captioning, with AdaVision groups showing 2-3x higher failure rates than Domino’s automatic clustering baseline.

    Source: §1 · p. 2
  • Takeaways & Limitations

    Fine-tuning on discovered failures raised group accuracy from 72.6% to 91.2% without reducing overall ImageNet accuracy, and improved labeled-class accuracy from 78.0% to 84.0% on five OOD ImageNet evaluation sets.

    Source: §1 · p. 2

    The fine-tuning experiment covered a limited set of labels and only one round of testing.

    Source: §5 · p. 9

Abstract

from arXiv · show

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.

1. Introduction

Vision models can achieve high average performance while failing on semantically coherent subsets, but finding those groups is difficult with existing evaluation methods. AdaVision uses user-steered, adaptive testing to surface such failures, and user studies show higher-failure groups and successful fine-tuning outcomes.

  • Semantically coherent failure groups can help developers understand interventions and make decisions about safe and fair deployment.Source: §1 · p. 1
  • Prior error-clustering methods can yield incoherent groups and are constrained by small evaluation sets that may underestimate out-of-distribution vulnerabilities.Source: §1 · p. 1
  • AdaVision retrieves images from LAION-5B using a natural-language group description and CLIP, then uses a small number of pass/fail labels to retrieve images similar to discovered failures.Source: §1 · p. 1
  • GPT-3 suggests new group descriptions based on difficult topics, while human steering keeps testing focused on coherent and meaningful groups.Source: §1 · p. 2
  • 2–3x higher failure rates than Domino’s automatic error clustering baseline were found in AdaVision groups, and users found close to 2x as many failures as with a non-adaptive CLIP baseline.Users also found bugs in state-of-the-art classification, object detection, and image captioning models.Source: §1 · p. 2
  • Fine-tuning raised discovered-group accuracy from 72.6% to 91.2%, without reducing overall ImageNet accuracy, and improved labeled-class accuracy from 78.0% to 84.0% on five OOD ImageNet evaluation sets.Source: §1 · p. 2

2. Related Work

Prior work uses error clustering and human-aided testing to find model weaknesses, but computer vision testing remains largely static. AdaVision brings human-steered, open-ended testing to vision models.

  • Error clusters should be coherent and generalizable, but automatic clustering can produce groups that overfit a few mispredictions, especially on small or mostly saturated evaluation sets.Source: §2 · p. 2
  • Human-aided testing has found coherent bugs in NLP models beyond static benchmarks, while computer vision lacks established frameworks for open-ended testing.Source: §2 · p. 3
  • Vision testing commonly relies on static suites, fixed out-of-distribution sets, counterfactual generators, or 3D simulation, which restrict tests to fixed images or predefined change axes.Source: §2 · p. 3
  • AdaVision allows natural-language tests along unrestricted axes and retrieves images from a pool of five billion candidates.Source: §2 · p. 3
  • Unlike Wiles et al.’s automatic clustering and generated-test approach [45], AdaVision uses human supervision to steer testing toward failures relevant to the downstream task.Source: §2 · p. 3

3. Methodology

AdaVision tests computer-vision models on coherent topics, adapting image retrieval to user feedback and suggesting new topics for exploration. Users can then use discovered failures to guide interventions such as fine-tuning.

3. Methodology

  • A coherent topic groups images by a human-understandable concept and shared expectation; AdaVision aims to help users find topics with high failure rates, called bugs.Source: §3 · p. 3
  • Users propose a topic, receive test suggestions, refine the topic through feedback, and can fine-tune on failed tests to improve performance on fresh examples from the topic.Source: §3 · p. 3

3.1. Test generation loop

  • Initial retrieval uses a CLIP embedding of the topic text to find nearest image neighbors in LAION-5B; other large unlabeled datasets or image generators can also be used.Source: §3.1 · p. 3
  • After users label tests as passed, failed, or off-topic, AdaVision combines in-topic image embeddings, prioritizing failures, and interpolates them with the topic embedding to retrieve subsequent suggestions.The process is described as hill-climbing toward a coherent, high-error region based on user labels.Source: §3.1 · p. 4, Figure 2 · p. 4
  • Lightweight topic-specific classifiers rerank suggestions to show likely failures first and predicted off-topic tests last, reducing the labeling effort required from users.Source: §3.1 · p. 4

3.2. Topic generation loop

  • GPT-3 generates candidate topics from prompt templates and existing topics, prioritizing high-failure topics; users choose which suggestions to explore.Suggestions need high recall rather than precision because users can disregard irrelevant ones.Source: §3.2 · pp. 4–5, Figure 3 · p. 5

4. Evaluation

Evaluation tests adaptive retrieval, user-led discovery against automatic slice discovery, and finetuning of discovered bugs. AdaVision helps users find failure-prone groups, and finetuning improves performance on held-out examples and out-of-distribution data without reducing ImageNet accuracy.

4.1. Value of adaptive test suggestions

  • After a few failures were found, adaptive suggestions quickly surfaced more failures than topic-string-only retrieval, hill-climbing from broad starting topics toward coherent failure groups.Figure 4 compares accumulated failures over 100 retrievals, averaged across topics.Source: Figure 4 · p. 5, §4.1 · p. 5

4.2. User study

  • Across classification, object detection, and image captioning, users found close to twice as many failing tests with AdaVision; 12/40 found 2 or more bugs versus 1/40 with the baseline.The AdaVision advantage was statistically significant in each task.Source: §4.2 · p. 6
  • Users found bugs involving spurious correlations, difficult examples, and missing world knowledge across the tested vision models.Examples included countertop-microwave associations, detections missed under snow occlusion, and OFA-Huge misidentifying oven mitts.Source: §4.2 · p. 6, Figure 6 · p. 7
  • 84.6% of surveyed users said existing tools could not have found these bugs, and perceived difficulty was 3.05±1.07 versus 4.10±0.91 for NonAdaptive (p < 0.001).Difficulty was rated on a scale of 1 to 5.Source: §4.2 · pp. 6–7

4.3. Comparison with automatic slice discovery

  • Among Domino topics, 61.6% for BERT and 33.3% for OFA were nonsensical or did not refer to the target category, and were excluded from Table 1.AdaVision topics were human-verified as coherent.Source: §4.3 · p. 8
  • AdaVision found bugs that were 3x more difficult for models than those surfaced by automatic slice discovery, while Domino's failure rates were close to baselines.AdaVision topics generated while testing ViT-H/14 also transferred well to ResNet-50.Source: Table 1 · p. 8, §4.3 · p. 8

4.4. Fixing bugs via finetuning

  • 18.6 percentage points higher held-out treatment-topic performance and 13.9 percentage points higher accuracy on Google-sourced in-topic images followed finetuning on AdaVision examples.Treatment-topic accuracy surpassed average ImageNet accuracy.Source: §4.4 · p. 8
  • 78% to 84% was the change in treatment-class accuracy across out-of-distribution sets; finetuning did not reduce overall ImageNet accuracy or performance on control topics.Table 2 summarizes held-out topics, ImageNet, control topics, and OOD evaluation sets.Source: §4.4 · pp. 8–9, Table 2 · p. 9

5. Limitations

AdaVision’s retrieval is less suited to specialized imagery and complex topic descriptions, while the reported finetuning experiments cover limited labels and one testing round. Fixing detection and captioning bugs also needs additional supervision or a suitable loss.

Retrieval limitations

  • LAION-5B and CLIP may be unsuitable for specialized domains, and text retrieval quality degrades for complex topics with several asymmetric relations.The authors suggest improved image-text models could reduce off-topic retrievals and improve testing speed.Source: §5 · p. 9

Experiment limitations

  • The finetuning experiment covered a limited set of labels and only one round of testing and finetuning.The authors note multiple rounds could be more beneficial.Source: §5 · p. 9
  • Models smaller than ViT-H/14 may be more prone to catastrophic forgetting, so preserving in-distribution performance may require robust finetuning or adding in-distribution data.Source: §5 · p. 9

Fixing non-classification bugs

  • Detection and captioning tests collect only pass/fail labels, so fixing their bugs requires labeling failing tests or using loss functions that allow negative labels.Source: §5 · p. 9

6. Conclusion

The paper concludes that human-in-the-loop AdaVision helps identify and improve coherent vision-model vulnerabilities beyond those captured by in-distribution evaluation sets. Its appendices provide further system, user-study, baseline-comparison, and finetuning details.

6. Conclusion

  • AdaVision’s adaptive testing helps discover bugs, and finetuning on discovered bugs boosts performance on those failure modes.The conclusion frames this as identifying and improving coherent vulnerabilities beyond in-distribution evaluation sets.Source: §6 · p. 9

Appendix Overview

  • Appendix A details adaptive retrieval, automatic labeling, and topic generation; Appendix B adds user-study and statistical details.Source: Appendix Overview · p. 13
  • Appendix C explains the Domino comparison, its coherency criterion, and the evaluated topics; Appendix D lists finetuning settings and adds an evaluation on unrelated bugs.Source: Appendix Overview · p. 13

A. Additional details on AdaVision

AdaVision has a test generation loop that retrieves images with CLIP and a topic generation loop that generates topics with GPT-3.

A. Additional details on AdaVision

A.1. Test generation loop

Each test-generation iteration retrieves topic-relevant suggestions and may automatically impute pass/fail labels to reduce user labeling effort. Retrieval uses prior labeled tests to steer suggestions toward failures, while lightweight classifiers predict correctness and topic relevance.

A.1. Test generation loop

  • Each iteration retrieves suggestions for a candidate topic and, when possible, imputes pass/fail labels to reduce user labeling effort.Source: §A.1 · p. 13
  • Labeled tests are triplets (x, m(x), y), where y is -1 for failure and 1 for success; previously reviewed off-topic tests may also be tracked.Source: §A.1 · p. 13
  • The appendix expands on two algorithm steps for a single retrieval-and-labeling iteration.Source: §A.1 · p. 13
  • AdaVision samples three previously labeled tests for retrieval, weighting confidently failed examples more heavily than less-confident failures or passed examples.Weights are normalized scores based on each test’s pass/fail label and model confidence.Source: §A.1 · p. 13
  • Topic-specific SVC classifiers use concatenated CLIP embeddings of each image and model output to predict pass/fail and in-topic status, then sort likely failures first.They are retrained at each iteration and take less than a second to train and run.Source: §A.1 · p. 13

A.2. Topic generation loop

The topic generation loop uses GPT-3 to propose topics for users to explore, while the test-generation algorithm retrieves and ranks images using the topic description and labeled examples. Its prompts incorporate prior suggestions and high-failure topics, and its image ranking uses lightweight classifiers.

A.2. Topic generation loop

  • GPT-3 first completes prewritten topic-generation templates, then receives first-round suggestions and previously explored high-failure topics for a second suggestion round.High-failure topics are placed last in prompts to account for GPT-3’s recency bias; users choose which suggestions to explore.Source: §A.2 · pp. 13–14
  • The algorithm embeds the textual topic with CLIP, combines it with embeddings of up to three sampled labeled images, and interpolates between text and image queries.The image mixture uses Dirichlet weights, and the spherical interpolation rate is sampled uniformly between zero and one.Source: §A.2 · p. 14
  • It retrieves approximate nearest neighbors from LAION-5B and excludes images whose CLIP embeddings have cosine similarity above 0.9 to any previous test.Source: §A.2 · p. 14
  • A lightweight classifier ranks predicted failures far from the decision boundary first, while another classifier identifies tests predicted to be off-topic.For tests far from the boundary, the procedure imputes a label for display to the user.Source: §A.2 · p. 14

A.3. Web interface

The web interface organizes topics and their tests in folders and rows, with separate areas for exploring topics and reviewing suggested tests.

A.3. Web interface

  • The root page presents suggested topics to explore, while individual topics appear as folders.Source: §A.3 · p. 14
  • Within a topic folder, tests appear as rows that map images to model outputs.Source: §A.3 · p. 14
  • The interface distinguishes the topic-generation loop on the root page from the test-generation loop within each topic.Source: §A.3 · p. 14

B. Additional details for user studies

The additional study details describe participant tasks, testing procedures, and outcome measures across classification, object detection, and image captioning. Users more often found bugs with AdaVision than in the baseline round, and many found the topic suggestions helpful.

B. Additional details for user studies

  • Participants completed a virtual 60-minute session with interface instruction and practiced on a held-out object or location before the main testing rounds.The practice topics were wine bottle for classification, fire hydrant for object detection, and garden for captioning.Source: B. Additional details for user studies · pp. 14–15
  • The interface presents topic suggestions on a root page and tests as image-to-model-output rows within topic folders.Source: Figure 7 · p. 15
  • Participants tested for 20 minutes in classification and captioning and 15 minutes in object detection, moving on after 10 or 8 failures, respectively.The threshold prevented users from continuing to exploit one topic to inflate the failure count.Source: B. Additional details for user studies · p. 15
  • Failure criteria varied by task: classification required an absent-object prediction, object detection a missed instance, and captioning an incorrect caption excluding counting, color, and age or gender errors.Captioning participants looked for errors among scenes from categories such as kitchens or elementary schools.Source: B. Additional details for user studies · p. 15
  • AdaVision users found significantly more failing tests than NonAdaptive users in classification, object detection, and image captioning, with reported effect sizes d = 0.588, d = 0.882, and d = 0.967, respectively.The paired tests were t(16) = 2.27, p < 0.05 for classification; t(16) = 3.42, p < 0.005 for object detection; and t(8) = 2.56, p < 0.05 for image captioning.Source: B. Additional details for user studies · p. 15
  • In the baseline round, 16/40 users could find such high-failure topics; users also reported finding bugs easier with AdaVision than without (t(40) = 4.18, p < 0.0005).Of 34 users who used GPT-3 topic suggestions, 24 marked them helpful for exploration.Source: B. Additional details for user studies · p. 19

C. Additional details for comparison with automatic slice discovery

The comparison uses two Domino captioning variants and evaluates only coherent topics. The appendix also specifies Domino’s slice-generation settings and how the AdaVision comparison topics were collected.

C. Additional details for comparison with automatic slice discovery

  • Domino generated five slices per class from ImageNet validation examples, using 25 candidate slices and γ = 40 after γ = 10 produced slices without errors.Larger γ values produced too much cluster incoherency.Source: C. Additional details for comparison… · p. 19
  • Domino (BERT) captioned clusters by CLIP-matching among 250,000 BERT or Wikipedia template completions, while Domino (OFA) selected the cluster caption most similar to the cluster mean.Both variants used the same image clusters; their captioning strategies differed.Source: C. Additional details for comparison… · p. 19
  • Domino failure rates were calculated only for coherent descriptions; incoherent or off-category descriptions were excluded, as were three coherent topics with no related LAION-5B images.Source: C. Additional details for comparison… · pp. 19–20
  • AdaVision topics came from six tested categories, with one user per category except that authors tested candle and wine bottle; testing was limited to 20 minutes.Participants had not previously explored ViT-H/14 on the tested class.Source: C. Additional details for comparison… · p. 20

D. Additional details for finetuning

This section details the finetuning setup and checks whether gains extend beyond the treatment topics. Finetuning also improves performance on semantically unrelated bugs within the same classes, though less than on treatment topics.

D. Additional details for finetuning

  • The finetuning used 20 images from each of 30 treatment topics, a constant learning rate of 1e-5, five AdamW steps, weight decay 0.01, batch size 16, and random square crops.Results were averaged over three random seeds; evaluation pairs were deduplicated against finetuning data when CLIP cosine similarity exceeded 0.95.Source: D. Additional details for finetuning · p. 20
  • The preceding experiments report that finetuning patched bugs while maintaining or slightly improving accuracy on ImageNet, control topics, and OOD evaluation sets.The appendix breaks down OOD performance by evaluation set; treatment-class and overall accuracies are reported separately.Source: D. Additional details for finetuning · pp. 20–21, Table 4 · p. 22, Table 5 · p. 22
  • Control topics were semantically related to treatment topics but had different labels, allowing the authors to check whether gains extended to those topics.Examples include “person holding a mop” as a control for “person holding a boxy broom,” and “microwave in kitchen” for “banana on kitchen countertop.”Source: D. Additional details for finetuning · pp. 20–21
  • Finetuning on treatment topics improves performance on semantically unrelated bugs within the same classes, but gains are smaller than on treatment topics.The comparison covers treatment, control, and unrelated topics.Source: D. Additional details for finetuning · p. 21, Table 6 · p. 22
Loading 2212.02774v2…