paper-with-me

Papers

TypyBench: Evaluating LLM Type Inference for Untyped Python Repositories

2025-07-28 · Honghua Dong, Jiacheng Yang, Xun Deng, Yuhe Jiang, Gennady Pekhimenko, Fan Long, Xujie Si arxiv

Type inference for dynamic languages like Python is a persistent challenge in software engineering. While large language models (LLMs) have shown promise in code understanding, their type inference capabilities remain underexplored. We introduce TypyBench, a benchmark designed to evaluate LLMs' type inference across entire Python repositories. TypyBench features two novel metrics: TypeSim, which captures nuanced semantic relationships between predicted and ground truth types, and TypeCheck, which assesses type consistency across codebases. Our evaluation of various LLMs on a curated dataset of 50 high-quality Python repositories reveals that, although LLMs achieve decent TypeSim scores, they struggle with complex nested types and exhibit significant type consistency errors. These findings suggest that future research should shift focus from improving type similarity to addressing repository-level consistency. TypyBench provides a foundation for this new direction, offering insights into model performance across different type complexities and usage contexts. Our code and data are available at https://github.com/typybench/typybench.

📄 PDF Abstract BibTeX arXiv:2507.22086

Code (0)

등록된 구현이 없습니다.

Similar Papers 제목 키워드 기반

TypeProbe: Recovering Type Representations from Hidden States of Pre-trained Code Models

2026-07-09 · Giuliano Gorgone, Fausto Carcassi arxiv

State-of-the-art code models achieve impressive performance, yet the extent to which they internally encode type information remains poorly understood. We probe the residual streams of pretrained code models for internal…

Identifying Untyped Relation Mentions in a Corpus given an Ontology

2012-07-01 · WS 2012 7 · Gabor Melli
Information RetrievalNatural Language InferenceRelationText Summarization

Type Prediction With Program Decomposition and Fill-in-the-Type Training

2023-05-25 · Federico Cassano, Ming-Ho Yee, Noah Shinn, Arjun Guha 외

TypeScript and Python are two programming languages that support optional type annotations, which are useful but tedious to introduce and maintain. This has motivated automated type prediction: given an untyped program, …

PredictionType prediction

Discriminating between Similar Languages Using a Combination of Typed and Untyped Character N-grams and Words

2017-04-01 · WS 2017 4 · Helena Gomez, Ilia Markov, Jorge Baptista, Grigori Sidorov 외

This paper presents the cic{\_}ualg{'}s system that took part in the Discriminating between Similar Languages (DSL) shared task, held at the VarDial 2017 Workshop. This year{'}s task aims at identifying 14 languages acro…

General ClassificationInformation RetrievalMachine Translation

ManyTypes4TypeScript: A Comprehensive TypeScript Dataset for Sequence-Based Type Inference

2022-10-17 · International Conference on Mining Software Repositories 2022 10 · Kevin Jesse, Premkumar T. Devanbu

In this paper, we present ManyTypes4TypeScript, a very large corpus for training and evaluating machine-learning models for sequence-based type inference in TypeScript. The dataset includes over 9 million type annotat…

Type prediction