paper-with-me

홈 › Papers

CodeGen4Libs: A Two-Stage Approach for Library-Oriented Code Generation

2023-09-11 · IEEE/ACM International Conference on Automated Software Engineering 2023 9 · Mingwei Liu, Tianyong Yang, Yiling Lou, Xueying Du, Ying Wang, Xin Peng

Automated code generation has been extensively studied in recent literature. In this work, we first survey 66 participants to motivate a more pragmatic code generation scenario, i.e., library-oriented code generation, where the generated code should implement the functionally of the natural language query with the given library. We then revisit existing learning- based code generation techniques and find they have limited effectiveness in such a library-oriented code generation scenario. To address this limitation, we propose a novel library-oriented code generation technique, CodeGen4Libs, which incorporates two stages: import generation and code generation. The import generation stage generates import statements for the natural language query with the given third-party libraries, while the code generation stage generates concrete code based on the generated imports and the query. To evaluate the effectiveness of our approach, we conduct extensive experiments on a dataset of 403,780 data items. Our results demonstrate that CodeGen4Libs outperforms baseline models in both import generation and code generation stages, achieving improvements of up to 97.4% on EM (Exact Match), 54.5% on BLEU, and 53.5% on Hit@All. Overall, our proposed CodeGen4Libs approach shows promising results in generating high-quality code with specific third-party libraries, which can improve the efficiency and effectiveness of software development.

📄 PDF Abstract BibTeX

Code (1)

FudanSELab/codegen4libs pytorch

Tasks

Code GenerationLibrary-Oriented Code Generation

Similar Papers 제목 키워드 기반

LIBS2ML: A Library for Scalable Second Order Machine Learning Algorithms

2019-04-20 · Vinod Kumar Chauhan, Anuj Sharma, Kalpana Dahiya

LIBS2ML is a library based on scalable second order learning algorithms for solving large-scale problems, i.e., big data problems in machine learning. LIBS2ML has been developed using MEX files, i.e., C++ with MATLAB/Oct…

BIG-bench Machine LearningSecond-order methods

CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesis

2022-03-25 · Erik Nijkamp, Bo Pang, Hiroaki Hayashi, Lifu Tu 외

Program synthesis strives to generate a computer program as a solution to a given problem specification, expressed with input-output examples or natural language descriptions. The prevalence of large language models adva…

Code GenerationHumanEvalLanguage ModelingLanguage Modelling+2

SimpleSBML: A Python package for creating, editing, and interrogating SBML models: Version 2.0

2020-09-04 · Herbert M Sauro

In this technical report, we describe a new version of SimpleSBML which provides an easier to use interface to python-libSBML allowing users of Python to more easily construct, edit, and inspect SBML based models. The mo…

What Makes Code Generation Ethically Sourced?

2025-07-26 · Zhuolin Xu, Chenglin Li, Qiushi Li, Shin Hwei Tan arxiv

Several code generation models have been proposed to help reduce time and effort in solving software-related tasks. To ensure responsible AI, there are growing interests over various ethical issues (e.g., unclear licensi…

Speech SynthesisImage GenerationCode Generation

CodegenBench: Can LLMs Write Efficient Code Across Architectures?

2026-06-01 · Jie Li, Wenzhao Wu, Junqi Hu, Qinrui Zheng 외 arxiv

While large language models (LLMs) have been extensively evaluated on code generation tasks for general-purpose programming and GPU-accelerated environments (e.g., PyTorch, CUDA), their capabilities in CPU-oriented high-…

Code Generation