Lune

AAAI2020顶会

TreeGen: A Tree-Based Transformer Architecture for Code Generation

Zeyu Sun, Qihao Zhu, Yingfei Xiong, Yican Sun, Lili Mou, Lu Zhang

摘要

A code generation system generates programming language code based on an input natural language description. State-of-the-art approaches rely on neural networks for code generation. However, these code generators suffer from two problems. One is the long dependency problem, where a code element often depends on another far-away code element. A variable reference, for example, depends on its definition, which may appear quite a few lines before. The other problem is structure modeling, as programs contain rich structural information. In this paper, we propose a novel tree-based neural architecture, TreeGen, for code generation. TreeGen uses the attention mechanism of Transformers to alleviate the long-dependency problem, and introduces a novel AST reader (encoder) to incorporate grammar rules and AST structures into the network. We evaluated TreeGen on a Python benchmark, HearthStone, and two semantic parsing benchmarks, ATIS and GEO. TreeGen outperformed the previous state-of-the-art approach by 4.5 percentage points on HearthStone, and achieved the best accuracy among neural network-based approaches on ATIS (89.1%) and GEO (89.6%). We also conducted an ablation test to better understand each component of our model.

问 Lune

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

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

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

可以从这些问题问起

Lune 可以查阅

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

获取答案

免费开始,无需绑卡

脉络

  • KNOD: Domain Knowledge Distilled Tree Decoder for Automated Program Repair 引用了 A syntax-guided edit decoder for neural program repair
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper41

  1. A syntax-guided edit decoder for neural program repairQihao Zhu, Zeyu Sun, Yuan-an Xiao, Wenjie Zhang 等FSE 2021 · 214 次引用
  2. CoProtector: Protect Open-Source Code against Unauthorized Training Usage with Data PoisoningZhensu Sun, Xiaoning Du, Fu Song, Mingze Ni 等WWW 2022 · 95 次引用
  3. KNOD: Domain Knowledge Distilled Tree Decoder for Automated Program RepairNan Jiang, Thibaud Lutellier, Yiling Lou, Lin Tan 等ICSE 2023 · 55 次引用
  4. Empirical study of transformers for source codeNadezhda Chirkova, Sergey TroshinFSE 2021 · 53 次引用
  5. SkCoder: A Sketch-based Approach for Automatic Code GenerationJia Li, Yongmin Li, Ge Li, Zhi Jin 等ICSE 2023 · 50 次引用

相关 Paper

  1. Analysis of Tree-Structured Architectures for Code GenerationSamip Dahal, Adyasha Maharana, Mohit BansalACL Findings 2021 · 9 次引用
  2. Code Summarization with Structure-induced TransformerHongqiu Wu, Hai Zhao, Min ZhangACL Findings 2021 · 70 次引用
  3. AST-Trans: Code Summarization with Efficient Tree-Structured AttentionZe Tang, Xiaoyu Shen, Chuanyi Li, Jidong Ge 等ICSE 2022 · 57 次引用
  4. DRTS Parsing with Structure-Aware Encoding and DecodingQiankun Fu, Yue Zhang, Jiangming Liu, Meishan ZhangACL 2020 · 8 次引用
  5. Graph-tree Fusion Model with Bidirectional Information Propagation for Long Document ClassificationSudipta Singha Roy, Xindi Wang, Robert E. Mercer, Frank RudziczEMNLP Findings 2024 · 1 次引用
黄昏的海面,两侧是细线勾勒的悬崖