Giter Club home page Giter Club logo

coregen's Introduction

CoreGen: Contextualized Code Representation Learning for Commit Message Generation

This is the source code repository for the paper CoreGen: Contextualized Code Representation Learning for Commit Message Generation.

If there is any suggestion or question, feel free to fire an issue here.

Setup Environment

All required packages and versions can be found in the environment configuration file environment.yml, or you may simply build an identical conda environment like this:

conda env create -f environment.yml
conda activate coregen

Usage

0. Data Preparation

Download the data here and unzip the dataset into the folder.

1. Training & Inference

Simply run the script ./run_all.sh with layer number and head number specified. You may easily adjust other parameters, such as batch size, epoch number and mask rate, by modifying the script file. The results reported in paper can be reproduced by setting the layer number to 2 and head number to 6 while keeping other parameter settings in the script unchanged.

./run_all.sh LAYER_NUM HEAD_NUM

2. Result Evaluation

Compute the BLUE-4, METEOR and ROUGE score by running the script ./score.sh with the reference file path and the inference result path specified.

./score.sh REFERENCE PREDICTION

Performance

CoreGen significantly outperforms previous state-of-the-art models with at least 28.18% improvement on BLEU-4 score.

Model BLEU-4 ROUGE-1 ROUGE-2 ROUGE-L METEOR
NMT 14.17 21.29 12.19 20.85 12.99
NNGen 16.43 25.86 15.52 24.46 14.03
PtrGNCMsg 9.78 23.66 9.61 23.67 11.41
CoreGen 21.06 32.87 20.17 30.85 16.53

In our experiment comparing vanilla Transformer and CoreGen on model’s convergence along the fine-tuning procedure, CoreGen also converges faster to achieve equivalent generation quality as the vanilla Transformer model at 25 training epochs ahead.

More details about the performance of CoreGen are presented and analyzed in the paper.

coregen's People

Contributors

zhaospei avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.