Lune

EMNLP2022顶会

Rethinking Positional Encoding in Tree Transformer for Code Representation

Han Peng, Ge Li, Yunfei Zhao, Zhi Jin

摘要

Transformers are now widely used in code representation, and several recent works further develop tree Transformers to capture the syntactic structure in source code. Specifically, novel tree positional encodings have been proposed to incorporate inductive bias into Transformer. In this work, we propose a novel tree Transformer encoding node positions based on our new description method for tree structures. Technically, local and global soft bias shown in previous works is both introduced as positional encodings of our Transformer model. Our model finally outperforms strong baselines on code summarization and completion tasks across two languages, demonstrating our model's effectiveness. Besides, extensive experiments and ablation study shows that combining both local and global paradigms is still helpful in improving model performance. We release our code at https://github.com/ AwdHanPeng/TreeTransformer .

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 3 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Transformers over Directed Acyclic Graphs 引用了 Do Transformers Really Perform Badly for Graph Representation?
  • Transformers over Directed Acyclic Graphs 引用了 Code Prediction by Feeding Trees to Transformers
  • Transformers over Directed Acyclic Graphs 引用了 TreeGen: A Tree-Based Transformer Architecture for Code Generation
  • Code Prediction by Feeding Trees to Transformers 引用了 Global Relational Models of Source Code
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper3

  1. Transformers over Directed Acyclic GraphsYuankai Luo, Veronika Thost, Lei ShiNeurIPS 2023 · 43 次引用
  2. GALLa: Graph Aligned Large Language Models for Improved Source Code UnderstandingZiyin Zhang, Hang Yu, Sage Lee, Peng Di 等ACL 2025 · 11 次引用
  3. The Chilling: Identifying Strategic Antisocial Behavior Online and Examining the Impact on JournalistsYian Wang, Mukhilshankar Umashankar, Eshwar Chandrasekharan, Hari SundaramCSCW 2025 · 1 次引用

它引用的 Paper14

  1. Deberta: decoding-Enhanced Bert with Disentangled AttentionPengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu ChenICLR 2021 · 3,729 次引用
  2. Do Transformers Really Perform Badly for Graph Representation?Chengxuan Ying, Tianle Cai, Shengjie Luo, Shuxin Zheng 等NeurIPS 2021 · 1,632 次引用
  3. Global Relational Models of Source CodeVincent J. Hellendoorn, Charles Sutton, Rishabh Singh, Petros Maniatis 等ICLR 2020 · 252 次引用
  4. TreeGen: A Tree-Based Transformer Architecture for Code GenerationZeyu Sun, Qihao Zhu, Yingfei Xiong, Yican Sun 等AAAI 2020 · 196 次引用
  5. Code Prediction by Feeding Trees to TransformersSeohyun Kim, Jinman Zhao, Yuchi Tian, Satish ChandraICSE 2021 · 179 次引用

相关 Paper

  1. Integrating Tree Path in Transformer for Code RepresentationHan Peng, Ge Li, Wenhan Wang, Yunfei Zhao 等NeurIPS 2021 · 56 次引用
  2. Code Summarization with Structure-induced TransformerHongqiu Wu, Hai Zhao, Min ZhangACL Findings 2021 · 70 次引用
  3. Learning Sequential and Structural Information for Source Code SummarizationYunSeok Choi, JinYeong Bak, CheolWon Na, Jee-Hyong LeeACL Findings 2021 · 34 次引用
  4. AST-Trans: Code Summarization with Efficient Tree-Structured AttentionZe Tang, Xiaoyu Shen, Chuanyi Li, Jidong Ge 等ICSE 2022 · 57 次引用
  5. Empirical study of transformers for source codeNadezhda Chirkova, Sergey TroshinFSE 2021 · 53 次引用
黄昏的海面,两侧是细线勾勒的悬崖