Abstract: This initial review examines the published proceedings paper, its embedded appendices, and the pinned released evaluation code. A major methodological problem affects the interpretation of TypeCheck: the released procedure checks predicted stub programs separately from original implementations, so the two error counts do not test the same program obligations. An independent, fully typed example passes as a predicted stub yet produces an argument-type error when its predictions are applied to the unchanged implementation. Two local implementation defects concern inherited attributes in TypeSim and an exact-match cache field. The printed model-level arithmetic is reproducible from the supplementary tables. These results establish defects in the evaluated objects and released implementation; they do not determine revised model rankings or identify the code commit used in the historical experiments.

Date: 24 October 2026

Title: Scientific review of TypyBench:
evaluation semantics and implementation checks

# Identity, version, and scope

The reviewed paper is Honghua Dong, Jiacheng Yang, Xun Deng, Yuhe Jiang, Gennady Pekhimenko, Fan Long, and Xujie Si, TypyBench: Evaluating LLM Type Inference for Untyped Python Repositories, ICML 2025, PMLR 267, paper identifier I25-43566 (local number 0197), OpenReview identifier `xl9sv9vEDy` [paper]. All page references below are one-based pages of the 28-page proceedings PDF, including appendices. The original PDF SHA-256 is

cedd43736ab0bfe6fc28e917e93aab07
e1f8aec4353c01f8a0ef7d6aa9c868bc.

The released repository was inspected statically at commit |51feed13381f6bd027caad1f5bf7c4de798bc6a5| [code]. Its acquisition record explicitly does not identify it as the historical experiment commit.

The review covers Sections 1–7, Algorithms 1–4, the metric definitions, data selection and cleaning, Tables 1–4, Appendix A–D, and the evaluation path through `run.py`, `Dockerfile`, |scripts/evaluation.py|, `repo_similarity.py`, `type_similarity.py`, and `helpers.py`. The benchmark’s separate repository dataset and raw model generations were not acquired or executed. Separate OpenReview supplementary attachments remain unavailable in the acquisition record (HTTP 403); the embedded appendices were read. No author code, Docker build, model API, or historical experiment was executed.

# Definitions and positive checks

For two base types the paper defines a Jaccard similarity of supported attribute sets after excluding common `object` operations. Ordered generic arguments are averaged positionwise and normalized by the larger arity; union members use a maximum-weight matching, again normalized by the larger cardinality. The root and argument contributions are averaged. These operations yield scores in \([0,1]\) when the base score does, handle unequal arities as specified, and are symmetric. The published example \[S(\mathrm{List[int]},\mathrm{Sequence[float]})
 =\tfrac12(0.7+0.6)=0.65\] is arithmetically correct. A partial-match score is a similarity heuristic, not a proof of type substitutability; this distinction alone is not counted as a defect.

The supplementary Tables 9–17 contain 50 rows per model, with 47 finite TypeCheck entries. Recomputed TypeCheck means include \(366.0213\) for GPT-4o, \(127.1277\) for Claude-3.5-Sonnet, and \(214.6170\) for DeepSeek-V3; these agree with Table 2 at its printed precision. The corresponding TypeSim means are \(0.80448\), \(0.78762\), and \(0.79468\). This is a check of published arithmetic, not a replication of the measurements. The three unavailable checker runs are disclosed in Table 6, rather than silently treated as zero.

The temporal contamination analysis on pp. 8–9 is presented as a potential explanation. Repository age is confounded with repository characteristics and model training exposure, so the plot is not a causal contamination estimate; the paper’s qualified wording does not establish a separate error. Likewise, the full-repository experiment uses only three eligible repositories, which bounds its generality without falsifying those observations.

# Problem 1: stub-only errors do not measure consistency with implementations

## Claim and operative procedure

Section 4.2 (p. 5) motivates TypeCheck using inconsistencies such as a predicted return type being incompatible with its uses, and interprets counted errors as obstacles to practical use. Section 6.2 (p. 7) compares model error counts with the original repository average of \(141.8\) and interprets a lower count as stronger consistency. The abstract and conclusion make repository-wide consistency a central contribution.

The released dataflow is decisive. `run.py` mounts the prediction directory. The Docker entry point invokes |scripts/evaluation.py| with that directory. Its `evaluate` function calls |get_repo_similarity(original_repo,prediction_directory)|. In `repo_similarity.py`, the original and prediction directories are passed separately to |get_type_dict_from_repo|. In `helpers.py`, that function copies each input program’s own files to a temporary directory and calls Mypy’s builder. No step inserts predicted signatures into the original function bodies or recreates their call sites. The predictions requested on pp. 7 and 14 are `.pyi` stub files. Ordinary stub files contain signatures but elide implementation logic [mypy].

Consequently the procedure compares \[E(P_{\mathrm{original}})\quad\hbox{with}\quad
 E(S_{\mathrm{predicted}}),\] where \(E\) is the selected error count and \(S\) is a stub program. To evaluate compatibility of predicted types with the original uses, the required object is instead \[E\!\left(P_{\mathrm{original}}[
       \text{predicted annotations}]\right).\] These quantities need not agree even for complete, syntactically valid predictions.

## Complete counterexample and observed 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.

