IDEAS home Printed from https://ideas.repec.org/a/plo/pcbi00/1011852.html
   My bibliography  Save this article

Trained recurrent neural networks develop phase-locked limit cycles in a working memory task

Author

Listed:
  • Matthijs Pals
  • Jakob H Macke
  • Omri Barak

Abstract

Neural oscillations are ubiquitously observed in many brain areas. One proposed functional role of these oscillations is that they serve as an internal clock, or ‘frame of reference’. Information can be encoded by the timing of neural activity relative to the phase of such oscillations. In line with this hypothesis, there have been multiple empirical observations of such phase codes in the brain. Here we ask: What kind of neural dynamics support phase coding of information with neural oscillations? We tackled this question by analyzing recurrent neural networks (RNNs) that were trained on a working memory task. The networks were given access to an external reference oscillation and tasked to produce an oscillation, such that the phase difference between the reference and output oscillation maintains the identity of transient stimuli. We found that networks converged to stable oscillatory dynamics. Reverse engineering these networks revealed that each phase-coded memory corresponds to a separate limit cycle attractor. We characterized how the stability of the attractor dynamics depends on both reference oscillation amplitude and frequency, properties that can be experimentally observed. To understand the connectivity structures that underlie these dynamics, we showed that trained networks can be described as two phase-coupled oscillators. Using this insight, we condensed our trained networks to a reduced model consisting of two functional modules: One that generates an oscillation and one that implements a coupling function between the internal oscillation and external reference.In summary, by reverse engineering the dynamics and connectivity of trained RNNs, we propose a mechanism by which neural networks can harness reference oscillations for working memory. Specifically, we propose that a phase-coding network generates autonomous oscillations which it couples to an external reference oscillation in a multi-stable fashion.Author summary: Many of our actions are rhythmic—walking, breathing, digesting and more. It is not surprising that neural activity can have a strong oscillatory component. Indeed, such brain waves are common, and can even be measured using EEG from the scalp. Perhaps less obvious is the presence of such oscillations during non-rhythmic behavior—such as memory maintenance and other cognitive functions. Reports of these cognitive oscillations have accumulated over the years, and various theories were raised regarding their origin and utilization. In particular, oscillations have been proposed to serve as a clock signal that can be used for temporal-, or phase-coding of information in working memory. Here, we studied the dynamical systems underlying this kind of coding, by using trained artificial neural networks as hypothesis generators. We trained recurrent neural networks to perform a working memory task, while giving them access to a reference oscillation. We were then able to reverse engineer the learned dynamics of the networks. Our analysis revealed that phase-coded memories correspond to stable attractors in the dynamical landscape of the model. These attractors arose from the coupling of the external reference oscillation with oscillations generated internally by the network.

