Circuit mechanisms for the maintenance and manipulation of information in working memory


Recently it has been proposed that information in working memory (WM) may not always be stored in persistent neuronal activity but can be maintained in ‘activity-silent’ hidden states, such as synaptic efficacies endowed with short-term synaptic plasticity. To test this idea computationally, we investigated recurrent neural network models trained to perform several WM-dependent tasks, in which WM representation emerges from learning and is not a priori assumed to depend on self-sustained persistent activity. We found that short-term synaptic plasticity can support the short-term maintenance of information, provided that the memory delay period is sufficiently short. However, in tasks that require actively manipulating information, persistent activity naturally emerges from learning, and the amount of persistent activity scales with the degree of manipulation required. These results shed insight into the current debate on WM encoding and suggest that persistent activity can vary markedly between short-term memory tasks with different cognitive demands.

Access options

Rent or Buy article

Get time limited or full article access on ReadCube.


All prices are NET prices.

Fig. 1: RNN design.
Fig. 2: DMS task.
Fig. 3: DMRS sample task.
Fig. 4: Delayed cue task.
Fig. 5: A-B-B-A and A-B-C-A tasks.
Fig. 6: Dual DMS task.
Fig. 7: The relationship between manipulation and stimulus-selective persistent activity.

Data availability

Data from all trained networks that were analyzed for this study are available from the corresponding author upon reasonable request.

Code availability

