Abstract
Deceptive patterns (DPs) are user interface designs deliberately crafted to manipulate users into unintended decisions, often by exploiting cognitive biases for the benefit of companies. While numerous studies have explored ways to identify these patterns, many existing solutions require significant human intervention and struggle to keep pace with evolving designs. To address these challenges, we expanded the deceptive pattern taxonomy from security and privacy perspectives and created a comprehensive dataset of 6,725 images containing 10,421 DP instances. We developed DPGuard, a novel automatic tool leveraging commercial multimodal large language models (MLLMs) and iterative prompt mutation for detection. Experimental results show that DPGuard outperforms state-of-the-art methods. Our empirical evaluation of 2,000 popular mobile apps and websites reveals that nearly half of websites feature at least one deceptive pattern, highlighting critical security implications.
Introduction
Deceptive patterns (often called "dark patterns") have become a pervasive issue in modern digital interfaces. From "hidden costs" to "forced continuity," these designs trick users into making choices that favor the provider at the user's expense. Current research faces three major hurdles: fragmented taxonomies that ignore security risks, rigid rule-based detection systems that fail against evolving UI designs, and a lack of large-scale, cross-platform datasets. This paper introduces a unified taxonomy and DPGuard, a framework designed to bridge the "semantic gap" in detection by using visual reasoning rather than just code metadata.
The DPGuard Framework
DPGuard is a hybrid detection pipeline designed to be both cost-effective and highly accurate. The system operates in three distinct stages to handle the complexity of modern UIs.
- Binary Filter: To manage API costs, a fine-tuned ResNet101 classifier first filters out benign images, passing only suspicious screenshots to the MLLM.
- Mutation-based Prompt Engineering: Inspired by evolutionary algorithms, DPGuard automatically evolves its detection prompts. It iteratively paraphrases and modifies instructions to find the optimal prompt for identifying 21 different DP categories.
- MLLM Categorization: Suspicious images are processed by a commercial MLLM (e.g., GPT-4o) using the evolved prompt, allowing the system to "see" and interpret the UI like a human user.
Data and Taxonomy
We introduce a massive, cross-platform dataset by merging existing sources (UIGuard, AidUI, LLE) with 1,666 newly collected samples. This results in a benchmark of 6,725 images spanning mobile apps and websites from 2017 to 2024.
Our unified taxonomy refines existing models by adding categories like "Forced Enrollment"—where users cannot skip sign-ups, leading to data over-collection—and expanding the scope of others to include security risks like phishing-adjacent "Disguised Ads."
Performance and Evaluation
DPGuard significantly outperforms previous state-of-the-art (SOTA) models. On mobile datasets, it achieved a micro F1-score of 0.73, surpassing UIGuard (0.66) and AidUI (0.58). A key driver of this success is the automated prompt mutation strategy.
As shown in the evaluation, the mutation strategy improved the MLLM's macro average F1-score by 6.1% compared to using a standard fixed prompt. This iterative refinement allows the model to better capture the nuances of deceptive language and visual hierarchy.
Key Insights and Security Implications
Our empirical study of 2,000 popular services revealed that 49.0% of websites and 25.7% of mobile apps employ at least one deceptive pattern. The higher prevalence on the web is largely driven by cookie consent "nagging."
Beyond mere annoyance, these patterns pose genuine security risks. "Disguised Ads" can trick users into clicking banners that mimic system notifications, potentially facilitating malware deployment or phishing attacks. By framing deceptive patterns as a security problem rather than just a usability issue, we highlight the need for more robust regulatory and technical defenses.
Conclusion and Future Work
While DPGuard represents a significant leap forward, challenges remain regarding the cost of MLLM APIs and the detection of dynamic, multi-step deceptions (e.g., "Roach Motels"). Future work will focus on multi-turn UI navigation to catch behavioral deceptions that emerge only through user interaction. As designers find more subtle ways to exploit cognitive biases, tools like DPGuard will be essential in maintaining a transparent and secure digital ecosystem.
Summary updated