Competition-Level Code Generation with AlphaCode

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...

Full description

Saved in:
Bibliographic Details
Published inarXiv.org
Main Authors Li, Yujia, Choi, David, Chung, Junyoung, Kushman, Nate, Schrittwieser, Julian, Leblond, Rémi, Eccles, Tom, Keeling, James, Gimeno, Felix, Agustin Dal Lago, Thomas, Hubert, Choy, Peter, Cyprien de Masson d'Autume, Babuschkin, Igor, Chen, Xinyun, Po-Sen, Huang, Welbl, Johannes, Gowal, Sven, Cherepanov, Alexey, Molloy, James, Mankowitz, Daniel J, Esme Sutherland Robson, Kohli, Pushmeet, Nando de Freitas, Kavukcuoglu, Koray, Vinyals, Oriol
Format Paper Journal Article
LanguageEnglish
Published Ithaca Cornell University Library, arXiv.org 08.02.2022
Subjects
Online AccessGet full text

Cover

Loading…
Abstract 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.
AbstractList 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.
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.
Author Chung, Junyoung
Babuschkin, Igor
Mankowitz, Daniel J
Eccles, Tom
Kavukcuoglu, Koray
Kohli, Pushmeet
Nando de Freitas
Cherepanov, Alexey
Cyprien de Masson d'Autume
Kushman, Nate
Po-Sen, Huang
Li, Yujia
Gimeno, Felix
Keeling, James
Choy, Peter
Welbl, Johannes
Vinyals, Oriol
Schrittwieser, Julian
Leblond, Rémi
Agustin Dal Lago
Molloy, James
Choi, David
Thomas, Hubert
Gowal, Sven
Chen, Xinyun
Esme Sutherland Robson
Author_xml – sequence: 1
  givenname: Yujia
  surname: Li
  fullname: Li, Yujia
– sequence: 2
  givenname: David
  surname: Choi
  fullname: Choi, David
– sequence: 3
  givenname: Junyoung
  surname: Chung
  fullname: Chung, Junyoung
– sequence: 4
  givenname: Nate
  surname: Kushman
  fullname: Kushman, Nate
– sequence: 5
  givenname: Julian
  surname: Schrittwieser
  fullname: Schrittwieser, Julian
– sequence: 6
  givenname: Rémi
  surname: Leblond
  fullname: Leblond, Rémi
– sequence: 7
  givenname: Tom
  surname: Eccles
  fullname: Eccles, Tom
– sequence: 8
  givenname: James
  surname: Keeling
  fullname: Keeling, James
– sequence: 9
  givenname: Felix
  surname: Gimeno
  fullname: Gimeno, Felix
– sequence: 10
  fullname: Agustin Dal Lago
– sequence: 11
  givenname: Hubert
  surname: Thomas
  fullname: Thomas, Hubert
– sequence: 12
  givenname: Peter
  surname: Choy
  fullname: Choy, Peter
– sequence: 13
  fullname: Cyprien de Masson d'Autume
– sequence: 14
  givenname: Igor
  surname: Babuschkin
  fullname: Babuschkin, Igor
– sequence: 15
  givenname: Xinyun
  surname: Chen
  fullname: Chen, Xinyun
– sequence: 16
  givenname: Huang
  surname: Po-Sen
  fullname: Po-Sen, Huang
– sequence: 17
  givenname: Johannes
  surname: Welbl
  fullname: Welbl, Johannes
– sequence: 18
  givenname: Sven
  surname: Gowal
  fullname: Gowal, Sven
– sequence: 19
  givenname: Alexey
  surname: Cherepanov
  fullname: Cherepanov, Alexey
– sequence: 20
  givenname: James
  surname: Molloy
  fullname: Molloy, James
– sequence: 21
  givenname: Daniel
  surname: Mankowitz
  middlename: J
  fullname: Mankowitz, Daniel J
– sequence: 22
  fullname: Esme Sutherland Robson
