paper-with-me

홈 › Papers

TypeT5: Seq2seq Type Inference using Static Analysis

2023-03-16 · Jiayi Wei, Greg Durrett, Isil Dillig

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.

📄 PDF Abstract BibTeX arXiv:2303.09564

Code (1)

utopia-group/typet5 공식 구현 pytorch

Tasks

Language ModelingLanguage ModellingType predictionVocal Bursts Type Prediction

Methods 이 논문이 사용한 방법론

Multi-Head Attention 설명 없음
Attention 설명 없음
Tanh Activation 설명 없음
Sigmoid Activation 설명 없음
Linear Layer A Linear Layer is a projection $\mathbf{XW + b}$.
Softmax The Softmax output function transforms a previous layer's output into a vector of probabilities. It is commonly used for multiclass classification. Given an input vector $x$…
BPE Byte Pair Encoding, or BPE, is a subword segmentation algorithm that encodes rare and unknown words as sequences of subword units. The intuition is that various word…
Residual Connection 설명 없음

Similar Papers 제목 키워드 기반

TypeTele: Releasing Dexterity in Teleoperation by Dexterous Manipulation Types

2025-07-02 · Yuhao Lin, Yi-Lin Wei, Haoran Liao, Mu Lin 외 arxiv

Dexterous teleoperation plays a crucial role in robotic manipulation for real-world data collection and remote robot control. Previous dexterous teleoperation mostly relies on hand retargeting to closely mimic human hand…

Learning Type Inference for Enhanced Dataflow Analysis

2023-10-01 · Lukas Seidel, Sedick David Baker Effendi, Xavier Pinho, Konrad Rieck 외

Statically analyzing dynamically-typed code is a challenging endeavor, as even seemingly trivial tasks such as determining the targets of procedure calls are non-trivial without knowing the types of objects at compile ti…

Type prediction

Advanced Graph-Based Deep Learning for Probabilistic Type Inference

2020-09-13 · Fangke Ye, Jisheng Zhao, Vivek Sarkar

Dynamically typed languages such as JavaScript and Python have emerged as the most popular programming languages in use. Important benefits can accrue from including type annotations in dynamically typed programs. This a…

Deep LearningGraph Neural NetworkVocal Bursts Type Prediction

ManyTypes4Py: A Benchmark Python Dataset for Machine Learning-based Type Inference

2021-04-10 · Amir M. Mir, Evaldas Latoskinas, Georgios Gousios

In this paper, we present ManyTypes4Py, a large Python dataset for machine learning (ML)-based type inference. The dataset contains a total of 5,382 Python projects with more than 869K type annotations. Duplicate source …

BIG-bench Machine LearningVocal Bursts Type Prediction

MLFMF: Data Sets for Machine Learning for Mathematical Formalization

2023-10-24 · NeurIPS 2023 11 · Andrej Bauer, Matej Petković, Ljupčo Todorovski

We introduce MLFMF, a collection of data sets for benchmarking recommendation systems used to support formalization of mathematics with proof assistants. These systems help humans identify which previous entries (theorem…

BenchmarkingRecommendation SystemsWord Embeddings