Unveiling the Tricks: Automated Detection of Dark Patterns in Mobile Applications

Jieshan Chen, Jiamou Sun, Sidong Feng, Zhenchang Xing, Qinghua Lu, Xiwei Xu, Chunyang Chen

Introduction

Mobile applications have become indispensable, yet they are frequently riddled with "dark patterns"—user interface designs intentionally crafted to deceive or manipulate users into actions they might not otherwise take. Common examples include "roach motels," where unsubscribing is intentionally difficult, and "forced continuity," where free trials transition into paid subscriptions without clear notice. While these patterns are well-categorized by researchers, automated detection remains a significant technical hurdle due to the visual and structural diversity of mobile apps.

The UIGuard Framework

To address this, researchers developed UIGuard, an automated, vision-based system designed to detect dark patterns with the same visual intuition as a human auditor. Unlike previous tools that rely on internal app metadata or specific code structures—which developers can easily obfuscate—UIGuard operates purely on UI screenshots. This platform-agnostic approach ensures broad applicability across different mobile operating systems.

The system functions through a two-stage pipeline:

  1. UI Element Property Extraction: Utilizing deep learning models like Faster-RCNN for element detection, PaddleOCR for text extraction, and ResNet-18 for icon classification, UIGuard builds a comprehensive map of the UI. It specifically analyzes visual saliency (e.g., color contrast) and spatial relationships to identify manipulative design choices.
  2. Knowledge-Driven Dark Pattern Checker: Extracted properties are fed into a heuristic engine. This engine matches UI features against a distilled knowledge base of 14 dark pattern types, providing an explainable detection result rather than a simple black-box classification.
Example of preselection dark patterns where notification toggles are enabled by default.

Datasets and Benchmarking

A major contribution of this work is the creation of the Mobile Dark Pattern Dataset, the first large-scale benchmark of its kind. It consists of 6,352 annotated UIs from 1,023 different apps. To train the underlying vision modules, the researchers also leveraged the Rico Dataset, which contains over 66,000 mobile UIs, providing a robust foundation for general element recognition.

Key Insights and Results

UIGuard demonstrates that effective detection requires a multi-modal approach. Textual analysis alone is insufficient; the system must understand icon semantics and visual hierarchy. For instance, "Interface Interference" is often detected by comparing the visual weight of competing buttons (e.g., a bright "Accept" vs. a muted "Decline").

Forced continuity in a subscription model, where the transition to a paid plan is hidden in fine print.

The system achieved a micro-average F1 score of 0.79 across 14 pattern types, with a binary classification accuracy of 0.93. Beyond technical performance, UIGuard serves as an educational tool. In user studies, the ability of participants to identify dark patterns independently rose from 18.5% to 57.8% after interacting with the system’s explanations and highlights.

Limitations and Future Outlook

While UIGuard is highly effective for single-screen analysis, some dark patterns are temporal, spanning multiple screens (e.g., "Hidden Costs" appearing only at checkout). Future iterations aim to incorporate user-flow tracking to capture these dynamic deceptions. Additionally, the challenge of "signifier-less" ads—those perfectly integrated into native content without visual markers—remains an open area for research. Despite these challenges, UIGuard represents a significant step toward empowering users against digital manipulation.

Summary updated

BibTeX
@inproceedings{chen2023unveiling,
  author = {Jieshan Chen and Jiamou Sun and Sidong Feng and Zhenchang Xing and Qinghua Lu and Xiwei Xu and Chunyang Chen},
  title = {{Unveiling the Tricks: Automated Detection of Dark Patterns in Mobile Applications}},
  booktitle = {UIST},
  year = {2023},
  url = {https://openreview.net/forum?id=LOtoxWxScx},
}
Figure