LibEvoBench: Probing Temporal Knowledge Stratification in Code Generation Models
The paper introduces LibEvoBench, a multi-task benchmark and the Software Evolution Understanding Score (SEUS) metric to evaluate Large Language Models' ability to handle evolving library APIs, revealing that current models are largely version-oblivious and prone to anachronistic errors despite explicit version specifications.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you are hiring a brilliant new software engineer who has read every single book, manual, and code snippet ever written about a popular tool called "PyTorch." They are incredibly smart and can write code faster than anyone else.
However, there's a catch: they have no sense of time.
This is the core problem researchers Daniele Cipollone and his team investigated in their paper, "LibEvoBench." They discovered that even the smartest AI coding assistants today are like that time-blind engineer: they struggle to know which version of a software library to use, often mixing up old rules with new ones.
Here is a breakdown of their findings using simple analogies.
1. The Problem: The "Time-Blind" Chef
Imagine a library (like PyTorch or NumPy) is a massive cookbook. Every few months, the publisher releases a new edition.
- Old Edition: Says "Add salt to taste."
- New Edition: Says "Add salt and pepper, but only if the dish is spicy."
Real-world software projects are like restaurants that often stick to an old edition of the cookbook because changing the whole menu is too expensive and risky.
The researchers found that current AI models are trained on a "smoothie" of all these cookbooks mixed together. They don't have a mechanism to say, "Wait, this specific restaurant is using the 2021 edition, so I must use the 2021 rules." Instead, they guess based on the most common or latest rules, leading to anachronistic errors—using a command that didn't exist in the old version or ignoring a rule that was removed.
2. The Solution: LibEvoBench (The "Time-Travel Test")
To prove this, the team built a new test called LibEvoBench. Think of this as a rigorous exam for AI chefs.
- The Setup: They created thousands of test questions based on real code from real projects using specific versions of popular libraries (PyTorch, NumPy, SciPy).
- The Three Tasks:
- API Calling: "Here is a half-written recipe. Fill in the missing ingredient." (Can the AI pick the right tool for this specific version?)
- API Identification: "Here is a description of a tool. What is its name?" (Can the AI identify the right tool without seeing the code?)
- Signature Recall: "What are the exact ingredients and measurements for this tool?" (Can the AI remember the specific details that change between versions?)
3. The Results: The AI is "Version-Oblivious"
The results were surprising and consistent across the smartest models (like GPT-4/5, Claude, and Gemini):
- The "Stable" vs. "Evolving" Gap: When the AI was asked about tools that never change (Stable APIs), it did great. But when asked about tools that do change between versions (Evolving APIs), its performance dropped significantly. It's like the AI is great at cooking with a knife, but terrible at cooking with a specific new gadget that was released last year.
- The "Version Tag" Illusion: The researchers tried to help the AI by explicitly telling it, "Use version 2.0." It didn't help at all. It's like telling a time-blind person, "You are in 1990," but they still try to use a smartphone that didn't exist yet. The AI sees the word "version 2.0" but doesn't actually know what that version contains.
- The "Manual" Boost: However, when the researchers gave the AI the actual documentation (the recipe book) right next to the question, the AI's performance jumped up by 10–20 points. This proves the AI can learn the rules if you hand it the book, but it doesn't have those rules memorized in its own brain.
4. The New Scorecard: SEUS
The team created a new score called SEUS (Software Evolution Understanding Score). Instead of just asking "How many answers were right?", this score asks:
- "Did the model get the right answers for both old and new versions?"
- "Did it get confused and mix up the eras?"
Using this score, they found that even the best models are still largely "version-oblivious." They are smart, but they lack a specific kind of "temporal awareness" needed to navigate software that changes over time.
Summary
The paper concludes that current AI coding models are like brilliant students who have read every textbook but forgot to note the publication dates. They can write code, but they often accidentally use "future" features in "past" projects or "past" features in "future" projects.
The researchers argue that to fix this, we can't just make the models bigger or smarter; we need to teach them how to organize their knowledge by time, so they know exactly which rules apply to which version of the software.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.