# Import2vec - Learning Embeddings for Software Libraries

**Authors:** Bart Theeten, Frederik Vandeputte, Tom Van Cutsem

arXiv: 1904.03990 · 2019-04-09

## TL;DR

This paper introduces a method to learn semantic embeddings for software libraries using NLP techniques, capturing meaningful relationships and improving tasks like search and classification.

## Contribution

It applies word embedding techniques to software libraries, creating representations that reflect their semantic relationships based on import usage in source code.

## Key findings

- Library vectors capture meaningful semantic relationships.
- Embeddings reveal ecosystem-specific library associations.
- Results improve downstream tasks like search and classification.

## Abstract

We consider the problem of developing suitable learning representations (embeddings) for library packages that capture semantic similarity among libraries. Such representations are known to improve the performance of downstream learning tasks (e.g. classification) or applications such as contextual search and analogical reasoning.   We apply word embedding techniques from natural language processing (NLP) to train embeddings for library packages ("library vectors"). Library vectors represent libraries by similar context of use as determined by import statements present in source code. Experimental results obtained from training such embeddings on three large open source software corpora reveals that library vectors capture semantically meaningful relationships among software libraries, such as the relationship between frameworks and their plug-ins and libraries commonly used together within ecosystems such as big data infrastructure projects (in Java), front-end and back-end web development frameworks (in JavaScript) and data science toolkits (in Python).

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/1904.03990/full.md

## Figures

18 figures with captions in the complete paper: https://tomesphere.com/paper/1904.03990/full.md

## References

25 references — full list in the complete paper: https://tomesphere.com/paper/1904.03990/full.md

---
Source: https://tomesphere.com/paper/1904.03990