paper-with-me

홈 › Papers

TreeBERT: A Tree-Based Pre-Trained Model for Programming Language

2021-05-26 · Xue Jiang, Zhuoran Zheng, Chen Lyu, Liang Li, Lei Lyu

Source code can be parsed into the abstract syntax tree (AST) based on defined syntax rules. However, in pre-training, little work has considered the incorporation of tree structure into the learning process. In this paper, we present TreeBERT, a tree-based pre-trained model for improving programming language-oriented generation tasks. To utilize tree structure, TreeBERT represents the AST corresponding to the code as a set of composition paths and introduces node position embedding. The model is trained by tree masked language modeling (TMLM) and node order prediction (NOP) with a hybrid objective. TMLM uses a novel masking strategy designed according to the tree's characteristics to help the model understand the AST and infer the missing semantics of the AST. With NOP, TreeBERT extracts the syntactical structure by learning the order constraints of nodes in AST. We pre-trained TreeBERT on datasets covering multiple programming languages. On code summarization and code documentation tasks, TreeBERT outperforms other pre-trained models and state-of-the-art models designed for these tasks. Furthermore, TreeBERT performs well when transferred to the pre-trained unseen programming language.

📄 PDF Abstract BibTeX arXiv:2105.12485

Code (1)

17385/TreeBERT 공식 구현 pytorch

Tasks

Code SummarizationLanguage ModelingLanguage ModellingMasked Language Modeling

Similar Papers 제목 키워드 기반

Behavior Trees Enable Structured Programming of Language Model Agents

2024-04-11 · Richard Kelley

Language models trained on internet-scale data sets have shown an impressive ability to solve problems in Natural Language Processing and Computer Vision. However, experience is showing that these models are frequently b…

Language ModelingLanguage Modelling

Program Language Translation Using a Grammar-Driven Tree-to-Tree Model

2018-07-04 · Mehdi Drissi, Olivia Watkins, Aditya Khant, Vivaswat Ojha 외

The task of translating between programming languages differs from the challenge of translating natural languages in that programming languages are designed with a far more rigid set of structural and grammatical rules. …

DecoderTranslation

Cross-Language Learning for Program Classification using Bilateral Tree-Based Convolutional Neural Networks

2017-10-17 · Nghi D. Q. Bui, Lingxiao Jiang, Yijun Yu

Towards the vision of translating code that implements an algorithm from one programming language into another, this paper proposes an approach for automated program classification using bilateral tree-based convolutiona…

Binary ClassificationC++ codeClassificationGeneral Classification

Design and Evaluation of an Assisted Programming Interface for Behavior Trees in Robotics

2026-02-10 · Jonathan Styrud, Matteo Iovino, Rebecca Stower, Mart Kartašev 외 arxiv

The possibility to create reactive robot programs faster without the need for extensively trained programmers is becoming increasingly important. So far, it has not been explored how various techniques for creating Behav…

Which Programming Language and What Features at Pre-training Stage Affect Downstream Logical Inference Performance?

2024-10-09 · Fumiya Uchiyama, Takeshi Kojima, Andrew Gambardella, Qi Cao 외

Recent large language models (LLMs) have demonstrated remarkable generalization abilities in mathematics and logical reasoning tasks. Prior research indicates that LLMs pre-trained with programming language data exhibit …

In-Context LearningLogical ReasoningWorld Knowledge