Exploring Dynamic Selection of Branch Expansion Orders for Code
Generation
- URL: http://arxiv.org/abs/2106.00261v1
- Date: Tue, 1 Jun 2021 06:52:41 GMT
- Title: Exploring Dynamic Selection of Branch Expansion Orders for Code
Generation
- Authors: Hui Jiang, Chulun Zhou, Fandong Meng, Biao Zhang, Jie Zhou, Degen
Huang, Qingqiang Wu, Jinsong Su
- Abstract summary: We equip the Seq2Tree model with a context-based Branch Selector.
The selector is able to dynamically determine optimal expansion orders of branches for multi-branch nodes.
Experimental results and in-depth analysis on several commonly-used datasets demonstrate the effectiveness and generality of our approach.
- Score: 43.027059412639
- License: http://creativecommons.org/licenses/by/4.0/
- 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.
Related papers
- Terminating Differentiable Tree Experts [77.2443883991608]
We propose a neuro-symbolic Differentiable Tree Machine that learns tree operations using a combination of transformers and Representation Products.
We first remove a series of different transformer layers that are used in every step by introducing a mixture of experts.
We additionally propose a new termination algorithm to provide the model the power to choose how many steps to make automatically.
arXiv Detail & Related papers (2024-07-02T08:45:38Z) - Learning to Branch in Combinatorial Optimization with Graph Pointer
Networks [17.729352126574902]
This paper proposes a graph pointer network model for learning the variable selection policy in the branch-and-bound.
The proposed model, which combines the graph neural network and the pointer mechanism, can effectively map from the solver state to the branching variable decisions.
arXiv Detail & Related papers (2023-07-04T01:56:07Z) - RLET: A Reinforcement Learning Based Approach for Explainable QA with
Entailment Trees [47.745218107037786]
We propose RLET, a Reinforcement Learning based Entailment Tree generation framework.
RLET iteratively performs single step reasoning with sentence selection and deduction generation modules.
Experiments on three settings of the EntailmentBank dataset demonstrate the strength of using RL framework.
arXiv Detail & Related papers (2022-10-31T06:45:05Z) - DORE: Document Ordered Relation Extraction based on Generative Framework [56.537386636819626]
This paper investigates the root cause of the underwhelming performance of the existing generative DocRE models.
We propose to generate a symbolic and ordered sequence from the relation matrix which is deterministic and easier for model to learn.
Experimental results on four datasets show that our proposed method can improve the performance of the generative DocRE models.
arXiv Detail & Related papers (2022-10-28T11:18:10Z) - Discovering Non-monotonic Autoregressive Orderings with Variational
Inference [67.27561153666211]
We develop an unsupervised parallelizable learner that discovers high-quality generation orders purely from training data.
We implement the encoder as a Transformer with non-causal attention that outputs permutations in one forward pass.
Empirical results in language modeling tasks demonstrate that our method is context-aware and discovers orderings that are competitive with or even better than fixed orders.
arXiv Detail & Related papers (2021-10-27T16:08:09Z) - Structural Optimization Makes Graph Classification Simpler and Better [5.770986723520119]
We investigate the feasibility of improving graph classification performance while simplifying the model learning process.
Inspired by progress in structural information assessment, we optimize the given data sample from graphs to encoding trees.
We present an implementation of the scheme in a tree kernel and a convolutional network to perform graph classification.
arXiv Detail & Related papers (2021-09-05T08:54:38Z) - Rethinking Learnable Tree Filter for Generic Feature Transform [71.77463476808585]
Learnable Tree Filter presents a remarkable approach to model structure-preserving relations for semantic segmentation.
To relax the geometric constraint, we give the analysis by reformulating it as a Markov Random Field and introduce a learnable unary term.
For semantic segmentation, we achieve leading performance (82.1% mIoU) on the Cityscapes benchmark without bells-and-whistles.
arXiv Detail & Related papers (2020-12-07T07:16:47Z) - MurTree: Optimal Classification Trees via Dynamic Programming and Search [61.817059565926336]
We present a novel algorithm for learning optimal classification trees based on dynamic programming and search.
Our approach uses only a fraction of the time required by the state-of-the-art and can handle datasets with tens of thousands of instances.
arXiv Detail & Related papers (2020-07-24T17:06:55Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.