日本语语法难题暴露模型分词缺陷,影响理解与生成质量。
Inconsistent Tokenizations Cause Language Models to be Perplexed by Japanese Grammar
- 用困惑度衡量模型对日语第一人称心理动词限制的识别能力。
- Llama 3 在良好分词下困惑度降低28倍,证明分词影响模型表现。
- 分词不一致导致模型被迫改用非自然语法,影响生成正确性。
主流语言模型评估侧重问答准确率,难以捕捉对非英语语言中细微语法(如日语第一人称心理动词限制)的掌握能力。我们通过困惑度测量模型对这一语法点的响应。在7-10B参数范围的开源模型中,Weblab是唯一能稳定对不合语法句赋予更高困惑度的模型。我们发现其统一差的分词可能是性能优异的原因。进一步实验显示,将测试句限定为分词行为良好的句子后,Llama 3 对合语法句的困惑度可下降28倍。在机器翻译任务中,当分词问题阻碍自然表达时,模型会主动采用替代语法结构以生成合规句子。
原文摘要 · Abstract (English)
Typical methods for evaluating the performance of language models evaluate their ability to answer questions accurately. These evaluation metrics are acceptable for determining the extent to which language models can understand and reason about text in a general sense, but fail to capture nuanced capabilities, such as the ability of language models to recognize and obey rare grammar points, particularly in languages other than English. We measure the perplexity of language models when confronted with the "first person psych predicate restriction" grammar point in Japanese. Weblab is the only tested open source model in the 7-10B parameter range which consistently assigns higher perplexity to ungrammatical psych predicate sentences than grammatical ones. We give evidence that Weblab's uniformly bad tokenization is a possible root cause for its good performance, and show that Llama 3's perplexity on grammatical psych predicate sentences can be reduced by orders of magnitude (28x difference) by restricting test sentences to those with uniformly well-behaved tokenizations. We show in further experiments on machine translation tasks that language models will use alternative grammar patterns in order to produce grammatical sentences when tokenization issues prevent the most natural sentence from being output.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。