paper-with-me

홈 › Papers

AST-Transformer: Encoding Abstract Syntax Trees Efficiently for Code Summarization

2021-12-02 · Ze Tang, Chuanyi Li, Jidong Ge, Xiaoyu Shen, Zheling Zhu, Bin Luo

Code summarization aims to generate brief natural language descriptions for source code. As source code is highly structured and follows strict programming language grammars, its Abstract Syntax Tree (AST) is often leveraged to inform the encoder about the structural information. However, ASTs are usually much longer than the source code. Current approaches ignore the size limit and simply feed the whole linearized AST into the encoder. To address this problem, we propose AST-Transformer to efficiently encode tree-structured ASTs. Experiments show that AST-Transformer outperforms the state-of-arts by a substantial margin while being able to reduce $90\sim95\%$ of the computational complexity in the encoding process.

📄 PDF Abstract BibTeX arXiv:2112.01184

Code (0)

등록된 구현이 없습니다.

Tasks

Code Summarization

Similar Papers 제목 키워드 기반

A Structural Transformer with Relative Positions in Trees for Code-to-Sequence Tasks

2020-06-04 · Anonymous

We suggest two approaches to incorporate syntactic information into transformer models encoding trees (e.g. abstract syntax trees) and generating sequences. First, we use self-attention with relative position representat…

Code SummarizationMachine TranslationPositionSource Code Summarization+1

Syntax-BERT: Improving Pre-trained Transformers with Syntax Trees

2021-03-07 · EACL 2021 2 · Jiangang Bai, Yujing Wang, Yiren Chen, Yaming Yang 외

Pre-trained language models like BERT achieve superior performances in various NLP tasks without explicit consideration of syntactic information. Meanwhile, syntactic information has been proved to be crucial for the suc…

Natural Language Understanding

Sparse Attention-Based Neural Networks for Code Classification

2023-11-11 · Ziyang Xiang, Zaixi Zhang, Qi Liu

Categorizing source codes accurately and efficiently is a challenging problem in real-world programming education platform management. In recent years, model-based approaches utilizing abstract syntax trees (ASTs) have b…

ClassificationCode Classification

Explainable Natural Language to Bash Translation using Abstract Syntax Tree

2021-11-01 · CoNLL (EMNLP) 2021 11 · Shikhar Bharadwaj, Shirish Shevade

Natural language processing for program synthesis has been widely researched. In this work, we focus on generating Bash commands from natural language invocations with explanations. We propose a novel transformer based s…

Program SynthesisTranslation

Improving Code Summarization with Block-wise Abstract Syntax Tree Splitting

2021-03-14 · Chen Lin, Zhichao Ouyang, Junqing Zhuang, Jianqiang Chen 외

Automatic code summarization frees software developers from the heavy burden of manual commenting and benefits software development and maintenance. Abstract Syntax Tree (AST), which depicts the source code's syntactic s…

Code SummarizationSource Code Summarization