## Counterevidence, impact, and correction boundary

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.

# Problem 2: supported operations are replaced by locally declared names

Section 4.1.1 (p. 4) defines base similarity using supported methods and operations. The released |get_type_attributes| returns `TypeInfo.names`, a class’s local symbol table, without traversing its method-resolution order. Consider

Code:
class Base:
    def read(self) -> int:
        return 1
class Child(Base):
    pass

Both types support the same inherited operation `read`; the subclass neither adds nor overrides behavior. Excluding common `object` operations, the intended supported-operation sets are both \(\{\mathrm{read}\}\) and their Jaccard score is \(1\). In the independently checked Mypy representation, the local names are respectively \(\{\mathrm{read}\}\) and \(\varnothing\). The released formula on those sets yields \[1-\frac{|\{\mathrm{read}\}\triangle\varnothing|}
 {|\{\mathrm{read}\}\cap\varnothing\setminus O|
  +|\{\mathrm{read}\}\triangle\varnothing|}=0,\] where \(O\) is the excluded common-operation set. The string-equality shortcut in |get_type_similarity| does not apply because the two named classes differ. The independent fixture confirms equal effective MRO attribute sets but a local-name score of zero.

An alternative definition based strictly on declarations would make the calculation internally coherent, but would not be the paper’s stated supported-operation definition. Method-name overlap also omits signatures and effects; that separate design limitation is not needed for this counterexample. Assessment: Minor for the demonstrated bounded implementation discrepancy. The extent to which inherited user-defined classes contributed to the historical aggregate scores is not established. Computing effective supported attribute sets would address this specific mismatch; complete semantic similarity and historical numerical recovery are not thereby verified.

# Problem 3: cache reload substitutes TypeSim for exact match

In |scripts/evaluation.py|, `evaluate` saves both |repo_overall_score_wo_missing| and |repo_overall_score_wo_missing_exact|. On a cache hit, however, the variable for the latter is assigned the former dictionary key. The resulting CSV and printed exact-match-without-missing output can change merely because the evaluation is repeated.

For a cache containing TypeSim-without-missing \(u=0.9\) and exact-match-without-missing \(v=0.6\), a cold evaluation correctly stores \(v\), whereas the reload branch assigns \(u\) to the exact field. Its absolute error is \(0.3\). The example needs only a valid cache containing the separately computed fields with \(u\ne v\); the same synthetic score pair is permitted by a partial-credit metric versus exact matching. No author pickle was loaded and no author function was executed.

The cold branch calculates and saves the correct field; the defect is specifically the reload branch. The published main exact-match-by-depth results do not automatically inherit this error, since their depth dictionaries are loaded separately. Assessment: Minor. Replacing the lookup with the exact-match key repairs this local dataflow, but no full author evaluation was rerun and no claim is made that the published tables used the faulty cached scalar.

# Dependence, conclusions, and remaining work

The strongest supported concern is the interpretation and implementation of the core consistency metric. The inherited-attribute and cache findings affect distinct parts of the released evaluation, with narrower demonstrated scope. None of these results justifies fabricating corrected benchmark scores. The basic TypeSim recurrence and the checked supplementary aggregate arithmetic survive these checks.

Issue | Assessment | Repair verification | Remaining work

Stub/implementation mismatch | Major | Targeted design stated; benchmark repair untested | Fixed-program re-evaluation

Inherited attributes | Minor | Counterexample verified; complete repair untested | MRO-aware implementation and score audit

Exact-match cache key | Minor | Local key correction analytically sufficient | Cold/cache regression check

All scientific adjudications remain pending. Human reviews are empty. Author adoption has not been requested. This newly created initial review has not undergone the separate independent acceptance stage.

# Supporting checks

The primary evidence is the frozen PDF and pinned repository. Relevant function anchors are |helpers.py:get_type_dict_from_repo,filter_errors|, |repo_similarity.py:get_repo_similarity|, |type_similarity.py:get_type_attributes,get_type_similarity|, and |scripts/evaluation.py:evaluate|. The latter’s cache assignments and CSV output were traced together, rather than judged from an isolated line.

The command was the existing `[local archive path omitted] running that independent script. The author package was never imported. The script checks newly written fixtures through Mypy and records its actual version, outputs, return codes, and fixture hashes. All author source files remained read-only.

The original PDF was read through the existing Poppler `pdftotext` executable in two page ranges, 1–10 and 11–28. The saved source text was used as a cross-reference. Extracted numerical tables were parsed and their means independently calculated; no raster-only plotted values were inferred from garbled text extraction. Source pages 5 and 7 were rendered.

Prior recovery metadata was preserved once as history and was not counted as this new scientific review.

9 H. Dong et al., TypyBench: Evaluating LLM Type Inference for Untyped Python Repositories, PMLR 267 (2025), proceedings version. https://proceedings.mlr.press/v267/dong25l.html. TypyBench authors, released evaluation repository, commit |51feed13381f6bd027caad1f5bf7c4de798bc6a5|. https://github.com/typybench/typybench. Mypy documentation, Stub files, accessed 24 October 2026. The accessed stable documentation reports version 2.4.0; it is used only for the documented distinction between interfaces and implementations. https://mypy.readthedocs.io/en/stable/stubs.html.
