File size: 11,812 Bytes
a6d1dfb 8424f51 a6d1dfb 8424f51 a6d1dfb 8424f51 f98eeb9 8424f51 fae736c 8424f51 f98eeb9 8424f51 f98eeb9 8424f51 f98eeb9 0fdd7fd f98eeb9 0fdd7fd f98eeb9 8424f51 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 | ---
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-*
---
<div align="center">
<img src="https://huggingface.co/datasets/JetBrains/LibEvoBench/resolve/main/assets/banner.png" alt="LibEvoBench: Probing Temporal Knowledge Stratification in Code Generation Models" width="100%">
Daniele Cipollone<sup>1,2</sup> · Sergey Titov<sup>2</sup> · Maliheh Izadi<sup>1</sup> · Egor Bogomolov<sup>2</sup> · Arie van Deursen<sup>1</sup><br>
<sup>1</sup>Delft University of Technology · <sup>2</sup>JetBrains Research<br>
NeurIPS 2026, Evaluations & Datasets Track
<p>
<a href="https://jetbrains-research.github.io/LibEvoBench/"><img src="https://img.shields.io/badge/Project-page-0f1729?style=for-the-badge" alt="Project page"></a>
<a href="https://neurips.cc/virtual/2026/poster/139459"><img src="https://img.shields.io/badge/NeurIPS-2026-7c3aed?style=for-the-badge" alt="NeurIPS 2026"></a>
<a href="https://arxiv.org/abs/2606.25402"><img src="https://img.shields.io/badge/arXiv-2606.25402-b31b1b?style=for-the-badge&logo=arxiv&logoColor=white" alt="arXiv"></a>
<a href="https://github.com/JetBrains-Research/LibEvoBench"><img src="https://img.shields.io/badge/Code-GitHub-181717?style=for-the-badge&logo=github&logoColor=white" alt="Code"></a>
<a href="https://doi.org/10.5281/zenodo.20066456"><img src="https://img.shields.io/badge/DOI-10.5281%2Fzenodo.20066456-1682d4?style=for-the-badge" alt="DOI"></a>
</p>
</div>
---
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.
<p align="center"><img src="https://huggingface.co/datasets/JetBrains/LibEvoBench/resolve/main/assets/pipeline.png" alt="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." width="100%"></p>
## 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.
<p align="center"><img src="https://huggingface.co/datasets/JetBrains/LibEvoBench/resolve/main/assets/results.png" alt="Stable versus evolving API scores for 13 models, ranked by SEUS. Every model scores lower on evolving APIs." width="100%"></p>
The interactive leaderboard is on the [project page](https://jetbrains-research.github.io/LibEvoBench/#leaderboard).
## Loading the data
There is one configuration per library and table, named `<library>__<table>`, each with a single `train` split.
```python
from datasets import load_dataset
ds = load_dataset("JetBrains/LibEvoBench", "torch__benchmark_t1", split="train")
```
The [code repository](https://github.com/JetBrains-Research/LibEvoBench) 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](https://creativecommons.org/licenses/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](https://github.com/JetBrains-Research/LibEvoBench).
## Citation
```bibtex
@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}
}
```
|