arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2204.09945cs.SE
收藏

判别子图模式的主动学习在API误用检测中的应用

Active Learning of Discriminative Subgraph Patterns for API Misuse Detection

Hong Jin Kang, David Lo

摘要:

bug和漏洞的常见原因是违反了与应用程序编程接口(API)相关的使用约束。API误用在软件项目中很常见,虽然已经提出了检测此类误用的技术,但研究表明它们无法可靠地检测误用,同时报告了许多误报。先前工作的一个局限性是无法可靠地识别正确的使用模式。许多方法混淆了使用模式的频率和正确性。由于各种可能不常见但正确的替代使用模式,基于异常检测的技术在识别误用方面的成功有限。我们解决这些挑战,并提出ALP(主动学习模式),重新制定API误用检测作为一个分类问题。在将程序表示为图之后,ALP挖掘可区分子图。虽然仍然包含频率信息,但通过有限的人类监督,我们减少了对与频率和正确性相关的假设的依赖。主动学习的原则被纳入转移人类的注意力从最常见的模式。相反,ALP样本信息和代表性的例子,同时最大限度地减少标签工作。在我们的实证评估中,ALP在MUBench(一个API误用基准)和我们从真实世界的软件项目中构建的新数据集上都大大优于以前的方法。

英文摘要:

A common cause of bugs and vulnerabilities are the violations of usage constraints associated with Application Programming Interfaces (APIs). API misuses are common in software projects, and while there have been techniques proposed to detect such misuses, studies have shown that they fail to reliably detect misuses while reporting many false positives. One limitation of prior work is the inability to reliably identify correct patterns of usage. Many approaches confuse a usage pattern's frequency for correctness. Due to the variety of alternative usage patterns that may be uncommon but correct, anomaly detection-based techniques have limited success in identifying misuses. We address these challenges and propose ALP (Actively Learned Patterns), reformulating API misuse detection as a classification problem. After representing programs as graphs, ALP mines discriminative subgraphs. While still incorporating frequency information, through limited human supervision, we reduce the reliance on the assumption relating frequency and correctness. The principles of active learning are incorporated to shift human attention away from the most frequent patterns. Instead, ALP samples informative and representative examples while minimizing labeling effort. In our empirical evaluation, ALP substantially outperforms prior approaches on both MUBench, an API Misuse benchmark, and a new dataset that we constructed from real-world software projects.

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

↑