A Tree-structured Transformer for Program Representation Learning
- URL: http://arxiv.org/abs/2208.08643v1
- Date: Thu, 18 Aug 2022 05:42:01 GMT
- Title: A Tree-structured Transformer for Program Representation Learning
- Authors: Wenhan Wang, Kechi Zhang, Ge Li, Shangqing Liu, Zhi Jin, Yang Liu
- Abstract summary: Long-term/global dependencies widely exist in programs, and most neural networks fail to capture these dependencies.
In this paper, we propose Tree-Transformer, a novel tree-structured neural network which aims to overcome the above limitations.
By combining bottom-up and top-down propagation, Tree-Transformer can learn both global contexts and meaningful node features.
- Score: 27.31416015946351
- License: http://creativecommons.org/licenses/by/4.0/
- Abstract: When using deep learning techniques to model program languages, neural
networks with tree or graph structures are widely adopted to capture the rich
structural information within program abstract syntax trees (AST). However,
long-term/global dependencies widely exist in programs, and most of these
neural architectures fail to capture these dependencies. In this paper, we
propose Tree-Transformer, a novel recursive tree-structured neural network
which aims to overcome the above limitations. Tree-Transformer leverages two
multi-head attention units to model the dependency between siblings and
parent-children node pairs. Moreover, we propose a bi-directional propagation
strategy to allow node information passing in two directions: bottom-up and
top-down along trees. By combining bottom-up and top-down propagation,
Tree-Transformer can learn both global contexts and meaningful node features.
The extensive experimental results show that our Tree-Transformer outperforms
existing tree-based or graph-based neural networks in program-related tasks
with tree-level and node-level prediction tasks, indicating that
Tree-Transformer performs well on learning both tree-level and node-level
representations.
Related papers
- HetTree: Heterogeneous Tree Graph Neural Network [12.403166161903378]
HetTree is a novel heterogeneous tree graph neural network that models both the graph structure and heterogeneous aspects.
HetTree builds a semantic tree data structure to capture the hierarchy among metapaths.
Our evaluation of HetTree on a variety of real-world datasets demonstrates that it outperforms all existing baselines on open benchmarks.
arXiv Detail & Related papers (2024-02-21T03:14:45Z) - Learning a Decision Tree Algorithm with Transformers [75.96920867382859]
We introduce MetaTree, a transformer-based model trained via meta-learning to directly produce strong decision trees.
We fit both greedy decision trees and globally optimized decision trees on a large number of datasets, and train MetaTree to produce only the trees that achieve strong generalization performance.
arXiv Detail & Related papers (2024-02-06T07:40:53Z) - ViTree: Single-path Neural Tree for Step-wise Interpretable Fine-grained
Visual Categorization [56.37520969273242]
We introduce ViTree, a novel approach for fine-grained visual categorization.
By traversing the tree paths, ViTree effectively selects patches from transformer-processed features to highlight informative local regions.
This patch and path selectivity enhances model interpretability of ViTree, enabling better insights into the model's inner workings.
arXiv Detail & Related papers (2024-01-30T14:32:25Z) - Hierarchical clustering with dot products recovers hidden tree structure [53.68551192799585]
In this paper we offer a new perspective on the well established agglomerative clustering algorithm, focusing on recovery of hierarchical structure.
We recommend a simple variant of the standard algorithm, in which clusters are merged by maximum average dot product and not, for example, by minimum distance or within-cluster variance.
We demonstrate that the tree output by this algorithm provides a bona fide estimate of generative hierarchical structure in data, under a generic probabilistic graphical model.
arXiv Detail & Related papers (2023-05-24T11:05:12Z) - DeepTree: Modeling Trees with Situated Latents [8.372189962601073]
We propose a novel method for modeling trees based on learning developmental rules for branching structures instead of manually defining them.
We call our deep neural model situated latent because its behavior is determined by the intrinsic state.
Our method enables generating a wide variety of tree shapes without the need to define intricate parameters.
arXiv Detail & Related papers (2023-05-09T03:33:14Z) - SE-GSL: A General and Effective Graph Structure Learning Framework
through Structural Entropy Optimization [67.28453445927825]
Graph Neural Networks (GNNs) are de facto solutions to structural data learning.
Existing graph structure learning (GSL) frameworks still lack robustness and interpretability.
This paper proposes a general GSL framework, SE-GSL, through structural entropy and the graph hierarchy abstracted in the encoding tree.
arXiv Detail & Related papers (2023-03-17T05:20:24Z) - GTNet: A Tree-Based Deep Graph Learning Architecture [8.50892442127182]
We propose a deep graph learning architecture with a new general message passing scheme that originates from the tree representation of graphs.
Two graph representation learning models are proposed within this GTNet architecture - Graph Tree Attention Network (GTAN) and Graph Tree Convolution Network (GTCN)
arXiv Detail & Related papers (2022-04-27T09:43:14Z) - Graph Tree Neural Networks [0.43012765978447565]
Graph tree neural networks (GTNNs) are designed to solve the problems of existing networks by analyzing the structure of human neural networks.
In GTNNs, information units are related to the form of a graph and then they become a bigger unit of information again and have a relationship with other information units.
arXiv Detail & Related papers (2021-10-31T07:58:00Z) - 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) - Visualizing hierarchies in scRNA-seq data using a density tree-biased
autoencoder [50.591267188664666]
We propose an approach for identifying a meaningful tree structure from high-dimensional scRNA-seq data.
We then introduce DTAE, a tree-biased autoencoder that emphasizes the tree structure of the data in low dimensional space.
arXiv Detail & Related papers (2021-02-11T08:48:48Z) - Growing Deep Forests Efficiently with Soft Routing and Learned
Connectivity [79.83903179393164]
This paper further extends the deep forest idea in several important aspects.
We employ a probabilistic tree whose nodes make probabilistic routing decisions, a.k.a., soft routing, rather than hard binary decisions.
Experiments on the MNIST dataset demonstrate that our empowered deep forests can achieve better or comparable performance than [1],[3].
arXiv Detail & Related papers (2020-12-29T18:05:05Z)
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.