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
下载
关闭预览

相关内容

【博士论文】基于多模态基础模型的上下文学习
专知会员服务
24+阅读 · 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会员
最新内容
ECCV 2026 | MIMFlow:MIM与归一化流统一图像生成
专知会员服务
1+阅读 · 45分钟前
网状网络及其在军事领域的运用
专知会员服务
4+阅读 · 今天6:18
无美国参与的欧洲战争方式(万字长文)
专知会员服务
5+阅读 · 今天5:54
《国防领域敏感性分析白皮书》
专知会员服务
6+阅读 · 今天3:42
综述 | 从问答到任务完成:Agent系统与Harness设计
Agentic RL:框架、实践与长程智能体训练
专知会员服务
6+阅读 · 6月24日
重新思考无人机时代的生存能力
专知会员服务
9+阅读 · 6月24日
装甲突击旅:现代战争思考、战斗与组织
专知会员服务
7+阅读 · 6月24日
在人工智能加速决策环境中拓展OODA循环
专知会员服务
9+阅读 · 6月24日
相关基金
国家自然科学基金
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会员