Large language models adapt to new tasks through in-context learning (ICL) without parameter updates. Current theoretical explanations for this capability assume test tasks are drawn from a distribution similar to that seen during pretraining. This assumption overlooks adversarial distribution shifts that threaten real-world reliability. To address this gap, we introduce a distributionally robust meta-learning framework that provides worst-case performance guarantees for ICL under Wasserstein-based distribution shifts. Focusing on linear self-attention Transformers, we derive a non-asymptotic bound linking adversarial perturbation strength ($ρ$), model capacity ($m$), and the number of in-context examples ($N$). The analysis reveals that model robustness scales with the square root of its capacity ($ρ_{\text{max}} \propto \sqrt{m}$), while adversarial settings impose a sample complexity penalty proportional to the square of the perturbation magnitude ($N_ρ- N_0 \propto ρ^2$). Experiments on synthetic tasks confirm these scaling laws. These findings advance the theoretical understanding of ICL's limits under adversarial conditions and suggest that model capacity serves as a fundamental resource for distributional robustness.


翻译:大型语言模型通过情境学习(ICL)适应新任务,而无需更新参数。目前对此能力的理论解释假设测试任务来自与预训练期间所见相似的分布。这一假设忽略了威胁现实世界可靠性的对抗性分布偏移。为弥补这一空白,我们引入了一个分布鲁棒的元学习框架,该框架为基于Wasserstein距离的分布偏移下的ICL提供了最坏情况性能保证。聚焦于线性自注意力Transformer,我们推导了一个非渐近边界,将对抗性扰动强度($ρ$)、模型容量($m$)和情境示例数量($N$)联系起来。分析表明,模型鲁棒性随其容量的平方根缩放($ρ_{\text{max}} \propto \sqrt{m}$),而对抗性设置会施加一个与扰动幅度平方成正比的样本复杂度惩罚($N_ρ- N_0 \propto ρ^2$)。在合成任务上的实验证实了这些缩放规律。这些发现推进了对对抗条件下ICL极限的理论理解,并表明模型容量是分布鲁棒性的一个基本资源。

0
下载
关闭预览

相关内容

通过对比学习提高基于知识对话的鲁棒性
专知会员服务
23+阅读 · 2024年1月10日
知识图谱表示学习的对抗鲁棒性
专知会员服务
40+阅读 · 2022年10月7日
基于模型的强化学习综述
专知
42+阅读 · 2022年7月13日
国家自然科学基金
43+阅读 · 2015年12月31日
国家自然科学基金
40+阅读 · 2015年12月31日
国家自然科学基金
21+阅读 · 2015年12月31日
国家自然科学基金
17+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
12+阅读 · 2015年12月31日
国家自然科学基金
11+阅读 · 2013年12月31日
国家自然科学基金
11+阅读 · 2012年12月31日
VIP会员
最新内容
最新“指挥控制”领域出版物合集(16份)
专知会员服务
7+阅读 · 4月12日
面向军事作战需求开发的人工智能(RAIMOND)
专知会员服务
15+阅读 · 4月12日
远程空中优势:新一代超视距导弹的兴起
专知会员服务
2+阅读 · 4月12日
大语言模型溯因推理的统一分类学与综述
专知会员服务
4+阅读 · 4月12日
相关基金
国家自然科学基金
43+阅读 · 2015年12月31日
国家自然科学基金
40+阅读 · 2015年12月31日
国家自然科学基金
21+阅读 · 2015年12月31日
国家自然科学基金
17+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
12+阅读 · 2015年12月31日
国家自然科学基金
11+阅读 · 2013年12月31日
国家自然科学基金
11+阅读 · 2012年12月31日
Top
微信扫码咨询专知VIP会员