The code used to train, simulate and analyze network activity is available at


  1. 1.

    Baddeley, A. D. & Hitch, G. Working memory. Psychol. Learn. Motiv. 8, 47–89 (1974).

    Article  Google Scholar 

  2. 2.

    Funahashi, S., Bruce, C. J. & Goldman-Rakic, P. S. Mnemonic coding of visual space in the monkey’s dorsolateral prefrontal cortex. J. Neurophysiol. 6, 331–349 (1989).

    Article  Google Scholar 

  3. 3.

    Chafee, M. V. & Goldman-Rakic, P. S. Matching patterns of activity in primate prefrontal area 8a and parietal area 7ip neurons during a spatial working memory task. J. Neurophysiol. 79, 2919–2940 (1998).

    CAS  Article  Google Scholar 

  4. 4.

    Colby, C. L., Duhamel, J. R. & Goldberg, M. E. Visual, presaccadic, and cognitive activation of single neurons in monkey lateral intraparietal area. J. Neurophysiol. 76, 2841–2852 (1996).

    CAS  Article  Google Scholar 

  5. 5.

    Romo, R., Brody, C. D., Hernández, A. & Lemus, L. Neuronal correlates of parametric working memory in the prefrontal cortex. Nature 399, 470–473 (1999).

    CAS  Article  Google Scholar 

  6. 6.

    Rainer, G., Asaad, W. F. & Miller, E. K. Selective representation of relevant information by neurons in the primate prefrontal cortex. Nature 393, 577–579 (1998).

    CAS  Article  Google Scholar 

  7. 7.

    Wang, M. et al. NMDA receptors subserve persistent neuronal firing during working memory in dorsolateral prefrontal cortex. Neuron 77, 736–749 (2013).

    CAS  Article  Google Scholar 

  8. 8.

    Wang, X.-J. Synaptic basis of cortical persistent activity: the importance of NMDA receptors to working memory. J. Neurosci. 19, 9587–9603 (1999).

    CAS  Article  Google Scholar 

  9. 9.

    Floresco, S. B., Braaksma, D. N. & Phillips, A. G. Thalamic-cortical-striatal circuitry subserves working memory during delayed responding on a radial arm maze. J. Neurosci. 19, 11061–11071 (1999).

    CAS  Article  Google Scholar 

  10. 10.

    Masse, N. Y., Hodnefield, J. M. & Freedman, D. J. Mnemonic encoding and cortical organization in parietal and prefrontal cortices. J. Neurosci. 37, 6098–6112 (2017).

    CAS  Article  Google Scholar 

  11. 11.

    Stokes, M. G. ‘Activity-silent’ working memory in prefrontal cortex: a dynamic coding framework. Trends Cogn. Sci. 19, 394–405 (2015).

    Article  Google Scholar 

  12. 12.

    Lara, A. H. & Wallis, J. D. Executive control processes underlying multi-item working memory. Nat. Neurosci. 17, 876–883 (2014).

    CAS  Article  Google Scholar 

  13. 13.

    Watanabe, K. & Funahashi, S. Neural mechanisms of dual-task interference and cognitive capacity limitation in the prefrontal cortex. Nat. Neurosci. 17, 601–611 (2014).

    CAS  Article  Google Scholar 

  14. 14.

    Sreenivasan, K. K., Curtis, C. E. & D’Esposito, M. Revisiting the role of persistent neural activity during working memory. Trends Cogn. Sci. 18, 82–89 (2014).

    Article  Google Scholar 

  15. 15.

    Lee, S.-H., Kravitz, D. J. & Baker, C. I. Goal-dependent dissociation of visual and prefrontal cortices during working memory. Nat. Neurosci. 16, 997–999 (2013).

    CAS  Article  Google Scholar 

  16. 16.

    Sarma, A., Masse, N. Y., Wang, X.-J. & Freedman, D. J. Task-specific versus generalized mnemonic representations in parietal and prefrontal cortices. Nat. Neurosci. 19, 143–149 (2016).

    CAS  Article  Google Scholar 

  17. 17.

    Zucker, R. S. & Regehr, W. G. Short-term synaptic plasticity. Annu. Rev. Physiol. 64, 355–405 (2002).

    CAS  Article  Google Scholar 

  18. 18.

    Mongillo, G., Barak, O. & Tsodyks, M. Synaptic theory of working memory. Science 319, 1543–1546 (2008).

    CAS  Article  Google Scholar 

  19. 19.

    Rose, N. S. et al. Reactivation of latent working memories with transcranial magnetic stimulation. Science 354, 1136–1139 (2016).

    CAS  Article  Google Scholar 

  20. 20.

    Wolff, M. J., Jochim, J., Akyürek, E. G. & Stokes, M. G. Dynamic hidden states underlying working-memory-guided behavior. Nat. Neurosci. 20, 864–871 (2017).

    CAS  Article  Google Scholar 

  21. 21.

    Koenigs, M., Barbey, A. K., Postle, B. R. & Grafman, J. Superior parietal cortex is critical for the manipulation of information in working memory. J. Neurosci. 29, 14980–14986 (2009).

    CAS  Article  Google Scholar 

  22. 22.

    D’Esposito, M., Postle, B. R., Ballard, D. & Lease, J. Maintenance versus manipulation of information held in working memory: an event-related fMRI study. Brain Cogn. 41, 66–86 (1999).

    Article  Google Scholar 

  23. 23.

    Mante, V., Sussillo, D., Shenoy, K. V. & Newsome, W. T. Context-dependent computation by recurrent dynamics in prefrontal cortex. Nature 503, 78–84 (2013).

    CAS  Article  Google Scholar 

  24. 24.

    Song, H. F., Yang, G. R. & Wang, X.-J. Reward-based training of recurrent neural networks for cognitive and value-based tasks. eLife 6, e21492 (2017).

    Article  Google Scholar 

  25. 25.

    Chaisangmongkon, W., Swaminathan, S. K., Freedman, D. J. & Wang, X.-J. Computing by robust transience: how the fronto-parietal network performs sequential, category-based decisions. Neuron 93, 1504–1517.e4 (2017).

    CAS  Article  Google Scholar 

  26. 26.

    Wang, J., Narain, D., Hosseini, E. A. & Jazayeri, M. Flexible timing by temporal scaling of cortical responses. Nat. Neurosci. 21, 102–110 (2018).

    CAS  Article  Google Scholar 

  27. 27.

    Goudar, V. & Buonomano, D. V. Encoding sensory and motor patterns as time-invariant trajectories in recurrent neural networks. eLife 7, e31134 (2018).

    Article  Google Scholar 

  28. 28.

    Issa, E. B., Cadieu, C. F. & DiCarlo, J. J. Neural dynamics at successive stages of the ventral visual stream are consistent with hierarchical error signals. Preprint at bioRxiv (2018).

  29. 29.

    Wang, J. X. et al. Prefrontal cortex as a meta-reinforcement learning system. Nat. Neurosci. 21, 860–868 (2018).

    CAS  Article  Google Scholar 

  30. 30.

    Song, H. F., Yang, G. R. & Wang, X.-J. Training excitatory-inhibitory recurrent neural networks for cognitive tasks: a simple and flexible framework. PLoS Comput. Biol. 12, e1004792 (2016).

    Article  Google Scholar 

  31. 31.

    Vinje, W. E. & Gallant, J. L. Sparse coding and decorrelation in primary visual cortex during natural vision. Science 287, 1273–1276 (2000).

    CAS  Article  Google Scholar 

  32. 32.

    Olshausen, B. & FIELD, D. Sparse coding of sensory inputs. Curr. Opin. Neurobiol. 14, 481–487 (2004).

    CAS  Article  Google Scholar 

  33. 33.

    Laughlin, S. B., de Ruyter van Steveninck, R. R. & Anderson, J. C. The metabolic cost of neural information. Nat. Neurosci. 1, 36–41 (1998).

    CAS  Article  Google Scholar 

  34. 34.

    Rainer, G., Rao, S. C. & Miller, E. K. Prospective coding for objects in primate prefrontal cortex. J. Neurosci. 19, 5493–5505 (1999).

    CAS  Article  Google Scholar 

  35. 35.

    Weissman, D. H., Roberts, K. C., Visscher, K. M. & Woldorff, M. G. The neural bases of momentary lapses in attention. Nat. Neurosci. 9, 971–978 (2006).

    CAS  Article  Google Scholar 

  36. 36.

    Miller, E. K., Erickson, C. A. & Desimone, R. Neural mechanisms of visual working memory in prefrontal cortex of the macaque. J. Neurosci. 16, 5154–5167 (1996).

    CAS  Article  Google Scholar 

  37. 37.

    Schneegans, S. & Bays, P. M. Restoration of fMRI decodability does not imply latent working memory States. J. Cogn. Neurosci. 29, 1977–1994 (2017).

    Article  Google Scholar 

  38. 38.

    Mendoza-Halliday, D., Torres, S. & Martinez-Trujillo, J. C. Sharp emergence of feature-selective sustained activity along the dorsal visual pathway. Nat. Neurosci. 17, 1255–1262 (2014).

    CAS  Article  Google Scholar 

  39. 39.

    Kornblith, S., Quian Quiroga, R., Koch, C., Fried, I. & Mormann, F. Persistent single-neuron activity during working memory in the human medial temporal lobe. Curr. Biol. 27, 1026–1032 (2017).

    CAS  Article  Google Scholar 

  40. 40.

    Takeda, K. & Funahashi, S. Population vector analysis of primate prefrontal activity during spatial working memory. Cereb. Cortex 14, 1328–1339 (2004).

    Article  Google Scholar 

  41. 41.

    Buschman, T. J., Siegel, M., Roy, J. E. & Miller, E. K. Neural substrates of cognitive capacity limitations. Proc. Natl Acad. Sci. USA 108, 11252–11255 (2011).

    CAS  Article  Google Scholar 

  42. 42.

    Trübutschek, D., Marti, S., Ueberschär, H. & Dehaene, S. Probing the limits of activity-silent non-conscious working memory. Preprint at bioRxiv (2018).

  43. 43.

    Orhan, A. E. & Ma, W. J. A diverse range of factors affect the nature of neural representations underlying short-term memory. Nat. Neurosci. 22, 275–283 (2019).

    CAS  Article  Google Scholar 

  44. 44.

    Wang, X. J. Synaptic reverberation underlying mnemonic persistent activity. Trends Neurosci. 24, 455–463 (2001).

    CAS  Article  Google Scholar 

  45. 45.

    Salazar, R. F., Dotson, N. M., Bressler, S. L. & Gray, C. M. Content-specific fronto-parietal synchronization during visual working memory. Science 338, 1097–1100 (2012).

    CAS  Article  Google Scholar 

  46. 46.

    Lundqvist, M. et al. Gamma and beta bursts underlie working memory. Neuron 90, 152–164 (2016).

    CAS  Article  Google Scholar 

  47. 47.

    Bolkan, S. S. et al. Thalamic projections sustain prefrontal activity during working memory maintenance. Nat. Neurosci. 20, 987–996 (2017).

    CAS  Article  Google Scholar 

  48. 48.

    Hochreiter, S. & Schmidhuber, J. Long short-term memory. Neural Comput. 9, 1735–1780 (1997).

    CAS  Article  Google Scholar 

  49. 49.

    Yang, G. R., Joglekar, M. R., Song, H. F., Newsome, W. T. & Wang, X.-J. Task representations in neural networks trained to perform many cognitive tasks. Nat. Neurosci. 22, 297–306 (2019).

    CAS  Article  Google Scholar 

  50. 50.

    Abadi, M. et al. TensorFlow: large-scale machine learning on heterogeneous distributed systems. Preprint at arXiv (2016).

  51. 51.

    Kingma, D. P. & Ba, J. Adam: a method for stochastic optimization. Preprint at arXiv (2014).

  52. 52.

    Swaminathan, S. K. & Freedman, D. J. Preferential encoding of visual categories in parietal cortex compared with prefrontal cortex. Nat. Neurosci. 15, 315–320 (2012).

    CAS  Article  Google Scholar 

Download references


This work was supported by National Institutes of Health grants R01EY019041 and R01MH092927, National Science Foundation Career Award NCS 1631571 and Department of Defense VBFF.

Author information




N.Y.M, G.R.Y., H.F.S., X.J.W. and D.J.F. contributed to conceiving the research. N.Y.M. performed all model simulations and data analysis. N.Y.M and D.J.F wrote the manuscript, which was further edited by G.R.Y., H.F.S. and X.J.W.

Corresponding authors

Correspondence to Nicolas Y. Masse or David J. Freedman.

Ethics declarations

Competing interests

The authors declare no competing interests.

Additional information

Journal peer review information: Nature Neuroscience thanks Timothy Buschman, Michael Frank, Daniel Scott and the other, anonymous, reviewer(s) for their contribution to the peer review of this work.

Publisher’s note: Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Supplementary Information

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Masse, N.Y., Yang, G.R., Song, H.F. et al. Circuit mechanisms for the maintenance and manipulation of information in working memory. Nat Neurosci 22, 1159–1167 (2019).

Download citation

Further reading


Nature Briefing

Sign up for the Nature Briefing newsletter — what matters in science, free to your inbox daily.

Get the most important science stories of the day, free in your inbox. Sign up for Nature Briefing