Exploring Dynamic Selection of Branch Expansion Orders for Code Generation
Due to the great potential in facilitating software development, code generation has attracted increasing attention recently. Generally, dominant models are Seq2Tree models, which convert the input natural language description into a sequence of tree-construction actions corresponding to the pre-ord...
Gespeichert in:
Hauptverfasser: | , , , , , , , |
---|---|
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 | Jiang, Hui Zhou, Chulun Meng, Fandong Zhang, Biao Zhou, Jie Huang, Degen Wu, Qingqiang Su, Jinsong |
description | Due to the great potential in facilitating software development, code
generation has attracted increasing attention recently. Generally, dominant
models are Seq2Tree models, which convert the input natural language
description into a sequence of tree-construction actions corresponding to the
pre-order traversal of an Abstract Syntax Tree (AST). However, such a traversal
order may not be suitable for handling all multi-branch nodes. In this paper,
we propose to equip the Seq2Tree model with a context-based Branch Selector,
which is able to dynamically determine optimal expansion orders of branches for
multi-branch nodes. Particularly, since the selection of expansion orders is a
non-differentiable multi-step operation, we optimize the selector through
reinforcement learning, and formulate the reward function as the difference of
model losses obtained through different expansion orders. Experimental results
and in-depth analysis on several commonly-used datasets demonstrate the
effectiveness and generality of our approach. We have released our code at
https://github.com/DeepLearnXMU/CG-RL. |
doi_str_mv | 10.48550/arxiv.2106.00261 |
format | Article |
fullrecord | <record><control><sourceid>arxiv_GOX</sourceid><recordid>TN_cdi_arxiv_primary_2106_00261</recordid><sourceformat>XML</sourceformat><sourcesystem>PC</sourcesystem><sourcerecordid>2106_00261</sourcerecordid><originalsourceid>FETCH-LOGICAL-a671-59822a2a4c24996f8b1a8c42d4b4714c7216e713b0496ddd2bd5485da8bb78c63</originalsourceid><addsrcrecordid>eNotj8tuwjAURL1hUQEf0FX9A0ntG8d2ljSltBUSi7KPrh8ploKNnArB35fQrkYaHY3mEPLIWSl0XbNnzJdwLoEzWTIGkj-Qz_XlNKQc4jd9vUY8Bku__ODtT0iRpp6-ZIz2QG8UxnHqdtn5PNI-Zdom5-nGR59xwhdk1uMw-uV_zsn-bb1v34vtbvPRrrYFSsWLutEACCgsiKaRvTYctRXghBGKC6uAS694ZZhopHMOjKtv5x1qY5S2spqTp7_Zu0x3yuGI-dpNUt1dqvoF8z5Gsw</addsrcrecordid><sourcetype>Open Access Repository</sourcetype><iscdi>true</iscdi><recordtype>article</recordtype></control><display><type>article</type><title>Exploring Dynamic Selection of Branch Expansion Orders for Code Generation</title><source>arXiv.org</source><creator>Jiang, Hui ; Zhou, Chulun ; Meng, Fandong ; Zhang, Biao ; Zhou, Jie ; Huang, Degen ; Wu, Qingqiang ; Su, Jinsong</creator><creatorcontrib>Jiang, Hui ; Zhou, Chulun ; Meng, Fandong ; Zhang, Biao ; Zhou, Jie ; Huang, Degen ; Wu, Qingqiang ; Su, Jinsong</creatorcontrib><description>Due to the great potential in facilitating software development, code
generation has attracted increasing attention recently. Generally, dominant
models are Seq2Tree models, which convert the input natural language
description into a sequence of tree-construction actions corresponding to the
pre-order traversal of an Abstract Syntax Tree (AST). However, such a traversal
order may not be suitable for handling all multi-branch nodes. In this paper,
we propose to equip the Seq2Tree model with a context-based Branch Selector,
which is able to dynamically determine optimal expansion orders of branches for
multi-branch nodes. Particularly, since the selection of expansion orders is a
non-differentiable multi-step operation, we optimize the selector through
reinforcement learning, and formulate the reward function as the difference of
model losses obtained through different expansion orders. Experimental results
and in-depth analysis on several commonly-used datasets demonstrate the
effectiveness and generality of our approach. We have released our code at
https://github.com/DeepLearnXMU/CG-RL.</description><identifier>DOI: 10.48550/arxiv.2106.00261</identifier><language>eng</language><subject>Computer Science - Computation and Language</subject><creationdate>2021-06</creationdate><rights>http://creativecommons.org/licenses/by/4.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,780,885</link.rule.ids><linktorsrc>$$Uhttps://arxiv.org/abs/2106.00261$$EView_record_in_Cornell_University$$FView_record_in_$$GCornell_University$$Hfree_for_read</linktorsrc><backlink>$$Uhttps://doi.org/10.48550/arXiv.2106.00261$$DView paper in arXiv$$Hfree_for_read</backlink></links><search><creatorcontrib>Jiang, Hui</creatorcontrib><creatorcontrib>Zhou, Chulun</creatorcontrib><creatorcontrib>Meng, Fandong</creatorcontrib><creatorcontrib>Zhang, Biao</creatorcontrib><creatorcontrib>Zhou, Jie</creatorcontrib><creatorcontrib>Huang, Degen</creatorcontrib><creatorcontrib>Wu, Qingqiang</creatorcontrib><creatorcontrib>Su, Jinsong</creatorcontrib><title>Exploring Dynamic Selection of Branch Expansion Orders for Code Generation</title><description>Due to the great potential in facilitating software development, code
generation has attracted increasing attention recently. Generally, dominant
models are Seq2Tree models, which convert the input natural language
description into a sequence of tree-construction actions corresponding to the
pre-order traversal of an Abstract Syntax Tree (AST). However, such a traversal
order may not be suitable for handling all multi-branch nodes. In this paper,
we propose to equip the Seq2Tree model with a context-based Branch Selector,
which is able to dynamically determine optimal expansion orders of branches for
multi-branch nodes. Particularly, since the selection of expansion orders is a
non-differentiable multi-step operation, we optimize the selector through
reinforcement learning, and formulate the reward function as the difference of
model losses obtained through different expansion orders. Experimental results
and in-depth analysis on several commonly-used datasets demonstrate the
effectiveness and generality of our approach. We have released our code at
https://github.com/DeepLearnXMU/CG-RL.</description><subject>Computer Science - Computation and Language</subject><fulltext>true</fulltext><rsrctype>article</rsrctype><creationdate>2021</creationdate><recordtype>article</recordtype><sourceid>GOX</sourceid><recordid>eNotj8tuwjAURL1hUQEf0FX9A0ntG8d2ljSltBUSi7KPrh8ploKNnArB35fQrkYaHY3mEPLIWSl0XbNnzJdwLoEzWTIGkj-Qz_XlNKQc4jd9vUY8Bku__ODtT0iRpp6-ZIz2QG8UxnHqdtn5PNI-Zdom5-nGR59xwhdk1uMw-uV_zsn-bb1v34vtbvPRrrYFSsWLutEACCgsiKaRvTYctRXghBGKC6uAS694ZZhopHMOjKtv5x1qY5S2spqTp7_Zu0x3yuGI-dpNUt1dqvoF8z5Gsw</recordid><startdate>20210601</startdate><enddate>20210601</enddate><creator>Jiang, Hui</creator><creator>Zhou, Chulun</creator><creator>Meng, Fandong</creator><creator>Zhang, Biao</creator><creator>Zhou, Jie</creator><creator>Huang, Degen</creator><creator>Wu, Qingqiang</creator><creator>Su, Jinsong</creator><scope>AKY</scope><scope>GOX</scope></search><sort><creationdate>20210601</creationdate><title>Exploring Dynamic Selection of Branch Expansion Orders for Code Generation</title><author>Jiang, Hui ; Zhou, Chulun ; Meng, Fandong ; Zhang, Biao ; Zhou, Jie ; Huang, Degen ; Wu, Qingqiang ; Su, Jinsong</author></sort><facets><frbrtype>5</frbrtype><frbrgroupid>cdi_FETCH-LOGICAL-a671-59822a2a4c24996f8b1a8c42d4b4714c7216e713b0496ddd2bd5485da8bb78c63</frbrgroupid><rsrctype>articles</rsrctype><prefilter>articles</prefilter><language>eng</language><creationdate>2021</creationdate><topic>Computer Science - Computation and Language</topic><toplevel>online_resources</toplevel><creatorcontrib>Jiang, Hui</creatorcontrib><creatorcontrib>Zhou, Chulun</creatorcontrib><creatorcontrib>Meng, Fandong</creatorcontrib><creatorcontrib>Zhang, Biao</creatorcontrib><creatorcontrib>Zhou, Jie</creatorcontrib><creatorcontrib>Huang, Degen</creatorcontrib><creatorcontrib>Wu, Qingqiang</creatorcontrib><creatorcontrib>Su, Jinsong</creatorcontrib><collection>arXiv Computer Science</collection><collection>arXiv.org</collection></facets><delivery><delcategory>Remote Search Resource</delcategory><fulltext>fulltext_linktorsrc</fulltext></delivery><addata><au>Jiang, Hui</au><au>Zhou, Chulun</au><au>Meng, Fandong</au><au>Zhang, Biao</au><au>Zhou, Jie</au><au>Huang, Degen</au><au>Wu, Qingqiang</au><au>Su, Jinsong</au><format>journal</format><genre>article</genre><ristype>JOUR</ristype><atitle>Exploring Dynamic Selection of Branch Expansion Orders for Code Generation</atitle><date>2021-06-01</date><risdate>2021</risdate><abstract>Due to the great potential in facilitating software development, code
generation has attracted increasing attention recently. Generally, dominant
models are Seq2Tree models, which convert the input natural language
description into a sequence of tree-construction actions corresponding to the
pre-order traversal of an Abstract Syntax Tree (AST). However, such a traversal
order may not be suitable for handling all multi-branch nodes. In this paper,
we propose to equip the Seq2Tree model with a context-based Branch Selector,
which is able to dynamically determine optimal expansion orders of branches for
multi-branch nodes. Particularly, since the selection of expansion orders is a
non-differentiable multi-step operation, we optimize the selector through
reinforcement learning, and formulate the reward function as the difference of
model losses obtained through different expansion orders. Experimental results
and in-depth analysis on several commonly-used datasets demonstrate the
effectiveness and generality of our approach. We have released our code at
https://github.com/DeepLearnXMU/CG-RL.</abstract><doi>10.48550/arxiv.2106.00261</doi><oa>free_for_read</oa></addata></record> |
fulltext | fulltext_linktorsrc |
identifier | DOI: 10.48550/arxiv.2106.00261 |
ispartof | |
issn | |
language | eng |
recordid | cdi_arxiv_primary_2106_00261 |
source | arXiv.org |
subjects | Computer Science - Computation and Language |
title | Exploring Dynamic Selection of Branch Expansion Orders for Code Generation |
url | https://sfx.bib-bvb.de/sfx_tum?ctx_ver=Z39.88-2004&ctx_enc=info:ofi/enc:UTF-8&ctx_tim=2024-12-21T02%3A28%3A18IST&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=Exploring%20Dynamic%20Selection%20of%20Branch%20Expansion%20Orders%20for%20Code%20Generation&rft.au=Jiang,%20Hui&rft.date=2021-06-01&rft_id=info:doi/10.48550/arxiv.2106.00261&rft_dat=%3Carxiv_GOX%3E2106_00261%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 |