An intelligent tool for type annotations in Python would increase the productivity of developers. Python is a dynamic programming language, and predicting types using static analysis is difficult. Existing techniques for type prediction use deep learning models originated in the area of Natural Language Processing. These models depend on the quality of embeddings for source code tokens. We compared approaches for pre- training embeddings for source code. Specifically, we compared FastText embeddings to embeddings trained with Graph Neural Networks (GNN). Our experiments showed that GNN embeddings outperformed FastText embeddings on the task of type prediction. Moreover, they seem to encode complementary information since the prediction quality increases when both types of embeddings are used

Ivanov V, Romanov V, Succi G (2021). Predicting Type Annotations for Python using Embeddings from Graph Neural Networks. SciTePress [10.5220/0010500305480556].

Predicting Type Annotations for Python using Embeddings from Graph Neural Networks

Succi G
2021

Abstract

An intelligent tool for type annotations in Python would increase the productivity of developers. Python is a dynamic programming language, and predicting types using static analysis is difficult. Existing techniques for type prediction use deep learning models originated in the area of Natural Language Processing. These models depend on the quality of embeddings for source code tokens. We compared approaches for pre- training embeddings for source code. Specifically, we compared FastText embeddings to embeddings trained with Graph Neural Networks (GNN). Our experiments showed that GNN embeddings outperformed FastText embeddings on the task of type prediction. Moreover, they seem to encode complementary information since the prediction quality increases when both types of embeddings are used
2021
Proceedings of the 23rd International Conference on Enterprise Information Systems (ICEIS 2021)
548
556
Ivanov V, Romanov V, Succi G (2021). Predicting Type Annotations for Python using Embeddings from Graph Neural Networks. SciTePress [10.5220/0010500305480556].
Ivanov V; Romanov V; Succi G
File in questo prodotto:
File Dimensione Formato  
Succi.C325.PredictingTypeAnnotationsforPythonUsingEmbeddingsFromGraph.pdf

accesso aperto

Tipo: Versione (PDF) editoriale
Licenza: Licenza per Accesso Aperto. Creative Commons Attribuzione - Non commerciale - Non opere derivate (CCBYNCND)
Dimensione 3.01 MB
Formato Adobe PDF
3.01 MB Adobe PDF Visualizza/Apri

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/11585/892503
Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus 5
  • ???jsp.display-item.citation.isi??? 4
social impact