Type4py: Practical Deep Similarity Learning-based Type Inference For Python
2021 Β· Amir M. Mir, Evaldas Latoskinas, Sebastian Proksch, et al.
Abstract
Dynamic languages, such as Python and Javascript, trade static typing for developer flexibility and productivity. Lack of static typing can cause run-time exceptions and is a major factor for weak IDE support. To alleviate these issues, PEP 484 introduced optional type annotations for Python. As retrofitting types to existing codebases is error-prone and laborious, machine learning (ML)-based approaches have been proposed to enable automatic type inference based on existing, partially annotated codebases. However, previous ML-based approaches are trained and evaluated on human-provided type annotations, which might not always be sound, and hence this may limit the practicality for real-world usage. In this paper, we present Type4Py, a deep similarity learning-based hierarchical neural network model. It learns to discriminate between similar and dissimilar types in a high-dimensional space, which results in clusters of types. Likely types for arguments, variables, and return values can
Authors
(none)
Tags
Stats
Related papers
- Metric Learning By Similarity Network For Deep Semi-supervised Learning (2020)3.58
- It's The Best Only When It Fits You Most: Finding Related Models For Serving Based On Dynamic Locality Sensitive Hashing (2020)0.00
- Words Are All You Need? Language As An Approximation For Human Similarity Judgments (2022)0.00
- Learning Deep Representation Of Multityped Objects And Tasks (2016)0.00
- Deep Graph Similarity Learning: A Survey (2019)13.97
- Improving Deep Representation Learning Via Auxiliary Learnable Target Coding (2023)5.84
- Attention-based Dynamic Subspace Learners For Medical Image Analysis (2022)3.58
- Learning From One And Only One Shot (2022)5.24