Unsupervised Translation of Programming Languages

Authors: Baptiste Roziere, Marie-Anne Lachaux, Lowik Chanussot, Guillaume Lample

NeurIPS 2020 | Conference PDF | Archive PDF | Plain Text | LLM Run Details

Reproducibility Variable Result LLM Response
Research Type Experimental We train our model on source code from open source Git Hub projects, and show that it can translate functions between C++, Java, and Python with high accuracy. We report the results on our test set in Table 1, using greedy decoding (beam size 1), for the three metrics presented in Section 4.4. In Table 2, we report our results with beam search decoding, and compare Trans Coder to existing baselines.
Researcher Affiliation Collaboration Baptiste Roziere* Facebook AI Research Paris-Dauphine University broz@fb.com Marie-Anne Lachaux Facebook AI Research malachaux@fb.com Lowik Chanussot Facebook AI Research lowik@fb.com Guillaume Lample Facebook AI Research glample@fb.com
Pseudocode No The paper includes illustrations of code examples (e.g., in Figure 1), but no formal pseudocode or algorithm blocks are provided.
Open Source Code Yes We will make our code and pretrained models publicly available.
Open Datasets Yes We download the Git Hub public dataset available on Google Big Query4. It contains more than 2.8 million open source Git Hub repositories. (Footnote 4: https://console.cloud.google.com/marketplace/details/github/github-repos) and GeeksforGeeks is an online platform9 with computer science and programming articles. It gathers many coding problems and presents solutions in several programming languages. From these solutions, we extract a set of parallel functions in C++, Java, and Python, to create our validation and test sets.
Dataset Splits Yes We build and release a validation and a test set composed of 852 parallel functions in 3 languages, along with unit tests to evaluate the correctness of generated translations. Section B and Table 4 in the appendix present more details on how we create these unit tests, and give statistics about our validation and test sets.
Hardware Specification Yes We implement our models in Py Torch [39] and train them on 32 V100 GPUs.
Software Dependencies No The paper mentions 'Py Torch [39]' but does not specify a version number or other key software dependencies with their versions.
Experiment Setup Yes We use a transformer with 6 layers, 8 attention heads, and set the dimensionality of the model to 1024. We optimize Trans Coder with the Adam optimizer [25], a learning rate of 10 4, and use the same learning rate scheduler as Vaswani et al. [45]. We implement our models in Py Torch [39] and train them on 32 V100 GPUs. At training time, we alternate between the denoising auto-encoding and back-translation objectives, and use batches of around 6000 tokens.