AI RESEARCH

Improving Code Translation with Syntax-Guided and Semantic-aware Preference Optimization

arXiv CS.AI

ArXi:2605.13229v1 Announce Type: new LLMs have shown immense potential for code translation, yet they often struggle to ensure both syntactic correctness and semantic consistency. While preference-based learning offers a promising alignment strategy, it is hindered by unreliable semantic rewards derived from sparse test cases or restrictive reference translations. We argue that a robust semantic reward for code translation must be derived directly from the source code. In this paper, we propose CTO to improve code translation with syntax-guided and semantic-aware preference optimization.