arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2501.04694cs.CLcs.AI
收藏

EpiCoder:在代码生成中涵盖多样性与复杂性

EpiCoder: Encompassing Diversity and Complexity in Code Generation

Microsoft(微软公司);School of Informatics, Xiamen University(厦门大学信息学院);Key Laboratory of Digital Protection(数字保护关键实验室);Taiwan (Xiamen University), Ministry of Culture(文化部(厦门大学));Tsinghua University(清华大学)

Yaoxiang Wang, Haoling Li, Xin Zhang, Jie Wu, Xiao Liu, Wenxiang Hu, Zhongxin Guo, Yangyu Huang, Ying Xin, Yujiu Yang, Jinsong Su, Qi Chen, Scarlett Li

AI总结:

本文提出基于特征树的代码合成框架EpiCoder,通过控制子树深度和广度生成多样且复杂的代码,在函数级和文件级基准上达到最先进性能,并展现仓库级代码合成潜力。

摘要:

现有的代码生成方法使用代码片段作为种子数据,限制了合成数据的复杂性和多样性。在本文中,我们提出了一种新颖的基于特征树的合成框架,该框架围绕从代码的高层抽象中导出的分层代码特征展开。特征树从原始数据构建,并通过迭代细化以增加提取特征的数量和多样性,从而捕获并识别代码中更复杂的模式和关系。通过调整采样子树的深度和广度,我们的框架能够精确控制生成代码的复杂性,支持从函数级操作到多文件场景的功能。我们对广泛使用的基础模型进行微调,获得了EpiCoder系列模型,在函数级和文件级的多个基准测试上达到了最先进的性能。特别是,实证证据表明,我们的方法在合成仓库级代码数据方面显示出巨大潜力。我们的代码和数据公开于https://github.com/microsoft/EpiCoder。

英文摘要:

Existing methods for code generation use code snippets as seed data, restricting the complexity and diversity of the synthesized data. In this paper, we introduce a novel feature tree-based synthesis framework, which revolves around hierarchical code features derived from high-level abstractions of code. The feature tree is constructed from raw data and refined iteratively to increase the quantity and diversity of the extracted features, which captures and recognizes more complex patterns and relationships within the code. By adjusting the depth and breadth of the sampled subtrees, our framework provides precise control over the complexity of the generated code, enabling functionalities that range from function-level operations to multi-file scenarios. We fine-tuned widely-used base models to obtain EpiCoder series, achieving state-of-the-art performance on multiple benchmarks at both the function and file levels. In particular, empirical evidence indicates that our approach shows significant potential in the synthesizing of repository-level code data. Our code and data are publicly available at https://github.com/microsoft/EpiCoder.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