Converted, Not Equivalent: Benchmarking Codebase Conversion via Observational Equivalence
On the map: LLM agents and tool use → Software engineering coding agents
Abstract (arXiv)
Migrating a machine-learning codebase across frameworks--for example from PyTorch to JAX--is a routine but costly engineering task that is fundamentally cross-paradigm: eager, stateful, object-oriented modules must be rewritten as pure, jittable functions over an explicit parameter pytree. We ask whether coding agents can perform such whole-repository migrations correctly, and argue that existing code benchmarks, which grade unit-test pass rates or surface-level similarity to a reference translation, cannot answer this: they neither require the migrated system to behave the same nor prevent a JAX reimplementation from faking equivalence by secretly importing PyTorch itself. We introduce T2J-BENCH, a benchmark of 63 whole-repository PyTorch-to-JAX migration tasks spanning 18 model families across both training and serving, where torch-free checkpoint conversion is itself part of the deliverable. T2J-BENCH grades execution-grounded functional equivalence: each candidate is run inside a separate, torch-free, offline verifier and scored against references frozen from the PyTorch original, under a hard independence gate and a continuous, threshold-free reward. Across twenty off-the-shelf agent--model configurations, the strongest recovers only 0.676 of the reward against a 0.980 oracle, with substantial numeric and behavioral divergence despite high spec pass rates. Finally, we contribute TWINHARNESS, a reference-grounded agent harness that turns the agent's executable PyTorch source into legitimate self-verification feedback; applied to an opus-5 agent it raises the reward from 0.649 to 0.723--the highest of any configuration--using only task-visible resources.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 31 of its 60 references that are in the map. First posted on arXiv 27 May 2026.
Builds on
31 of 60 references.
Closest ancestors · 8
Same direction, newest first
- 2026GLM-5: from Vibe Coding to Agentic Engineering17 Feb
- 2025AlphaEvolve: A coding agent for scientific and algorithmic discovery16 Jun
- 2025ProjectEval: A Benchmark for Programming Agents Automated Evaluation on Project-Level Code Generation10 Mar
- 2024AppWorld: A Controllable World of Apps and People for Benchmarking Interactive Coding Agents26 Jul
- 2024OpenHands: An Open Platform for AI Software Developers as Generalist Agents23 Jul
- 2024MapCoder: Multi-Agent Code Generation for Competitive Problem Solving18 May
- 2024SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering6 May
- 2024CodeAgent: Autonomous Communicative Agents for Code Review3 Feb
Other references · 23
- 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,373
- 2023Large Language Models Cannot Self-Correct Reasoning Yetcited by 1,017
- 2023Teaching Large Language Models to Self-Debugcited by 988
- 2023CRITIC: Large Language Models Can Self-Correct with Tool-Interactive Critiquingcited by 783
- 2024MLE-bench: Evaluating Machine Learning Agents on Machine Learning Engineeringcited by 469
- 2023RepoBench: Benchmarking Repository-Level Code Auto-Completion Systemscited by 353
- 2024AutoCodeRover: Autonomous Program Improvementcited by 278
- 2025FEA-Bench: A Benchmark for Evaluating Repository-Level Code Generation for Feature Implementationcited by 58
- 2023CodeTransOcean: A Comprehensive Multilingual Benchmark for Code Translationcited by 57
- 2023xCodeEval: A Large Scale Multilingual Multitask Benchmark for Code Understanding, Generation, Translation and Retrievalcited by 47
- 2023A Closer Look at the Self-Verification Abilities of Large Language Models in Logical Reasoningcited by 41
- 2024RepoTransBench: A Real-World Multilingual Benchmark for Repository-Level Code Translationcited by 23
11 more
- 2024M2rc-Eval: Massively Multilingual Repository-level Code Completion Evaluationcited by 21
- 2025DependEval: Benchmarking LLMs for Repository Dependency Understandingcited by 17
- 2025Migrating Code At Scale With LLMs At Googlecited by 14
- 2025CODEMENV: Benchmarking Large Language Models on Code Migrationcited by 13
- 2025MigrationBench: Repository-Level Code Migration Benchmark from Java 8cited by 11
- 2025ExeCoder: Empowering Large Language Models with Executability Representation for Code Translationcited by 10
- 2024Automatic Library Migration Using Large Language Models: First Resultscited by 9
- 2024RustRepoTrans: Repository-level Code Translation Benchmark Targeting Rustcited by 6
- 2025RepoDebug: Repository-Level Multi-Task and Multi-Language Debugging Evaluation of Large Language Modelscited by 5
- 2025An Empirical Study of Python Library Migration Using Large Language Modelscited by 2
- 2026JMigBench: A Benchmark for Evaluating LLMs on Source Code Migration (Java 8 to Java 11)cited by 2
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026RepoMod-Bench: A Benchmark for Code Repository Modernization via Implementation-Agnostic Testing
- 2026A Jagged Frontier: Evaluating Robustness of Code Agents to Semantics-Preserving Transformations
- 2026E2E-SWE: Benchmarking LLMs on Building Working Codebases from Scratch
- 2026PERFOPT-Bench: Evaluating Coding Agents on Software Performance Optimization
- 2026SlopCodeBench: Benchmarking How Coding Agents Degrade Over Long-Horizon Iterative Tasks
- 2026SWE Refactor Bench: Can Coding Agents Complete a Long-Horizon, Whole-Repository Stack Migration?
- 2026LoopsBench: From Harness Engineering to Loop Engineering in Coding Agent Evaluation
- 2026SWE-Bench ProMax: Benchmarking Agents on Large-Scale Multilingual Code Refactoring