– sequence: 23
  givenname: Pushmeet
  surname: Kohli
  fullname: Kohli, Pushmeet
– sequence: 24
  fullname: Nando de Freitas
– sequence: 25
  givenname: Koray
  surname: Kavukcuoglu
  fullname: Kavukcuoglu, Koray
– sequence: 26
  givenname: Oriol
  surname: Vinyals
  fullname: Vinyals, Oriol
BackLink https://doi.org/10.1126/science.abq1158$$DView published paper (Access to full text may be restricted)
https://doi.org/10.48550/arXiv.2203.07814$$DView paper in arXiv
BookMark eNotj0FLw0AUhBdRsNb-AE8GPCe-fbubbo4laBUCXnoPu5sXmpJm4yat-u9t2p4GZoZhvgd22_mOGHvikEitFLya8NscE0QQCSw1lzdshkLwWEvEe7YYhh0AYLpEpcSMQe73PY3N2PguLuhIbZT7iqI1dRTM5EY_zbiNVm2_NVPyyO5q0w60uOqcbd7fNvlHXHytP_NVERuFGBNWQlpbOcmlNZhmIIXmIs0spEC61toa4lI6oTKX2Uy6WhrruOAOpCEl5uz5MnvGKfvQ7E34Kyes8ox1arxcGn3w3wcaxnLnD6E7fSoxFZlOuQIU_4bFUDs
ContentType Paper
Journal Article
Copyright 2022. This work is published under http://creativecommons.org/licenses/by/4.0/ (the “License”). Notwithstanding the ProQuest Terms and Conditions, you may use this content in accordance with the terms of the License.
http://creativecommons.org/licenses/by/4.0
Copyright_xml – notice: 2022. This work is published under http://creativecommons.org/licenses/by/4.0/ (the “License”). Notwithstanding the ProQuest Terms and Conditions, you may use this content in accordance with the terms of the License.
– notice: http://creativecommons.org/licenses/by/4.0
DBID 8FE
8FG
ABJCF
ABUWG
AFKRA
AZQEC
BENPR
BGLVJ
CCPQU
DWQXO
HCIFZ
L6V
M7S
PHGZM
PHGZT
PIMPY
PKEHL
PQEST
PQGLB
PQQKQ
PQUKI
PRINS
PTHSS
AKY
GOX
DOI 10.48550/arxiv.2203.07814
DatabaseName ProQuest SciTech Collection
ProQuest Technology Collection
Materials Science & Engineering Collection
ProQuest Central (Alumni)
ProQuest Central UK/Ireland
ProQuest Central Essentials
ProQuest Central
Technology Collection (via ProQuest SciTech Premium Collection)
ProQuest One Community College
ProQuest Central Korea
SciTech Premium Collection (via ProQuest)
ProQuest Engineering Collection
Engineering Database
ProQuest Central Premium
ProQuest One Academic
Publicly Available Content Database
ProQuest One Academic Middle East (New)
ProQuest One Academic Eastern Edition (DO NOT USE)
ProQuest One Applied & Life Sciences
ProQuest One Academic
ProQuest One Academic UKI Edition
ProQuest Central China
Engineering Collection
arXiv Computer Science
arXiv.org
DatabaseTitle Publicly Available Content Database
Engineering Database
Technology Collection
ProQuest One Academic Middle East (New)
ProQuest Central Essentials
ProQuest One Academic Eastern Edition
ProQuest Central (Alumni Edition)
SciTech Premium Collection
ProQuest One Community College
ProQuest Technology Collection
ProQuest SciTech Collection
ProQuest Central China
ProQuest Central
ProQuest One Applied & Life Sciences
ProQuest Engineering Collection
ProQuest One Academic UKI Edition
ProQuest Central Korea
Materials Science & Engineering Collection
ProQuest Central (New)
ProQuest One Academic
ProQuest One Academic (New)
Engineering Collection
DatabaseTitleList
Publicly Available Content Database
Database_xml – sequence: 1
  dbid: GOX
  name: arXiv.org
  url: http://arxiv.org/find
  sourceTypes: Open Access Repository
