LambdaNet: Probabilistic Type Inference using Graph Neural Networks

By Jiayi Wei, Maruth Goyal, Greg Durrett, Işıl Dillig. 2020

119 citations recorded by the source corpus.

As gradual typing becomes increasingly popular in languages like Python and Typescript, there is a growing need to infer type annotations. While type annotations help with tasks like code completion and static error catching, these annotations cannot be fully inferred 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 well as user-defined types that have not been encountered during training. Our experimental results show that our approach outperforms prior work in this space by 14% (absolute) on library types, while having the ability to make type predictions that are out of scope for existing techniques.

Subfields: Artificial Intelligence, Information Systems, Software, Natural Language Processing, Graph Learning

How researchers see this paper

The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.

In Artificial Intelligence

  1. Luke S. Zettlemoyer
  2. Percy Liang
  3. Mohit Bansal
  4. Quoc V. Le
  5. Graham Neubig
  6. Jianfeng Gao
  7. Yoshua Bengio
  8. Hannaneh Hajishirzi

In Information Systems

  1. Charles Sutton
  2. Miltiadis Allamanis
  3. Ming-Ho Yee
  4. Prem Devanbu
  5. Earl T. Barr
  6. Arjun Guha
  7. Daniel Tarlow
  8. Georgios Gousios

In Software

  1. Charles Sutton
  2. Earl T. Barr
  3. Georgios Gousios
  4. Daniel Tarlow
  5. Augustus Odena
  6. Ming-Ho Yee
  7. A. Gordon
  8. Prem Devanbu

In Natural Language Processing

  1. Luke S. Zettlemoyer
  2. Percy Liang
  3. Graham Neubig
  4. Quoc V. Le
  5. Wen-tau Yih
  6. Charles Sutton
  7. Mohit Bansal
  8. Jianfeng Gao

In Graph Learning

  1. Charles Sutton
  2. Prem Devanbu
  3. Kevin Jesse
  4. Wen-tau Yih
  5. Carolyn Jane Anderson
  6. Ke Wang
  7. Daniel Tarlow
  8. Earl T. Barr

Citations in the corpus