TreeBERT: A Tree-Based Pre-Trained Model for Programming Language
Not on the map. Why?
Abstract (arXiv)
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.
Key facts. Cited by 40 papers in the map (data through 7 Oct 2026). Builds on 24 of its 33 references that are in the map. First posted on arXiv 26 May 2021.
Builds on
24 of 33 references.
References · 24
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2014Adam: A Method for Stochastic Optimizationcited by 36,960
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
- 2015Neural Machine Translation of Rare Words with Subword Unitscited by 2,898
- 2019XLNet: Generalized Autoregressive Pretraining for Language Understandingcited by 2,801
- 2019ALBERT: A Lite BERT for Self-supervised Learning of Language Representationscited by 2,772
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
- 2019Cross-lingual Language Model Pretrainingcited by 1,088
- 2019Unified Language Model Pre-training for Natural Language Understanding and Generationcited by 668
- 2017Convolutional Sequence to Sequence Learningcited by 550
- 2019Multi-Task Deep Neural Networks for Natural Language Understandingcited by 349
12 more
- 2019MASS: Masked Sequence to Sequence Pre-training for Language Generationcited by 345
- 2017Unsupervised Machine Translation Using Monolingual Corpora Onlycited by 272
- 2020Unsupervised Translation of Programming Languagescited by 262
- 2018code2vec: Learning Distributed Representations of Codecited by 249
- 2018code2seq: Generating Sequences from Structured Representations of Codecited by 177
- 2017Abstract Syntax Networks for Code Generation and Semantic Parsingcited by 92
- 2016A Convolutional Attention Network for Extreme Summarization of Source Codecited by 90
- 2020Improved Code Summarization via a Graph Neural Networkcited by 79
- 2019A Neural Model for Generating Natural Language Summaries of Program Subroutinescited by 76
- 2019TreeGen: A Tree-Based Transformer Architecture for Code Generationcited by 58
- 2018Graph2Seq: Graph to Sequence Learning with Attention-based Neural Networkscited by 36
- 2019Learning and Evaluating Contextual Embedding of Source Codecited by 33
Built on by
Citing papers per year: 2021: 2; 2022: 9; 2023: 9; 2024: 9; 2025: 10; 2026: 1.
40 papers.
Sort:
By area:
- 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 355
- 2021SynCoBERT: Syntax-Guided Multi-Modal Contrastive Pre-Training for Code Representationcited by 63
- 2022PanGu-Coder: Program Synthesis with Function-Level Language Modelingcited by 47
- 2023Natural Language Generation and Understanding of Big Code for AI-Assisted Programming: A Reviewcited by 32
- 2022On the Transferability of Pre-trained Language Models for Low-Resource Programming Languagescited by 30
- 2025Code Graph Model (CGM): A Graph-Integrated Large Language Model for Repository-Level Software Engineering Taskscited by 27
- 2024Code Representation Learning At Scalecited by 26
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkitcited by 22
- 2022Deep Learning Meets Software Engineering: A Survey on Pre-Trained Models of Source Codecited by 20
- 2023Multi-target Backdoor Attacks for Code Pre-trained Modelscited by 19
- 2021Towards Learning (Dis)-Similarity of Source Code from Program Contrastscited by 17
- 2023Exploring the Robustness of Large Language Models for Solving Programming Problemscited by 16
28 more
- 2022CODE-MVP: Learning to Represent Source Code from Multiple Views with Contrastive Pre-Trainingcited by 15
- 2025Large Language Models (LLMs) for Source Code Analysis: applications, models and datasetscited by 15
- 2024GALLa: Graph Aligned Large Language Models for Improved Source Code Understandingcited by 7
- 2022CommitBART: A Large Pre-trained Model for GitHub Commitscited by 6
- 2022Learning Program Representations with a Tree-Structured Transformercited by 6
- 2023An Unbiased Transformer Source Code Learning with Semantic Vulnerability Graphcited by 5
- 2023Abstract Syntax Tree for Programming Language Understanding and Representation: How Far Are We?cited by 5
- 2025Grammar-Based Code Representation: Is It a Worthy Pursuit for LLMs?cited by 5
- 2022A Survey of Deep Learning Models for Structural Code Understandingcited by 4
- 2024CodeGRAG: Bridging the Gap between Natural Language and Programming Language via Graphical Retrieval Augmented Generationcited by 4
- 2022Finding Reusable Machine Learning Components to Build Programming Language Processing Pipelinescited by 3
- 2023Neural Machine Translation for Code Generationcited by 3
- 2024Structured Code Representations Enable Data-Efficient Adaptation of Code Language Modelscited by 3
- 2024Towards Better Code Understanding in Decoder-Only Models with Contrastive Learningcited by 3
- 2024Code LLMs: A Taxonomy-based Surveycited by 3
- 2025Post-Incorporating Code Structural Knowledge into Pretrained Models via ICL for Code Translationcited by 3
- 2025On The Role of Pretrained Language Models in General-Purpose Text Embeddings: A Surveycited by 3
- 2026Token Optimization Strategies for LLM-Based Oracle-to-PostgreSQL Migrationcited by 3
- 2023APIContext2Com: Code Comment Generation by Incorporating Pre-Defined API Documentationcited by 2
- 2023Neuro-symbolic Zero-Shot Code Cloning with Cross-Language Intermediate Representationcited by 2
- 2025Speculative Decoding for Verilog: Speed and Quality, All in Onecited by 2
- 2025CCCI: Code Completion with Contextual Information for Complex Data Transfer Tasks Using Large Language Modelscited by 2
- 2024Text-to-Code Generation with Modality-relative Pre-trainingcited by 1
- 2024Analysing the Behaviour of Tree-Based Neural Networks in Regression Taskscited by 0
- 2024CogNarr Ecosystem: Facilitating Group Cognition at Scalecited by 0
- 2025LEANCODE: Understanding Models Better for Code Simplification of Pre-trained Large Language Modelscited by 0
- 2025Interpreting Performance Profiles with Deep Learningcited by 0
- 2025Resource-Efficient Automatic Software Vulnerability Assessment via Knowledge Distillation and Particle Swarm Optimizationcited by 0
- 2026Token Optimization Strategies for LLM-Based Oracle-to-PostgreSQL Migration27 May 2026
- 2025Interpreting Performance Profiles with Deep Learning1 Aug 2025
- 2025Resource-Efficient Automatic Software Vulnerability Assessment via Knowledge Distillation and Particle Swarm Optimization30 Jul 2025
- 2025On The Role of Pretrained Language Models in General-Purpose Text Embeddings: A Survey28 Jul 2025
- 2025Code Graph Model (CGM): A Graph-Integrated Large Language Model for Repository-Level Software Engineering Tasks22 May 2025
- 2025LEANCODE: Understanding Models Better for Code Simplification of Pre-trained Large Language Models20 May 2025
- 2025CCCI: Code Completion with Contextual Information for Complex Data Transfer Tasks Using Large Language Models29 Mar 2025
- 2025Post-Incorporating Code Structural Knowledge into Pretrained Models via ICL for Code Translation28 Mar 2025
- 2025Large Language Models (LLMs) for Source Code Analysis: applications, models and datasets21 Mar 2025
- 2025Speculative Decoding for Verilog: Speed and Quality, All in One18 Mar 2025
- 2025Grammar-Based Code Representation: Is It a Worthy Pursuit for LLMs?7 Mar 2025
- 2024Code LLMs: A Taxonomy-based Survey11 Dec 2024
28 more
- 2024GALLa: Graph Aligned Large Language Models for Improved Source Code Understanding6 Sep 2024
- 2024CogNarr Ecosystem: Facilitating Group Cognition at Scale11 Jul 2024
- 2024Towards Better Code Understanding in Decoder-Only Models with Contrastive Learning18 Jun 2024
- 2024Analysing the Behaviour of Tree-Based Neural Networks in Regression Tasks17 Jun 2024
- 2024CodeGRAG: Bridging the Gap between Natural Language and Programming Language via Graphical Retrieval Augmented Generation3 May 2024
- 2024Text-to-Code Generation with Modality-relative Pre-training8 Feb 2024
- 2024Code Representation Learning At Scale2 Feb 2024
- 2024Structured Code Representations Enable Data-Efficient Adaptation of Code Language Models19 Jan 2024
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkit30 Dec 2023
- 2023Abstract Syntax Tree for Programming Language Understanding and Representation: How Far Are We?1 Dec 2023
- 2023Natural Language Generation and Understanding of Big Code for AI-Assisted Programming: A Review4 Jul 2023
- 2023Exploring the Robustness of Large Language Models for Solving Programming Problems26 Jun 2023
- 2023Multi-target Backdoor Attacks for Code Pre-trained Models14 Jun 2023
- 2023Neural Machine Translation for Code Generation22 May 2023
- 2023Neuro-symbolic Zero-Shot Code Cloning with Cross-Language Intermediate Representation26 Apr 2023
- 2023An Unbiased Transformer Source Code Learning with Semantic Vulnerability Graph17 Apr 2023
- 2023APIContext2Com: Code Comment Generation by Incorporating Pre-Defined API Documentation3 Mar 2023
- 2022Learning Program Representations with a Tree-Structured Transformer18 Aug 2022
- 2022CommitBART: A Large Pre-trained Model for GitHub Commits17 Aug 2022
- 2022Finding Reusable Machine Learning Components to Build Programming Language Processing Pipelines11 Aug 2022
- 2022PanGu-Coder: Program Synthesis with Function-Level Language Modeling22 Jul 2022
- 2022Deep Learning Meets Software Engineering: A Survey on Pre-Trained Models of Source Code24 May 2022
- 2022CODE-MVP: Learning to Represent Source Code from Multiple Views with Contrastive Pre-Training4 May 2022
- 2022A Survey of Deep Learning Models for Structural Code Understanding3 May 2022
- 2022On the Transferability of Pre-trained Language Models for Low-Resource Programming Languages5 Apr 2022
- 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representation8 Mar 2022
- 2021Towards Learning (Dis)-Similarity of Source Code from Program Contrasts8 Oct 2021
- 2021SynCoBERT: Syntax-Guided Multi-Modal Contrastive Pre-Training for Code Representation10 Aug 2021
- 2023Multi-target Backdoor Attacks for Code Pre-trained Modelscited by 19
- 2023Multi-target Backdoor Attacks for Code Pre-trained Models14 Jun 2023
- 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 355
- 2021SynCoBERT: Syntax-Guided Multi-Modal Contrastive Pre-Training for Code Representationcited by 63
- 2022PanGu-Coder: Program Synthesis with Function-Level Language Modelingcited by 47
- 2023Natural Language Generation and Understanding of Big Code for AI-Assisted Programming: A Reviewcited by 32
- 2022On the Transferability of Pre-trained Language Models for Low-Resource Programming Languagescited by 30
- 2025Code Graph Model (CGM): A Graph-Integrated Large Language Model for Repository-Level Software Engineering Taskscited by 27
- 2024Code Representation Learning At Scalecited by 26
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkitcited by 22
- 2022Deep Learning Meets Software Engineering: A Survey on Pre-Trained Models of Source Codecited by 20
- 2021Towards Learning (Dis)-Similarity of Source Code from Program Contrastscited by 17
- 2023Exploring the Robustness of Large Language Models for Solving Programming Problemscited by 16
- 2022CODE-MVP: Learning to Represent Source Code from Multiple Views with Contrastive Pre-Trainingcited by 15
12 most cited of 36 All 36 (JSON)
- 2026Token Optimization Strategies for LLM-Based Oracle-to-PostgreSQL Migration27 May 2026
- 2025Interpreting Performance Profiles with Deep Learning1 Aug 2025
- 2025Resource-Efficient Automatic Software Vulnerability Assessment via Knowledge Distillation and Particle Swarm Optimization30 Jul 2025
- 2025On The Role of Pretrained Language Models in General-Purpose Text Embeddings: A Survey28 Jul 2025
- 2025Code Graph Model (CGM): A Graph-Integrated Large Language Model for Repository-Level Software Engineering Tasks22 May 2025
- 2025LEANCODE: Understanding Models Better for Code Simplification of Pre-trained Large Language Models20 May 2025
- 2025CCCI: Code Completion with Contextual Information for Complex Data Transfer Tasks Using Large Language Models29 Mar 2025
- 2025Post-Incorporating Code Structural Knowledge into Pretrained Models via ICL for Code Translation28 Mar 2025
- 2025Large Language Models (LLMs) for Source Code Analysis: applications, models and datasets21 Mar 2025
- 2025Grammar-Based Code Representation: Is It a Worthy Pursuit for LLMs?7 Mar 2025
- 2024Code LLMs: A Taxonomy-based Survey11 Dec 2024
- 2024CogNarr Ecosystem: Facilitating Group Cognition at Scale11 Jul 2024
12 newest of 36 All 36 (JSON)