mlsanityData to 14 Oct 2026

TypyBench: Evaluating LLM Type Inference for Untyped Python Repositories

arXiv 2507.22086 ↗First posted 28 Jul 2025cs.SE cs.AI cs.PLcited by 0

Not on the map. Why?

Abstract (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.

Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 20 of its 28 references that are in the map. First posted on arXiv 28 Jul 2025.

Builds on

20 of 28 references.

References · 20

  1. 2020Language Models are Few-Shot Learnerscited by 32,419
  2. 2023GPT-4 Technical Reportcited by 18,396
  3. 2024The Llama 3 Herd of Modelscited by 14,715
  4. 2021Evaluating Large Language Models Trained on Codecited by 8,320
  5. 2024Qwen2.5 Technical Reportcited by 4,942
  6. 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,373
  7. 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Codecited by 2,004
  8. 2024BigCodeBench: Benchmarking Code Generation with Diverse Function Calls and Complex Instructionscited by 546
  9. 2023RepoBench: Benchmarking Repository-Level Code Auto-Completion Systemscited by 353
  10. 2020LambdaNet: Probabilistic Type Inference using Graph Neural Networkscited by 44
  11. 2023Data Contamination Through the Lens of Timecited by 40
  12. 2019TypeWriter: Neural Type Prediction with Search-based Validationcited by 32
8 more
  1. 2020Typilus: Neural Type Hintscited by 29
  2. 2024RepoTransBench: A Real-World Multilingual Benchmark for Repository-Level Code Translationcited by 23
  3. 2023TypeT5: Seq2seq Type Inference using Static Analysiscited by 12
  4. 2021ManyTypes4Py: A Benchmark Python Dataset for Machine Learning-based Type Inferencecited by 9
  5. 2024APPL: A Prompt Programming Language for Harmonious Integration of Programs and Large Language Model Promptscited by 8
  6. 2023Type Prediction With Program Decomposition and Fill-in-the-Type Trainingcited by 6
  7. 2023Generative Type Inference for Pythoncited by 6
  8. 2023TypeEvalPy: A Micro-benchmarking Framework for Python Type Inference Toolscited by 3

Built on by

Not cited yet.