Pith. sign in

REVIEW 1 cited by

TypeT5: Seq2seq Type Inference using Static Analysis

Not yet reviewed by Pith; the record is open.

This paper has not been read by Pith yet. Machine review is queued; the pith claim, tier, and objections will appear here once it completes.

SPECIMEN: schema-true, not a live event

T0 review · schema-true

One-sentence machine reading of the paper's core claim.

pith:XXXXXXXX · record.json · timestamp

arxiv 2303.09564 v1 pith:2RYBRCTM submitted 2023-03-16 cs.SE cs.LGcs.PL

classification cs.SEcs.LGcs.PL
keywords typecodemodeltypesaccuracyanalysiscomplexinference
verification ladder T0 review T1 audit T2 compute T3 formal
0 comments
read the original abstract

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.

Discussion (0). Continue with ORCID to comment.

Forward citations

Cited by 1 Pith paper

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score. Full citation record

  1. Combining Type Inference and Automated Unit Test Generation for Python

    cs.SE 2025-07 conditional novelty 6.0 of 10

    A proxy-based type tracing technique integrated into Pynguin infers parameter and return types during test generation and improves branch coverage.

Pith tools