UI-CTX: Understanding UI Behaviors with Code Contexts for Mobile Applications
Jiawei Li, Jiahao Liu, Jian Mao, Jun Zeng, Zhenkai Liang
Abstract
—Many mobile apps utilize UI widgets to interact with users and trigger specific operational logic, such as clicking a button to send a message. While UI widgets are designed to be intuitive and user-friendly, they can also be misused to perform harmful behaviors that violate user expectations. To address these potential threats, recent studies strive to understand the intentions of UI widgets in mobile apps. However, existing methods either concentrate on the surface-level features of UI widgets, failing to capture their underlying intentions, or involve tedious and faulty information, making it challenging to distill the core intentions. In this paper, we present UI-CTX, which demystifies UI behaviors with a concise and effective representation. For each UI widget, UI-CTX first represents its intentions with a UI Handler Graph (UHG) , incorporating the code context behind the widget while eliminating irrelevant information ( e.g., unreachable code blocks). Then, UI-CTX performs graph summarization and explores both the structural and semantic information in UHGs to model the core intentions of UI widgets. To systematically evaluate UI-CTX, we extract a series of UI widget behaviors, such as login and search, from a large-scale dataset and conduct extensive experiments. Experimental results show that UI-CTX can effectively represent the intentions of UI widgets and sig-nificantly outperforms existing solutions in modeling UI widget behaviors. For example, in the task of classifying UI widget intentions, UHG achieves the highest average F1-score compared to other widget representations (+95.2% and +8.2% compared with permission set and call sequence, respectively) used in state-of-the-art approaches. Additionally, by accurately pinpointing the code contexts of widgets, UI-CTX achieves a 3 . 6 × improvement in widget intention clustering performance.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 30092070-44fd-4a27-8dff-190147790109Cited by top-tier papers1
Ask how each one uses itBuilds on20
- MaMaDroid: Detecting Android Malware by Building Markov Chains of Behavioral ModelsEnrico Mariconti, Lucky Onwuzurike, Panagiotis Andriotis, Emiliano De Cristofaro et al.NDSS 2017 · 471 citations
- P3: Distributed Deep Graph Learning at ScaleSwapnil Gandhi, Anand Padmanabha IyerOSDI 2021 · 192 citations
- SHADEWATCHER: Recommendation-guided Cyber Threat Analysis using System Audit RecordsJun Zeng, Xiang Wang, Jiahao Liu, Yinfang Chen et al.S&P 2022 · 187 citations
- Enhancing State-of-the-art Classifiers with API Semantics to Detect Evolved Android MalwareXiaohan Zhang, Yuan Zhang, Ming Zhong, Daizong Ding et al.CCS 2020 · 173 citations
- DeepIntent: Deep Icon-Behavior Learning for Detecting Intention-Behavior Discrepancy in Mobile AppsShengqu Xi, Shao Yang, Xusheng Xiao, Yuan Yao et al.CCS 2019 · 74 citations
Related papers
- What You See Is What You Get? It Is Not the Case! Detecting Misleading Icons for Mobile ApplicationsLinlin Li, Ruifeng Wang, Xian Zhan, Ying Wang et al.ISSTA 2023 · 4 citations
- AppBDS: LLM-Powered Description Synthesis for Sensitive Behaviors in Mobile AppsZichen Liu, Xusheng XiaoASE 2025
- SummAct: Uncovering User Intentions Through Interactive Behaviour SummarisationGuanhua Zhang, Mohamed Adel Naguib Ahmed, Zhiming Hu, Andreas BullingCHI 2025 · 5 citations
- DescribeCtx: Context-Aware Description Synthesis for Sensitive Behaviors in Mobile AppsShao Yang, Yuehan Wang, Yuan Yao, Haoyu Wang et al.ICSE 2022 · 8 citations
- What's Done Is Not What's Claimed: Detecting and Interpreting Inconsistencies in App BehaviorsChang Yue, Kai Chen, Zhixiu Guo, Jun Dai et al.NDSS 2025
