CodeTrek: Flexible Modeling of Code using an Extensible Relational Representation
Pardis Pashakhanloo, Aaditya Naik, Yuepeng Wang, Hanjun Dai, Petros Maniatis, Mayur Naik
摘要
Designing a suitable representation for code-reasoning tasks is challenging in aspects such as the kinds of program information to model, how to combine them, and how much context to consider. We propose CodeTrek, a deep learning approach that addresses these challenges by representing codebases as databases that conform to rich relational schemas. The relational representation not only allows CodeTrek to uniformly represent diverse kinds of program information, but also to leverage program-analysis queries to derive new semantic relations, which can be readily incorporated without further architectural engineering. CodeTrek embeds this relational representation using a set of walks that can traverse different relations in an unconstrained fashion, and incorporates all relevant attributes along the way. We evaluate CodeTrek on four diverse and challenging Python tasks: variable misuse, exception prediction, unused definition, and variable shadowing. CodeTrek achieves an accuracy of 91%, 63%, 98%, and 94% on these tasks respectively, and outperforms state-of-the-art neural models by 2-19% points.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 3 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Learning and Evaluating Contextual Embedding of Source Code 引用了 Global Relational Models of Source Code
- Code Prediction by Feeding Trees to Transformers 引用了 Global Relational Models of Source Code
- Multi-task Learning based Pre-trained Language Model for Code Completion 引用了 Code Prediction by Feeding Trees to Transformers
引用它的顶会 Paper3
- CodePlan: Repository-Level Coding using LLMs and PlanningRamakrishna Bairi, Atharv Sonwane, Aditya Kanade, Vageesh D. C. 等FSE 2024 · 67 次引用
- On Grounded Planning for Embodied Tasks with Language ModelsBill Yuchen Lin, Chengsong Huang, Qian Liu, Wenda Gu 等AAAI 2023 · 52 次引用
- Statically Contextualizing Large Language Models with Typed HolesAndrew Blinn, Xiang Li, June Hyung Kim, Cyrus OmarOOPSLA 2024 · 10 次引用
它引用的 Paper12
- Learning and Evaluating Contextual Embedding of Source CodeAditya Kanade, Petros Maniatis, Gogul Balakrishnan, Kensen ShiICML 2020 · 438 次引用
- Global Relational Models of Source CodeVincent J. Hellendoorn, Charles Sutton, Rishabh Singh, Petros Maniatis 等ICLR 2020 · 252 次引用
- Hoppity: Learning Graph Transformations to Detect and Fix Bugs in ProgramsElizabeth Dinella, Hanjun Dai, Ziyang Li, Mayur Naik 等ICLR 2020 · 212 次引用
- Code Prediction by Feeding Trees to TransformersSeohyun Kim, Jinman Zhao, Yuchi Tian, Satish ChandraICSE 2021 · 179 次引用
- Multi-task Learning based Pre-trained Language Model for Code CompletionFang Liu, Ge Li, Yunfei Zhao, Zhi JinASE 2020 · 162 次引用
相关 Paper
- Learning Graph Structure With A Finite-State Automaton LayerDaniel D. Johnson, Hugo Larochelle, Daniel TarlowNeurIPS 2020 · 17 次引用
- TreeCaps: Tree-Based Capsule Networks for Source Code ProcessingNghi D. Q. Bui, Yijun Yu, Lingxiao JiangAAAI 2021 · 44 次引用
- Fault Localization with Code Coverage Representation LearningYi Li, Shaohua Wang, Tien N. NguyenICSE 2021 · 120 次引用
- Blended, precise semantic program embeddingsKe Wang, Zhendong SuPLDI 2020 · 53 次引用
- Keeping Pace with Ever-Increasing Data: Towards Continual Learning of Code Intelligence ModelsShuzheng Gao, Hongyu Zhang, Cuiyun Gao, Chaozheng WangICSE 2023 · 14 次引用
