Cross-Domain Evaluation of a Deep Learning-Based Type Inference System
Bernd Gruner, Tim Sonnekalb, Thomas S. Heinze, Clemens-Alexander Brust

TL;DR
This paper evaluates the cross-domain generalization of a deep learning-based type inference system, Type4Py, revealing challenges due to dataset shifts and rare data types, and explores adaptation techniques to improve performance.
Contribution
It introduces a new dataset, CrossDomainTypes4Py, for evaluating type inference across different software domains and assesses the effectiveness of adaptation methods.
Findings
Dataset shifts significantly reduce inference accuracy.
Long-tailed data distributions hinder model performance.
Unsupervised adaptation improves cross-domain inference.
Abstract
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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Software Testing and Debugging Techniques · Software Reliability and Analysis Research
MethodsTest
