Reproduce “Persistent Recurrent Memory Between Transformer Layers - Improves Language Model Generalization” on OpenResearch

Turn your favorite coding agents into research agents that review literature, develop hypotheses, and run experiments.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Eduardo Novaes Hering

The paper adds a Persistent Recurrent Memory (PRM) bridge to a six-layer decoder-only transformer, where a recurrent state observes lower-layer representations, updates through a GRU, and influences upper layers. On TinyStories, PRM reduced held-out cross-entropy by 28.5% versus the standard model. A topology-matched model without self-prediction performed similarly, limiting the evidence to this small-scale setup.

Key insights

  • The recurrent observe–update–influence topology is sufficient: removing the proposed self-prediction objective leaves performance statistically similar to the full PRM model, while an arbitrary auxiliary objective provides no benefit.
  • The persistent state contains information about narrative position, reaching 52.1% probe accuracy versus 33.3% for the standard model, but represents uncertainty less effectively than the baseline.
  • The evidence supports an architectural inductive bias for preserving global context, though it is limited to small models and the TinyStories dataset.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.