Neural Code Comprehension: A Learnable Representation of Code Semantics
원문 초록
With the recent success of embeddings in natural language processing, research has been conducted into applying similar methods to code analysis. Most works attempt to process the code directly or use a syntactic tree representation, treating it like sentences written in a natural language. However, none of the existing methods are sufficient to comprehend program semantics robustly, due to structural features such as function calls, branching, and interchangeable order of statements. In this paper, we propose a novel processing technique to learn code semantics, and apply it to a variety of program analysis tasks. In particular, we stipulate that a robust distributional hypothesis of code applies to both human- and machine-generated programs. Following this hypothesis, we define an embedding space, inst2vec, based on an Intermediate Representation (IR) of the code that is independent of the source programming language. We provide a novel definition of contextual flow for this IR, leveraging both the underlying data- and control-flow of the program. We then analyze the embeddings qualitatively using analogies and clustering, and evaluate the learned representation on three different high-level tasks. We show that even without fine-tuning, a single RNN architecture and fixed inst2vec embeddings outperform specialized approaches for performance prediction (compute device mapping, optimal thread coarsening); and algorithm classification from raw code (104 classes), where we set a new state-of-the-art.
함께 살펴볼 논문
공통 태그를 근거로 연결했습니다. 실제 인용 관계나 논문의 우수성을 뜻하지 않습니다.
Tri-Learn Graph Fusion Network for Attributed Graph Clustering
Car Object Counting and Position Estimation via Extension of the CLIP-EBC Framework
HERCULES: Hierarchical Embedding-based Recursive Clustering Using LLMs for Efficient Summarization
MiCo: Multiple Instance Learning with Context-Aware Clustering for Whole Slide Image Analysis
Self-supervised Learning of Echocardiographic Video Representations via Online Cluster Distillation
Structural-Spectral Graph Convolution with Evidential Edge Learning for Hyperspectral Image Clustering
토론
이 논문과 연결된 포럼 글이 아직 없습니다.