arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2601.06276cs.SEcs.CR
收藏

基于大语言模型的Android源代码中准确隐私描述的自动化生成

Automated Generation of Accurate Privacy Captions From Android Source Code Using Large Language Models

University of Maine(缅因大学);Google Inc.(谷歌公司);University of Notre Dame(圣母大学)

Vijayanta Jain, Sepideh Ghanavati, Sai Teja Peddinti, Collin McMillan

AI总结:

本文提出PCapGen方法,利用大语言模型自动从Android源代码生成准确、简洁的隐私描述,有效解决现有方法的不足。

摘要:

隐私描述是简短的句子,用于简洁地描述应用程序中使用的个人信息、其用途以及原因。这些描述可以用于各种通知格式,如隐私政策、应用程序说明和应用商店描述。然而,不准确的描述可能会误导用户并使开发者面临监管罚款。现有的生成隐私通知或仅隐私描述的方法包括使用问卷、模板、静态分析或机器学习。然而,这些方法要么严重依赖开发者的输入从而增加他们的负担,要么使用有限的源代码上下文,导致无法完整捕捉应用程序的隐私行为,或者依赖可能不准确的隐私政策作为创建通知的来源。在本工作中,我们通过开发Privacy Caption Generator (PCapGen)来解决这些限制。该方法包括:i) 自动识别和提取实现隐私行为的应用中的大量且精确的源代码上下文,ii) 使用大型语言模型(LLM)来描述粗粒度和细粒度的隐私行为,iii) 生成准确、简洁且完整的隐私描述以描述应用程序的隐私行为。我们的评估显示,PCapGen生成的隐私描述比基线方法更加简洁、完整和准确。此外,隐私专家选择PCapGen描述的频率至少为71%,而LLM作为判断者则至少76%地偏好PCapGen描述,这表明了我们方法的强性能。

英文摘要:

Privacy captions are short sentences that succinctly describe what personal information is used, how it is used, and why, within an app. These captions can be utilized in various notice formats, such as privacy policies, app rationales, and app store descriptions. However, inaccurate captions may mislead users and expose developers to regulatory fines. Existing approaches to generating privacy notices or just privacy captions include using questionnaires, templates, static analysis, or machine learning. However, these approaches either rely heavily on developers' inputs and thus strain their efforts, use limited source code context, leading to the incomplete capture of app privacy behaviors, or depend on potentially inaccurate privacy policies as a source for creating notices. In this work, we address these limitations by developing Privacy Caption Generator (PCapGen), an approach that - i) automatically identifies and extracts large and precise source code context that implements privacy behaviors in an app, ii) uses a Large Language Model (LLM) to describe coarse- and fine-grained privacy behaviors, and iii) generates accurate, concise, and complete privacy captions to describe the privacy behaviors of the app. Our evaluation shows PCapGen generates concise, complete, and accurate privacy captions as compared to the baseline approach. Furthermore, privacy experts choose PCapGen captions at least 71\% of the time, whereas LLMs-as-judge prefer PCapGen captions at least 76\% of the time, indicating strong performance of our approach.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