arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2212.05976cs.SEcs.AI
收藏

DexBERT:有效的、任务无关的Android字节码细粒度表示学习

DexBERT: Effective, Task-Agnostic and Fine-grained Representation Learning of Android Bytecode

University of Luxembourg(卢森堡大学);Singapore Management University(新加坡管理大学);Kyungpook National University(庆北国立大学)

Tiezhu Sun, Kevin Allix, Kisub Kim, Xin Zhou, Dongsun Kim, David Lo, Tegawendé F. Bissyandé, Jacques Klein

AI总结:

针对现有Android字节码表示模型层面单一、任务特定的局限,受NLP通用语言模型启发,提出专门建模DEX字节码的类BERT模型DexBERT,在三类类级别软件工程任务中验证了其有效性,并探索了适配不同规模应用的策略。

摘要:

机器学习(ML)正让大量软件工程任务的自动化成为可能。将机器学习应用于软件制品(如源代码或可执行代码)的核心,是将其转换为适合学习的形式。传统上,研究人员依赖基于专家知识手动选择的特征,这类特征有时不够精确,且通常不完整。表示学习让机器学习能够自动选择合适的表示与相关特征。然而,针对Android相关任务,现有模型如apk2vec聚焦于应用整体层面,或是像smali2vec那样面向特定任务,这限制了它们的适用性。\n我们的工作属于一个新的研究方向,该方向旨在研究有效的、任务无关的字节码细粒度通用表示,以缓解上述两类局限。这类表示旨在捕获与各类低层级下游任务(例如类级别任务)相关的信息。我们受自然语言处理领域启发——该领域通过构建通用语言模型(如BERT)解决了通用表示问题,BERT的目标是以可复用于多种任务的方式捕获句子的抽象语义信息。\n我们提出了DexBERT,这是一种类BERT语言模型,专门用于表示DEX字节码(Android应用使用的主要二进制格式)的代码块。我们通过实验评估了DexBERT是否能够建模DEX语言,并在三类不同的类级别软件工程任务中验证了模型的适用性:恶意代码定位、缺陷预测和组件类型分类。我们还针对适配规模差异极大的应用这一问题,实验了多种应对策略,并展示了一个使用我们的技术研究特定任务相关信息的示例。

英文摘要:

The automation of a large number of software engineering tasks is becoming possible thanks to Machine Learning (ML). Central to applying ML to software artifacts (like source or executable code) is converting them into forms suitable for learning. Traditionally, researchers have relied on manually selected features, based on expert knowledge which is sometimes imprecise and generally incomplete. Representation learning has allowed ML to automatically choose suitable representations and relevant features. Yet, for Android-related tasks, existing models like apk2vec focus on whole-app levels, or target specific tasks like smali2vec, which limits their applicability. Our work is part of a new line of research that investigates effective, task-agnostic, and fine-grained universal representations of bytecode to mitigate both of these two limitations. Such representations aim to capture information relevant to various low-level downstream tasks (e.g., at the class-level). We are inspired by the field of Natural Language Processing, where the problem of universal representation was addressed by building Universal Language Models, such as BERT, whose goal is to capture abstract semantic information about sentences, in a way that is reusable for a variety of tasks. We propose DexBERT, a BERT-like Language Model dedicated to representing chunks of DEX bytecode, the main binary format used in Android applications. We empirically assess whether DexBERT is able to model the DEX language and evaluate the suitability of our model in three distinct class-level software engineering tasks: Malicious Code Localization, Defect Prediction, and Component Type Classification. We also experiment with strategies to deal with the problem of catering to apps having vastly different sizes, and we demonstrate one example of using our technique to investigate what information is relevant to a given task.

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

↑