Gated recurrence enables simple and accurate sequence prediction in stochastic, changing, and structured environments

  1. Cédric Foucault
  2. Florent Meyniel  Is a corresponding author
  1. INSERM, CEA, Université Paris-Saclay, France
  2. CEA, Sorbonne Université, France


From decision making to perception to language, predicting what is coming next is crucial. It is also challenging in stochastic, changing, and structured environments; yet the brain makes accurate predictions in many situations. What computational architecture could enable this feat? Bayesian inference makes optimal predictions but is prohibitively difficult to compute. Here, we show that a specific recurrent neural network architecture enables simple and accurate solutions in several environments. This architecture relies on three mechanisms: gating, lateral connections, and recurrent weight training. Like the optimal solution and the human brain, such networks develop internal representations of their changing environment (including estimates of the environment's latent variables and the precision of these estimates), leverage multiple levels of latent structure, and adapt their effective learning rate to changes without changing their connection weights. Being ubiquitous in the brain, gated recurrence could therefore serve as a generic building block to predict in real-life environments.

Data availability

This paper presents no experimental data. All synthetic data are available in the code repository at and archived on Zenodo with DOI: 10.5281/zenodo.5707498.

The following data sets were generated
    1. Foucault C
    (2021) Networks for sequence prediction
    Publicly available at Zenodo (

Article and author information

Author details

  1. Cédric Foucault

    INSERM, CEA, Université Paris-Saclay, Gif sur Yvette, France
    Competing interests
    The authors declare that no competing interests exist.
    ORCID icon "This ORCID iD identifies the author of this article:" 0000-0002-7247-6927
  2. Florent Meyniel

    NeuroSpin, CEA, Sorbonne Université, Gif sur Yvette, France
    For correspondence
    Competing interests
    The authors declare that no competing interests exist.
    ORCID icon "This ORCID iD identifies the author of this article:" 0000-0002-6992-678X


Ecole normale superieure Paris-Saclay (PhD fellowship Contrat doctoral spécifique normalien"")

  • Cédric Foucault

Agence Nationale de la Recherche (18-CE37-0010-01 CONFI LEARN"")

  • Florent Meyniel

H2020 European Research Council (ERC StG 947105 NEURAL PROB"")

  • Florent Meyniel

The funders had no role in study design, data collection and interpretation, or the decision to submit the work for publication.

Reviewing Editor

  1. Srdjan Ostojic, Ecole Normale Superieure Paris, France

Publication history

  1. Preprint posted: May 3, 2021 (view preprint)
  2. Received: June 30, 2021
  3. Accepted: December 1, 2021
  4. Accepted Manuscript published: December 2, 2021 (version 1)
  5. Version of Record published: January 6, 2022 (version 2)
  6. Version of Record updated: January 21, 2022 (version 3)
  7. Version of Record updated: February 3, 2022 (version 4)


© 2021, Foucault & Meyniel

This article is distributed under the terms of the Creative Commons Attribution License permitting unrestricted use and redistribution provided that the original author and source are credited.


  • 674
    Page views
  • 103
  • 0

Article citation count generated by polling the highest count across the following sources: Crossref, PubMed Central, Scopus.

Download links

A two-part list of links to download the article, or parts of the article, in various formats.

Downloads (link to download the article as PDF)

Open citations (links to open the citations from this article in various online reference manager services)

Cite this article (links to download the citations from this article in formats compatible with various reference manager tools)

  1. Cédric Foucault
  2. Florent Meyniel
Gated recurrence enables simple and accurate sequence prediction in stochastic, changing, and structured environments
eLife 10:e71801.

Further reading

    1. Neuroscience
    Paul Pfeiffer et al.
    Tools and Resources Updated

    Dynamics of excitable cells and networks depend on the membrane time constant, set by membrane resistance and capacitance. Whereas pharmacological and genetic manipulations of ionic conductances of excitable membranes are routine in electrophysiology, experimental control over capacitance remains a challenge. Here, we present capacitance clamp, an approach that allows electrophysiologists to mimic a modified capacitance in biological neurons via an unconventional application of the dynamic clamp technique. We first demonstrate the feasibility to quantitatively modulate capacitance in a mathematical neuron model and then confirm the functionality of capacitance clamp in in vitro experiments in granule cells of rodent dentate gyrus with up to threefold virtual capacitance changes. Clamping of capacitance thus constitutes a novel technique to probe and decipher mechanisms of neuronal signaling in ways that were so far inaccessible to experimental electrophysiology.

    1. Neuroscience
    Seren Zhu et al.
    Research Article Updated

    Goal-oriented navigation is widely understood to depend upon internal maps. Although this may be the case in many settings, humans tend to rely on vision in complex, unfamiliar environments. To study the nature of gaze during visually-guided navigation, we tasked humans to navigate to transiently visible goals in virtual mazes of varying levels of difficulty, observing that they took near-optimal trajectories in all arenas. By analyzing participants’ eye movements, we gained insights into how they performed visually-informed planning. The spatial distribution of gaze revealed that environmental complexity mediated a striking trade-off in the extent to which attention was directed towards two complimentary aspects of the world model: the reward location and task-relevant transitions. The temporal evolution of gaze revealed rapid, sequential prospection of the future path, evocative of neural replay. These findings suggest that the spatiotemporal characteristics of gaze during navigation are significantly shaped by the unique cognitive computations underlying real-world, sequential decision making.