paper-with-me

홈 › Papers

Code Execution with Pre-trained Language Models

2023-05-08 · Chenxiao Liu, Shuai Lu, Weizhu Chen, Daxin Jiang, Alexey Svyatkovskiy, Shengyu Fu, Neel Sundaresan, Nan Duan

Code execution is a fundamental aspect of programming language semantics that reflects the exact behavior of the code. However, most pre-trained models for code intelligence ignore the execution trace and only rely on source code and syntactic structures. In this paper, we investigate how well pre-trained models can understand and perform code execution. We develop a mutation-based data augmentation technique to create a large-scale and realistic Python dataset and task for code execution, which challenges existing models such as Codex. We then present CodeExecutor, a Transformer model that leverages code execution pre-training and curriculum learning to enhance its semantic comprehension. We evaluate CodeExecutor on code execution and show its promising performance and limitations. We also demonstrate its potential benefits for code intelligence tasks such as zero-shot code-to-code search and text-to-code generation. Our analysis provides insights into the learning and generalization abilities of pre-trained models for code execution.

📄 PDF Abstract BibTeX arXiv:2305.05383

Code (1)

microsoft/CodeBERT 공식 구현 pytorch

Tasks

Code GenerationCode SearchData AugmentationText-to-Code Generation

Methods 이 논문이 사용한 방법론

Multi-Head Attention 설명 없음
Attention 설명 없음
Layer Normalization Unlike batch normalization, Layer Normalization directly estimates the normalization statistics from the summed inputs…
Linear Layer A Linear Layer is a projection $\mathbf{XW + b}$.
Label Smoothing Label Smoothing is a regularization technique that introduces noise for the labels. This accounts for the fact that datasets may have mistakes in them, so maximizing the…
Dropout Dropout is a regularization technique for neural networks that drops a unit (along with connections) at training time with a specified probability $p$ (a common value is…
BPE Byte Pair Encoding, or BPE, is a subword segmentation algorithm that encodes rare and unknown words as sequences of subword units. The intuition is that various word…
Dense Connections Dense Connections, or Fully Connected Connections, are a type of layer in a deep neural network that use a linear operation where every input is connected to every output…

Similar Papers 제목 키워드 기반

Natural Language to Code Translation with Execution

2022-04-25 · Freda Shi, Daniel Fried, Marjan Ghazvininejad, Luke Zettlemoyer 외

Generative models of code, pretrained on large corpora of programs, have shown great success in translating natural language to code (Chen et al., 2021; Austin et al., 2021; Li et al., 2022, inter alia). While these mode…

Code GenerationCode TranslationTranslation

LEVER: Learning to Verify Language-to-Code Generation with Execution

2023-02-16 · Ansong Ni, Srini Iyer, Dragomir Radev, Ves Stoyanov 외

The advent of large language models trained on code (code LLMs) has led to significant progress in language-to-code generation. State-of-the-art approaches in this area combine LLM decoding with sample pruning and rerank…

Arithmetic ReasoningCode GenerationMathReranking+2

GenX: Mastering Code and Test Generation with Execution Feedback

2024-12-18 · Nan Wang, Yafei Liu, Chen Chen, Haonan Lu

Recent advancements in language modeling have enabled the translation of natural language into code, and the use of execution feedback to improve code generation. However, these methods often rely heavily on pre-existing…

Code GenerationData AugmentationLanguage ModelingLanguage Modelling

xCodeEval: A Large Scale Multilingual Multitask Benchmark for Code Understanding, Generation, Translation and Retrieval

2023-03-06 · Mohammad Abdullah Matin Khan, M Saiful Bari, Xuan Long Do, Weishi Wang 외

Recently, pre-trained large language models (LLMs) have shown impressive abilities in generating codes from natural language descriptions, repairing buggy codes, translating codes between languages, and retrieving releva…

Program RepairProgram SynthesisRetrieval

NExT: Teaching Large Language Models to Reason about Code Execution

2024-04-23 · Ansong Ni, Miltiadis Allamanis, Arman Cohan, Yinlin Deng 외

A fundamental skill among human developers is the ability to understand and reason about program execution. As an example, a programmer can mentally simulate code execution in natural language to debug and repair code (a…

HumanEvalmbppProgram Repair