Learning to Represent Patches
- URL: http://arxiv.org/abs/2308.16586v2
- Date: Tue, 3 Oct 2023 23:00:33 GMT
- Title: Learning to Represent Patches
- Authors: Xunzhu Tang and Haoye Tian and Zhenghan Chen and Weiguo Pian and Saad
Ezzini and Abdoul Kader Kabore and Andrew Habib and Jacques Klein and
Tegawende F. Bissyande
- Abstract summary: We introduce a novel method, Patcherizer, to bridge the gap between deep learning for patch representation and semantic intent.
Patcherizer employs graph convolutional neural networks for structural intention graph representation and transformers for intention sequence representation.
Our experiments demonstrate the representation's efficacy across all tasks, outperforming state-of-the-art methods.
- Score: 7.073203009308308
- License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
- Abstract: Patch representation is crucial in automating various software engineering
tasks, like determining patch accuracy or summarizing code changes. While
recent research has employed deep learning for patch representation, focusing
on token sequences or Abstract Syntax Trees (ASTs), they often miss the
change's semantic intent and the context of modified lines. To bridge this gap,
we introduce a novel method, Patcherizer. It delves into the intentions of
context and structure, merging the surrounding code context with two innovative
representations. These capture the intention in code changes and the intention
in AST structural modifications pre and post-patch. This holistic
representation aptly captures a patch's underlying intentions. Patcherizer
employs graph convolutional neural networks for structural intention graph
representation and transformers for intention sequence representation. We
evaluated Patcherizer's embeddings' versatility in three areas: (1) Patch
description generation, (2) Patch accuracy prediction, and (3) Patch intention
identification. Our experiments demonstrate the representation's efficacy
across all tasks, outperforming state-of-the-art methods. For example, in patch
description generation, Patcherizer excels, showing an average boost of 19.39%
in BLEU, 8.71% in ROUGE-L, and 34.03% in METEOR scores.
Related papers
- Semi-supervised 3D Object Detection with PatchTeacher and PillarMix [71.4908268136439]
Current semi-supervised 3D object detection methods typically use a teacher to generate pseudo labels for a student.
We propose PatchTeacher, which focuses on partial scene 3D object detection to provide high-quality pseudo labels for the student.
We introduce three key techniques, i.e., Patch Normalizer, Quadrant Align, and Fovea Selection, to improve the performance of PatchTeacher.
arXiv Detail & Related papers (2024-07-13T06:58:49Z) - Automated Description Generation for Software Patches [4.080365651252764]
We present EXPLAINER, a machine translation approach to generating software patch descriptions.
In EXPLAINER, we leverage explicit representations of critical elements, historical context, and syntactic conventions.
We show that EXPLAINER consistently outperforms existing methods, with improvements up to 189% in BLEU, 5.7X in Exact Match rate, and 154% in Semantic Similarity.
arXiv Detail & Related papers (2024-02-06T08:46:14Z) - MS-Former: Memory-Supported Transformer for Weakly Supervised Change
Detection with Patch-Level Annotations [50.79913333804232]
We propose a memory-supported transformer (MS-Former) for weakly supervised change detection.
MS-Former consists of a bi-directional attention block (BAB) and a patch-level supervision scheme (PSS)
Experimental results on three benchmark datasets demonstrate the effectiveness of our proposed method in the change detection task.
arXiv Detail & Related papers (2023-11-16T09:57:29Z) - Patch-CLIP: A Patch-Text Pre-Trained Model [6.838615442552715]
patch representation learning has emerged as a necessary research direction for exploiting the capabilities of machine learning in software generation.
We introduce.
theweak-CLIP, a novel pre-training framework for patches and natural language text.
We show that.
theweak-CLIP sets new state-of-the-art performance, consistently outperforming the state-of-the-art in metrics like BLEU, ROUGE-L, METEOR, and Recall.
arXiv Detail & Related papers (2023-10-19T14:00:19Z) - Ray-Patch: An Efficient Querying for Light Field Transformers [10.859910783551937]
We propose the Ray-Patch querying, a novel model to efficiently query transformers to decode implicit representations into target views.
Our Ray-Patch decoding reduces the computational footprint and increases inference speed up to one order of magnitude compared to previous models.
arXiv Detail & Related papers (2023-05-16T16:03:27Z) - PATS: Patch Area Transportation with Subdivision for Local Feature
Matching [78.67559513308787]
Local feature matching aims at establishing sparse correspondences between a pair of images.
We propose Patch Area Transportation with Subdivision (PATS) to tackle this issue.
PATS improves both matching accuracy and coverage, and shows superior performance in downstream tasks.
arXiv Detail & Related papers (2023-03-14T08:28:36Z) - Is this Change the Answer to that Problem? Correlating Descriptions of
Bug and Code Changes for Evaluating Patch Correctness [8.606215760860362]
We turn the patch correctness assessment into a Question Answering problem.
We consider as inputs the bug reports as well as the natural language description of the generated patches.
Experiments show that Quatrain can achieve an AUC of 0.886 on predicting patch correctness.
arXiv Detail & Related papers (2022-08-08T13:32:58Z) - Patch-level Representation Learning for Self-supervised Vision
Transformers [68.8862419248863]
Vision Transformers (ViTs) have gained much attention recently as a better architectural choice, often outperforming convolutional networks for various visual tasks.
Inspired by this, we design a simple yet effective visual pretext task, coined SelfPatch, for learning better patch-level representations.
We demonstrate that SelfPatch can significantly improve the performance of existing SSL methods for various visual tasks.
arXiv Detail & Related papers (2022-06-16T08:01:19Z) - Context Autoencoder for Self-Supervised Representation Learning [64.63908944426224]
We pretrain an encoder by making predictions in the encoded representation space.
The network is an encoder-regressor-decoder architecture.
We demonstrate the effectiveness of our CAE through superior transfer performance in downstream tasks.
arXiv Detail & Related papers (2022-02-07T09:33:45Z) - Rethinking Generative Zero-Shot Learning: An Ensemble Learning
Perspective for Recognising Visual Patches [52.67723703088284]
We propose a novel framework called multi-patch generative adversarial nets (MPGAN)
MPGAN synthesises local patch features and labels unseen classes with a novel weighted voting strategy.
MPGAN has significantly greater accuracy than state-of-the-art methods.
arXiv Detail & Related papers (2020-07-27T05:49:44Z)
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.