LibEvoBench / README.md
DanCip's picture
Add TL;DR, update banner
0fdd7fd verified
|
Raw History Blame Contribute Delete
11.8 kB
metadata
license: cc-by-4.0
pretty_name: LibEvoBench
language:
  - en
task_categories:
  - text-generation
tags:
  - code
  - python
  - benchmark
  - api-evolution
  - library-versions
size_categories:
  - 100K<n<1M
configs:
  - config_name: numpy__api_comp_matrix
    data_files:
      - split: train
        path: numpy__api_comp_matrix/train-*
  - config_name: numpy__api_dictionary
    data_files:
      - split: train
        path: numpy__api_dictionary/train-*
  - config_name: numpy__benchmark_t1
    data_files:
      - split: train
        path: numpy__benchmark_t1/train-*
  - config_name: numpy__benchmark_t2
    data_files:
      - split: train
        path: numpy__benchmark_t2/train-*
  - config_name: numpy__benchmark_t3
    data_files:
      - split: train
        path: numpy__benchmark_t3/train-*
  - config_name: numpy__sign_comp_matrix
    data_files:
      - split: train
        path: numpy__sign_comp_matrix/train-*
  - config_name: scipy__api_comp_matrix
    data_files:
      - split: train
        path: scipy__api_comp_matrix/train-*
  - config_name: scipy__api_dictionary
    data_files:
      - split: train
        path: scipy__api_dictionary/train-*
  - config_name: scipy__benchmark_t1
    data_files:
      - split: train
        path: scipy__benchmark_t1/train-*
  - config_name: scipy__benchmark_t2
    data_files:
      - split: train
        path: scipy__benchmark_t2/train-*
  - config_name: scipy__benchmark_t3
    data_files:
      - split: train
        path: scipy__benchmark_t3/train-*
  - config_name: scipy__sign_comp_matrix
    data_files:
      - split: train
        path: scipy__sign_comp_matrix/train-*
  - config_name: torch__api_comp_matrix
    default: true
    data_files:
      - split: train
        path: torch__api_comp_matrix/train-*
  - config_name: torch__api_dictionary
    data_files:
      - split: train
        path: torch__api_dictionary/train-*
  - config_name: torch__benchmark_t1
    data_files:
      - split: train
        path: torch__benchmark_t1/train-*
  - config_name: torch__benchmark_t2
    data_files:
      - split: train
        path: torch__benchmark_t2/train-*
  - config_name: torch__benchmark_t3
    data_files:
      - split: train
        path: torch__benchmark_t3/train-*
  - config_name: torch__sign_comp_matrix
    data_files:
      - split: train
        path: torch__sign_comp_matrix/train-*
LibEvoBench: Probing Temporal Knowledge Stratification in Code Generation Models

Daniele Cipollone1,2 · Sergey Titov2 · Maliheh Izadi1 · Egor Bogomolov2 · Arie van Deursen1
1Delft University of Technology · 2JetBrains Research
NeurIPS 2026, Evaluations & Datasets Track

Project page NeurIPS 2026 arXiv Code DOI


LibEvoBench tests whether code models know an API as it exists in a specific library version. It covers 29 releases of three Python libraries: PyTorch (1.12–2.7, 10 releases), NumPy (1.21–2.3, 10 releases) and SciPy (1.7–1.16, 9 releases). It has three tasks:

Task Tables What the model does
API Calling (API-C) benchmark_t1 Completes a real call site mined from GitHub, at prompt levels L0 (code only) to L3 (code, docstring, version pin and parameter hint)
API Identification (API-I) benchmark_t2 Names the API from a redacted description
Signature Recall (SR) benchmark_t3 Writes the full signature of an API at a given version

Per-version compatibility matrices split APIs into stable ones, whose signature never changes, and evolving ones, which are added, removed or modified across the covered releases. Wrong answers are classified automatically as invalid, anachronistic or unknown by matrix lookup.

Pipeline: mine GitHub repos that pin a version, resolve call sites to versioned APIs, build per-release compatibility matrices, generate the three tasks, classify every error by matrix lookup and rank by SEUS.

TL;DR

  • Even SOTA models lag on version-specific knowledge: a persistent 5–10 point gap between stable and evolving APIs that neither scale nor training recency closes.
  • Models don't store the version as a dimension of library knowledge: giving the target version yields no gain, while giving documentation adds +10–20 points.
  • Failures are temporal confusion, not fabrication: models fall back on version-agnostic, high-frequency symbols that hide the gap.

Stable versus evolving API scores for 13 models, ranked by SEUS. Every model scores lower on evolving APIs.

The interactive leaderboard is on the project page.

Loading the data

