mlsanityData to 7 Oct 2026

TypeT5: Seq2seq Type Inference using Static Analysis

arXiv 2303.09564 ↗First posted 16 Mar 2023cs.SE cs.LG cs.PLcited by 12

Not on the map. Why?

Abstract (arXiv)

There has been growing interest in automatically predicting missing type annotations in programs written in Python and JavaScript. While prior methods have achieved impressive accuracy when predicting the most common types, they often perform poorly on rare or complex types. In this paper, we present a new type inference method that treats type prediction as a code infilling task by leveraging CodeT5, a state-of-the-art seq2seq pre-trained language model for code. Our method uses static analysis to construct dynamic contexts for each code element whose type signature is to be predicted by the model. We also propose an iterative decoding scheme that incorporates previous type predictions in the model's input context, allowing information exchange between related code elements. Our evaluation shows that the proposed approach, TypeT5, not only achieves a higher overall accuracy (particularly on rare and complex types) but also produces more coherent results with fewer type errors -- while enabling easy user intervention.

Key facts. Cited by 12 papers in the map (data through 7 Oct 2026). Builds on 25 of its 42 references that are in the map. First posted on arXiv 16 Mar 2023.

Builds on

25 of 42 references.

References · 25

  1. 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
  2. 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,160
  3. 2020Dense Passage Retrieval for Open-Domain Question Answeringcited by 3,779
  4. 2015Neural Machine Translation of Rare Words with Subword Unitscited by 2,898
  5. 2020REALM: Retrieval-Augmented Language Model Pre-Trainingcited by 2,126
  6. 2021WebGPT: Browser-assisted question-answering with human feedbackcited by 1,722
  7. 2022Competition-Level Code Generation with AlphaCodecited by 1,427
  8. 2021Improving language models by retrieving from trillions of tokenscited by 1,278
  9. 2020Leveraging Passage Retrieval with Generative Models for Open Domain Question Answeringcited by 1,203
  10. 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
  11. 2015Scheduled Sampling for Sequence Prediction with Recurrent Neural Networkscited by 779
  12. 2017Reading Wikipedia to Answer Open-Domain Questionscited by 777
13 more
  1. 2020KILT: a Benchmark for Knowledge Intensive Language Taskscited by 571
  2. 2021Unified Pre-training for Program Understanding and Generationcited by 361
  3. 2020Autoregressive Entity Retrievalcited by 333
  4. 2018The Adverse Effects of Code Duplication in Machine Learning Models of Codecited by 123
  5. 2020LambdaNet: Probabilistic Type Inference using Graph Neural Networkscited by 44
  6. 2019TypeWriter: Neural Type Prediction with Search-based Validationcited by 32
  7. 2020Learning to Update Natural Language Comments Based on Code Changescited by 30
  8. 2020Typilus: Neural Type Hintscited by 29
  9. 2021Type4Py: Practical Deep Similarity Learning-Based Type Inference for Pythoncited by 19
  10. 2020OptTyper: Probabilistic Type Inference by Optimising Logical and Natural Constraintscited by 14
  11. 2021Static Inference Meets Deep Learning: A Hybrid Type Inference Approach for Pythoncited by 12
  12. 2021ManyTypes4Py: A Benchmark Python Dataset for Machine Learning-based Type Inferencecited by 9
  13. 2022Cross-Domain Evaluation of a Deep Learning-Based Type Inference Systemcited by 1

Built on by

Cited by year

Citing papers per year: 2023: 3; 2024: 6; 2025: 3.

12 papers.