Mining Program Properties From Neural Networks Trained on Source Code Embeddings

03/09/2021
by   Martina Saletta, et al.
0

In this paper, we propose a novel approach for mining different program features by analysing the internal behaviour of a deep neural network trained on source code. Using an unlabelled dataset of Java programs and three different embedding strategies for the methods in the dataset, we train an autoencoder for each program embedding and then we test the emerging ability of the internal neurons in autonomously building internal representations for different program features. We defined three binary classification labelling policies inspired by real programming issues, so to test the performance of each neuron in classifying programs accordingly to these classification rules, showing that some neurons can actually detect different program properties. We also analyse how the program representation chosen as input affects the performance on the aforementioned tasks. On the other hand, we are interested in finding the overall most informative neurons in the network regardless of a given task. To this aim, we propose and evaluate two methods for ranking neurons independently of any property. Finally, we discuss how these ideas can be applied in different settings for simplifying the programmers' work, for instance if included in environments such as software repositories or code editors.

READ FULL TEXT
research
07/31/2020

On the Generalizability of Neural Program Analyzers with respect to Semantic-Preserving Program Transformations

With the prevalence of publicly available source code repositories to tr...
research
05/13/2019

Learning Scalable and Precise Representation of Program Semantics

Neural program embedding has shown potential in aiding the analysis of l...
research
05/27/2019

COSET: A Benchmark for Evaluating Neural Program Embeddings

Neural program embedding can be helpful in analyzing large software, a t...
research
05/01/2023

Interpreting Pretrained Source-code Models using Neuron Redundancy Analyses

Neural code intelligence models continue to be 'black boxes' to the huma...
research
02/07/2020

What You See is What it Means! Semantic Representation Learning of Code based on Visualization and Transfer Learning

Recent successes in training word embeddings for NLP tasks have encourag...
research
01/29/2021

The significance of user-defined identifiers in Java source code authorship identification

When writing source code, programmers have varying levels of freedom whe...
research
09/27/2021

Self-Replicating Neural Programs

In this work, a neural network is trained to replicate the code that tra...

Please sign up or login with your details

Forgot password? Click here to reset