Suggested Citation

  • Matthijs Pals & Jakob H Macke & Omri Barak, 2024. "Trained recurrent neural networks develop phase-locked limit cycles in a working memory task," PLOS Computational Biology, Public Library of Science, vol. 20(2), pages 1-23, February.
  • Handle: RePEc:plo:pcbi00:1011852
    DOI: 10.1371/journal.pcbi.1011852
    as

    Download full text from publisher

    File URL: https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1011852
    Download Restriction: no

    File URL: https://journals.plos.org/ploscompbiol/article/file?id=10.1371/journal.pcbi.1011852&type=printable
    Download Restriction: no

    File URL: https://libkey.io/10.1371/journal.pcbi.1011852?utm_source=ideas
    LibKey link: if access is restricted and if your library uses this service, LibKey will redirect you to where you can use your library subscription to access this item
    ---><---

    References listed on IDEAS

    as
    1. Valerio Mante & David Sussillo & Krishna V. Shenoy & William T. Newsome, 2013. "Context-dependent computation by recurrent dynamics in prefrontal cortex," Nature, Nature, vol. 503(7474), pages 78-84, November.
    Full references (including those not matched with items on IDEAS)

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Yan Li & Mitchell Swerdloff & Tianyu She & Asiyah Rahman & Naveen Sharma & Reema Shah & Michael Castellano & Daniel Mogel & Jason Wu & Asim Ahmed & James San Miguel & Jared Cohn & Nikesh Shah & Raddy , 2023. "Robust odor identification in novel olfactory environments in mice," Nature Communications, Nature, vol. 14(1), pages 1-29, December.
    2. Georgia Koppe & Hazem Toutounji & Peter Kirsch & Stefanie Lis & Daniel Durstewitz, 2019. "Identifying nonlinear dynamical systems via generative recurrent neural networks with applications to fMRI," PLOS Computational Biology, Public Library of Science, vol. 15(8), pages 1-35, August.
    3. Jan Weber & Anne-Kristin Solbakk & Alejandro O. Blenkmann & Anais Llorens & Ingrid Funderud & Sabine Leske & Pål Gunnar Larsson & Jugoslav Ivanovic & Robert T. Knight & Tor Endestad & Randolph F. Helf, 2024. "Ramping dynamics and theta oscillations reflect dissociable signatures during rule-guided human behavior," Nature Communications, Nature, vol. 15(1), pages 1-16, December.
    4. Pierre O. Boucher & Tian Wang & Laura Carceroni & Gary Kane & Krishna V. Shenoy & Chandramouli Chandrasekaran, 2023. "Initial conditions combine with sensory evidence to induce decision-related dynamics in premotor cortex," Nature Communications, Nature, vol. 14(1), pages 1-28, December.
    5. Rishi Rajalingham & Aída Piccato & Mehrdad Jazayeri, 2022. "Recurrent neural networks with explicit representation of dynamic latent variables can mimic behavioral patterns in a physical inference task," Nature Communications, Nature, vol. 13(1), pages 1-15, December.
    6. repec:plo:pcbi00:1006854 is not listed on IDEAS
    7. Wan-Yu Shih & Hsiang-Yu Yu & Cheng-Chia Lee & Chien-Chen Chou & Chien Chen & Paul W. Glimcher & Shih-Wei Wu, 2023. "Electrophysiological population dynamics reveal context dependencies during decision making in human frontal cortex," Nature Communications, Nature, vol. 14(1), pages 1-24, December.
    8. Shailaja Akella & Peter Ledochowitsch & Joshua H. Siegle & Hannah Belski & Daniel D. Denman & Michael A. Buice & Severine Durand & Christof Koch & Shawn R. Olsen & Xiaoxuan Jia, 2025. "Deciphering neuronal variability across states reveals dynamic sensory encoding," Nature Communications, Nature, vol. 16(1), pages 1-22, December.
    9. Wenyi Zhang & Yang Xie & Tianming Yang, 2022. "Reward salience but not spatial attention dominates the value representation in the orbitofrontal cortex," Nature Communications, Nature, vol. 13(1), pages 1-12, December.
    10. Nir Even-Chen & Blue Sheffer & Saurabh Vyas & Stephen I Ryu & Krishna V Shenoy, 2019. "Structure and variability of delay activity in premotor cortex," PLOS Computational Biology, Public Library of Science, vol. 15(2), pages 1-17, February.
    11. Hao Guo & Shenbing Kuang & Alexander Gail, 2025. "Sensorimotor environment but not task rule reconfigures population dynamics in rhesus monkey posterior parietal cortex," Nature Communications, Nature, vol. 16(1), pages 1-17, December.
    12. Javier G. Orlandi & Mohammad Abdolrahmani & Ryo Aoki & Dmitry R. Lyamzin & Andrea Benucci, 2023. "Distributed context-dependent choice information in mouse posterior cortex," Nature Communications, Nature, vol. 14(1), pages 1-16, December.
    13. Rishi Rajalingham & Hansem Sohn & Mehrdad Jazayeri, 2025. "Dynamic tracking of objects in the macaque dorsomedial frontal cortex," Nature Communications, Nature, vol. 16(1), pages 1-16, December.
    14. Joao Barbosa & Rémi Proville & Chris C. Rodgers & Michael R. DeWeese & Srdjan Ostojic & Yves Boubenec, 2023. "Early selection of task-relevant features through population gating," Nature Communications, Nature, vol. 14(1), pages 1-13, December.
    15. Nir Moneta & Mona M. Garvert & Hauke R. Heekeren & Nicolas W. Schuck, 2023. "Task state representations in vmPFC mediate relevant and irrelevant value signals and their behavioral influence," Nature Communications, Nature, vol. 14(1), pages 1-21, December.
    16. Huanyuan Zhou & KongFatt Wong-Lin & Da-Hui Wang, 2018. "Parallel Excitatory and Inhibitory Neural Circuit Pathways Underlie Reward-Based Phasic Neural Responses," Complexity, Hindawi, vol. 2018, pages 1-20, April.
    17. Benjamin R Cowley & Matthew A Smith & Adam Kohn & Byron M Yu, 2016. "Stimulus-Driven Population Activity Patterns in Macaque Primary Visual Cortex," PLOS Computational Biology, Public Library of Science, vol. 12(12), pages 1-31, December.
    18. Kiyohito Iigaya & Sanghyun Yi & Iman A. Wahle & Sandy Tanwisuth & Logan Cross & John P. O’Doherty, 2023. "Neural mechanisms underlying the hierarchical construction of perceived aesthetic value," Nature Communications, Nature, vol. 14(1), pages 1-19, December.
    19. Jean-Paul Noel & Edoardo Balzani & Cristina Savin & Dora E. Angelaki, 2024. "Context-invariant beliefs are supported by dynamic reconfiguration of single unit functional connectivity in prefrontal cortex of male macaques," Nature Communications, Nature, vol. 15(1), pages 1-12, December.
    20. Takuya Ito & Guangyu Robert Yang & Patryk Laurent & Douglas H. Schultz & Michael W. Cole, 2022. "Constructing neural network models from brain data reveals representational transformations linked to adaptive behavior," Nature Communications, Nature, vol. 13(1), pages 1-16, December.
    21. Eleanor Holton & Jan Grohn & Harry Ward & Sanjay G. Manohar & Jill X. O’Reilly & Nils Kolling, 2024. "Goal commitment is supported by vmPFC through selective attention," Nature Human Behaviour, Nature, vol. 8(7), pages 1351-1365, July.

    More about this item

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:plo:pcbi00:1011852. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: ploscompbiol (email available below). General contact details of provider: https://journals.plos.org/ploscompbiol/ .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.