Reproduce “In-Context Exemplars as Clues to Retrieving from Large Associative Memory” on OpenResearch
Run Claude Code, Codex or any coding agent as a research agent: literature, hypotheses and experiments on your laptop, cluster or cloud GPUs.
Universal app for Apple silicon and Intel. Requires macOS 11 or later.
About this paper
Jiachen Zhao
Jiachen Zhao of the University of Massachusetts Amherst re-conceptualizes In-Context Learning (ICL) in Large Language Models (LLMs) as a contextual retrieval process from associative memory, establishing a formal equivalence between LLM self-attention and Modern Hopfield Networks. This theoretical foundation led to an Active Exemplar Selection method that improved ICL performance by up to 4% F1 score in parsing tasks and 1-2% accuracy in question answering, consistently outperforming baselines with fewer exemplars.
Key insights
- ICL can be fundamentally understood as a memory retrieval operation within LLMs, where in-context examples function as cues for accessing pre-trained knowledge.
- The self-attention mechanism within Transformers formally aligns with the retrieval dynamics of Modern Hopfield Networks, suggesting a biologically plausible mechanism for ICL.
- Retrieval error in ICL consists of instance error and contextual error, indicating that the quality and distinctiveness of in-context exemplars are critical, and simply increasing their number may not always improve performance.
Summary by alphaXiv.
Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.