- A dual-LLM Questioner-Solver pipeline generates dialogue-based training data for code translation, embedding reasoning traces and feedback.
- A 7B open-weight model, trained on this synthetic data, outperformed Gemini 2.5 Flash and LLaMA 4 Scout 17B on code translation benchmarks.
- The research suggests that training data quality, particularly dialogue, is more critical than model size for specialized code translation.
A 7B open-weight model, trained on entirely synthetic data, just outperformed Gemini 2.5 Flash and LLaMA 4 Scout 17B on code translation benchmarks. The research behind that result, posted to arXiv on November 29, 2025 by Le Chen, Nuo Xu and colleagues at Argonne National Laboratory and the University of Minnesota, argues that the quality of training data matters more than model size, and that dialogue, not static code pairs, is how you build that quality.
Dialogue Transforms LLM Code Translation Data
The paper, titled “Beyond Code Pairs: Dialogue-Based Data Generation for LLM Code Translation,” starts from a simple observation: existing approaches to training code translation models rely on matched source-target pairs, which capture the answer but not the reasoning that got there. Chen and colleagues propose replacing that format with multi-turn dialogues that embed the full process, compiler errors, runtime failures, iterative fixes, as structured training signal. The question the research sets out to answer is whether encoding that problem-solving trace into synthetic data can teach a model to translate code the way a skilled programmer actually works through it.
The Dual-LLM Questioner-Solver Architecture
The pipeline’s core mechanism is a split between two LLM roles. The Questioner analyses the current state of a translation attempt and generates targeted prompts that incorporate external feedback, compiler errors, execution outputs, test failures. The Solver takes those prompts and produces revised code, generates unit tests to check functional consistency, and proposes further corrections. Neither model is doing the full job alone; the architecture is designed so that analysis and generation stay separate, keeping each role focused.
What that separation produces is training data that records not just whether a translation was eventually correct, but the sequence of decisions and corrections that made it correct. A model fine-tuned on those dialogues learns to handle the iterative reality of code translation, something a clean source-target pair cannot teach it.
Bridging Data Gaps in Specialized Domains
Fortran and CUDA are the test cases here, and the choice is deliberate. Both are domains where human-curated parallel datasets barely exist: Fortran is critical in scientific computing but largely absent from modern training corpora; CUDA is central to GPU programming but still niche enough that high-quality translation data is scarce. The pipeline generated roughly 3,640 dialogues for Fortran-to-C++ translation and 3,930 for C++-to-CUDA, decomposing further into more than 14,100 and 12,700 Question-Solution pairs respectively, alongside three test suites for evaluation. That scale of verified, reasoning-rich synthetic data is precisely what neither domain previously had.
Small Model Achieves Major Performance Gains
The 7B model fine-tuned on dialogue data outperformed substantially larger models on compilation and execution success, models backed by far greater compute. That gap suggests the bottleneck in specialised code translation is not raw model capacity but the structure of the training signal.
Implications for Advanced Code Intelligence
The broader case the paper makes is that dialogue-driven data generation is a transferable method, not a one-off trick for Fortran and CUDA. If the Questioner-Solver pipeline can be instantiated for other low-resource programming domains, legacy languages, domain-specific hardware frameworks, emerging parallel computing environments, then the same approach could close data gaps that have kept LLMs weak in specialised technical settings. This connects to a wider pattern in synthetic data research: the quality and structure of artificially generated data, when designed carefully, can substitute for real-world corpora that are expensive or impractical to collect. For code translation specifically, where correctness is verifiable and compiler feedback is unambiguous, the conditions for high-quality synthetic data generation are unusually favourable. It is not yet clear how far this generalises to programming domains where automated verification is harder, but the results here give the approach real credibility. Work like OpenAI’s recent progress on formal mathematics points in a similar direction: structured reasoning traces, embedded in training data, appear to matter. For more coverage of AI research and breakthroughs, visit our AI Research section.



