使用AlphaCode生成竞赛级代码
Competition-Level Code Generation with AlphaCode
摘要:
编程是一种强大而无处不在的解决问题的工具。开发可以帮助程序员甚至独立生成程序的系统可以使编程更具生产力和可访问性,但到目前为止,将创新融入人工智能已被证明具有挑战性。最近的大规模语言模型已经展示了令人印象深刻的生成代码的能力,并且现在能够完成简单的编程任务。然而,当评估更复杂、看不见的问题时,这些模型的表现仍然很差,这些问题需要解决问题的技能,而不仅仅是将指令翻译成代码。例如,需要理解算法和复杂自然语言的竞争性编程问题仍然极具挑战性。为了解决这个问题,我们引入了AlphaCode,这是一个代码生成系统,可以为这些需要更深入推理的问题创建新的解决方案。在Codeforces平台最近的编程比赛模拟评估中,AlphaCode在超过5,000名参与者的比赛中平均排名前54.3%。我们发现,三个关键组件对于实现良好和可靠的性能至关重要:(1)用于训练和评估的广泛而干净的竞争性编程数据集,(2)基于转换器的大型高效采样架构,以及(3)大规模模型采样以探索搜索空间,然后基于程序行为过滤到一小部分提交。
英文摘要:
Programming is a powerful and ubiquitous problem-solving tool. Developing systems that can assist programmers or even generate programs independently could make programming more productive and accessible, yet so far incorporating innovations in AI has proven challenging. Recent large-scale language models have demonstrated an impressive ability to generate code, and are now able to complete simple programming tasks. However, these models still perform poorly when evaluated on more complex, unseen problems that require problem-solving skills beyond simply translating instructions into code. For example, competitive programming problems which require an understanding of algorithms and complex natural language remain extremely challenging. To address this gap, we introduce AlphaCode, a system for code generation that can create novel solutions to these problems that require deeper reasoning. In simulated evaluations on recent programming competitions on the Codeforces platform, AlphaCode achieved on average a ranking of top 54.3% in competitions with more than 5,000 participants. We found that three key components were critical to achieve good and reliable performance: (1) an extensive and clean competitive programming dataset for training and evaluation, (2) large and efficient-to-sample transformer-based architectures, and (3) large-scale model sampling to explore the search space, followed by filtering based on program behavior to a small set of submissions.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。