– sequence: 2
  dbid: 8FG
  name: ProQuest Technology Collection
  url: https://search.proquest.com/technologycollection1
  sourceTypes: Aggregation Database
DeliveryMethod fulltext_linktorsrc
Discipline Physics
EISSN 2331-8422
ExternalDocumentID 2203_07814
Genre Working Paper/Pre-Print
GroupedDBID 8FE
8FG
ABJCF
ABUWG
AFKRA
ALMA_UNASSIGNED_HOLDINGS
AZQEC
BENPR
BGLVJ
CCPQU
DWQXO
FRJ
HCIFZ
L6V
M7S
M~E
PHGZM
PHGZT
PIMPY
PKEHL
PQEST
PQGLB
PQQKQ
PQUKI
PRINS
PTHSS
AKY
GOX
ID FETCH-LOGICAL-a522-e2d34bbdc414ba26904381369b060e8f88bae144c359c9b94cf4abc131c04ae53
IEDL.DBID BENPR
IngestDate Tue Jul 22 23:03:03 EDT 2025
Mon Jun 30 09:30:19 EDT 2025
IsDoiOpenAccess true
IsOpenAccess true
IsPeerReviewed false
IsScholarly false
Language English
LinkModel DirectLink
MergedId FETCHMERGED-LOGICAL-a522-e2d34bbdc414ba26904381369b060e8f88bae144c359c9b94cf4abc131c04ae53
Notes SourceType-Working Papers-1
ObjectType-Working Paper/Pre-Print-1
content type line 50
OpenAccessLink https://www.proquest.com/docview/2639861502?pq-origsite=%requestingapplication%
PQID 2639861502
PQPubID 2050157
ParticipantIDs arxiv_primary_2203_07814
proquest_journals_2639861502
PublicationCentury 2000
PublicationDate 20220208
2022-02-08
PublicationDateYYYYMMDD 2022-02-08
PublicationDate_xml – month: 02
  year: 2022
  text: 20220208
  day: 08
PublicationDecade 2020
PublicationPlace Ithaca
PublicationPlace_xml – name: Ithaca
PublicationTitle arXiv.org
PublicationYear 2022
Publisher Cornell University Library, arXiv.org
Publisher_xml – name: Cornell University Library, arXiv.org
SSID ssj0002672553
Score 1.7875036
SecondaryResourceType preprint
Snippet Programming is a powerful and ubiquitous problem-solving tool. Developing systems that can assist programmers or even generate programs independently could...
Programming is a powerful and ubiquitous problem-solving tool. Developing systems that can assist programmers or even generate programs independently could...
SourceID arxiv
proquest
SourceType Open Access Repository
Aggregation Database
SubjectTerms Algorithms
Computer Science - Artificial Intelligence
Computer Science - Learning
Computer Science - Programming Languages
Natural language (computers)
Problem solving
Programming
Scale models
Task complexity
Translating
SummonAdditionalLinks – databaseName: arXiv.org
  dbid: GOX
  link: http://utb.summon.serialssolutions.com/2.0.0/link/0/eLvHCXMwdZ07T8MwFIWv2k4sCASohYI8sFo4fiTOWEWUCvFYipQt8lNiAdQWxM_H10nFgFgdZ_BNFJ-TnPsF4JpHEa1TglZReSpNsFQbFmlyQxWPUZUuQ5Ien8rVi7xvVTsCsu-FMZvv16-eD2y3N5wjgBSpTGMYc46Rrbvntv84mVFcw_zfeUlj5qE_j9a8XyyP4HAQemTRX5ljGIW3E2BNlqk5JkUfMK9DmncfSA9_xlGCL0bJAjtg8cgprJe362ZFh38WUJOUDA3cC2mtd7KQ1vBkPRGhJcraspIFHbW2JiQP44SqXW1r6aI01hWicCwVSokzmCTbH6ZADK-0U54FESP2gxqnZXIDwVe2lEV0M5jmlXYfPZaiwyJ0uQgzmO8X3w235LbjSYtoxL_z8__PvIADjvl-jCXrOUx2m89wmXbdnb3Kpf8BmoWBTA
  priority: 102
  providerName: Cornell University
