Precise Learning of Source Code Contextual Semantics via Hierarchical
Dependence Structure and Graph Attention Networks
- URL: http://arxiv.org/abs/2111.11435v1
- Date: Sat, 20 Nov 2021 04:03:42 GMT
- Title: Precise Learning of Source Code Contextual Semantics via Hierarchical
Dependence Structure and Graph Attention Networks
- Authors: Zhehao Zhao, Bo Yang, Ge Li, Huai Liu, Zhi Jin
- Abstract summary: We propose a novel source code model embedded with hierarchical dependencies.
We introduce the syntactic structural of the basic block, i.e., its corresponding AST, in source code model to provide sufficient information.
The results show that our model reduces the scale of parameters by 50% and achieves 4% improvement on accuracy on program classification task.
- Score: 28.212889828892664
- License: http://creativecommons.org/licenses/by/4.0/
- Abstract: Deep learning is being used extensively in a variety of software engineering
tasks, e.g., program classification and defect prediction. Although the
technique eliminates the required process of feature engineering, the
construction of source code model significantly affects the performance on
those tasks. Most recent works was mainly focused on complementing AST-based
source code models by introducing contextual dependencies extracted from CFG.
However, all of them pay little attention to the representation of basic
blocks, which are the basis of contextual dependencies.
In this paper, we integrated AST and CFG and proposed a novel source code
model embedded with hierarchical dependencies. Based on that, we also designed
a neural network that depends on the graph attention mechanism.Specifically, we
introduced the syntactic structural of the basic block, i.e., its corresponding
AST, in source code model to provide sufficient information and fill the gap.
We have evaluated this model on three practical software engineering tasks and
compared it with other state-of-the-art methods. The results show that our
model can significantly improve the performance. For example, compared to the
best performing baseline, our model reduces the scale of parameters by 50\% and
achieves 4\% improvement on accuracy on program classification task.
Related papers
- High-Performance Few-Shot Segmentation with Foundation Models: An Empirical Study [64.06777376676513]
We develop a few-shot segmentation (FSS) framework based on foundation models.
To be specific, we propose a simple approach to extract implicit knowledge from foundation models to construct coarse correspondence.
Experiments on two widely used datasets demonstrate the effectiveness of our approach.
arXiv Detail & Related papers (2024-09-10T08:04:11Z) - Leveraging Reinforcement Learning and Large Language Models for Code
Optimization [14.602997316032706]
This paper introduces a new framework to decrease the complexity of code optimization.
The proposed framework builds on large language models (LLMs) and reinforcement learning (RL)
We run several experiments on the PIE dataset using a CodeT5 language model and RRHF, a new reinforcement learning algorithm.
arXiv Detail & Related papers (2023-12-09T19:50:23Z) - Structured Cooperative Learning with Graphical Model Priors [98.53322192624594]
We study how to train personalized models for different tasks on decentralized devices with limited local data.
We propose "Structured Cooperative Learning (SCooL)", in which a cooperation graph across devices is generated by a graphical model.
We evaluate SCooL and compare it with existing decentralized learning methods on an extensive set of benchmarks.
arXiv Detail & Related papers (2023-06-16T02:41:31Z) - Universal Domain Adaptation from Foundation Models: A Baseline Study [58.51162198585434]
We make empirical studies of state-of-the-art UniDA methods using foundation models.
We introduce textitCLIP distillation, a parameter-free method specifically designed to distill target knowledge from CLIP models.
Although simple, our method outperforms previous approaches in most benchmark tasks.
arXiv Detail & Related papers (2023-05-18T16:28:29Z) - CodeGen2: Lessons for Training LLMs on Programming and Natural Languages [116.74407069443895]
We unify encoder and decoder-based models into a single prefix-LM.
For learning methods, we explore the claim of a "free lunch" hypothesis.
For data distributions, the effect of a mixture distribution and multi-epoch training of programming and natural languages on model performance is explored.
arXiv Detail & Related papers (2023-05-03T17:55:25Z) - A Unified Active Learning Framework for Annotating Graph Data with
Application to Software Source Code Performance Prediction [4.572330678291241]
We develop a unified active learning framework specializing in software performance prediction.
We investigate the impact of using different levels of information for active and passive learning.
Our approach aims to improve the investment in AI models for different software performance predictions.
arXiv Detail & Related papers (2023-04-06T14:00:48Z) - GRANITE: A Graph Neural Network Model for Basic Block Throughput
Estimation [3.739243122393041]
We introduce a new machine learning model that estimates throughput of basic blocks across different microarchitectures.
Results establish a new state-of-the-art for basic block performance estimation with an average test error of 6.9%.
We propose the use of multi-task learning with independent multi-layer feed forward decoder networks.
arXiv Detail & Related papers (2022-10-08T03:03:49Z) - Comparative Code Structure Analysis using Deep Learning for Performance
Prediction [18.226950022938954]
This paper aims to assess the feasibility of using purely static information (e.g., abstract syntax tree or AST) of applications to predict performance change based on the change in code structure.
Our evaluations of several deep embedding learning methods demonstrate that tree-based Long Short-Term Memory (LSTM) models can leverage the hierarchical structure of source-code to discover latent representations and achieve up to 84% (individual problem) and 73% (combined dataset with multiple of problems) accuracy in predicting the change in performance.
arXiv Detail & Related papers (2021-02-12T16:59:12Z) - Prior Guided Feature Enrichment Network for Few-Shot Segmentation [64.91560451900125]
State-of-the-art semantic segmentation methods require sufficient labeled data to achieve good results.
Few-shot segmentation is proposed to tackle this problem by learning a model that quickly adapts to new classes with a few labeled support samples.
Theses frameworks still face the challenge of generalization ability reduction on unseen classes due to inappropriate use of high-level semantic information.
arXiv Detail & Related papers (2020-08-04T10:41:32Z) - Improved Code Summarization via a Graph Neural Network [96.03715569092523]
In general, source code summarization techniques use the source code as input and outputs a natural language description.
We present an approach that uses a graph-based neural architecture that better matches the default structure of the AST to generate these summaries.
arXiv Detail & Related papers (2020-04-06T17:36:42Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.