TL;DR
TRACEEVAL is a new execution-verified, multi-language benchmark designed to test whether Large Language Models (LLMs) can truly understand code semantics by reconstructing a program's runtime call graph. Unlike traditional benchmarks that only check if code passes tests, TRACEEVAL uses actual program execution to eliminate label noise and human error across Python, JavaScript, and Java. The benchmark reveals that even frontier models struggle with deep semantic reasoning, but fine-tuning smaller models on reasoning traces can dramatically close the performance gap.
What Problem Does This Paper Address?
The current code-LLM evaluation landscape is heavily dominated by "test-passing" benchmarks like HumanEval, MBPP, and SWE-Bench. While useful, these benchmarks often conflate an LLM's true semantic understanding of code with pattern retrieval, API knowledge, and test-specific search. A model might generate code that passes a test suite while still hallucinating call targets, misresolving aliases, or confusing dynamic dispatch.
Furthermore, existing benchmarks for call-graph construction (predicting which functions call which) are typically siloed to a single language and rely on noisy, hand-annotated data or imperfect static analysis tools. This paper addresses the need for a scalable, multi-language, and mechanically verifiable benchmark that evaluates an LLM's ability to recover execution-grounded program structures directly from source code.
Methods
The authors developed an automated, three-stage pipeline to construct TRACEEVAL:
- Harness Generation: Real-world source files from GitHub are rarely runnable in isolation. The authors used an LLM (GPT-5.4) to generate standalone executable "harnesses" by adding driver entry points and replacing external imports with lightweight inline stubs.
- Dynamic Tracing: To establish absolute ground truth, the pipeline runs each harnessed program under a language-specific dynamic tracer (
sys.settracefor Python, AST instrumentation for JavaScript, and method injection for Java) to record every single function-to-function call that actually occurs at runtime. - Validation: Programs are only accepted if they execute without error and produce a non-trivial trace (at least two cross-function edges), ensuring the ground truth is entirely free from human annotator bias or static-tool errors.
Additionally, the authors explored Supervised Fine-Tuning (SFT) by using GPT-5.4 to generate step-by-step reasoning traces (Chain-of-Thought) explaining how the call graphs are derived, which were then used to train the open-weight Qwen2.5-Coder model family via LoRA.
Datasets
The resulting dataset, TRACEEVAL, consists of 10,583 real-world programs extracted from over 1,600 permissively licensed GitHub repositories. It is split into:
- Training Split: 8,454 programs used for fine-tuning.
- Test Split: 2,129 held-out programs (769 Python, 649 JavaScript, 711 Java) for zero-shot evaluation.
Crucially, the split is performed at the repository level, ensuring zero data leakage between training and testing code.
Key Insights and Ideas
- Call Graphs as a Reasoning Probe: Constructing a call graph is an excellent proxy for compositional reasoning. To get it right, a model must successfully chain variable tracking, alias resolution, and dynamic dispatch across multiple execution hops.
- The Precision Premium: The highest-performing frontier models excel not because they find more execution edges (recall), but because they are highly conservative and avoid over-predicting non-executed edges (precision).
- Fine-Tuning Fixes "Bookkeeping": Smaller models suffer heavily from formatting and schema mismatches in zero-shot settings. Providing them with training data rich in reasoning traces allows them to overcome these bookkeeping errors and punch far above their weight class.
Key Results
- Zero-Shot Frontier: Claude-Opus-4.6 emerged as the strongest model, achieving an average F1 score of 72.9% across all three languages. DeepSeek-v3.2 proved to be the strongest open-weight model zero-shot at 62.1% F1.
- Fine-Tuning Lifts: Fine-tuning the Qwen2.5-Coder family on the training split yielded massive performance jumps. Notably, Qwen2.5-Coder-32B's F1 score surged by +24.6 points to 71.2%, placing it within striking distance (1.7 F1 points) of zero-shot Claude-Opus-4.6. Even the tiny 1.5B model saw a staggering +55.6 F1 improvement.
- Common Failure Modes: A manual audit of Claude-Opus-4.6 highlighted three primary errors:
- Untaken-branch hallucination: Predicting calls inside
if/elseblocks that were never actually triggered by the input. - Dynamic dispatch confusion: Relying on statically declared types rather than tracking the concrete runtime types assigned to interfaces.
- Output schema mismatches: Misinterpreting how to represent constructor initializations (
<init>) versus bare class names.
Limitations and Future Work
While TRACEEVAL represents a major step forward, the authors note a few limitations:
- Language Coverage: The benchmark currently spans Python, JavaScript, and Java. Future iterations aim to include Go, Rust, and TypeScript.
- Trace Generation Dependency: The training split currently relies on teacher-distilled reasoning traces from GPT-5.4. The authors plan to explore verifier-driven post-training (RL), where models generate their own rationales and are programmatically rewarded only when their final predicted call graph matches the tracer's ground truth.
Summary updated