[Paper Review] A Unified Active Learning Framework for Annotating Graph Data with Application to Software Source Code Performance Prediction
This paper proposes a unified active learning framework for graph-structured software source code, transforming code into Flow Augmented-AST (FA-AST) graphs and leveraging graph embeddings (e.g., Graph2Vec, GNNs) to enable regression-based performance prediction with minimal labeling. The framework achieves strong performance using only a small fraction of labeled data, with Graph2Vec and test feature integration yielding the best results across real-world datasets like HadoopTests and OSSBuilds.
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.
Motivation & Objective
- To address the scarcity of labeled data in software performance prediction, a critical bottleneck in AI-driven software engineering.
- To develop a generic, task-agnostic active learning framework applicable to graph-structured data, particularly source code representations.
- To investigate how additional information—such as test features and partially labeled training data—affects embedding quality and active learning performance.
- To evaluate the effectiveness of diverse query strategies (random, coreset, variance, QBC) in a regression setting on graph-embedded code.
- To demonstrate that high-performance prediction models can be trained with minimal human labeling by leveraging informative data selection.
Proposed method
- Parse source code into Abstract Syntax Trees (ASTs), then augment them with data and control flow edges to form Flow Augmented-AST (FA-AST) graphs.
- Construct graph embeddings using both unsupervised (e.g., Graph2Vec) and supervised (e.g., GNN-based) methods, incorporating features from test data and/or partially labeled training data.
- Map each FA-AST graph into a latent space representation to decouple the learning task from the graph structure, enabling use of standard regression models.
- Apply Gaussian Process Regressors (GPR) with multiple acquisition functions—uniform random, coreset, variance, and query-by-committee (QBC)—to select the most informative samples for labeling.
- Iteratively query labels using active learning strategies, retrain the model, and evaluate performance on regression tasks (execution time prediction).
- Use real-world datasets (HadoopTests, OSSBuilds) to evaluate the framework under varying initial label sets and batch sizes.
Experimental results
Research questions
- RQ1How does the inclusion of test data features during embedding construction affect active learning performance in source code performance prediction?
- RQ2To what extent do partially available training labels improve the quality of graph embeddings and subsequent regression performance?
- RQ3Which active learning query strategy—random, coreset, variance, or QBC—yields the best performance in a graph-based regression setting for source code?
- RQ4How does the choice of graph embedding method (e.g., Graph2Vec vs. GNN) influence the effectiveness of active learning in performance prediction?
- RQ5Can a small subset of labeled data achieve high predictive accuracy for source code execution time using this unified framework?
Key findings
- Graph2Vec embeddings, especially when augmented with test data features, achieved the highest performance across all datasets and query strategies.
- Supervised GNN embeddings ranked second in performance, demonstrating the benefit of using training labels during embedding learning.
- Adaptive query strategies (variance, coreset, QBC) improved performance over random selection, though the gains were modest in some cases due to the regression and deep learning setting.
- The framework achieved strong regression performance using only a small fraction of the total data items labeled, indicating high labeling efficiency.
- Manual embeddings showed reduced performance differences between query strategies, suggesting that embedding quality heavily influences query strategy effectiveness.
- The system-level parsing setting showed more competitive query strategy performance compared to file-level parsing, where coreset and variance dominated in later stages.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.