atlas

Research map / Architectures and efficiency / RNNs and normalization

Memory Layers at Scale

ICML 2025 · Architectures and efficiency › RNNs and normalization · approach: Efficient network compression and training · 1 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Scales trainable product-key memory layers (up to 128B memory parameters) that replace FFN layers in Llama-style transformers, showing large factual QA gains over dense, MoE, and PEER baselines at matched compute.

Problem

Memory layers (trainable key-value lookups that add parameters without FLOPs) have not been scaled enough to be useful in modern architectures; they are memory-bandwidth bound and hard to parallelize, and their benefits for factual knowledge at scale are unknown.

Approach

Make memory layers practical at scale via trainable product keys, a parallel sharded EmbeddingBag over GPUs, custom CUDA kernels, a single shared memory pool across multiple (3) layers replacing FFNs, and a gated silu-based "Memory+" variant.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Replace dense FFN layers with Memory+Llama3 8B · HumanEval, MBPP, MMLU, NaturalQuestions, TriviaQA, HotpotQA, HellaSwag, OBQA, and PIQA (1T training tokens)benchmark accuracy, F1, or pass@1: HellaSwag 58.90 -> 60.29; HotpotQA 25.26 -> 26.06; HumanEval 29.88 -> 31.71; MBPP 44.20 -> 42.20; MMLU 59.68 -> 63.04; NMixed
Use three memory layers rather than one (ablation)373m Memory · training setnll: 2.11 -> 2.08Helped
Use three memory layers rather than one (ablation)373m Memory · NQ answersnll: 12.13 -> 11.60Helped
Use three memory layers rather than one (ablation)373m Memory · TQA answersnll: 8.34 -> 7.54Helped
Use six memory layers instead of one (ablation)373m Memory · training setnll: 2.11 -> 2.11No clear effect
Use centered, more widely spaced memory layers (ablation)373m Memory · NQ answersnll: 12.13 -> 11.32Helped
Add input-dependent linear gating (ablation)373m Memory · NQ answersnll: 12.13 -> 12.24Hurt
Add input-dependent linear gating (ablation)373m Memory · TQA answersnll: 8.34 -> 8.17Helped
Add custom swilu nonlinearity (ablation)373m Memory · NQ answersnll: 12.13 -> 12.05Helped
Add random key-value pairs during pretraining (ablation)373m Memory · NQ answersnll: 12.13 -> 12.36Hurt
Add a fixed softmax-sink key-value pair (ablation)373m Memory · TQA answersnll: 8.34 -> 8.04Helped
Increase value dimension from 1024 to 2048 while holding parameter count fixed (ablation)373m Memory · training setnll: 2.11 -> 2.14Hurt

Surprising findings

Limitations

Experimental setup

Datasets: Llama2-like pretraining data mix Llama3-like pretraining data mix

Benchmarks: NaturalQuestions TriviaQA HotpotQA MMLU HellaSwag OBQA PIQA HumanEval MBPP

Metrics: exact match F1 accuracy pass@1 negative log-likelihood

Baselines: dense Llama-style transformer mixture-of-experts PEER Llama2 7B Llama3.1 8B

Builds on: product-key memory networks PEER mixture-of-experts expert choice Llama

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy