Cross-Domain Evaluation of a Deep Learning-Based Type Inference System
Not on the map. Why?
Abstract (arXiv)
Optional type annotations allow for enriching dynamic programming languages with static typing features like better Integrated Development Environment (IDE) support, more precise program analysis, and early detection and prevention of type-related runtime errors. Machine learning-based type inference promises interesting results for automating this task. However, the practical usage of such systems depends on their ability to generalize across different domains, as they are often applied outside their training domain. In this work, we investigate Type4Py as a representative of state-of-the-art deep learning-based type inference systems, by conducting extensive cross-domain experiments. Thereby, we address the following problems: class imbalances, out-of-vocabulary words, dataset shifts, and unknown classes. To perform such experiments, we use the datasets ManyTypes4Py and CrossDomainTypes4Py. The latter we introduce in this paper. Our dataset enables the evaluation of type inference systems in different domains of software projects and has over 1,000,000 type annotations mined on the platforms GitHub and Libraries. It consists of data from the two domains web development and scientific calculation. Through our experiments, we detect that the shifts in the dataset and the long-tailed distribution with many rare and unknown data types decrease the performance of the deep learning-based type inference system drastically. In this context, we test unsupervised domain adaptation methods and fine-tuning to overcome these issues. Moreover, we investigate the impact of out-of-vocabulary words.
Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Builds on 18 of its 58 references that are in the map. First posted on arXiv 19 Aug 2022.
Builds on
18 of 58 references.
References · 18
- 2013Efficient Estimation of Word Representations in Vector Spacecited by 4,346
- 2015Domain-Adversarial Training of Neural Networkscited by 3,023
- 2015Neural Machine Translation of Rare Words with Subword Unitscited by 2,898
- 2016Enriching Word Vectors with Subword Informationcited by 1,578
- 2018Continual Lifelong Learning with Neural Networks: A Reviewcited by 1,313
- 2019Learning Imbalanced Datasets with Label-Distribution-Aware Margin Losscited by 987
- 2020IntelliCode Compose: Code Generation Using Transformercited by 225
- 2018The Adverse Effects of Code Duplication in Machine Learning Models of Codecited by 123
- 2020Big Code != Big Vocabulary: Open-Vocabulary Models for Source Codecited by 53
- 2020LambdaNet: Probabilistic Type Inference using Graph Neural Networkscited by 44
- 2019TypeWriter: Neural Type Prediction with Search-based Validationcited by 32
- 2020Typilus: Neural Type Hintscited by 29
6 more
- 2018What's in a GitHub Star? Understanding Repository Starring Practices in a Social Coding Platformcited by 25
- 2021Type4Py: Practical Deep Similarity Learning-Based Type Inference for Pythoncited by 19
- 2020OptTyper: Probabilistic Type Inference by Optimising Logical and Natural Constraintscited by 14
- 2021ManyTypes4Py: A Benchmark Python Dataset for Machine Learning-based Type Inferencecited by 9
- 2021PYInfer: Deep Learning Semantic Type Inference for Python Variablescited by 4
- 2019DLTPy: Deep Learning Type Inference of Python Function Signatures using Natural Language Contextcited by 2
Built on by
Citing papers per year: 2023: 1.
1 paper.
- 2023TypeT5: Seq2seq Type Inference using Static Analysiscited by 12
- 2023TypeT5: Seq2seq Type Inference using Static Analysis16 Mar 2023