Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
119 tokens/sec
GPT-4o
56 tokens/sec
Gemini 2.5 Pro Pro
43 tokens/sec
o3 Pro
6 tokens/sec
GPT-4.1 Pro
47 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

GraphCode2Vec: Generic Code Embedding via Lexical and Program Dependence Analyses (2112.01218v2)

Published 2 Dec 2021 in cs.SE

Abstract: Code embedding is a keystone in the application of machine learning on several Software Engineering (SE) tasks. To effectively support a plethora of SE tasks, the embedding needs to capture program syntax and semantics in a way that is generic. To this end, we propose the first self-supervised pre-training approach (called GraphCode2Vec) which produces task-agnostic embedding of lexical and program dependence features. GraphCode2Vec achieves this via a synergistic combination of code analysis and Graph Neural Networks. GraphCode2Vec is generic, it allows pre-training, and it is applicable to several SE downstream tasks. We evaluate the effectiveness of GraphCode2Vec on four (4) tasks (method name prediction, solution classification, mutation testing and overfitted patch classification), and compare it with four (4) similarly generic code embedding baselines (Code2Seq, Code2Vec, CodeBERT, GraphCodeBERT) and 7 task-specific, learning-based methods. In particular, GraphCode2Vec is more effective than both generic and task-specific learning-based baselines. It is also complementary and comparable to GraphCodeBERT (a larger and more complex model). We also demonstrate through a probing and ablation study that GraphCode2Vec learns lexical and program dependence features and that self-supervised pre-training improves effectiveness.

User Edit Pencil Streamline Icon: https://streamlinehq.com
Authors (9)
  1. Wei Ma (106 papers)
  2. Mengjie Zhao (35 papers)
  3. Ezekiel Soremekun (13 papers)
  4. Qiang Hu (149 papers)
  5. Jie Zhang (847 papers)
  6. Mike Papadakis (64 papers)
  7. Maxime Cordy (61 papers)
  8. Xiaofei Xie (104 papers)
  9. Yves Le Traon (83 papers)
Citations (28)

Summary

We haven't generated a summary for this paper yet.