In-Context Exemplars as Clues to Retrieving from Large Associative Memory

Jiachen Zhao
11/6/2023
cs.CLcs.LG

No confident code implementation found for this paper.

Abstract

Recently, large language models (LLMs) have made remarkable progress in natural language processing. The most representative ability of LLMs is in-context learning (ICL), which enables LLMs to learn patterns from in-context exemplars without training. The performance of ICL greatly depends on the exemplars used. However, how to choose exemplars remains unclear due to the lack of understanding of how in-context learning works. In this paper, we present a novel perspective on ICL by conceptualizing it as contextual retrieval from a model of associative memory. We establish a theoretical framework of ICL based on Hopfield Networks. Based on our framework, we look into how in-context exemplars influence the performance of ICL and propose more efficient active exemplar selection. Our study sheds new light on the mechanism of ICL by connecting it to memory retrieval, with potential implications for advancing the understanding of LLMs.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{zhao2023incontext,
  title  = {In-Context Exemplars as Clues to Retrieving from Large Associative Memory},
  author = {Jiachen Zhao},
  year   = {2023},
  eprint = {2311.03498},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2311.03498v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2311.03498.svg)](https://codeofpaper.com/paper/2311.03498)

Discussion