NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

A Weak Supervision Approach to Detecting Visual Anomalies for Automated Testing of Graphics Units

Adi Szeskin, Lev Faivishevsky, Ashwin K Muppalla, Amitai Armon, Tom HopearXiv 2019

TL;DR

Automated graphics unit (GPU) testing traditionally relies on tedious manual video labeling or low-accuracy unsupervised anomaly detection to catch visual glitches. This paper introduces a fully automated weak supervision framework that leverages known driver bugs to generate training data without human intervention. By framing the problem as Multiple Instance Learning (MIL), the system significantly outperforms unsupervised baselines in real-time production environments and successfully discovers entirely novel hardware corruptions.

What Problem Does This Paper Address?

Graphics Processing Units (GPUs) are incredibly complex, and software or hardware defects often manifest as fleeting visual corruptions (glitches, lines, or color shifts). Catching these defects during validation is critical. Historically, this required human testers to watch screens for hours—a process that is costly, unscalable, and error-prone.

While deep learning can automate this by analyzing camera-captured screen recordings, training these models typically requires massive amounts of frame-by-frame manual tagging. Unsupervised methods (like Generative Adversarial Networks) remove the need for labels but suffer from low accuracy and high false-alarm rates. To make matters more challenging, a production-ready automated testing system must operate in real-time (processing roughly 2 million frames per day) and adhere to a strict False Positive Rate (FPR) of $\le$ 0.1% to avoid overwhelming engineers with false alerts.

Methods

The authors strike a balance between supervised and unsupervised learning using a weak supervision approach based on Multiple Instance Learning (MIL).

Instead of manually labeling frames, the authors automatically generate data by intentionally reproducing historical driver bugs. Triggering these bugs doesn't guarantee a corruption in every single frame, but it drastically increases the probability that a corruption will occur somewhere in the video.

The framework processes data as follows:

  1. Bag Creation: Videos are treated as "bags," and short, continuous 16-frame segments are treated as "instances." A video generated with a faulty driver is labeled a "corrupted bag" (containing at least one anomalous segment), while a video from a stable driver is a "normal bag" (containing zero anomalies).
  2. Feature Extraction: A pre-trained C3D network extracts spatiotemporal features from the video segments, which are then passed to a 3-layer fully-connected neural network.
  3. Weak Supervision Models: The authors tested two MIL strategies to map video-level labels to segment-level predictions:
  4. Deep MIL (Hard Maximum): Uses a hinge loss function that penalizes the model based on the maximum predicted anomaly score in a normal bag versus a corrupted bag. It forces the single most anomalous segment in a positive video to score higher than any segment in a clean video.
  5. MIL Attention: Uses an attention mechanism to compute a soft, weighted average of segment scores rather than relying on a hard maximum.
Figure 2: Our Multiple Instance Learning (MIL) model flow requires no manual tagging, using weak labels generated by reproducing known bugs and feeding them into weak supervision models.

Datasets

The system was trained and evaluated on a dataset of screen-captured videos:

  • Training: 532 videos.
  • Validation: 216 videos.
  • Test Set: 2,573 uncorrupted videos and 213 corrupted videos.
  • Threshold Tuning: 1 million frames of uncorrupted data were used to strictly tune the decision threshold to guarantee an FPR of $\le$ 0.1%.

Key Insights and Ideas

  • Bugs as a Feature, Not a Flaw: Intentionally injecting known software bugs is an elegant way to generate a "noisy but free" supervision signal, completely bypassing the manual data-labeling bottleneck.
  • The Hard-Max Advantage at Low FPR: While the Attention-based MIL model achieved a higher overall Area Under the Curve (AUC), the Deep MIL (hard-max) model performed significantly better at the ultra-low 0.1% FPR line required by the business logic. When false alarms must be virtually non-existent, optimizing for the absolute worst-case anomaly score in clean data yields better operational results.
ROC Curves comparing Attention vs No Attention

Key Results

  • Massive Performance Boost: At a strict 0.1% FPR, the Deep MIL approach achieved an average recall of 13.0%, nearly tripling the performance of the best unsupervised baseline (BEGAN, which achieved 4.7%).
  • Targeted Corruption Detection: Deep MIL dramatically outperformed unsupervised methods on specific artifact types, such as detecting vertical/horizontal lines (27.3% vs 4.39%) and green flashes (13.1% vs 1.5%).
  • Discovery of Novel Corruptions: Because the weak supervision approach scales easily to massive amounts of data, the model generalized well enough to discover entirely new, unmodeled hardware corruptions. It successfully flagged 38 videos featuring a "half-screen corruption," 6 videos with a "bottom split," and several sequential "sudden blackouts" with a perfect false-positive rate.

Limitations and Future Work

While the weak supervision approach clearly outperforms unsupervised baselines, the authors note that unsupervised models in their preliminary tests had access to a much larger volume of clean data. They anticipate that scaling up the automated generation of weakly supervised data will widen their model's performance lead even further.

For future work, the authors plan to explore hybrid semi-supervised approaches that can incorporate frame-level labels when they happen to be available, as well as extending the architecture to handle multiclass anomaly classification.

Summary updated

BibTeX
@misc{szeskin2019weak,
  author = {Adi Szeskin and Lev Faivishevsky and Ashwin K Muppalla and Amitai Armon and Tom Hope},
  title = {{A Weak Supervision Approach to Detecting Visual Anomalies for Automated Testing of Graphics Units}},
  year = {2019},
  eprint = {1912.04138},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1912.04138},
}
Figure