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

XAMPLER:学习检索跨语言上下文示例

XAMPLER: Learning to Retrieve Cross-Lingual In-Context Examples

LMU Munich(慕尼黑大学);Munich Center for Machine Learning(慕尼黑机器学习中心);Instituto Superior Técnico, Universidade de Lisboa(里斯本大学高等技术学院);Instituto de Telecomunicações(电信研究所);Unbabel(昂巴贝尔公司)

Peiqin Lin, André F. T. Martins, Hinrich Schütze

AI总结:

针对跨语言上下文学习中跨语言检索器和标注数据稀缺的问题,提出XAMPLER方法,基于Glot500训练检索器并利用MaLA500构建训练数据,仅用英语标注数据即可为目标语言检索英语示例,在SIB200和MasakhaNEWS基准上显著提升性能。

摘要:

近期研究表明,利用现成或微调的检索器检索与输入查询匹配的相关上下文示例,可提升英语的少样本上下文学习效果。但将这些方法适配到其他语言(尤其是低资源语言)面临挑战,原因是跨语言检索器和标注数据稀缺。因此,我们提出XAMPLER:跨语言示例检索方法,仅使用标注的英语数据解决跨语言上下文学习问题。XAMPLER首先基于多语言小型语言模型Glot500训练检索器,训练数据来自多语言大型语言模型MaLA500预测构建的正负英语示例。借助检索器的跨语言能力,XAMPLER可直接检索英语示例作为目标语言上下文学习的少样本示例。在两个多语言文本分类基准(含176种语言的SIB200和16种语言的MasakhaNEWS)上的实验表明,XAMPLER显著提升了跨语言上下文学习性能。代码见https://github.com/cisnlp/XAMPLER。

英文摘要:

Recent studies indicate that leveraging off-the-shelf or fine-tuned retrievers, capable of retrieving relevant in-context examples tailored to the input query, enhances few-shot in-context learning of English. However, adapting these methods to other languages, especially low-resource ones, poses challenges due to the scarcity of cross-lingual retrievers and annotated data. Thus, we introduce XAMPLER: Cross-Lingual Example Retrieval, a method tailored to tackle the challenge of cross-lingual in-context learning using only annotated English data. XAMPLER first trains a retriever based on Glot500, a multilingual small language model, using positive and negative English examples constructed from the predictions of a multilingual large language model, i.e., MaLA500. Leveraging the cross-lingual capacity of the retriever, it can directly retrieve English examples as few-shot examples for in-context learning of target languages. Experiments on two multilingual text classification benchmarks, namely SIB200 with 176 languages and MasakhaNEWS with 16 languages, demonstrate that XAMPLER substantially improves the in-context learning performance across languages. Our code is available at https://github.com/cisnlp/XAMPLER.

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

↑