Just Use XML: Revisiting Joint Translation and Label Projection

This paper introduces LabelPigeon, a novel framework that uses XML tags to jointly perform machine translation and label projection, demonstrating that this approach not only outperforms existing baselines in cross-lingual transfer tasks but also actively improves translation quality across multiple languages.

Thennal D K, Chris Biemann, Hans Ole Hatzel

Published 2026-03-13
📖 4 min read☕ Coffee break read

Imagine you have a treasure map written in English, but the "X" marks the spot where a specific treasure (like a person's name or a date) is hidden. You want to give this map to a friend who speaks only German, so they can find the treasure too.

The old way of doing this was a two-step process:

  1. Translate the whole map into German.
  2. Go back and try to guess where the "X" should be in the German version by matching words one-by-one.

The problem? Sometimes the translation changes the sentence structure so much that the "X" ends up in the wrong place, or the map gets messy and hard to read. Previous researchers tried to fix this by putting brackets around the "X" before translating, but they found that the brackets confused the translator, making the German map sound robotic and unnatural.

Enter "LabelPigeon": The New Way

The authors of this paper say, "Wait a minute! What if we just teach the translator to understand the brackets from the start?"

They created a new method called LabelPigeon. Instead of treating translation and label-mapping as two separate jobs, they combine them into one smooth operation using XML tags (think of these as colorful, invisible sticky notes like <name> or <date>).

Here is how it works, using a few creative analogies:

1. The "Bilingual Chef" Analogy

Imagine a chef who usually cooks English recipes. Previously, if you asked them to cook a German version of a recipe that had specific instructions like "add salt here," they would:

  • First, translate the whole recipe to German.
  • Then, a sous-chef would try to find where "salt" went in the German text and stick a note there.

Often, the sous-chef would get it wrong because the German sentence structure was different.

LabelPigeon is like hiring a Bilingual Chef who knows exactly what "salt" means in both languages. You hand them the English recipe with the word "salt" wrapped in a special tag: add <salt> here. The chef translates the whole thing while keeping that tag intact, ensuring the German version says füge <salt> hier hinzu. The tag travels perfectly with the word it describes, and the sentence still flows naturally.

2. Why XML Tags are Better than Brackets

The previous method used simple square brackets like [salt]. The authors argue this is like trying to write a letter with sticky notes that just say "NOTE." It's vague.

They used XML tags (like <person> or <year>). This is like using color-coded, labeled folders.

  • If you have a nested instruction (a note inside another note), brackets get messy and confusing.
  • XML tags are like Russian nesting dolls that fit perfectly together. They can handle complex sentences where one label is inside another without getting lost.

3. The "Training" Secret

The big surprise in this paper is that adding these tags actually makes the translation better, not worse.

Usually, you'd think adding extra symbols (the tags) would distract the AI. But the authors took a massive, high-quality dataset of translated text that already had these tags (from software localization) and fine-tuned their AI model on it.

It's like teaching a student not just to translate words, but to translate structure. The AI learned that "Oh, when I see this tag, I need to keep the meaning of this specific chunk of text intact." This extra training made the AI a better translator overall, even for sentences without tags.

The Results: A Win-Win

The team tested this on over 200 languages and three different types of tasks (finding names, answering questions, and figuring out who "he" or "she" refers to).

  • Better Labels: They found the "X" (the labels) much more accurately than before.
  • Better Translation: The German (and other language) translations sounded more natural and accurate than the old methods.
  • No Extra Cost: Unlike other methods that require running two different programs (one to translate, one to fix the labels), LabelPigeon does it all in one single pass. It's fast and efficient.

The Bottom Line

This paper proves that you don't have to choose between a good translation and accurate data labels. By teaching the AI to wear "glasses" (XML tags) that help it see the structure of the sentence, you get a translation that is both fluent and precise. It's a simple, elegant solution that stops the "two-step dance" and lets the AI do the whole job in one smooth move.