ELVIA.Evidence Atlas
← Back to analysis

AI context

ELVIA analysis of: TypyBench: Evaluating LLM Type Inference for Untyped Python Repositories — Problem 1: Stub-only checker counts omit original implementation obligations

Original paper: Honghua Dong; Jiacheng Yang; Xun Deng; Yuhe Jiang; Gennady Pekhimenko; Fan Long; Xujie Si. TypyBench: Evaluating LLM Type Inference for Untyped Python Repositories. Proceedings of the 42nd International Conference on Machine Learning, vol. 267, 2025. https://proceedings.mlr.press/v267/dong25l.html
Source version: Published ICML 2025 proceedings PDF (PMLR 267)
Source location: PDF pp. 5,7; Figs.1,9-10 and p. 14 prompts; released repo_similarity.py:get_repo_similarity, helpers.py:get_type_dict_from_repo, evaluation.py:evaluate, Dockerfile entry point.

Question: What does the recorded analysis establish about “Stub-only checker counts omit original implementation obligations”?
Bounded finding:
Stub checking can detect genuine inconsistencies in declarations, inheritance, and imports. It is useful for interface validation. The paper also reports missing rates, which provide information beyond the raw error count. These facts do not make the stub-only count a test of implementation compatibility: the counterexample has complete signatures and no missing files.
A separate possibility is that historical prediction folders contained transformed implementations in addition to stubs. No supplied raw prediction artifacts establish that, and the released pipeline does not perform such transformation. The report therefore does not assert that every published model score was generated by this commit, or that any ranking reverses. It establishes that the described/released evaluation does not support the broad interpretation placed on TypeCheck, and that the direct model-versus-original comparison changes the set of checked program obligations.
Assessment: Major. Repository-level consistency is a principal benchmark contribution and a central empirical conclusion. Losing the original usage constraints materially affects that measurement, even if TypeSim and the qualitative need for better type inference remain useful. A defensible repair is to apply predictions to a fixed implementation/caller corpus and count the same checks for every model, reporting parse/annotation failures separately. That repair design is logically targeted; its effects on the published benchmark require a fresh evaluation and are not verified here.
Correct implementation zero errors, predicted .pyi zero errors, reannotated unchanged implementation two errors: return-value and arg-type. The latter is in the paper's counted categories. Stubs remove the offending expressions.

Recorded check:
Consider this original implementation:
Code:
def f() -> int:
    return 1
def h(x: int) -> int:
    return x
def g() -> int:
    return h(f())
Predict precisely these three signatures:
Code:
def f() -> str: ...
def h(x: int) -> int: ...
def g() -> int: ...
All functions are present; all parameters and returns use ordinary explicit primitive types; there is no `Any`, missing file, syntax error, external dependency, overload, dynamic dispatch, or untyped body. Thus neither missing predictions nor gradual-typing escape hatches explain the discrepancy. This is a counterexample to the metric’s interpretation, not a claimed member of the curated 50-repository dataset.
The predicted stub is internally type-correct. Applying its signatures to the original bodies instead changes only the return annotation of `f`. The literal return value \(1\) is an `int`, contradicting the predicted `str`; moreover `h(f())` supplies a declared `str` to a required `int` argument. The latter is an `arg-type` error, explicitly included in Appendix C.2.
An independently written fixture was checked with the already installed Mypy 1.14.1 and Python 3.13.5. The original implementation produced zero errors; the predicted stub produced zero errors; the reannotated implementation produced two errors, `return-value` and `arg-type`. This is an actual finite diagnostic on new reviewer-written programs, not execution of the authors’ evaluator. The paper reports Mypy 1.11.1/Python 3.12, so this run is not claimed to reproduce that environment. The structural argument does not depend on a version-specific diagnostic: the predicted stub contains none of the original return or call expressions.

Case-wide limitations:
- Stub-only checker counts omit original implementation obligations — Counterevidence: Stubs retain useful declaration/import/inheritance checks. Missing-rate is also reported. Neither addresses the complete-signature counterexample. Historical prediction directory contents/experiment commit are not supplied, so historical rankings are not declared reversed.
- Local symbol names do not equal supported inherited operations — Counterevidence: A declaration-only similarity is mathematically coherent but differs from the paper's stated supported-operation semantics. Paper's experiment environment was Mypy1.11.1; no exact-environment empirical rerun claimed.
- Cached exact-match-without-missing loads the TypeSim key — Counterevidence: Fresh computation/saved exact field is correct. Exact-match depth arrays are loaded separately. Historical usage of faulty cached scalar is unknown.
- Limitations: Historical experiment commit and prediction folders not verified
- Limitations: No author code, dataset, model APIs or empirical benchmark rerun
- Limitations: Independent synthetic mypy tests used1.14.1/Python3.13.5 versus paper1.11.1/Python3.12
- Limitations: Separate OpenReview attachment unavailable (403 acquisition)
- Limitations: Source plots checked through extracted context and numerical tables; parent inspects rendered key pages
- Limitations: Completed by parent; see provenance execution_facts.compile and visual_qa.
- The original report's complete scope, counterevidence and unresolved questions are retained below.
- This import checks publication format and identity; it does not repeat scientific review.
- Independent human scientific review is pending; author adoption has not been requested.
Source problem ID: p1
Source report index: 1

Original source excerpts (verbatim):
We then use the Jaccard index to measure functional similarity, where two types are similar if they share most of the same methods and operations.
Source: Published ICML 2025 proceedings PDF (PMLR 267)
Locator: PDF p. 4
Source PDF SHA-256: cedd43736ab0bfe6fc28e917e93aab07e1f8aec4353c01f8a0ef7d6aa9c868bc

Review status: Independent review pending
Case: icml2025-0197-typybench-evaluating-llm-type-inference-for-untyped-python-reposit
Revision: 1
Record created: 2026-10-26T04:21:21.357774+00:00
Permalink: https://elvia-atlas.org/atlas/cases/icml2025-0197-typybench-evaluating-llm-type-inference-for-untyped-python-reposit.html#problem-1
Versioned public record: https://elvia-atlas.org/atlas/evidence/icml2025-0197-typybench-evaluating-llm-type-inference-for-untyped-python-reposit/records/icml2025-0197-typybench-evaluating-llm-type-inference-for-untyped-python-reposit.r1.json
Canonical record SHA-256: 8dd416ef88cd70afe40888b9f481e1af97152200e21f6b3be66bbb2829763136
The page follows the latest revision; the versioned record identifies this snapshot.