Unveiling In-Context Learning: A Coordinate System to Understand Its Working Mechanism
Zhao, Anhao, Ye, Fanghua, Fu, Jinlan, Shen, Xiaoyu
–arXiv.org Artificial Intelligence
Large language models (LLMs) exhibit remarkable in-context learning (ICL) capabilities. However, the underlying working mechanism of ICL remains poorly understood. Recent research presents two conflicting views on ICL: One attributes it to LLMs' inherent ability of task recognition, deeming label correctness and shot numbers of demonstrations as not crucial; the other emphasizes the impact of similar examples in the demonstrations, stressing the need for label correctness and more shots. In this work, we provide a Two-Dimensional Coordinate System that unifies both views into a systematic framework. The framework explains the behavior of ICL through two orthogonal variables: whether LLMs can recognize the task and whether similar examples are presented in the demonstrations. We propose the peak inverse rank metric to detect the task recognition ability of LLMs and study LLMs' reactions to different definitions of similarity. Based on these, we conduct extensive experiments to elucidate how ICL functions across each quadrant on multiple representative classification tasks. Finally, we extend our analyses to generation tasks, showing that our coordinate system can also be used to interpret ICL for generation tasks effectively.
arXiv.org Artificial Intelligence
Jul-24-2024
- Country:
- South America
- Peru (0.04)
- Colombia > Bogotá D.C.
- Bogotá (0.04)
- Chile > Santiago Metropolitan Region
- Santiago Province > Santiago (0.04)
- Brazil > Federal District
- Brasília (0.04)
- Argentina > Pampas
- Buenos Aires F.D. > Buenos Aires (0.04)
- Oceania
- New Zealand (0.04)
- Australia > Australian Capital Territory
- Canberra (0.04)
- North America
- United States
- District of Columbia > Washington (0.04)
- Washington > King County
- Seattle (0.14)
- Minnesota > Hennepin County
- Minneapolis (0.04)
- Mexico > Mexico City
- Mexico City (0.04)
- Canada > Ontario
- Toronto (0.04)
- National Capital Region > Ottawa (0.04)
- United States
- Europe
- France (0.04)
- Germany (0.04)
- Italy (0.04)
- Austria > Vienna (0.04)
- Switzerland (0.04)
- Monaco (0.04)
- Greece (0.04)
- United Kingdom (0.04)
- Czechia > Prague (0.04)
- Sweden > Stockholm
- Stockholm (0.04)
- Russia > Central Federal District
- Moscow Oblast > Moscow (0.04)
- Spain > Galicia
- Madrid (0.04)
- Netherlands > North Holland
- Amsterdam (0.04)
- Hungary > Budapest
- Budapest (0.04)
- Denmark > Capital Region
- Copenhagen (0.04)
- Portugal > Lisbon
- Lisbon (0.04)
- Norway > Eastern Norway
- Oslo (0.04)
- Ukraine > Kyiv Oblast
- Kyiv (0.04)
- Finland > Uusimaa
- Helsinki (0.04)
- Ireland > Leinster
- County Dublin > Dublin (0.04)
- Belgium > Brussels-Capital Region
- Brussels (0.04)
- Poland > Masovia Province
- Warsaw (0.04)
- Romania > București - Ilfov Development Region
- Municipality of Bucharest > Bucharest (0.04)
- Asia
- Russia (0.04)
- Philippines > Luzon
- National Capital Region > City of Manila (0.04)
- Indonesia > Java
- India > NCT
- New Delhi (0.04)
- Bangladesh > Dhaka Division
- Dhaka District > Dhaka (0.04)
- Myanmar > Tanintharyi Region
- Dawei (0.04)
- Vietnam > Hanoi
- Hanoi (0.04)
- Thailand > Bangkok
- Bangkok (0.04)
- South Korea > Seoul
- Seoul (0.04)
- China
- Zhejiang Province > Ningbo (0.04)
- Beijing > Beijing (0.04)
- Middle East
- Jordan (0.04)
- Saudi Arabia > Riyadh Province
- Riyadh (0.04)
- Republic of Türkiye > Ankara Province
- Ankara (0.04)
- Israel > Jerusalem District
- Jerusalem (0.04)
- Singapore > Central Region
- Singapore (0.04)
- Malaysia > Kuala Lumpur
- Kuala Lumpur (0.04)
- Pakistan > Islamabad Capital Territory
- Islamabad (0.04)
- Japan > Honshū
- Kantō > Tokyo Metropolis Prefecture > Tokyo (0.04)
- Africa
- South Africa > Gauteng
- Pretoria (0.04)
- Nigeria > Federal Capital Territory
- Abuja (0.04)
- Middle East > Egypt
- Cairo Governorate > Cairo (0.04)
- South Africa > Gauteng
- South America
- Genre:
- Research Report > New Finding (0.67)
- Industry:
- Leisure & Entertainment (1.00)
- Technology: