atlas

Research map / Architectures and efficiency / Attention and transformers

RNNs are not Transformers (Yet): The Key Bottleneck on In-Context Retrieval

ICLR 2025 · Architectures and efficiency › Attention and transformers · approach: State space and recurrent sequence models · 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.

Shows theoretically that chain-of-thought does not let constant-size RNNs match Transformers on in-context retrieval tasks (associative recall, IsTree), and that in-context RAG via regex or appending one Transformer layer closes the gap; validated on IsTree and HotpotQA with Mamba/Transformer/hybrid models.

Problem

Whether RNNs, even with chain-of-thought, can match Transformers on algorithmic problems, given that RNNs have limited memory for in-context retrieval.

Approach

Uses communication-complexity/streaming lower bounds to show o(n)-bit-memory RNNs fail at in-context retrieval (Index, AR, c-gram, Counting, IsTree) even with CoT, then shows that adding regex-based retrieval (in-context RAG) or a single Transformer layer on top of the RNN restores full polynomial-time expressivity.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Add CoTRNNs and Transformers · IsTreeaccuracyHelped
Add CoT to RNNsRNNs · IsTree as graph size increasesaccuracyHurt
Add CoT to RNNs rather than use a TransformerIsTree · IsTreeaccuracyHurt
Add In-Context RAG with regular-expression retrievalAll tested models · IsTreeaccuracyHelped
Append one Transformer layer to MambaMamba · IsTreeaccuracyHelped
Increase the number of randomly ordered paragraphsRNNs, Transformers, and hybrid models · Hotpot-QA, random paragraph orderaccuracyHurt
Increase retrieval difficulty by adding randomly ordered paragraphsRNNs compared with Transformers and hybrid models · Hotpot-QA, random paragraph orderaccuracyMixed
Use a hybrid model with 4 attention layers instead of an RNNRNN · Hotpot-QA, random paragraph orderaccuracyHelped
Place the required paragraphs at the end instead of randomizing paragraph orderTransformer, RNN, and hybrid models · Hotpot-QAaccuracyHelped

Surprising findings

Limitations

Experimental setup

Datasets: HotpotQA synthetic IsTree graphs

Benchmarks: IsTree (synthetic) HotpotQA with controlled retrieval difficulty

Metrics: accuracy

Baselines: Mamba Transformer (LLaMA architecture) Mamba with one Transformer layer (hybrid) Phi-1.5 teacher

Builds on: chain-of-thought Mamba Linear Transformers Phi-1.5

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