cs.CLApr 8, 2026

Evaluating In-Context Translation with Synchronous Context-Free Grammar Transduction

Authors: Jackson Petty, Jaulie Goe, Tal Linzen

Organizations: Department of Linguisticsλ New York University · Center for Data Scienceδ New York University

Abstract

Low-resource languages pose a challenge for machine translation with large language models (LLMs), which require large amounts of training data. One potential way to circumvent this data dependence is to rely on LLMs' ability to use in-context descriptions of languages, like textbooks and dictionaries. To do so, LLMs must be able to infer the link between the languages' grammatical descriptions and the sentences in question. Here we isolate this skill using a formal analogue of the task: string transduction based on a formal grammar provided in-context. We construct synchronous context-free grammars which define pairs of formal languages designed to model particular aspects of natural language grammar, morphology, and written representation. Using these grammars, we measure how well LLMs can translate sentences from one formal language into another when given both the grammar and the source-language sentence. We vary the size of the grammar, the lengths of the sentences, the syntactic and morphological properties of the languages, and their written script. We note three key findings. First, LLMs' translation accuracy decreases markedly as a function of grammar size and sentence length. Second, differences in morphology and written representation between the source and target languages can strongly diminish model performance. Third, we examine the types of errors committed by models and find they are most prone to recall the wrong words from the target language vocabulary, hallucinate new words, or leave source-language words untranslated.

Figures & tables

Appendix figures & tables48 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. Reasoning over Grammar: Can Synthetic Linguistic Reasoning Traces Enhance Low-Resource Machine Translation?

    Jun 2, 2026Renhao Pei, Yihong Liu, Sampo Pyysalo +2CoT ReasoningLow-Resource MT

  2. Current LLMs still cannot 'talk much' about grammar modules: Evidence from syntax

    Mar 20, 2026Mohammed Q. Shormani, Yehia A. AlSohbaniMachine Translation

  3. Can Linguistically Related Languages Guide LLM Translation in Low-Resource Settings?

    Mar 17, 2026Aishwarya Ramasethu, Niyathi Allu, Rohin Garg +2Machine TranslationLow-Resource MT