mlsanityData to 7 Oct 2026

Learning Bug Context for PyTorch-to-JAX Translation with LLMs

arXiv 2510.09898 ↗First posted 10 Oct 2025cs.LG cs.AIcited by 0

Not on the map. Why?

Abstract (arXiv)

Large language models (LLMs) have shown strong performance on code translation between widely used programming languages. However, translation becomes much less reliable for domain-specific code, where correctness depends on framework-specific APIs and execution semantics. One example is translating deep-learning code from PyTorch to JAX, where LLM outputs often contain subtle bugs or non-idiomatic usage that prevents execution or changes behavior. Prior work suggests that curated bug-fix data from LLM-generated code can help improve code generation quality, but such resources are still limited for PyTorch-to-JAX translation. In this work, we introduce T2J, a benchmark of LLM translation bugs paired with developer-written fixes for PyTorch-to-JAX code. We start from 20 kernels in the TorchLeet dataset, translate them to JAX using the weak LLM gpt-4o-mini, and hire software developers to debug and repair the generated JAX implementations. We then use T2J to improve PyTorch-to-JAX translation for the weak LLM gpt-4o-mini via in-context learning. Our evaluation shows that using T2J yields up to 20% improvement of our proposed metric T2J-CodeTrans-Score.

Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 25 of its 31 references that are in the map. First posted on arXiv 10 Oct 2025.

Builds on

25 of 31 references.

References · 25

  1. 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 732
  2. 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 638
  3. 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 600
  4. 2020CodeBLEU: a Method for Automatic Evaluation of Code Synthesiscited by 468
  5. 2021Unified Pre-training for Program Understanding and Generationcited by 361
  6. 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 355
  7. 2023CodeBERTScore: Evaluating Code Generation with Pretrained Models of Codecited by 101
  8. 2024HumanEval-XL: A Multilingual Code Generation Benchmark for Cross-lingual Natural Language Generalizationcited by 84
  9. 2021Leveraging Automated Unit Tests for Unsupervised Code Translationcited by 82
  10. 2021DOBF: A Deobfuscation Pre-Training Objective for Programming Languagescited by 68
  11. 2024LLMs Assist NLP Researchers: Critique Paper (Meta-)Reviewingcited by 62
  12. 2024Exploring and Unleashing the Power of Large Language Models in Automated Code Translationcited by 57
13 more
  1. 2024CodeUltraFeedback: An LLM-as-a-Judge Dataset for Aligning Large Language Models to Coding Preferencescited by 56
  2. 2023CodeTransOcean: A Comprehensive Multilingual Benchmark for Code Translationcited by 55
  3. 2023ICE-Score: Instructing Large Language Models to Evaluate Codecited by 50
  4. 2019Does BLEU Score Work for Code Migration?cited by 49
  5. 2022Code Translation with Compiler Representationscited by 42
  6. 2024CodeJudge: Evaluating Code Generation with Large Language Modelscited by 41
  7. 2024A Systematic Literature Review on Large Language Models for Automated Program Repaircited by 37
  8. 2023Large Language Models of Code Fail at Completing Code with Potential Bugscited by 28
  9. 2024AlphaTrans: A Neuro-Symbolic Compositional Approach for Repository-Level Code Translation and Validationcited by 28
  10. 2024CodeRosetta: Pushing the Boundaries of Unsupervised Code Translation for Parallel Programmingcited by 19
  11. 2024InterTrans: Leveraging Transitive Intermediate Translations to Enhance LLM-based Code Translationcited by 15
  12. 2024Open LLMs are Necessary for Current Private Adaptations and Outperform their Closed Alternativescited by 12
  13. 2023Program Translation via Code Distillationcited by 10

Built on by

Not cited yet.