We gratefully acknowledge support from
the Simons Foundation and member institutions.
Full-text links:

Download:

Current browse context:

cs

Change to browse by:

References & Citations

DBLP - CS Bibliography

Bookmark

(what is this?)
CiteULike logo BibSonomy logo Mendeley logo del.icio.us logo Digg logo Reddit logo ScienceWISE logo

Computer Science > Computation and Language

Title: Exploring Dynamic Selection of Branch Expansion Orders for Code Generation

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 this https URL
Comments: Accepted by ACL 2021 main conference
Subjects: Computation and Language (cs.CL)
Cite as: arXiv:2106.00261 [cs.CL]
  (or arXiv:2106.00261v1 [cs.CL] for this version)

Submission history

From: Jiang Hui [view email]
[v1] Tue, 1 Jun 2021 06:52:41 GMT (1337kb,D)

Link back to: arXiv, form interface, contact.