# Mining Program Properties From Neural Networks Trained on Source Code Embeddings

**Authors:** Martina Saletta, Claudio Ferretti  
**arXiv:** [2103.05442](https://arxiv.org/abs/2103.05442)  
**Date:** 2021-03-09  
**Summary page:** https://www.summarizepaper.com/en/arxiv-id/2103.05442v1/

## Key points

- Saletta and Ferretti propose a novel approach for mining program features by analyzing the internal behavior of a deep neural network trained on source code.
- They use an unlabelled dataset of Java programs and three different embedding strategies to train an autoencoder for each program embedding.
- The authors test the ability of internal neurons in autonomously building internal representations for different program features by defining three binary classification labelling policies inspired by real programming issues.
- Some neurons can detect different program properties, and the authors analyze how the chosen program representation affects performance on these tasks.
- Two methods are proposed and evaluated for ranking neurons independently of any property to find the overall most informative neurons in the network regardless of a given task.
- These approaches could help automate certain programming tasks by identifying relevant features within code automatically if included in environments such as software repositories or code editors.

## Summary

In their paper titled "Mining Program Properties From Neural Networks Trained on Source Code Embeddings," Martina Saletta and Claudio Ferretti propose a novel approach for mining different program features by analyzing the internal behavior of a deep neural network trained on source code. The authors use an unlabelled dataset of Java programs and three different embedding strategies for the methods in the dataset to train an autoencoder for each program embedding. They then test the emerging ability of the internal neurons in autonomously building internal representations for different program features. To evaluate their approach, the authors define three binary classification labelling policies inspired by real programming issues and test the performance of each neuron in classifying programs accordingly to these classification rules, showing that some neurons can actually detect different program properties. Additionally, they analyze how the program representation chosen as input affects performance on these tasks. The authors are also interested in finding the overall most informative neurons in the network regardless of a given task. To this aim, they propose and evaluate two methods for ranking neurons independently of any property. Finally, Saletta and Ferretti discuss how these ideas can be applied in different settings for simplifying programmers' work. For instance, if included in environments such as software repositories or code editors, these approaches could help automate certain programming tasks by identifying relevant features within code automatically. Overall, this paper presents a promising new approach to mining program properties using deep neural networks trained on source code embeddings which could simplify programming tasks and help automate certain processes within software repositories or code editors.
