If large language models operate in a universal semantic space, then switching between languages should require only a simple activation offset. To test this, we take multilingual in-context learning as a case study, where few-shot demonstrations are provided in English but the test query is in a target language. We propose language vectors, computed as the mean activation difference between parallel source and target language examples at a particular layer, and added as an offset to hidden states at inference time to shift the model's internal representations toward the target language. We evaluate our method across three multilingual tasks spanning 19 languages and three models. Our results show consistent improvements on multilingual in-context learning over baselines across all tasks and languages tested, demonstrating that a simple activation offset is sufficient to redirect a model's language mode without any parameter updates. Beyond performance, the vectors encode interpretable linguistic structure, with closely related languages forming tight clusters and vectors transferring across tasks, suggesting that language identity occupies separable and structured directions in a model's activation space.


翻译:若大语言模型运行于通用语义空间中,语言切换应仅需简单的激活偏移。为验证该假设,我们以多语言上下文学习为例——其中少样本示例以英文呈现,而测试查询使用目标语言——提出语言向量法:计算特定层并行源语言与目标语言示例的平均激活差异,在推理时作为偏移量添加至隐藏状态,以将模型内部表征转向目标语言。我们在覆盖19种语言的三项多语言任务及三个模型上评估该方法。结果表明,相较基线方法,该方法在所有测试任务与语言的多语言上下文学习性能上呈现一致性提升,验证了无需参数更新的简单激活偏移即可重定向模型语言模式。除性能优势外,该向量编码了可解释的语言结构——相近语言形成紧密聚类,且向量可跨任务迁移,表明语言身份在模型激活空间中占据可分离的结构化方向。

0
下载
关闭预览

相关内容

【博士论文】基于多模态基础模型的上下文学习
专知会员服务
25+阅读 · 2025年12月17日
多模态视觉语言表征学习研究综述
专知
27+阅读 · 2020年12月3日
长文本表示学习概述
云栖社区
15+阅读 · 2019年5月9日
TextInfoExp:自然语言处理相关实验(基于sougou数据集)
全球人工智能
12+阅读 · 2017年11月12日
国家自然科学基金
4+阅读 · 2017年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
8+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
VIP会员
最新内容
非对称防御中的自组织临界性:俄乌战争
专知会员服务
6+阅读 · 8月10日
《战争中的大语言模型监管》
专知会员服务
5+阅读 · 8月10日
《边缘计算关键技术分析及美军作战实践应用》
边缘计算的军事应用
专知会员服务
9+阅读 · 8月9日
一种考虑资源机动性的武器目标分配混合算法
专知会员服务
11+阅读 · 8月8日
相关基金
国家自然科学基金
4+阅读 · 2017年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
8+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员