arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2408.13987cs.CLcs.AI
收藏

聚焦的大型语言模型是稳定的多样本学习器

Focused Large Language Models are Stable Many-Shot Learners

School of Computer Science and Technology, Beijing Institute of Technology(北京理工大学计算机科学与技术学院);Xiaohongshu Inc(小红书公司)

Peiwen Yuan, Shaoxiong Feng, Yiwei Li, Xinglin Wang, Yueqi Zhang, Chuyi Tan, Boyuan Pan, Heda Wang, Yao Hu, Kan Li

AI总结:

针对ICL在多样本设置下性能无法有效扩展的问题,提出无需训练的FocusICL方法,通过琐碎性过滤和分层注意力确保模型聚焦查询,实现5.2%的平均性能提升且扩展良好。

摘要:

上下文学习(ICL)使大型语言模型(LLMs)能够通过从演示中学习来实现快速任务适应。随着LLMs可用上下文长度的增加,最近的实验表明,ICL的性能在多样本(演示)设置下并不一定能很好地扩展。我们在理论和实验上确认,原因在于更多的演示分散了模型对查询的注意力,阻碍了其对关键内容的理解。受人类从示例中学习方式的启发,我们提出了一种无需训练的方法FocusICL,该方法进行琐碎性过滤以避免注意力在token级别被不重要内容转移,并操作分层注意力以在演示级别进一步确保对当前查询的充分关注。我们还基于演示的模型困惑度为FocusICL设计了一种高效的超参数搜索策略。综合实验验证,FocusICL比原始ICL平均性能提升5.2%,并且在多样本演示下扩展良好。

英文摘要:

In-Context Learning (ICL) enables large language models (LLMs) to achieve rapid task adaptation by learning from demonstrations. With the increase in available context length of LLMs, recent experiments have shown that the performance of ICL does not necessarily scale well in many-shot (demonstration) settings. We theoretically and experimentally confirm that the reason lies in more demonstrations dispersing the model attention from the query, hindering its understanding of key content. Inspired by how humans learn from examples, we propose a training-free method FocusICL, which conducts triviality filtering to avoid attention being diverted by unimportant contents at token-level and operates hierarchical attention to further ensure sufficient attention towards current query at demonstration-level. We also design an efficient hyperparameter searching strategy for FocusICL based on model perplexity of demonstrations. Comprehensive experiments validate that FocusICL achieves an average performance improvement of 5.2% over vanilla ICL and scales well with many-shot demonstrations.

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

↑