Code Generation as a Dual Task of Code Summarization
arXiv:1910.05923
Abstract
Code summarization (CS) and code generation (CG) are two crucial tasks in the field of automatic software development. Various neural network-based approaches are proposed to solve these two tasks separately. However, there exists a specific intuitive correlation between CS and CG, which have not been exploited in previous work. In this paper, we apply the relations between two tasks to improve the performance of both tasks. In other words, exploiting the duality between the two tasks, we propose a dual training framework to train the two tasks simultaneously. In this framework, we consider the dualities on probability and attention weights, and design corresponding regularization terms to constrain the duality. We evaluate our approach on two datasets collected from GitHub, and experimental results show that our dual framework can improve the performance of CS and CG tasks over baselines.
To appear at the 33rd Conference on Neural Information Processing Systems (NeurIPS) 2019
Cited by in corpus (24)
- CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generation
- CODIT: Code Editing with Tree-Based Neural Models
- Retrieval-Augmented Generation for Code Summarization via Hybrid GNN
- A Transformer-based Approach for Source Code Summarization
- Embedding API Dependency Graph for Neural Code Generation
- Multi-branch Attentive Transformer
- CoCoSum: Contextual Code Summarization with Multi-Relational Graph Neural Network
- Multi-task Learning based Pre-trained Language Model for Code Completion
- Code to Comment "Translation": Data, Metrics, Baselining & Evaluation
- GN-Transformer: Fusing Sequence and Graph Representation for Improved Code Summarization
- Improving Code Summarization with Block-wise Abstract Syntax Tree Splitting
- Exploring Dynamic Selection of Branch Expansion Orders for Code Generation
- Latent Programmer: Discrete Latent Codes for Program Synthesis
- Code Summarization with Structure-induced Transformer
- On the Relevance of Cross-project Learning with Nearest Neighbours for Commit Message Generation
- DeepSumm -- Deep Code Summaries using Neural Transformer Architecture
- IOT: Instance-wise Layer Reordering for Transformer Structures
- Neural-Symbolic Solver for Math Word Problems with Auxiliary Tasks
- Rethinking complexity for software code structures: A pioneering study on Linux kernel code repository
- Exploiting Method Names to Improve Code Summarization: A Deliberation Multi-Task Learning Approach
- CodeQA: A Question Answering Dataset for Source Code Comprehension
- KaggleDBQA: Realistic Evaluation of Text-to-SQL Parsers
- A Multi-Modal Transformer-based Code Summarization Approach for Smart Contracts
- Keywords Guided Method Name Generation