mlsanityData to 7 Oct 2026

Typilus: Neural Type Hints

arXiv 2004.10657 ↗First posted 6 Apr 2020cs.PL cs.LG stat.MLcited by 29

Not on the map. Why?

Abstract (arXiv)

Type inference over partial contexts in dynamically typed languages is challenging. In this work, we present a graph neural network model that predicts types by probabilistically reasoning over a program's structure, names, and patterns. The network uses deep similarity learning to learn a TypeSpace -- a continuous relaxation of the discrete space of types -- and how to embed the type properties of a symbol (i.e. identifier) into it. Importantly, our model can employ one-shot learning to predict an open vocabulary of types, including rare and user-defined ones. We realise our approach in Typilus for Python that combines the TypeSpace with an optional type checker. We show that Typilus accurately predicts types. Typilus confidently predicts types for 70% of all annotatable symbols; when it predicts a type, that type optionally type checks 95% of the time. Typilus can also find incorrect type annotations; two important and popular open source libraries, fairseq and allennlp, accepted our pull requests that fixed the annotation errors Typilus discovered.

Key facts. Cited by 29 papers in the map (data through 7 Oct 2026). First posted on arXiv 6 Apr 2020.

Builds on

No reference list yet.

Built on by

Cited by year

Citing papers per year: 2021: 6; 2022: 10; 2023: 6; 2024: 3; 2025: 4.

29 papers.

Sort:

  1. 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 492
  2. 2021Self-Supervised Bug Detection and Repaircited by 59
  3. 2022NatGen: Generative pre-training by "Naturalizing" source codecited by 53
  4. 2024Can LLMs Replace Manual Annotation of Software Engineering Artifacts?cited by 40
  5. 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkitcited by 22
  6. 2021Type4Py: Practical Deep Similarity Learning-Based Type Inference for Pythoncited by 19
  7. 2021GraphSearchNet: Enhancing GNNs via Capturing Global Dependencies for Semantic Code Searchcited by 15
  8. 2022On Distribution Shift in Learning-based Bug Detectorscited by 15
  9. 2024Do Large Code Models Understand Programming Concepts? Counterfactual Analysis for Code Predicatescited by 14
  10. 2023TypeT5: Seq2seq Type Inference using Static Analysiscited by 12
  11. 2022AutoPruner: Transformer-Based Call Graph Pruningcited by 11
  12. 2021ManyTypes4Py: A Benchmark Python Dataset for Machine Learning-based Type Inferencecited by 9
17 more
  1. 2023LExecutor: Learning-Guided Executioncited by 7
  2. 2022Learning Program Semantics with Code Representations: An Empirical Studycited by 6
  3. 2022Learning Program Representations with a Tree-Structured Transformercited by 6
  4. 2023Type Prediction With Program Decomposition and Fill-in-the-Type Trainingcited by 6
  5. 2023An Unbiased Transformer Source Code Learning with Semantic Vulnerability Graphcited by 5
  6. 2021PSIMiner: A Tool for Mining Rich Abstract Syntax Trees from Codecited by 4
  7. 2021Cross-Lingual Transfer Learning for Statistical Type Inferencecited by 2
  8. 2022JEMMA: An Extensible Java Dataset for ML4Code Applicationscited by 2
  9. 2025Treefix: Enabling Execution with a Tree of Prefixescited by 2
  10. 2022Unveiling Project-Specific Bias in Neural Code Modelscited by 1
  11. 2022Evaluating the Impact of Source Code Parsers on ML4SE Modelscited by 1
  12. 2022Cross-Domain Evaluation of a Deep Learning-Based Type Inference Systemcited by 1
  13. 2023Implant Global and Local Hierarchy Information to Sequence based Code Representation Modelscited by 1
  14. 2025Call Me Maybe: Enhancing JavaScript Call Graph Construction using Graph Neural Networkscited by 1
  15. 2024Inferring Pluggable Types with Machine Learningcited by 0
  16. 2025TypyBench: Evaluating LLM Type Inference for Untyped Python Repositoriescited by 0
  17. 2025Automated Type Annotation in Python Using Large Language Modelscited by 0