Skip to main content
QUICK REVIEW

[论文解读] A Unified Active Learning Framework for Annotating Graph Data with Application to Software Source Code Performance Prediction

Peter Samoaa, Linus Aronsson|arXiv (Cornell University)|Apr 6, 2023
Software System Performance and Reliability被引用 5
一句话总结

本文提出了一种统一的主动学习框架,用于图结构化软件源代码的性能预测,将代码转换为流增强型抽象语法树(FA-AST)图,并利用图嵌入(如Graph2Vec、GNNs)实现基于回归的性能预测,仅需极少的标注数据。该框架在仅使用少量标注数据的情况下表现出色,其中Graph2Vec与测试特征结合的方案在HadoopTests和OSSBuilds等真实世界数据集上表现最佳。

ABSTRACT

Most machine learning and data analytics applications, including performance engineering in software systems, require a large number of annotations and labelled data, which might not be available in advance. Acquiring annotations often requires significant time, effort, and computational resources, making it challenging. We develop a unified active learning framework specializing in software performance prediction to address this task. We begin by parsing the source code to an Abstract Syntax Tree (AST) and augmenting it with data and control flow edges. Then, we convert the tree representation of the source code to a Flow Augmented-AST graph (FA-AST) representation. Based on the graph representation, we construct various graph embeddings (unsupervised and supervised) into a latent space. Given such an embedding, the framework becomes task agnostic since active learning can be performed using any regression method and query strategy suited for regression. Within this framework, we investigate the impact of using different levels of information for active and passive learning, e.g., partially available labels and unlabeled test data. Our approach aims to improve the investment in AI models for different software performance predictions (execution time) based on the structure of the source code. Our real-world experiments reveal that respectable performance can be achieved by querying labels for only a small subset of all the data.

研究动机与目标

  • 为解决人工智能驱动的软件工程中软件性能预测面临的标注数据稀缺问题,该问题构成关键瓶颈。
  • 开发一种通用的、与任务无关的主动学习框架,适用于图结构化数据,特别是源代码表示。
  • 研究额外信息(如测试特征和部分标注的训练数据)对嵌入质量及主动学习性能的影响。
  • 评估多种查询策略(随机、coreset、方差、QBC)在图嵌入代码的回归设置下的有效性。
  • 证明通过选择信息量丰富的数据,仅需极少人工标注即可训练出高性能的预测模型。

提出的方法

  • 将源代码解析为抽象语法树(AST),并通过添加数据流和控制流边,构建流增强型抽象语法树(FA-AST)图。
  • 使用无监督方法(如Graph2Vec)和有监督方法(如基于GNN的方法)构建图嵌入,整合来自测试数据和/或部分标注训练数据的特征。
  • 将每个FA-AST图映射到潜在空间表示,以解耦学习任务与图结构,从而支持标准回归模型的使用。
  • 应用高斯过程回归器(GPR),并采用多种获取函数——均匀随机、coreset、方差和基于委员会的查询(QBC)——选择最具信息量的样本进行标注。
  • 迭代地使用主动学习策略查询标签,重新训练模型,并在回归任务(执行时间预测)上评估性能。
  • 使用真实世界数据集(HadoopTests、OSSBuilds)在不同初始标签集和批量大小下评估该框架。

实验结果

研究问题

  • RQ1在图嵌入构建过程中引入测试数据特征,如何影响源代码性能预测中的主动学习性能?
  • RQ2在训练标签部分可用的情况下,其对图嵌入质量及后续回归性能的提升程度如何?
  • RQ3在图结构回归设置中,哪种主动学习查询策略——随机、coreset、方差或QBC——在源代码性能预测中表现最佳?
  • RQ4图嵌入方法的选择(如Graph2Vec与GNN)如何影响性能预测中主动学习的有效性?
  • RQ5通过该统一框架,仅使用一小部分标注数据,能否实现对源代码执行时间的高精度预测?

主要发现

  • Graph2Vec嵌入,尤其是在结合测试数据特征时,在所有数据集和查询策略中均达到最高性能。
  • 有监督的GNN嵌入性能排名第二,表明在嵌入学习过程中使用训练标签具有显著优势。
  • 自适应查询策略(方差、coreset、QBC)相较于随机选择提升了性能,尽管在某些情况下提升幅度较小,这可能归因于回归与深度学习设置的特性。
  • 该框架仅使用极小比例的总数据项进行标注,即实现了强大的回归性能,表明具有极高的标注效率。
  • 人工构建的嵌入显示出不同查询策略之间的性能差异减小,表明嵌入质量对查询策略有效性的显著影响。
  • 与文件级解析相比,系统级解析设置下各查询策略表现更具竞争力;在文件级解析中,coreset和方差策略在后期阶段占据主导地位。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。