Focused Large Language Models are Stable Many-Shot Learners
Yuan, Peiwen, Feng, Shaoxiong, Li, Yiwei, Wang, Xinglin, Zhang, Yueqi, Tan, Chuyi, Pan, Boyuan, Wang, Heda, Hu, Yao, Li, Kan
–arXiv.org Artificial Intelligence
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.
arXiv.org Artificial Intelligence
Aug-25-2024
- Country:
- North America
- United States
- District of Columbia > Washington (0.04)
- Maryland > Baltimore (0.04)
- Washington > King County
- Seattle (0.04)
- Minnesota > Hennepin County
- Minneapolis (0.14)
- Louisiana > Orleans Parish
- New Orleans (0.04)
- Hawaii > Honolulu County
- Honolulu (0.04)
- Canada > Ontario
- Toronto (0.04)
- United States
- Europe
- Austria > Vienna (0.14)
- Middle East > Malta
- Eastern Region > Northern Harbour District > St. Julian's (0.04)
- Ireland > Leinster
- County Dublin > Dublin (0.04)
- Asia
- Africa > Rwanda
- North America
- Genre:
- Research Report > New Finding (0.46)
- Technology: