Automatic Unit Test Data Generation and Actor-Critic Reinforcement Learning for Code Synthesis

The advent of large pre-trained language models in the domain of Code Synthesis has shown remarkable performance on various benchmarks, treating the problem of Code Generation in a fashion similar to Natural Language Generation, trained with a Language Modelling (LM) objective. In addition, the prop...

Ausführliche Beschreibung

Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Gorinski, Philip John, Zimmer, Matthieu, Lampouras, Gerasimos, Deik, Derrick Goh Xin, Iacobacci, Ignacio
Format: Artikel
Sprache:eng
Schlagworte:
Online-Zugang:Volltext bestellen
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
container_end_page
container_issue
container_start_page
container_title
container_volume
creator Gorinski, Philip John
Zimmer, Matthieu
Lampouras, Gerasimos
Deik, Derrick Goh Xin
Iacobacci, Ignacio
description The advent of large pre-trained language models in the domain of Code Synthesis has shown remarkable performance on various benchmarks, treating the problem of Code Generation in a fashion similar to Natural Language Generation, trained with a Language Modelling (LM) objective. In addition, the property of programming language code being precisely evaluable with respect to its semantics -- through the use of Unit Tests to check its functional correctness -- lends itself to using Reinforcement Learning (RL) as a further training paradigm. Previous work has shown that RL can be applied as such to improve models' coding capabilities; however, such RL-based methods rely on a reward signal based on defined Unit Tests, which are much harder to obtain compared to the huge crawled code datasets used in LM objectives. In this work, we present a novel approach to automatically obtain data consisting of function signatures and associated Unit Tests, suitable for RL training of Code Synthesis models. We also introduce a straightforward, simple yet effective Actor-Critic RL training scheme and show that it, in conjunction with automatically generated training data, leads to improvement of a pre-trained code language model's performance by up to 9.9% improvement over the original underlying code synthesis LM, and up to 4.3% over RL-based models trained with standard PPO or CodeRL.
doi_str_mv 10.48550/arxiv.2310.13669
format Article
fullrecord <record><control><sourceid>arxiv_GOX</sourceid><recordid>TN_cdi_arxiv_primary_2310_13669</recordid><sourceformat>XML</sourceformat><sourcesystem>PC</sourcesystem><sourcerecordid>2310_13669</sourcerecordid><originalsourceid>FETCH-LOGICAL-a679-eb10f8edbd5779876a5769d665aeb3cc8905c3e5e9d8a5bee8efe95992d12caf3</originalsourceid><addsrcrecordid>eNotj81KxDAUhbNxIaMP4Mr7Ah3bxvwtS9VRKAhat5bb5EYDNpU0ivP2dkZXB75zOPAxdlGV22stRHmF6Sd8b2u-gopLaU7Za_OV5wlzsPASQ4aelgw3mBF2FCmtxRwBo4PG5jkVbQqH6ROF6OdkaaKYoSNMMcQ3WBG0syN43sf8TktYztiJx4-Fzv9zw_q72769L7rH3UPbdAVKZQoaq9JrcqMTShmtJAoljZNSII3cWm1KYTkJMk6jGIk0eTLCmNpVtUXPN-zy7_YoOHymMGHaDwfR4SjKfwE3LU-c</addsrcrecordid><sourcetype>Open Access Repository</sourcetype><iscdi>true</iscdi><recordtype>article</recordtype></control><display><type>article</type><title>Automatic Unit Test Data Generation and Actor-Critic Reinforcement Learning for Code Synthesis</title><source>arXiv.org</source><creator>Gorinski, Philip John ; Zimmer, Matthieu ; Lampouras, Gerasimos ; Deik, Derrick Goh Xin ; Iacobacci, Ignacio</creator><creatorcontrib>Gorinski, Philip John ; Zimmer, Matthieu ; Lampouras, Gerasimos ; Deik, Derrick Goh Xin ; Iacobacci, Ignacio</creatorcontrib><description>The advent of large pre-trained language models in the domain of Code Synthesis has shown remarkable performance on various benchmarks, treating the problem of Code Generation in a fashion similar to Natural Language Generation, trained with a Language Modelling (LM) objective. In addition, the property of programming language code being precisely evaluable with respect to its semantics -- through the use of Unit Tests to check its functional correctness -- lends itself to using Reinforcement Learning (RL) as a further training paradigm. Previous work has shown that RL can be applied as such to improve models' coding capabilities; however, such RL-based methods rely on a reward signal based on defined Unit Tests, which are much harder to obtain compared to the huge crawled code datasets used in LM objectives. In this work, we present a novel approach to automatically obtain data consisting of function signatures and associated Unit Tests, suitable for RL training of Code Synthesis models. We also introduce a straightforward, simple yet effective Actor-Critic RL training scheme and show that it, in conjunction with automatically generated training data, leads to improvement of a pre-trained code language model's performance by up to 9.9% improvement over the original underlying code synthesis LM, and up to 4.3% over RL-based models trained with standard PPO or CodeRL.</description><identifier>DOI: 10.48550/arxiv.2310.13669</identifier><language>eng</language><subject>Computer Science - Artificial Intelligence ; Computer Science - Computation and Language ; Computer Science - Learning ; Computer Science - Programming Languages</subject><creationdate>2023-10</creationdate><rights>http://arxiv.org/licenses/nonexclusive-distrib/1.0</rights><oa>free_for_read</oa><woscitedreferencessubscribed>false</woscitedreferencessubscribed></display><links><openurl>$$Topenurl_article</openurl><openurlfulltext>$$Topenurlfull_article</openurlfulltext><thumbnail>$$Tsyndetics_thumb_exl</thumbnail><link.rule.ids>228,230,776,881</link.rule.ids><linktorsrc>$$Uhttps://arxiv.org/abs/2310.13669$$EView_record_in_Cornell_University$$FView_record_in_$$GCornell_University$$Hfree_for_read</linktorsrc><backlink>$$Uhttps://doi.org/10.48550/arXiv.2310.13669$$DView paper in arXiv$$Hfree_for_read</backlink></links><search><creatorcontrib>Gorinski, Philip John</creatorcontrib><creatorcontrib>Zimmer, Matthieu</creatorcontrib><creatorcontrib>Lampouras, Gerasimos</creatorcontrib><creatorcontrib>Deik, Derrick Goh Xin</creatorcontrib><creatorcontrib>Iacobacci, Ignacio</creatorcontrib><title>Automatic Unit Test Data Generation and Actor-Critic Reinforcement Learning for Code Synthesis</title><description>The advent of large pre-trained language models in the domain of Code Synthesis has shown remarkable performance on various benchmarks, treating the problem of Code Generation in a fashion similar to Natural Language Generation, trained with a Language Modelling (LM) objective. In addition, the property of programming language code being precisely evaluable with respect to its semantics -- through the use of Unit Tests to check its functional correctness -- lends itself to using Reinforcement Learning (RL) as a further training paradigm. Previous work has shown that RL can be applied as such to improve models' coding capabilities; however, such RL-based methods rely on a reward signal based on defined Unit Tests, which are much harder to obtain compared to the huge crawled code datasets used in LM objectives. In this work, we present a novel approach to automatically obtain data consisting of function signatures and associated Unit Tests, suitable for RL training of Code Synthesis models. We also introduce a straightforward, simple yet effective Actor-Critic RL training scheme and show that it, in conjunction with automatically generated training data, leads to improvement of a pre-trained code language model's performance by up to 9.9% improvement over the original underlying code synthesis LM, and up to 4.3% over RL-based models trained with standard PPO or CodeRL.</description><subject>Computer Science - Artificial Intelligence</subject><subject>Computer Science - Computation and Language</subject><subject>Computer Science - Learning</subject><subject>Computer Science - Programming Languages</subject><fulltext>true</fulltext><rsrctype>article</rsrctype><creationdate>2023</creationdate><recordtype>article</recordtype><sourceid>GOX</sourceid><recordid>eNotj81KxDAUhbNxIaMP4Mr7Ah3bxvwtS9VRKAhat5bb5EYDNpU0ivP2dkZXB75zOPAxdlGV22stRHmF6Sd8b2u-gopLaU7Za_OV5wlzsPASQ4aelgw3mBF2FCmtxRwBo4PG5jkVbQqH6ROF6OdkaaKYoSNMMcQ3WBG0syN43sf8TktYztiJx4-Fzv9zw_q72769L7rH3UPbdAVKZQoaq9JrcqMTShmtJAoljZNSII3cWm1KYTkJMk6jGIk0eTLCmNpVtUXPN-zy7_YoOHymMGHaDwfR4SjKfwE3LU-c</recordid><startdate>20231020</startdate><enddate>20231020</enddate><creator>Gorinski, Philip John</creator><creator>Zimmer, Matthieu</creator><creator>Lampouras, Gerasimos</creator><creator>Deik, Derrick Goh Xin</creator><creator>Iacobacci, Ignacio</creator><scope>AKY</scope><scope>GOX</scope></search><sort><creationdate>20231020</creationdate><title>Automatic Unit Test Data Generation and Actor-Critic Reinforcement Learning for Code Synthesis</title><author>Gorinski, Philip John ; Zimmer, Matthieu ; Lampouras, Gerasimos ; Deik, Derrick Goh Xin ; Iacobacci, Ignacio</author></sort><facets><frbrtype>5</frbrtype><frbrgroupid>cdi_FETCH-LOGICAL-a679-eb10f8edbd5779876a5769d665aeb3cc8905c3e5e9d8a5bee8efe95992d12caf3</frbrgroupid><rsrctype>articles</rsrctype><prefilter>articles</prefilter><language>eng</language><creationdate>2023</creationdate><topic>Computer Science - Artificial Intelligence</topic><topic>Computer Science - Computation and Language</topic><topic>Computer Science - Learning</topic><topic>Computer Science - Programming Languages</topic><toplevel>online_resources</toplevel><creatorcontrib>Gorinski, Philip John</creatorcontrib><creatorcontrib>Zimmer, Matthieu</creatorcontrib><creatorcontrib>Lampouras, Gerasimos</creatorcontrib><creatorcontrib>Deik, Derrick Goh Xin</creatorcontrib><creatorcontrib>Iacobacci, Ignacio</creatorcontrib><collection>arXiv Computer Science</collection><collection>arXiv.org</collection></facets><delivery><delcategory>Remote Search Resource</delcategory><fulltext>fulltext_linktorsrc</fulltext></delivery><addata><au>Gorinski, Philip John</au><au>Zimmer, Matthieu</au><au>Lampouras, Gerasimos</au><au>Deik, Derrick Goh Xin</au><au>Iacobacci, Ignacio</au><format>journal</format><genre>article</genre><ristype>JOUR</ristype><atitle>Automatic Unit Test Data Generation and Actor-Critic Reinforcement Learning for Code Synthesis</atitle><date>2023-10-20</date><risdate>2023</risdate><abstract>The advent of large pre-trained language models in the domain of Code Synthesis has shown remarkable performance on various benchmarks, treating the problem of Code Generation in a fashion similar to Natural Language Generation, trained with a Language Modelling (LM) objective. In addition, the property of programming language code being precisely evaluable with respect to its semantics -- through the use of Unit Tests to check its functional correctness -- lends itself to using Reinforcement Learning (RL) as a further training paradigm. Previous work has shown that RL can be applied as such to improve models' coding capabilities; however, such RL-based methods rely on a reward signal based on defined Unit Tests, which are much harder to obtain compared to the huge crawled code datasets used in LM objectives. In this work, we present a novel approach to automatically obtain data consisting of function signatures and associated Unit Tests, suitable for RL training of Code Synthesis models. We also introduce a straightforward, simple yet effective Actor-Critic RL training scheme and show that it, in conjunction with automatically generated training data, leads to improvement of a pre-trained code language model's performance by up to 9.9% improvement over the original underlying code synthesis LM, and up to 4.3% over RL-based models trained with standard PPO or CodeRL.</abstract><doi>10.48550/arxiv.2310.13669</doi><oa>free_for_read</oa></addata></record>
fulltext fulltext_linktorsrc
identifier DOI: 10.48550/arxiv.2310.13669
ispartof
issn
language eng
recordid cdi_arxiv_primary_2310_13669
source arXiv.org
subjects Computer Science - Artificial Intelligence
Computer Science - Computation and Language
Computer Science - Learning
Computer Science - Programming Languages
title Automatic Unit Test Data Generation and Actor-Critic Reinforcement Learning for Code Synthesis
url https://sfx.bib-bvb.de/sfx_tum?ctx_ver=Z39.88-2004&ctx_enc=info:ofi/enc:UTF-8&ctx_tim=2025-02-20T20%3A34%3A52IST&url_ver=Z39.88-2004&url_ctx_fmt=infofi/fmt:kev:mtx:ctx&rfr_id=info:sid/primo.exlibrisgroup.com:primo3-Article-arxiv_GOX&rft_val_fmt=info:ofi/fmt:kev:mtx:journal&rft.genre=article&rft.atitle=Automatic%20Unit%20Test%20Data%20Generation%20and%20Actor-Critic%20Reinforcement%20Learning%20for%20Code%20Synthesis&rft.au=Gorinski,%20Philip%20John&rft.date=2023-10-20&rft_id=info:doi/10.48550/arxiv.2310.13669&rft_dat=%3Carxiv_GOX%3E2310_13669%3C/arxiv_GOX%3E%3Curl%3E%3C/url%3E&disable_directlink=true&sfx.directlink=off&sfx.report_link=0&rft_id=info:oai/&rft_id=info:pmid/&rfr_iscdi=true