Title Competition-Level Code Generation with AlphaCode
URI https://www.proquest.com/docview/2639861502
https://arxiv.org/abs/2203.07814
hasFullText 1
inHoldings 1
isFullTextHit
isPrint
link http://utb.summon.serialssolutions.com/2.0.0/link/0/eLvHCXMwfV1LSwMxEB60RfDmk1Zr2YPX2N08drMn0dIHYmuRCr0tSTYBL21tq3jyt5tJt3oQvASSnDIJ88o33wBcU8ecNoKRzImScGU1kSp2xEdDGXVOpCaQJI3G6fCFP8zErEq4rStY5U4nBkVdLgzmyDvUm1KJ7OX0dvlGsGsU_q5WLTT2oe5VsJQ1qN_3xpPnnywLTTPvM7Ptd2Yg7-qo1efrxw2lSG2KfE_eKw1Lf5RxsDD9I6hP1NKujmHPzk_gIAAzzfoU4m5wbAOwijwiwifqLkobbemicTXCVGp0hzWzuHMG035v2h2SqssBUd73IZaWjGtdGp5wragPVpF0i6W5jtPYSielVtZHPYaJ3OQ658ZxpU3CEhN70Qp2DrX5Ym4bECmaSSPK2DLnsIJUGcl9_GDLTKc8caYJjXDSYrklsihQCEUQQhNau8MX1SNeF78iv_h_-xIOKVYFIJhZtqC2Wb3bK2-rN7oN-7I_aFfX4meDp5kfR1-9b4z3loI
linkProvider ProQuest
linkToHtml http://utb.summon.serialssolutions.com/2.0.0/link/0/eLvHCXMwtV1LTwIxEJ4QidGbz4Ci7kGPld22-zoYY1AEecQDJtw2bbdNvAACvn6U_9FOl9WDiTeu7Wk67bz6zTcA59QwI1XISGzCnHChJUmEb4jNhmJqTBgpR5I0GEadJ_4wDscV-Cp7YRBWWdpEZ6jzqcIaeZNaV5ogezm9nr0QnBqFv6vlCI3iWvT057tN2RZX3Vur3wtK23ejVoespgoQYWMNomnOuJS54gGXgtrkEEmuWJRKP_J1YpJECm2zDMXCVKUy5cpwIVXAAuVbUXBIhLX4Vc6sI8fG9Pb9T0mHRrEN0Fnxd-qYwppi_vH8dkkp8qgiuZQNgd3SH8vv3Fl7B6qPYqbnu1DRkz3YdChQtdgHv-WiaIfiIn2EE3mtaa69gpsaVz2s23o32KCLOwcwWofwh7AxmU50DTxB40SFua-ZMdiuKlTCbbKi81hGPDCqDjUnaTYrWDMyPITMHUIdGqXw2erFLLJf_R79v30GW53RoJ_1u8PeMWxTbEdAFHXSgI3l_FWf2CBhKU-dajzI1nwVvgGdLs3m
openUrl ctx_ver=Z39.88-2004&ctx_enc=info%3Aofi%2Fenc%3AUTF-8&rfr_id=info%3Asid%2Fsummon.serialssolutions.com&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.atitle=Competition-Level+Code+Generation+with+AlphaCode&rft.jtitle=arXiv.org&rft.au=Li%2C+Yujia&rft.au=Choi%2C+David&rft.au=Chung%2C+Junyoung&rft.au=Kushman%2C+Nate&rft.date=2022-02-08&rft.pub=Cornell+University+Library%2C+arXiv.org&rft.eissn=2331-8422&rft_id=info:doi/10.48550%2Farxiv.2203.07814