Semantic GUI Scene Learning and Video Alignment for Detecting Duplicate Video-based Bug Reports

Yanfu Yan, Nathan Cooper, Oscar Chaparro, Kevin Moran, Denys Poshyvanyk

As mobile apps become more complex, users are ditching text-heavy bug reports for screen recordings. It makes sense—showing a bug is often easier than describing it. However, for developers, this "video boom" is a double-edged sword. Manually watching hundreds of videos to see if a bug has already been reported is a massive time sink.

At ICSE ’24, researchers from William & Mary and the University of Central Florida presented Janus, a new approach that uses state-of-the-art computer vision to automatically detect duplicate video-based bug reports with unprecedented accuracy.

TL;DR

Janus is an automated tool that identifies duplicate video bug reports by combining Vision Transformers (ViT) for GUI scene understanding, high-accuracy OCR for text extraction, and a specialized video alignment algorithm. It outperforms previous state-of-the-art methods by roughly 9%, achieving an impressive 89.8% Mean Reciprocal Rank (mRR) in identifying duplicates.

What Problem Does This Paper Address?

In crowd-sourced testing, it’s common for dozens of users to report the same crash or UI glitch. Identifying these duplicates is critical for "bug triage"—the process of prioritizing and assigning issues.

While text-based duplicate detection is a well-studied field, video is much harder. Videos vary in length, recording quality, and the speed at which a user navigates the app. Previous tools (like the baseline Tango) relied on traditional Convolutional Neural Networks (CNNs), which are great at spotting local textures but struggle to understand the overall "scene" or layout of a mobile screen. Furthermore, existing tools often failed to account for the fact that the most important part of a bug report usually happens at the very end of the video.

Methods

Janus tackles the problem through a three-pronged "semantic" approach:

  1. Visual Scene Learning: Instead of standard CNNs, Janus uses a Vision Transformer (ViT) trained with a self-supervised scheme called DINO. This allows the model to learn the "geometry" of a mobile UI—recognizing buttons, headers, and layouts as structural components rather than just pixels.
  2. Neural Text Recognition: To understand the text on the screen, Janus moves away from older "heuristic" OCR (like Tesseract) and uses a modern pipeline: EAST for text localization and TrOCR (a Transformer-based OCR) for recognition. This is much more resilient to the varied fonts and low-contrast backgrounds found in mobile apps.
  3. Adaptive Video Alignment: Janus uses a modified Longest Common Substring (LCS) algorithm to compare sequences of frames. Crucially, it uses a weighting scheme that gives more importance to frames appearing later in the video. Since the "buggy behavior" typically manifests after a series of reproduction steps, the end of the video is statistically more likely to contain the "smoking gun."

Datasets

The researchers evaluated Janus on a massive benchmark of 7,290 duplicate detection tasks. This was built from:

  • 270 video-based bug reports covering 90 unique bugs.
  • 9 Android apps, including real-world apps like Firefox Focus and GPSTest.
  • The benchmark includes a mix of "synthetic" bugs (injected for testing) and real-world bugs pulled from the AndroR2+ dataset, making it the most comprehensive and realistic benchmark in this sub-field to date.

Key Insights and Ideas

  • Layout over Pixels: The "aha moment" for the researchers was realizing that duplicate bug reports often show the same structure even if the content differs (e.g., two users reporting a crash in a settings menu, but with different toggle states). The Vision Transformer’s ability to capture global GUI layouts was the key to its superior performance.
  • The "End-Weighting" Strategy: Most video comparison algorithms treat every second of footage equally. Janus recognizes that bug reports have a narrative structure: Setup -> Action -> Failure. By weighting the "Failure" (the end) more heavily, Janus avoids being distracted by minor differences in how users start their recordings.
  • OCR Matters More Than You Think: Better text extraction (via TrOCR) significantly helped in apps with "dynamic content" (like web browsers), where visual layouts change constantly but the text in menus or error pop-ups remains a reliable anchor.

Key Results

  • Top-Tier Accuracy: Janus achieved an overall mRR of 89.8% and an mAP of 84.7%.
  • Significant Improvement: It outperformed the previous state-of-the-art (Tango) by ~9% across the board.
  • Efficiency for Developers: In practical terms, the researchers found that using Janus would require a developer to watch only 1.38 videos on average to find the first duplicate, compared to much higher numbers for previous tools.
  • Qualitative Success: Saliency maps showed that Janus’s ViT-based model successfully "attended" to the edges of pop-up windows and UI components that CNN-based models completely ignored.

Limitations and Future Work

While Janus is a major step forward, the authors noted a few hurdles:

  • Dynamic Content: Apps that render highly variable content (like a web browser showing different websites) still pose a challenge, as the "background" noise can sometimes overwhelm the UI signals.
  • Platform Scope: The current study focused on Android. Future work could involve adapting the model for iOS or cross-platform frameworks (like Flutter or React Native).
  • Computational Overhead: Vision Transformers and neural OCR are computationally expensive. Optimizing these models to run faster in a real-time issue tracker environment is a logical next step.

Paper Citation: Yanfu Yan, Nathan Cooper, Oscar Chaparro, Kevin Moran, and Denys Poshyvanyk.

  1. Semantic GUI Scene Learning and Video Alignment for Detecting Duplicate Video-based Bug Reports. In 2024 IEEE/ACM 46th International Conference on Software Engineering (ICSE ’24).

Summary updated

BibTeX
@inproceedings{yan2024semantic,
  author = {Yanfu Yan and Nathan Cooper and Oscar Chaparro and Kevin Moran and Denys Poshyvanyk},
  title = {{Semantic GUI Scene Learning and Video Alignment for Detecting Duplicate Video-based Bug Reports}},
  booktitle = {ICSE},
  year = {2024},
  url = {https://openreview.net/forum?id=KKUd1iZ6Gb},
}

Loading related content...

Figure