一句话:首次评估 LLM 在 Android 应用中检测隐私合规违规,发现模型专长随检测粒度与法规而变化。
隐私法规(GDPR、LGPD、PDPA、PIPEDA)对移动应用提出合规要求,但代码级合规验证仍十分耗时。本文首次系统评估大语言模型在 Android 应用中检测隐私合规违规的能力。作者构建了覆盖四部法规的标注数据集,每部包含 57 至 146 个实例,并在违规定位(文件、模块、行级别)与代码片段级分类任务上评估四个 LLM。实验揭示了粒度依赖的模型专长:Claude 系列擅长粗粒度分析(MAP 最高 0.66),而 GPT-4o 在细粒度检测上更优(Acc@1 0.48);同时法规间性能差异显著,GDPR 与 PIPEDA 的得分约为 LGPD 与 PDPA 的两倍。这些发现为设计混合式合规验证系统提供了实证基础。
Privacy regulations (GDPR, LGPD, PDPA, PIPEDA) impose compliance requirements on mobile applications; verifying code-level adherence remains labor-intensive. We present the first evaluation of Language Models (LLMs) for detecting privacy compliance violations in Android applications. We construct annotated datasets spanning four regulations with 57 to 146 instances each, and evaluate four LLMs on violation localization (file, module, and line levels) and snippet-level classification. Experiments reveal granularity-dependent model specialization: Claude variants excel at coarse-grained analysis (MAP up to 0.66) while GPT-4o demonstrates superior fine-grained detection (Acc@1 0.48), alongside performance disparities—GDPR and PIPEDA yield twice the scores of LGPD and PDPA. These findings provide grounding for designing hybrid compliance verification systems.