Mobile apps are essential in daily life but frequently employ deceptive patterns, such as visual emphasis or linguistic nudging, to manipulate user behavior. Existing research largely relies on manual detection, which is time-consuming and cannot keep pace with rapidly evolving apps. Although recent work has explored automated approaches, these methods are limited to intra-page patterns, depend on manual app exploration, and lack flexibility. To address these limitations, we present AppRay, a system that integrates task-oriented app exploration with automated deceptive pattern detection to reduce manual effort, expand detection coverage, and improve performance. AppRay operates in two stages. First, it combines large language model-guided task-oriented exploration with random exploration to capture diverse user interface (UI) states. Second, it detects both intra-page and inter-page deceptive patterns using a contrastive learning-based multi-label classifier augmented with a rule-based refiner for context-aware detection. We contribute two datasets, AppRay-Tainted-UIs and AppRay-Benign-UIs, comprising 2,185 deceptive pattern instances, including 149 intra-page cases, spanning 16 types across 876 deceptive and 871 benign UIs, while preserving UI relationships. Experimental results show that AppRay achieves macro/micro averaged precision of 0.92/0.85, recall of 0.86/0.88, and F1 scores of 0.89/0.85, yielding 27.14% to 1200% improvements over prior methods and enabling effective detection of previously unexplored deceptive patterns.
翻译:移动应用在日常生活中不可或缺,但经常采用视觉强调、语言助推等欺骗性模式操纵用户行为。现有研究主要依赖人工检测,耗时且无法跟上应用快速演变的步伐。尽管近期工作已探索自动化方法,但这些方法局限于页面内模式、依赖人工应用探索且缺乏灵活性。为解决这些局限,我们提出AppRay系统,将面向任务的应用探索与自动化欺骗模式检测相结合,以减少人工工作量、扩大检测覆盖率并提升性能。AppRay分两阶段运行:首先,结合大语言模型引导的面向任务探索与随机探索,捕获多样化的用户界面状态;其次,采用基于对比学习的多标签分类器(辅以基于规则的细调器进行上下文感知检测)检测页面内与页面间欺骗模式。我们贡献了两个数据集——AppRay-Tainted-UIs和AppRay-Benign-UIs,包含2185个欺骗模式实例(含149个页面内案例),涵盖876个欺骗性UI与871个良性UI的16种类型,同时保留UI关联关系。实验结果表明,AppRay宏平均/微平均精确率达0.92/0.85,召回率0.86/0.88,F1分数0.89/0.85,相比以往方法提升27.14%至1200%,并能有效检测此前未探索的欺骗模式。