LibEvoBench: Probing Temporal Knowledge Stratification in Code Generation Models

📅 2026-06-24
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
Large language models frequently generate code containing API temporal misalignment errors due to insufficient awareness of library version evolution. To address this, this work introduces LibEvoBench—the first multitask evaluation benchmark focused on multi-version Python libraries—and proposes the Software Evolution Understanding Score (SEUS) to quantify model consistency in API usage across versions. By constructing a multi-version API dataset and systematically evaluating prominent models, the study reveals that merely specifying a version number is insufficient to improve accuracy, whereas providing documentation corresponding to the target version significantly enhances performance. This work is the first to expose the limitations of current models in temporally aware version knowledge and establishes a novel evaluation framework and metric specifically designed for API evolution.
📝 Abstract
Large software projects often depend on older versions of libraries, even as APIs continue to evolve across releases. This creates a challenge for LLMs: they must maintain knowledge of multiple API versions, not merely the latest or most common one. However, current LLMs are trained on temporally mixed corpora and lack explicit mechanisms for such version-specific reasoning, leading to anachronistic errors - calling APIs as they exist in a different library version. To systematically evaluate this phenomenon, we introduce LibEvoBench, a multi-task benchmark spanning multiple versions of widely used Python libraries, along with a new metric, the Software Evolution Understanding Score (SEUS), to measure models' consistency when working with evolving APIs. Our results show that state-of-the-art models are largely version-oblivious: performance degrades for evolving APIs, while for stable APIs it remains the same across versions. Moreover, simply specifying the target version provides no benefit, while relevant documentation significantly boosts models' accuracy. These findings highlight a systematic limitation of current training paradigms and motivate new approaches for temporally grounded knowledge in code generation.
Problem

Research questions and friction points this paper is trying to address.

temporal knowledge
API versioning
code generation
anachronistic errors
library evolution
Innovation

Methods, ideas, or system contributions that make the work stand out.

temporal knowledge stratification
version-aware code generation
API evolution
LibEvoBench
Software Evolution Understanding Score