2018/10/18 by Milan Cvitkovic, Cvitkovic, Milan, Badal Singh +3 · 1 citation
Computer Science · Materials Science · #FOS: Computer and information sciences #Machine Learning (cs.LG) #Machine Learning (stat.ML) #Machine Learning and Data Classification #Machine Learning in Materials Science #Software Engineering Research
paper · pdf · doi:10.48550/arxiv.1810.08305
openalex publication_date 2018/10/18 · openalex created_date 2025/10/10 · openalex updated_date 2026/08/01
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 100% relative improvement on the latter --- at the cost of a moderate increase in computation time.