Exploring Software Naturalness through Neural Language Models

06/22/2020
by   Luca Buratti, et al.
0

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 language model 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 language models work on raw source code. This work is the first to investigate whether such language models can discover AST features automatically. To achieve this, we introduce a sequence labeling task that directly probes the language models understanding of AST. Our results show that transformer based language models 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.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
06/22/2020

Exploring Software Naturalness throughNeural Language Models

The Software Naturalness hypothesis argues that programming languages ca...
research
04/07/2022

Transformer-Based Language Models for Software Vulnerability Detection: Performance, Model's Security and Platforms

The large transformer-based language models demonstrate excellent perfor...
research
07/31/2020

Language Modelling for Source Code with Transformer-XL

It has been found that software, like natural language texts, exhibits "...
research
08/28/2022

Measuring design compliance using neural language models – an automotive case study

As the modern vehicle becomes more software-defined, it is beginning to ...
research
08/18/2023

Exploring Sampling Techniques for Generating Melodies with a Transformer Language Model

Research in natural language processing has demonstrated that the qualit...
research
09/02/2023

LinkTransformer: A Unified Package for Record Linkage with Transformer Language Models

Linking information across sources is fundamental to a variety of analys...
research
08/07/2023

Evaluating and Explaining Large Language Models for Code Using Syntactic Structures

Large Language Models (LLMs) for code are a family of high-parameter, tr...

Please sign up or login with your details

Forgot password? Click here to reset