Evaluating In-Context Translation with Synchronous Context-Free Grammar Transduction
This paper evaluates large language models' ability to perform in-context translation using synchronous context-free grammars as a formal proxy for natural languages, finding that performance significantly degrades with increased grammar size and sentence length, is hindered by morphological and script differences, and is characterized by errors such as vocabulary hallucinations and untranslated source words.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you are trying to teach a brilliant but inexperienced translator how to speak a language they have never heard before. You can't give them a dictionary or a textbook they've studied for years. Instead, you hand them a brand-new, rulebook written in a foreign language, along with a few sentences, and say, "Here are the rules. Now, translate this sentence."
This is the core challenge of In-Context Machine Translation (ICMT). The big question researchers asked was: Can modern AI models (like GPT-5 or Gemma) actually learn a new language just by reading its grammar rules on the fly, without needing massive amounts of training data?
To answer this, the authors created a "training camp" using formal languages (made-up languages with strict, logical rules) instead of real-world languages like French or Swahili. This allowed them to control every variable perfectly.
Here is the breakdown of their findings, using some everyday analogies:
1. The "Rulebook Size" Problem
The Finding: The bigger the grammar rulebook, the worse the AI performed.
The Analogy: Imagine you are trying to assemble a piece of IKEA furniture.
- Small Grammar: The rulebook is a simple 2-page pamphlet for a small stool. The AI can read it, understand the steps, and build the stool perfectly.
- Large Grammar: The rulebook is a 500-page manual for a massive, complex castle. The AI gets overwhelmed. It starts forgetting the first rule by the time it reaches the last one.
- Result: When the grammar was small (a few hundred rules), the AI was nearly perfect. But as the grammar grew to the size needed to model human language (thousands of rules), the AI's accuracy plummeted. It simply couldn't keep all the rules in its "working memory" at once.
2. The "Sentence Length" Problem
The Finding: Short sentences were easy; long sentences were a disaster.
The Analogy: Think of it like a game of "Telephone."
- Short Sentence: You whisper a 3-word phrase to the AI. It translates it perfectly.
- Long Sentence: You whisper a 30-word story. By the time the AI gets to the end of the sentence, it has forgotten the beginning. It starts hallucinating words or dropping parts of the sentence entirely.
- Result: The AI handled sentences under 10 words well, but once they passed 20 words, performance dropped sharply.
3. The "Word Order" Surprise
The Finding: Changing the order of words (like putting the verb at the end of the sentence) didn't actually hurt the AI much.
The Analogy: Imagine you are rearranging furniture in a room.
- If you tell the AI, "Put the chair in front of the table," it can easily swap that to "Put the table behind the chair" if the rulebook says so.
- Result: The AI is actually quite good at following instructions to shuffle word order (e.g., English style vs. Japanese style). The difficulty wasn't the order; it was the complexity of the rules themselves.
4. The "Morphology" Trap
The Finding: The AI struggled most when translating from a "simple" language (where words don't change) to a "complex" language (where words change based on who is doing the action).
The Analogy: Imagine a game where you have to guess a secret code.
- Simple to Simple: "Cat" always means "Cat." Easy.
- Simple to Complex: In the target language, "Cat" changes to "Cat-er" if a man is looking at it, and "Cat-est" if a woman is looking at it. The AI has to look at the other words in the sentence to figure out which version of "Cat" to use.
- Result: The AI was great at simple-to-simple translation but terrible at figuring out the hidden "agreement" rules when moving from a simple language to a complex one.
5. The "Script" Nightmare
The Finding: The AI did great with Latin letters (A, B, C), okay with Cyrillic (Russian style), but failed completely with Hebrew, especially if it had vowel marks.
The Analogy: Imagine the AI is a chef who has only ever cooked with a standard set of knives.
- Latin Script: Standard knives. No problem.
- Cyrillic/Hebrew: The chef has to use a weird, unfamiliar set of tools. They can still chop, but they are clumsy.
- Hebrew with Vowels: This is like being handed a set of tools made of glass that you've never seen before. The AI completely froze. It couldn't even produce the correct characters.
- Result: The AI relies heavily on patterns it has seen before. If the "look" of the words (the script) is too unfamiliar, the AI gives up, even if it understands the grammar rules perfectly.
The Big Takeaway
The paper concludes that while AI models can technically learn a new language from a rulebook, they are extremely fragile at it.
- They are like a student who can ace a math test if the problems are short and the formulas are simple.
- But if you give them a 50-page textbook of complex formulas and ask them to solve a long, multi-step problem in a language they've never seen, they will likely panic, forget the rules, and start making things up.
Why does this matter?
Currently, AI translation relies on massive amounts of data (millions of sentences) to learn low-resource languages. This study suggests that simply handing an AI a grammar book isn't enough yet. Until AI gets better at holding complex rules in its "mind" and recognizing unfamiliar writing systems, we can't fully rely on it to translate languages it hasn't been trained on.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.