paper-with-me

홈 › Papers

GAP-Gen: Guided Automatic Python Code Generation

2022-01-19 · Junchen Zhao, Yurun Song, Junlin Wang, Ian G. Harris

Automatic code generation from natural language descriptions can be highly beneficial during the process of software development. In this work, we propose GAP-Gen, a Guided Automatic Python Code Generation method based on Python syntactic constraints and semantic constraints. We first introduce Python syntactic constraints in the form of Syntax-Flow, which is a simplified version of Abstract Syntax Tree (AST) reducing the size and high complexity of Abstract Syntax Tree but maintaining crucial syntactic information of Python code. In addition to Syntax-Flow, we introduce Variable-Flow which abstracts variable and function names consistently through out the code. In our work, rather than pretraining, we focus on modifying the finetuning process which reduces computational requirements but retains high generation performance on automatic Python code generation task. GAP-Gen fine-tunes the transformer based language models T5 and CodeT5 using the Code-to-Docstring datasets CodeSearchNet, CodeSearchNet AdvTest and Code-Docstring Corpus from EdinburghNLP. Our experiments show that GAP-Gen achieves better results on automatic Python code generation task than previous works.

📄 PDF Abstract BibTeX arXiv:2201.08810

Code (1)

rain9876/auto-code-generator 공식 구현 pytorch

Tasks

Code Generation

Methods 이 논문이 사용한 방법론

Attention 설명 없음
Linear Layer A Linear Layer is a projection $\mathbf{XW + b}$.
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…
Inverse Square Root Schedule Inverse Square Root is a learning rate schedule 1 / $\sqrt{\max\left(n, k\right)}$ where $n$ is the current training iteration and $k$ is the number of warm-up steps. This…
Residual Connection 설명 없음
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…
SentencePiece 설명 없음
Layer Normalization Unlike batch normalization, Layer Normalization directly estimates the normalization statistics from the summed inputs…

Similar Papers 제목 키워드 기반

Effective LLM-Driven Code Generation with Pythoness

2025-01-03 · Kyla H. Levin, Kyle Gwilt, Emery D. Berger, Stephen N. Freund

The advent of large language models (LLMs) has paved the way for a new era of programming tools with both significant capabilities and risks, as the generated code lacks guarantees of correctness and reliability. Develop…

Code Generation

Retriv at BLP-2025 Task 2: Test-Driven Feedback-Guided Framework for Bangla-to-Python Code Generation

2025-11-10 · K M Nafi Asib, Sourav Saha, Mohammed Moshiul Hoque arxiv

Large Language Models (LLMs) have advanced the automated generation of code from natural language prompts. However, low-resource languages (LRLs) like Bangla remain underrepresented due to the limited availability of ins…

Code Generation

TreeCoder: Systematic Exploration and Optimisation of Decoding and Constraints for LLM Code Generation

2025-11-27 · Henrijs Princis, Arindam Sharma, Cristina David arxiv

Large language models (LLMs) have shown remarkable ability to generate code, yet their outputs often violate syntactic or semantic constraints when guided only through natural language prompts. We introduce TreeCoder, th…

Prompt EngineeringCode Generation

Automatic Generation of Python Programs Using Context-Free Grammars

2024-03-11 · Kamel Yamani, Marwa Naïr, Riyadh Baghdadi

In recent years, data has emerged as the new gold, serving as a powerful tool for creating intelligent systems. However, procuring high-quality data remains challenging, especially for code. To address this, we developed…

Code Generation

LangChoiceBench: Measuring and Explaining Programming-Language Choice in LLMs

2026-08-06 · Lukas Twist, Twm Stone, Helen Yannakoudakis, Jie M. Zhang arxiv

Large language models (LLMs) have been shown to exhibit strong Python preferences when generating project-level code, but there is currently no systematic way to measure this behaviour across new models. To bridge this g…