Papers › Data Augmentation for Code Translation with Comparable Corpora and Multiple References

Data Augmentation for Code Translation with Comparable Corpora and Multiple References

1 Nov 2023arXiv:2311.00317archive 2025-07-28

Yiqing Xie, Atharva Naik, Daniel Fried, Carolyn Rose

One major challenge of translating code between programming languages is that parallel training data is often limited. To overcome this challenge, we present two data augmentation techniques, one that builds comparable corpora (i.e., code pairs with similar functionality), and another that augments existing parallel data with multiple reference translations. Specifically, we build and analyze multiple types of comparable corpora, including programs generated from natural language documentation using a code generation model. Furthermore, to reduce overfitting to a single reference translation, we automatically generate additional translation references for available parallel data and filter the translations by unit tests, which increases variation in target translations. Experiments show that our data augmentation techniques significantly improve CodeT5 for translation between Java, Python, and C++ by an average of 7.5% Computational Accuracy (CA@1), which verifies the correctness of translations by execution. The code is available at https://github.com/Veronicium/CMTrans.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2311.00317")

Code

Syntology Ran 6 of 12 code samples harvested from 1 repository linked to this paper; 6 have no recorded run. Of those that ran: 6 ran with no contract checked.

By repository: official repository: 12 samples from 1 repository, 6 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

veronicium/cmtrans officialmentioned in papermentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

12 samples harvested; 6 ran; 0 honoured the contract we drafted; 6 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

6ran
6unverified

Licence: 12 of the 12 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from veronicium/cmtrans. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

add_lang_by_task veronicium/cmtrans/codet5/_utils.py official repository ran fingerprinted no licence file found · pointer only · 2e3e72e1e860afb2 · report
compare_answer veronicium/cmtrans/candidate_filtering/filter_candidates.py official repository ran fingerprinted no licence file found · pointer only · b507c1b1c65c9174 · report
convert_clone_examples_to_features veronicium/cmtrans/codet5/_utils.py official repository ran no licence file found · pointer only · cc181d5e6e9504de · report
convert_examples_to_features veronicium/cmtrans/codet5/_utils.py official repository ran no licence file found · pointer only · 70674cae33ae9c61 · report
get_model_size veronicium/cmtrans/codet5/models.py official repository ran no licence file found · pointer only · 8cfe38019e9d6a49 · report
load_codet5 veronicium/cmtrans/codet5/models.py official repository ran no licence file found · pointer only · b57e5f4b7c4d2011 · report
add_args veronicium/cmtrans/codet5/config.py official repository unverified no licence file found · pointer only · 37156125554b21d2 · report
build_or_load_gen_model veronicium/cmtrans/codet5/models.py official repository unverified no licence file found · pointer only · 78e60a90cda4f3d6 · report
eval_ppl_epoch veronicium/cmtrans/codet5/run_gen.py official repository unverified no licence file found · pointer only · 7151e260c673ae6c · report
load_and_cache_clone_data veronicium/cmtrans/codet5/utils.py official repository unverified no licence file found · pointer only · 4dfcf272e3b5535f · report
load_and_cache_gen_data veronicium/cmtrans/codet5/utils.py official repository unverified no licence file found · pointer only · 08e8e1fc7c5648f7 · report
load_and_cache_multi_gen_data veronicium/cmtrans/codet5/utils.py official repository unverified no licence file found · pointer only · 8638626b5e47ee34 · report

Tasks

Code GenerationCode TranslationData AugmentationTranslation

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

AdafactorAttentionAttention DropoutBPECodeT5Dense ConnectionsDropoutGated Linear UnitInverse Square Root ScheduleLayer NormalizationLinear LayerMulti-Head AttentionResidual ConnectionSentencePieceSoftmaxT5

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections