Context-Gated Associative Retrieval: From Theory to Transformers

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Choraria, Moulik, Gerogiannis, Argyrios, Jayaraman, Vidhata, Mani, Ankur, Varshney, Lav R.
Formato: Preprint
Publicado: 2026
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866911672072929280
author Choraria, Moulik
Gerogiannis, Argyrios
Jayaraman, Vidhata
Mani, Ankur
Varshney, Lav R.
author_facet Choraria, Moulik
Gerogiannis, Argyrios
Jayaraman, Vidhata
Mani, Ankur
Varshney, Lav R.
contents Hopfield networks and their generalizations have established deep connections among biological associative memories, statistical physics, and transformers. Yet most models treat retrieval as a fixed query-to-memory mapping, ignoring the role of external context in recall. In this work, we propose a two-stage associative memory architecture, wherein a context-gate subcircuit reshapes the retrieval energy landscape before and during recall. We show theoretically that context gating increases inter-memory separation while inducing sparsity, translating into exponential improvements in retrieval. Crucially, we prove that the system admits a unique self-consistent fixed point, revealing that the resulting retrieval state is driven by both a direct contextual bias and a second-order retrieval-gate feedback loop. We then bridge this theory to transformers; specifically, we evaluate a first-order approximation on Llama-3, confirming that in-context learning acts as context-gated retrieval. Native dynamics mirror our theory: context localizes a memory subspace, enabling the zero-shot query to cleanly discriminate. Ultimately, this framework provides a mechanistic link between associative memory theory and LLM phenomenology.
format Preprint
id arxiv_https___arxiv_org_abs_2605_10970
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Context-Gated Associative Retrieval: From Theory to Transformers
Choraria, Moulik
Gerogiannis, Argyrios
Jayaraman, Vidhata
Mani, Ankur
Varshney, Lav R.
Disordered Systems and Neural Networks
Artificial Intelligence
Hopfield networks and their generalizations have established deep connections among biological associative memories, statistical physics, and transformers. Yet most models treat retrieval as a fixed query-to-memory mapping, ignoring the role of external context in recall. In this work, we propose a two-stage associative memory architecture, wherein a context-gate subcircuit reshapes the retrieval energy landscape before and during recall. We show theoretically that context gating increases inter-memory separation while inducing sparsity, translating into exponential improvements in retrieval. Crucially, we prove that the system admits a unique self-consistent fixed point, revealing that the resulting retrieval state is driven by both a direct contextual bias and a second-order retrieval-gate feedback loop. We then bridge this theory to transformers; specifically, we evaluate a first-order approximation on Llama-3, confirming that in-context learning acts as context-gated retrieval. Native dynamics mirror our theory: context localizes a memory subspace, enabling the zero-shot query to cleanly discriminate. Ultimately, this framework provides a mechanistic link between associative memory theory and LLM phenomenology.
title Context-Gated Associative Retrieval: From Theory to Transformers
topic Disordered Systems and Neural Networks
Artificial Intelligence
url https://arxiv.org/abs/2605.10970