arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2606.15416cs.CL
收藏

编码错误:多语言语法错误纠正中上下文示例的表征检索

Encode Errors: Representational Retrieval of In-Context Demonstrations for Multilingual Grammatical Error Correction

State Key Laboratory of Multimedia Information Processing, School of Computer Science, Peking University(北京大学计算机学院多媒体信息处理国家重点实验室)

Guangyue Peng, Wei Li, Wen Luo, Houfeng Wang

AI总结:

提出从LLM内部状态提取语法错误表征(GER)用于检索上下文示例,显著提升多语言语法错误纠正的少样本性能,在低资源语言上F0.5提升达1.20倍。

摘要:

语法错误纠正(GEC)涉及检测和纠正语法的错误使用。虽然具有上下文学习(ICL)能力的大型语言模型(LLM)在各种自然语言处理(NLP)任务上取得了显著进展,但它们在GEC上的少样本性能仍然次优。这主要是由于难以检索到能够捕捉错误模式而非语义相似性的合适上下文示例。在本文中,我们证明LLM可以通过其内部状态固有地捕捉与语法错误相关的信息。从这些状态中,我们提取了语法错误表征(GER),这是一种信息丰富且语义中立的语法错误编码。我们基于GER的新型检索方法显著提升了多语言GEC数据集上ICL设置的性能,提高了纠正的精确度。对于高资源语言,我们在8B大小的开源模型上的结果与Deepseek2.5和GPT-4o-mini等闭源模型相当。对于低资源语言,我们的F0.5分数比基线高出最多1.20倍。该方法为多语言GEC提供了一种更精确且资源高效的解决方案,为可解释的GEC研究提供了一个有前景的方向。

英文摘要:

Grammatical Error Correction (GEC) involves detecting and correcting the wrong usage of grammar. While large language models (LLMs) with in-context learning (ICL) capabilities have shown significant progress on various natural language processing (NLP) tasks, their few-shot performance on GEC remains suboptimal. This is mainly due to the challenge of retrieving suitable in-context demonstrations that capture error patterns instead of semantic similarity. In this paper, we demonstrate that LLMs can inherently capture information related to grammatical errors through their internal states. From these states, we extract the Grammatical Error Representation (GER), an informative and semantically neutral encoding of grammatical errors. Our novel GER-based retrieval method significantly boosts performance in ICL settings on multilingual GEC datasets, improving the precision of correction. For high-resource languages, our results on 8B-sized open-source models match those of closed-source models such as Deepseek2.5 and GPT-4o-mini. For low-resource languages, our $F_{0.5}$ scores surpass the baseline by up to a factor of 1.20. This method provides a more precise and resource-efficient solution for multilingual GEC, offering a promising direction for interpretable GEC research.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