mlsanityData to 14 Oct 2026

Function-to-Style Guidance of LLMs for Code Translation

arXiv 2507.11083 ↗First posted 15 Jul 2025cs.AI cs.SEcited by 4

Not on the map. Why?

Abstract (arXiv)

Large language models (LLMs) have made significant strides in code translation tasks. However, ensuring both the correctness and readability of translated code remains a challenge, limiting their effective adoption in real-world software development. In this work, we propose F2STrans, a function-to-style guiding paradigm designed to progressively improve the performance of LLMs in code translation. Our approach comprises two key stages: (1) Functional learning, which optimizes translation correctness using high-quality source-target code pairs mined from online programming platforms, and (2) Style learning, which improves translation readability by incorporating both positive and negative style examples. Additionally, we introduce a novel code translation benchmark that includes up-to-date source code, extensive test cases, and manually annotated ground-truth translations, enabling comprehensive functional and stylistic evaluations. Experiments on both our new benchmark and existing datasets demonstrate that our approach significantly improves code translation performance. Notably, our approach enables Qwen-1.5B to outperform prompt-enhanced Qwen-32B and GPT-4 on average across 20 diverse code translation scenarios.

Key facts. Cited by 4 papers in the map (data through 14 Oct 2026). Builds on 34 of its 50 references that are in the map. First posted on arXiv 15 Jul 2025.

Builds on

34 of 50 references.

References · 34

  1. 2023GPT-4 Technical Reportcited by 18,396
  2. 2017Proximal Policy Optimization Algorithmscited by 15,215
  3. 2020A Simple Framework for Contrastive Learning of Visual Representationscited by 12,049
  4. 2023Direct Preference Optimization: Your Language Model is Secretly a Reward Modelcited by 8,065
  5. 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 906
  6. 2023Instruction Tuning for Large Language Models: A Surveycited by 623
  7. 2024StarCoder 2 and The Stack v2: The Next Generationcited by 502
  8. 2020Unsupervised Translation of Programming Languagescited by 263
  9. 2021CodeNet: A Large-Scale AI for Code Dataset for Learning a Diversity of Coding Taskscited by 200
  10. 2024Beyond Functional Correctness: Exploring Hallucinations in LLM-Generated Codecited by 107
  11. 2024Benchmarking Benchmark Leakage in Large Language Modelscited by 106
  12. 2023Jina Embeddings 2: 8192-Token General-Purpose Text Embeddings for Long Documentscited by 104
22 more
  1. 2018Tree-to-tree Neural Networks for Program Translationcited by 93
  2. 2021Leveraging Automated Unit Tests for Unsupervised Code Translationcited by 82
  3. 2022Automated Repair of Programs from Large Language Modelscited by 71
  4. 2021AVATAR: A Parallel Corpus for Java-Python Program Translationcited by 59
  5. 2023CodeTransOcean: A Comprehensive Multilingual Benchmark for Code Translationcited by 57
  6. 2022XLCoST: A Benchmark Dataset for Cross-lingual Code Intelligencecited by 56
  7. 2023Unveiling Security, Privacy, and Ethical Concerns of ChatGPTcited by 53
  8. 2023xCodeEval: A Large Scale Multilingual Multitask Benchmark for Code Understanding, Generation, Translation and Retrievalcited by 47
  9. 2022Code Translation with Compiler Representationscited by 42
  10. 2023CodeScope: An Execution-based Multilingual Multitask Multidimensional Benchmark for Evaluating LLMs on Code Understanding and Generationcited by 39
  11. 2024Rectifier: Code Translation with Corrector via LLMscited by 20
  12. 2024UniCoder: Scaling Code Large Language Model via Universal Codecited by 18
  13. 2024Rewriting the Code: A Simple Method for Large Language Model Augmented Code Searchcited by 17
  14. 2024Unraveling the Potential of Large Language Models in Code Translation: How Far Are We?cited by 17
  15. 2024Enhancing Code Translation in Language Models with Few-Shot Learning via Retrieval-Augmented Generationcited by 16
  16. 2022Better Together? An Evaluation of AI-Supported Code Translationcited by 15
  17. 2023Program Translation via Code Distillationcited by 10
  18. 2023Data Augmentation for Code Translation with Comparable Corpora and Multiple Referencescited by 9
  19. 2024Output Format Biases in the Evaluation of Large Language Models for Code Translationcited by 9
  20. 2018Revisiting the tree edit distance and its backtracing: A tutorialcited by 8
  21. 2024TransAgent: Enhancing LLM-Based Code Translation via Fine-Grained Execution Alignmentcited by 7
  22. 2024Enhancing Cross-Language Code Translation via Task-Specific Embedding Alignment in Retrieval-Augmented Generationcited by 4

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 1; 2026: 3.

4 papers.