paper-with-me

홈 › Papers

Energy-Based Models for Code Generation under Compilability Constraints

2021-06-09 · Tomasz Korbak, Hady Elsahar, Marc Dymetman, Germán Kruszewski

Neural language models can be successfully trained on source code, leading to applications such as code completion. However, their versatile autoregressive self-supervision objective overlooks important global sequence-level features that are present in the data such as syntactic correctness or compilability. In this work, we pose the problem of learning to generate compilable code as constraint satisfaction. We define an Energy-Based Model (EBM) representing a pre-trained generative model with an imposed constraint of generating only compilable sequences. We then use the KL-Adaptive Distributional Policy Gradient algorithm (Khalifa et al., 2021) to train a generative model approximating the EBM. We conduct experiments showing that our proposed approach is able to improve compilability rates without sacrificing diversity and complexity of the generated samples.

📄 PDF Abstract BibTeX arXiv:2106.04985

Code (2)

naver/disco pytorch
soran-ghaderi/torchebm pytorch

Tasks

Code CompletionCode GenerationDiversity

Methods 이 논문이 사용한 방법론

EBM 설명 없음

Similar Papers 제목 키워드 기반

Compilable Neural Code Generation with Compiler Feedback

2022-03-10 · Findings (ACL) 2022 5 · Xin Wang, Yasheng Wang, Yao Wan, Fei Mi 외

Automatically generating compilable programs with (or without) natural language descriptions has always been a touchstone problem for computational linguistics and automated software engineering. Existing deep-learning a…

Code CompletionCode GenerationDecoderLanguage Modeling+3

PCodeTrans: Translate Decompiled Pseudocode to Compilable and Executable Equivalent

2026-03-16 · Yuxin Cui, Zeyu Gao, Shuxian He, Siliang Qin 외 arxiv

Decompilation is foundational to binary analysis, yet conventional tools prioritize human readability over strict recompilability and verifiable runtime correctness. While recent LLM-based approaches attempt to refine de…

TFHE-Coder: Evaluating LLM-agentic Fully Homomorphic Encryption Code Generation

2025-03-15 · Mayank Kumar, Jiaqi Xue, Mengxin Zheng, Qian Lou

Fully Homomorphic Encryption over the torus (TFHE) enables computation on encrypted data without decryption, making it a cornerstone of secure and confidential computing. Despite its potential in privacy preserving machi…

Code GenerationPrivacy PreservingRAGRetrieval-augmented Generation

Execution-based Code Generation using Deep Reinforcement Learning

2023-01-31 · Parshin Shojaee, Aneesh Jain, Sindhu Tipirneni, Chandan K. Reddy

The utilization of programming language (PL) models, pre-trained on large-scale code corpora, as a means of automating software engineering processes has demonstrated considerable potential in streamlining various code g…

Code CompletionCode GenerationCode TranslationDeep Reinforcement Learning+6

FRANC: A Lightweight Framework for High-Quality Code Generation

2023-07-17 · Mohammed Latif Siddiq, Beatrice Casey, Joanna C. S. Santos

In recent years, the use of automated source code generation utilizing transformer-based generative models has expanded, and these models can generate functional code according to the requirements of the developers. Howe…

Code GenerationPrompt Engineering