LambdaNet: Probabilistic Type Inference using Graph Neural Networks
Jiayi Wei, Maruth Goyal, Greg Durrett, Isil Dillig

TL;DR
LambdaNet introduces a probabilistic type inference method for TypeScript that leverages graph neural networks to improve accuracy and handle unseen types, outperforming previous approaches.
Contribution
The paper presents a novel graph neural network-based probabilistic type inference scheme that predicts both standard and user-defined types in TypeScript.
Findings
Outperforms prior work by 14% on library types
Capable of predicting unseen user-defined types
Uses program abstraction called type dependency graph
Abstract
As gradual typing becomes increasingly popular in languages like Python and TypeScript, there is a growing need to infer type annotations automatically. While type annotations help with tasks like code completion and static error catching, these annotations cannot be fully determined by compilers and are tedious to annotate by hand. This paper proposes a probabilistic type inference scheme for TypeScript based on a graph neural network. Our approach first uses lightweight source code analysis to generate a program abstraction called a type dependency graph, which links type variables with logical constraints as well as name and usage information. Given this program abstraction, we then use a graph neural network to propagate information between related type variables and eventually make type predictions. Our neural architecture can predict both standard types, like number or string, as…
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 · Topic Modeling · Software Testing and Debugging Techniques
MethodsGraph Neural Network
