Lune

摘要

Code representation is a key step in the application of AI in software engineering. Generic NLP representations are e ective but do not exploit all the rich structure inherent to code. Recent work has focused on extracting abstract syntax trees (AST) and integrating their structural information into code representations. These AST-enhanced representations advanced the state of the art and accelerated new applications of AI to software engineering. ASTs, however, neglect important aspects of code structure, notably control and data ow, leaving some potentially relevant code signal unexploited. For example, purely image-based representations perform nearly as well as AST-based representations, despite the fact that they must learn to even recognize tokens, let alone their semantics. This result, from prior work, is strong evidence that these new code representations can still be improved; it also raises the question of just what signal image-based approaches are exploiting. We answer this question. We show that code is spatial and exploit this fact to propose CodeGrid, a new representation that embeds tokens into a grid that preserves code layout. Unlike some of the existing state of the art, CodeGrid is agnostic to the downstream task: whether that task is generation or classi cation, CodeGrid can complement the learning algorithm with spatial signal. For example, we show that CNNs, which are inherently spatially-aware models, can exploit CodeGrid outputs to e ectively tackle fundamental software engineering tasks, such as code classi cation, code clone detection and vulnerability detection. PixelCNN leverages CodeGrid's grid representations to achieve code completion. Through extensive experiments, we validate our spatial code hypothesis, quantifying model performance as we vary the degree to which the representation preserves the grid. To demonstrate its generality, we show that CodeGrid augments models, improving their performance on a range of tasks. On clone detection, CodeGrid improves ASTNN's performance by 3.3% F1 score. * Some work carried out while a visiting scholar at Google DeepMind.

问 Lune

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

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

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

可以从这些问题问起

Lune 可以查阅

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

获取答案

免费开始,无需绑卡

脉络

  • Detecting Semantic Clones of Unseen Functionality 引用了 CodeBERT: A Pre-Trained Model for Programming and Natural Languages
  • Multi-task Learning based Pre-trained Language Model for Code Completion 引用了 CodeBERT: A Pre-Trained Model for Programming and Natural Languages
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper1

  1. Detecting Semantic Clones of Unseen FunctionalityKonstantinos Kitsios, Francesco Sovrano, Earl T. Barr, Alberto BacchelliASE 2025 · 1 次引用

它引用的 Paper6

  1. CodeBERT: A Pre-Trained Model for Programming and Natural LanguagesZhangyin Feng, Daya Guo, Duyu Tang, Nan Duan 等EMNLP Findings 2020 · 2,828 次引用
  2. VUDDY: A Scalable Approach for Vulnerable Code Clone DiscoverySeulbae Kim, Seunghoon Woo, Heejo Lee, Hakjoo OhS&P 2017 · 388 次引用
  3. Multi-task Learning based Pre-trained Language Model for Code CompletionFang Liu, Ge Li, Yunfei Zhao, Zhi JinASE 2020 · 162 次引用
  4. Structural Language Models of CodeUri Alon, Roy Sadaka, Omer Levy, Eran YahavICML 2020 · 115 次引用
  5. Software visualization and deep transfer learning for effective software defect predictionJinyin Chen, Keke Hu, Yue Yu, Zhuangzhi Chen 等ICSE 2020 · 89 次引用

相关 Paper

  1. Comparison and Evaluation of Clone Detection Techniques with Different Code RepresentationsYuekun Wang, Yuhang Ye, Yueming Wu, Weiwei Zhang 等ICSE 2023 · 15 次引用
  2. Tritor: Detecting Semantic Code Clones by Building Social Network-Based Triads ModelDeqing Zou, Siyue Feng, Yueming Wu, Wenqi Suo 等FSE 2023 · 6 次引用
  3. The Natural Geometry of Code: Hyperbolic Representation Learning for Program ReasoningWeilin ZhouICLR 2026
  4. Functional code clone detection with syntax and semantics fusion learningChunrong Fang, Zixi Liu, Yangyang Shi, Jeff Huang 等ISSTA 2020 · 125 次引用
  5. Disentangled Code Representation Learning for Multiple Programming LanguagesJingfeng Zhang, Haiwen Hong, Yin Zhang, Yao Wan 等ACL Findings 2021 · 16 次引用
黄昏的海面,两侧是细线勾勒的悬崖