用形式语法测试大模型的上下文翻译能力,发现语法越复杂、句子越长,效果越差。
Evaluating In-Context Translation with Synchronous Context-Free Grammar Transduction
- 用形式语法模拟语言结构,测试模型在上下文中的翻译能力
- 语法规模和句长增加时,翻译准确率显著下降
- 模型常误译词汇或胡编新词,适合研究低资源语言翻译
低资源语言的机器翻译对大型语言模型(LLMs)构成挑战,因其依赖大量训练数据。一种可能的解决方案是利用LLMs根据上下文中的语言描述(如教科书、词典)进行翻译。这要求模型能将语言的语法描述与具体句子关联起来。本文通过形式化任务来分离并评估这一能力:基于上下文提供的同步上下文无关语法(synchronous context-free grammars),实现形式语言间的字符串转换。我们构建了用于建模自然语言语法、形态学和书写表示特定方面的形式语言对。通过这些语法,测量在给出语法和源语言句子的情况下,LLMs将句子从一种形式语言翻译到另一种的能力。我们改变语法规模、句子长度、语言的句法与形态特征以及书写系统。主要发现:第一,随着语法规模和句子长度增加,翻译准确率明显下降;第二,源语言与目标语言在形态和书写表示上的差异会显著降低模型性能;第三,分析模型错误类型发现,模型最常犯的错误是误记目标词汇、虚构新词或未翻译源语言词汇。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。