Beyond BLEU: A Semantic Evaluation Method for Code Translation

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Näumann, Julius, Keidel, Sven, Sharifloo, Amir Molzam, Mezini, Mira
Natura: Preprint
Pubblicazione: 2026
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866918486802956288
author Näumann, Julius
Keidel, Sven
Sharifloo, Amir Molzam
Mezini, Mira
author_facet Näumann, Julius
Keidel, Sven
Sharifloo, Amir Molzam
Mezini, Mira
contents Code translation is one of the core capabilities of LLMs. However, evaluating the correctness of translations remains difficult, as commonly used metrics such as BLEU measure only syntactic similarity, disregarding program semantics. We propose a novel evaluation methodology for code translation tasks, emphasizing semantic equivalence over surface-level string similarity. Our approach applies established compiler testing methodology to a new domain, allowing the assessment of an LLM fine-tuned for binary lifting tasks (i.e. decompiling binaries to higher-level representations). We introduce a semantic correctness score, defined as the proportion of translations that produce correct execution outcomes, and demonstrate its application by evaluating LLM-based and heuristic decompilers. Our findings show that LLM-based approaches significantly outperform heuristic ones, while BLEU scores show negligible correlation with semantic correctness (r = -0.127 to 0.354), demonstrating that syntactic metrics fail to predict functional accuracy.
format Preprint
id arxiv_https___arxiv_org_abs_2605_05282
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Beyond BLEU: A Semantic Evaluation Method for Code Translation
Näumann, Julius
Keidel, Sven
Sharifloo, Amir Molzam
Mezini, Mira
Programming Languages
Computation and Language
Code translation is one of the core capabilities of LLMs. However, evaluating the correctness of translations remains difficult, as commonly used metrics such as BLEU measure only syntactic similarity, disregarding program semantics. We propose a novel evaluation methodology for code translation tasks, emphasizing semantic equivalence over surface-level string similarity. Our approach applies established compiler testing methodology to a new domain, allowing the assessment of an LLM fine-tuned for binary lifting tasks (i.e. decompiling binaries to higher-level representations). We introduce a semantic correctness score, defined as the proportion of translations that produce correct execution outcomes, and demonstrate its application by evaluating LLM-based and heuristic decompilers. Our findings show that LLM-based approaches significantly outperform heuristic ones, while BLEU scores show negligible correlation with semantic correctness (r = -0.127 to 0.354), demonstrating that syntactic metrics fail to predict functional accuracy.
title Beyond BLEU: A Semantic Evaluation Method for Code Translation
topic Programming Languages
Computation and Language
url https://arxiv.org/abs/2605.05282