Papers
Topics
Authors
Recent
2000 character limit reached

Exploring Software Naturalness through Neural Language Models

Published 22 Jun 2020 in cs.CL, cs.LG, and cs.PL | (2006.12641v2)

Abstract: The Software Naturalness hypothesis argues that programming languages can be understood through the same techniques used in natural language processing. We explore this hypothesis through the use of a pre-trained transformer-based LLM to perform code analysis tasks. Present approaches to code analysis depend heavily on features derived from the Abstract Syntax Tree (AST) while our transformer-based LLMs work on raw source code. This work is the first to investigate whether such LLMs can discover AST features automatically. To achieve this, we introduce a sequence labeling task that directly probes the LLMs understanding of AST. Our results show that transformer based LLMs achieve high accuracy in the AST tagging task. Furthermore, we evaluate our model on a software vulnerability identification task. Importantly, we show that our approach obtains vulnerability identification results comparable to graph based approaches that rely heavily on compilers for feature extraction.

Citations (93)

Summary

Paper to Video (Beta)

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Continue Learning

We haven't generated follow-up questions for this paper yet.

Collections

Sign up for free to add this paper to one or more collections.