There is one configuration per library and table, named <library>__<table>, each with a single train split.

from datasets import load_dataset

ds = load_dataset("JetBrains/LibEvoBench", "torch__benchmark_t1", split="train")

The code repository has the evaluation pipeline, the prompt templates and the scored outputs of the 13 models in the paper. scripts/download_data.py there writes every configuration to out/benchmark_db/<library>/<table>.parquet. The evaluation script (src/eval_benchmark/run_eval.py) builds the prompts and selects the evaluated instances from these tables with a fixed seed.

Tables

Rows per table:

Table PyTorch NumPy SciPy
benchmark_t1 170,532 72,383 7,973
benchmark_t2 49,124 24,565 32,501
benchmark_t3 41,165 22,632 28,310
api_comp_matrix 5,178 2,566 3,642
sign_comp_matrix 7,171 2,998 4,921
api_dictionary 5,178 2,566 3,642

benchmark_t1 (API Calling)

Field Description
sample_id unique identifier
api_norm fully qualified public API name the call resolves to
lib_version library version pinned by the source repository
library torch, numpy or scipy
group extraction group
api_type constant (stable across versions), sig_changed or version_specific
prompt prompt text
code_str code preceding the call site
target ground-truth line containing the call
right_context_few_lines code following the call site
repo_url source GitHub repository
file_path path of the source file at extraction time
signature_at_version signature of the API at lib_version
docstring docstring of the API at lib_version

benchmark_t2 (API Identification)

sample_id, api, version, library, api_type, gt_exists (whether the API exists at version), t2_balanced (membership in the balanced subset).

benchmark_t3 (Signature Recall)

sample_id, api, version, library, api_type, gt_signature (signature of api at version).

api_comp_matrix and sign_comp_matrix

One row per API (api_comp_matrix) or per API–signature pair (sign_comp_matrix, with a signature column), and one boolean column per release (v_1.12, v_2.0, ...). true means the API (or signature) is present in that release, false means absent, and null marks a cell where the documentation and the runtime disagree, which is excluded from evaluation.

api_dictionary

One row per tracked API: api, category, doc_uri, canonical_path, entry_type, signature_source, first_version, last_version, is_constant, and the per-version documentation as JSON strings (doc_versions, online_doc_versions).

How the data was built

  • Library usage. Public GitHub repositories whose requirements.txt pins the target library to a specific version, deduplicated, with a permissive license and at least ten stars. Each repository is cloned at the manifest commit, and every call site reaching the library is resolved by static analysis to its fully qualified public API name against the exact pinned version.
  • Versions. For each library, the ten most-used versions in the mined manifests (nine for SciPy, where 1.5 was too old for the extraction toolchain).
  • API surface. Rebuilt per release from the official Sphinx objects.inv inventory and from runtime introspection of the installed package. An API counts as present only when both sources agree.
  • Declarative tasks. API Identification and Signature Recall are generated from the compatibility matrices and the documentation, with no mined code.

No synthetic data or model-generated content is included, and there is no human annotation.

Intended use

Evaluating how well code generation models know the API of a specific library version, comparing models on stable versus evolving APIs, and studying version-aware code generation, retrieval and static checking. It is an evaluation benchmark and is not meant as training data. Training on it would invalidate results on it.

Limitations and biases

  • Scope. Three libraries from the Python scientific stack. Results may not transfer to other ecosystems, languages or kinds of libraries.
  • Source bias. Call sites come only from permissively licensed repositories with at least ten stars that pin versions in requirements.txt, which favours popular, maintained projects and the APIs they use.
  • Conservative API surface. Requiring documentation and runtime to agree excludes some public APIs (null cells, about 3.4% of the matrix cells).
  • Possible contamination. API Calling instances come from public code that may be in model training data. The two declarative tasks are not mined from code and are not exposed in the same way.

Personal and sensitive information

The API Calling tables contain code from public GitHub repositories and their URLs. These snippets can include author names, e-mail addresses or similar information that was present in the public source files. No other personal data was collected, and the dataset involves no human subjects.

License

The dataset is released under CC BY 4.0. Code snippets mined from GitHub remain under the license of their source repository (all permissive; licenses.json lists the licenses that occur). The evaluation code is released under Apache 2.0 in the code repository.

Citation

@inproceedings{cipollone2026libevobench,
  title     = {{LibEvoBench}: Probing Temporal Knowledge Stratification
               in Code Generation Models},
  author    = {Cipollone, Daniele and Titov, Sergey and Izadi, Maliheh
               and Bogomolov, Egor and van Deursen, Arie},
  booktitle = {Advances in Neural Information Processing Systems},
  year      = {2026}
}