{"paper":{"title":"Improving Code Translation with Syntax-Guided and Semantic-aware Preference Optimization","license":"http://creativecommons.org/licenses/by/4.0/","headline":"A contrastively trained cross-lingual model supplies reliable semantic rewards for code translation inside direct preference optimization.","cross_cats":["cs.SE"],"primary_cat":"cs.AI","authors_text":"Chen Shen, Huan Zhang, Jingyue Yang, Wei Cheng, Wei Hu, Yuhan Wu","submitted_at":"2026-05-13T09:19:39Z","abstract_excerpt":"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. Through contrastive learning, we train a c"},"claims":{"count":4,"items":[{"kind":"strongest_claim","text":"Through contrastive learning, we train a cross-lingual semantic model to directly assess functional equivalence between source and translated code. By formulating code translation as a multi-objective optimization problem, this robust semantic signal is seamlessly unified with compiler-based syntactic feedback within the direct preference optimization framework.","source":"verdict.strongest_claim","status":"machine_extracted","claim_id":"C1","attestation":"unclaimed"},{"kind":"weakest_assumption","text":"A robust semantic reward for code translation must be derived directly from the source code via a contrastively trained cross-lingual model that accurately captures functional equivalence without test cases or reference translations.","source":"verdict.weakest_assumption","status":"machine_extracted","claim_id":"C2","attestation":"unclaimed"},{"kind":"one_line_summary","text":"CTO improves code translation by training a semantic equivalence model through contrastive learning and unifying it with syntactic compiler feedback in a multi-objective direct preference optimization setup.","source":"verdict.one_line_summary","status":"machine_extracted","claim_id":"C3","attestation":"unclaimed"},{"kind":"headline","text":"A contrastively trained cross-lingual model supplies reliable semantic rewards for code translation inside direct preference optimization.","source":"verdict.pith_extraction.headline","status":"machine_extracted","claim_id":"C4","attestation":"unclaimed"}],"snapshot_sha256":"365d5d858247af58db1458fe1cdfbcd127aa4cd837f9f8ac9d9941a1e031c9db"},"source":{"id":"2605.13229","kind":"arxiv","version":1},"verdict":{"id":"1d41bc17-d481-404b-bfa7-28b4b86ad7ee","model_set":{"reader":"grok-4.3"},"created_at":"2026-05-14T20:00:12.450098Z","strongest_claim":"Through contrastive learning, we train a cross-lingual semantic model to directly assess functional equivalence between source and translated code. By formulating code translation as a multi-objective optimization problem, this robust semantic signal is seamlessly unified with compiler-based syntactic feedback within the direct preference optimization framework.","one_line_summary":"CTO improves code translation by training a semantic equivalence model through contrastive learning and unifying it with syntactic compiler feedback in a multi-objective direct preference optimization setup.","pipeline_version":"pith-pipeline@v0.9.0","weakest_assumption":"A robust semantic reward for code translation must be derived directly from the source code via a contrastively trained cross-lingual model that accurately captures functional equivalence without test cases or reference translations.","pith_extraction_headline":"A contrastively trained cross-lingual model supplies reliable semantic rewards for code translation inside direct preference optimization."},"references":{"count":50,"sample":[{"doi":"","year":2020,"title":"NeurIPS , year = 2020, pages =","work_id":"44b7714c-76ec-4291-940b-333e55cef989","ref_index":1,"cited_arxiv_id":"","is_internal_anchor":false},{"doi":"","year":2024,"title":"ICSE , year = 2024, pages =","work_id":"5af42412-6224-44e6-b327-27b2d40d0fe0","ref_index":2,"cited_arxiv_id":"","is_internal_anchor":false},{"doi":"","year":2022,"title":"ICLR , year = 2022, pages =","work_id":"cecdd246-be52-4da6-a91a-70ba65f4383d","ref_index":3,"cited_arxiv_id":"","is_internal_anchor":false},{"doi":"","year":2023,"title":"ICLR , year = 2023, pages =","work_id":"aec077c7-0b75-4a0a-83c4-509d3ca7249b","ref_index":4,"cited_arxiv_id":"","is_internal_anchor":false},{"doi":"","year":2023,"title":"ASE , year = 2023, pages =","work_id":"81bc644d-2da1-4838-ba74-926922b727b7","ref_index":5,"cited_arxiv_id":"","is_internal_anchor":false}],"resolved_work":50,"snapshot_sha256":"f2b2d95fa794615f4b6f3e4a577920259348bb1553aa5c16c1f07bf0c61e0cc6","internal_anchors":0},"formal_canon":{"evidence_count":2,"snapshot_sha256":"37477977d974d20a12970ce0f8c3bde56d5b88f0422ca8dfda9c07460404a405"},"author_claims":{"count":0,"strong_count":0,"snapshot_sha256":"258153158e38e3291e3d48162225fcdb2d5a3ed65a07baac614ab91432fd4f57"},"builder_version":"pith-number-builder-2026-05-17-v1"}