Open Vocabulary Learning on Source Code with a Graph-Structured Cache
Milan Cvitkovic, Badal Singh, Anima Anandkumar

TL;DR
This paper introduces a graph-structured cache to handle open vocabulary challenges in source code modeling, significantly improving performance on code completion and variable naming tasks using graph neural networks.
Contribution
It proposes a novel graph-structured cache mechanism that enhances neural models' ability to handle open vocabulary in source code, improving accuracy in code understanding tasks.
Findings
Over 100% improvement in variable naming accuracy
Enhanced performance on code completion tasks
Moderate increase in computation time
Abstract
Machine learning models that take computer program source code as input typically use Natural Language Processing (NLP) techniques. However, a major challenge is that code is written using an open, rapidly changing vocabulary due to, e.g., the coinage of new variable and method names. Reasoning over such a vocabulary is not something for which most NLP methods are designed. We introduce a Graph-Structured Cache to address this problem; this cache contains a node for each new word the model encounters with edges connecting each word to its occurrences in the code. We find that combining this graph-structured cache strategy with recent Graph-Neural-Network-based models for supervised learning on code improves the models' performance on a code completion task and a variable naming task --- with over relative improvement on the latter --- at the cost of a moderate increase in…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsMachine Learning in Materials Science · Machine Learning and Data Classification · Software Engineering Research
