# MoME: Mixture-of-Memory Embeddings for Context-Aware Sparse Lookup

*Muchen Li, Leonid Sigal, Renjie Liao*

[NeurIPS page](https://neurips.cc/virtual/2026/poster/154940) · [OpenReview](https://openreview.net/forum?id=9mjuvwVddL) · [Open on the map](../papers.html#p154940)

Category: [Efficient LLM Inference & Training](../pcat/14.md) › [Linear Attention Memory Mechanisms](../pgroup/24.md) · Type: new method · Keywords: context-aware memory, sparse lookup, Mixture-of-Experts, polysemy, embedding tables

Areas: [LLM Reasoning](../areas/reasoning.md) › Efficient Reasoning › Mixture-of-Experts; [Memory](../areas/memory.md) › Memory mechanisms › Memory Augmentation; [Long Context](../areas/longcontext.md) › Long-context mechanisms › Agent memory representations; [Model Architectures & Sequence Modeling](../areas/architectures.md) › Language Model Architectures › Mixture of Experts Optimizations

## Summary
MoME introduces a context-aware memory mechanism that replaces each token's single memory row with a mixture of M slots and uses a learned gate over the hidden state to select slots, improving performance over prior memory-embedding methods.

## Explained to a 5-year-old
Computers sometimes need to remember words, but they forget that a word can mean different things. The new system gives each word many little memory spots instead of just one. Each spot can hold a different meaning of the word. It learns to pick the right spot based on what the word is being used for. This helps the computer understand better whether the word means the animal or the programming language.

## Explained to a 5-year-old, longer
When we talk to computers, they need to know what words mean. Sometimes a word like "python" can mean a snake or a programming language. Old computer memory systems only remember one meaning for each word. This new idea gives each word many different memory places, like many tiny boxes. Each box can hold a different meaning of the word. The computer learns to choose which box to use by looking at the surrounding words. If the word is used in a sentence about programming, it picks the programming box. If the sentence is about animals, it picks the animal box. This helps the computer understand better what we are saying. It also saves memory because the boxes are small and only used when needed. The system works on many different computer models and helps them run faster. All the code is shared so other people can use and improve it.

## For a technical reader
MoME introduces a context-aware memory mechanism that replaces the traditional single token embedding with a mixture of M slots. Each slot stores a different embedding, and a learned gating function selects which slots to read based on the hidden state of the model. This allows the same surface token to retrieve distinct embeddings for different senses, solving the polysemy collapse problem of prior memory-lookup methods. Experiments across several model families show that MoME matches or exceeds the performance of baselines like Value Embedding and Engram while using comparable memory budgets. The implementation is open-sourced, making it easy for engineers to integrate into existing large language model pipelines.

## Problem
Existing memory-embedding methods retrieve a single fixed embedding per token based on its surface form, causing different contextual senses of the same token to be collapsed into one entry. This limits the ability of sparse capacity mechanisms to capture context-dependent representations in large language models.

## Method
The approach replaces each token's single memory row with a mixture of M slots and employs a learned gating function over the hidden state to select which slots to read for each token, enabling context-dependent retrieval.

## Results
The approach consistently outperforms prior memory-embedding baselines at matched memory and training budgets, shows better memory-size scaling on the nanochat backbone, and remains compatible with Engram-style memory under compound scaling.

## Contributions
A context-aware memory mechanism that uses a mixture of slots with a learned gate to retrieve sense-specific embeddings, and empirical evidence of its effectiveness across multiple model backbones and scaling regimes.

## Research questions this paper is counted under

- [How can token representations be enhanced to better support rare tokens and multiple senses?](../q/671.md)

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. [Suggest a correction](../feedback/?on=p/154940)
