arXiv:2505.21224cs.CL2025-05ACL被引 1

分析机器翻译模型如何在内部表示层面修复语法错误。

A Representation Level Analysis of NMT Model Robustness to Grammatical Errors

  • 从模型内部表示出发,追踪错误输入的演化过程。
  • 编码器先识别错误,再将其表示向正确形式迁移。
  • 发现特定注意力头负责鲁棒性,适合模型可解释性研究者。

理解鲁棒性对构建可靠的自然语言处理系统至关重要。然而,在机器翻译领域,以往研究主要集中在记录鲁棒性失败或提升鲁棒性。本文从模型表示视角出发,分析未校正输入在模型各层中的内部表示变化。通过语法错误检测(GED)探测和表示相似性分析,发现编码器首先检测语法错误,随后通过将错误表示向正确形式移动来修正。为探究该过程的成因,我们研究注意力机制,识别出称为「鲁棒性注意力头」的组件。这些头在响应语法错误时会关注可解释的语言单元;当对模型进行鲁棒性微调时,它们更倾向于用于更新错误词的表示。

原文摘要 · Abstract (English)

Understanding robustness is essential for building reliable NLP systems. Unfortunately, in the context of machine translation, previous work mainly focused on documenting robustness failures or improving robustness. In contrast, we study robustness from a model representation perspective by looking at internal model representations of ungrammatical inputs and how they evolve through model layers. For this purpose, we perform Grammatical Error Detection (GED) probing and representational similarity analysis. Our findings indicate that the encoder first detects the grammatical error, then corrects it by moving its representation toward the correct form. To understand what contributes to this process, we turn to the attention mechanism where we identify what we term Robustness Heads. We find that Robustness Heads attend to interpretable linguistic units when responding to grammatical errors, and that when we fine-tune models for robustness, they tend to rely more on Robustness Heads for updating the ungrammatical word representation.

机器翻译鲁棒性注意力机制

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。