atlas

Research map / Large language models / Agents, code and math

CodeRosetta: Pushing the Boundaries of Unsupervised Code Translation for Parallel Programming

NeurIPS 2024 · Large language models › Agents, code and math · approach: Execution-based code verification · 4 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Introduces CodeRosetta, a 0.8B encoder-decoder transformer trained unsupervised (cross-lingual MLM, AST entity recognition, tailored denoising, back-translation, optional synthetic-data fine-tuning) for C++↔CUDA and Fortran↔C++ translation.

Problem

Unsupervised code translation between a language and its HPC parallel extensions (C++ to CUDA, Fortran to C++) is underexplored due to scarce parallel corpora and complex parallel semantics; prior models were unidirectional or relied on language-specific metrics.

Approach

An encoder-decoder transformer with pretraining and denoising objectives tailored to HPC extensions: cross-lingual masked LM, AST entity recognition (tree-sitter tags), weighted token dropping prioritizing language keywords, foreign-token insertion, and an adaptive noise rate, plus back-translation and optional LLM-synthetic fine-tuning.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Add MLM pretraining (ablation)CodeRosetta · C++ to CUDABLEU: 52.12 -> 76.90Helped
Add AER pretraining (ablation)CodeRosetta · C++ to CUDACodeBLEU: 75.55 -> 78.84Helped
Use DAE special noises (ablation)CodeRosetta · C++ to CUDACodeBLEU: 73.22 -> 78.84Helped
Add back translation (ablation)CodeRosetta · C++ to CUDACodeBLEU: 73.18 -> 78.84Helped
Fine-tune on synthetic data (ablation)CodeRosetta · C++ to CUDACodeBLEU: 71.21 -> 78.84Helped
Use CodeRosetta instead of BabelTowerC++ to CUDA · C++ to CUDABLEU: +2.9 BLEUHelped
Use CodeRosetta instead of BabelTowerC++ to CUDA · C++ to CUDACodeBLEU: +1.72 pointsHelped
Use CodeRosetta instead of BabelTowerC++ to CUDA · C++ to CUDAcompilation accuracy: 6.05%Helped
Use CodeRosetta instead of fine-tuned StarCoderFortran to C++ · Fortran to C++CodeBLEU: 61.30 -> 65.93Helped
Use CodeRosetta instead of GPT-4CUDA to C++ · CUDA to C++BLEU: 70.18 -> 77.03Helped
Use CodeRosetta instead of GPT-4C++ to Fortran · C++ to FortranCodeBLEU: 35.32 -> 70.46Helped

Surprising findings

Limitations

Experimental setup

Datasets: BabelTower C++-CUDA dataset Stack V2 Bin et al. paired C++-Fortran dataset synthetic C++-CUDA pairs from GPT-4 and Gemini

Benchmarks: BabelTower C++-CUDA test set (180 pairs) Bin et al. C++-Fortran test set (33 pairs)

Metrics: BLEU CodeBLEU ChrF ROUGE-L compilation accuracy functional correctness (30 kernels)

Baselines: BabelTower TransCoder GPT-4 Gemini-Ultra Gemini-Pro StarCoder2-7B DeepSeek-Coder-V2-Lite-Base StarCoder (fine-tuned, Bin et al.)

Builds on: TransCoder BabelTower UniXcoder CodeT5

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy