Search bioRxiv⌕ Search

bioRxiv · 10.1101/2020.09.30.321752

PsychRNN: An Accessible and Flexible Python Package for Training Recurrent Neural Network Models on Cognitive Tasks

Abstract

Task-trained artificial recurrent neural networks (RNNs) provide a computational modeling framework of increasing interest and application in computational, systems, and cognitive neuroscience. RNNs can be trained, using deep learning methods, to perform cognitive tasks used in animal and human experiments, and can be studied to investigate potential neural representations and circuit mechanisms underlying cognitive computations and behavior. Widespread application of these approaches within neuroscience has been limited by technical barriers in use of deep learning software packages to train network models. Here we introduce PsychRNN, an accessible, flexible, and extensible Python package for training RNNs on cognitive tasks. Our package is designed for accessibility, for researchers to define tasks and train RNN models using only Python and NumPy without requiring knowledge of deep learning software. The training backend is based on TensorFlow and is readily extensible for researchers with TensorFlow knowledge to develop projects with additional customization. PsychRNN implements a number of specialized features to support applications in systems and cognitive neuroscience. Users can impose neurobiologically relevant constraints on synaptic connectivity patterns. Furthermore, specification of cognitive tasks has a modular structure, which facilitates parametric variation of task demands to examine their impact on model solutions. PsychRNN also enables task shaping during training, or curriculum learning, in which tasks are adjusted in closed-loop based on performance. Shaping is ubiquitous in training of animals in cognitive tasks, and PsychRNN allows investigation of how shaping trajectories impact learning and model solutions. Overall, the PsychRNN framework facilitates application of trained RNNs in neuroscience research. Visual Abstract O_FIG O_LINKSMALLFIG WIDTH=200 HEIGHT=100 SRC="FIGDIR/small/321752v1_ufig1.gif" ALT="Figure 1"> View larger version (25K): org.highwire.dtl.DTLVardef@1541513org.highwire.dtl.DTLVardef@133c86borg.highwire.dtl.DTLVardef@aaf099org.highwire.dtl.DTLVardef@99d55b_HPS_FORMAT_FIGEXP M_FIG Example workflow for using PsychRNN. First, the task of interest is defined, and a recurrent neural network model is trained to perform the task, optionally with neurobiologically informed constraints on the network. After the network is trained, the researchers can investigate network properties including the synaptic connectivity patterns and the dynamics of neural population activity during task execution, and other studies, e.g. those on perturbations, can be explored. The dotted line shows the possible repetition of this cycle with one network, which allows investigation of training effects of task shaping, or curriculum learning, for closed-loop training of the network on a progression of tasks. C_FIG Significance StatementArtificial recurrent neural network (RNN) modeling is of increasing interest within computational, systems, and cognitive neuroscience, yet its proliferation as a computational tool within the field has been limited due to technical barriers in use of specialized deep-learning software. PsychRNN provides an accessible, flexible, and powerful framework for training RNN models on cognitive tasks. Users can define tasks and train models using the Python-based interface which enables RNN modeling studies without requiring user knowledge of deep learning software. PsychRNNs modular structure facilitates task specification and incorporation of neurobiological constraints, and supports extensibility for users with deep learning expertise. PsychRNNs framework for RNN modeling will increase accessibility and reproducibility of this approach across neuroscience subfields.

Source connections

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Ehrlich, D. B., Stone, J. T., Brandfonbrener, D., Atanasov, A., Murray, J. D.. 2020-10-01. PsychRNN: An Accessible and Flexible Python Package for Training Recurrent Neural Network Models on Cognitive Tasks. https://doi.org/10.1101/2020.09.30.321752

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related preprints

Novel Tau Interaction Partners as Potential Biomarkers and Therapeutic Targets in Neurodegenerative Diseases

Alzheimers disease is a progressive neurodegenerative disorder leading to cognitive decline and ultimately death. One of the main hallmarks of this disease is the accumulation of pathological tau protein into neurofibrillary tangles. To better understand these pathological mechanisms, it is essential to characterize the tau protein interactome in health and disease. In this study, we performed a yeast two-hybrid screening using a human brain cDNA library, from which we identified 15 novel tau-interacting proteins that bind to full-length human tau, or its fragments: the N-terminus, microtubule-binding domain, or C-terminus. We subsequently validated these novel interactions using in vitro co-immunoprecipitation and colocalization assays with both physiological and pathological tau isoforms. Furthermore, their interactions with the human tau protein were analyzed using surface plasmon resonance. Finally, an in silico interactome analysis of these newly discovered tau-binding partners revealed several additional interactors that can link them to downstream processes critical to neurodegenerative pathways Our findings offer fresh insights into tau biology and highlight novel targets for therapeutic intervention and biomarker development.

neuroscience↗

Early visual cortex is not functionally necessary for temporal attention: A TMS study

Temporal attention enhances the selective processing of information at a specific point in time and improves perception. Previous neuroimaging studies investigating its neural mechanisms have either conflated temporal attention with temporal expectation or provided correlational evidence. Thus, whether early visual cortex is functionally necessary for temporal attention remains unknown. Here, we combined psychophysics with transcranial magnetic stimulation (TMS) to examine whether V1/V2 are functionally necessary and play a causal role in temporal attention. Observers performed an orientation-discrimination task in which two consecutive stimuli, T1 and T2, were presented in the periphery, preceded by a precue providing either valid or neutral temporal information. Double-pulse TMS was delivered under four conditions: at T1 (T1-TMS), at T2 (T2-TMS), at both T1 and T2 (both-TMS), or not at all (none-TMS), to assess its effects on temporal attention and the efficacy of the stimulation was verified by pupil size analysis. Behavioral results revealed robust temporal attention benefits on d', reaction time, and the Balanced Integration Score (BIS) across all four TMS conditions, indicating that the benefits of temporal attention were unaffected by occipital TMS. Furthermore, pupil dilation was largest in the both-TMS condition, followed by the T1-TMS and T2-TMS conditions, and smallest in the none-TMS condition, providing physiological verification of the stimulation protocol. Together, these findings reveal the first causal evidence that the early visual cortex is not functionally necessary for endogenous temporal attention.

neuroscience↗

Disentanglement of persistent and dynamic neural substrates of working memory

Competing theories of working memory have alternatively emphasized the importance of persistent and dynamic substrates of this cognitive function. Here, we directly tested these theories by computationally isolating the contributions of persistent and dynamic activity to working memory. We analyzed neuronal population activity recordings in macaques doing match/non-match working memory tasks. We first extracted signatures of persistent and dynamic activity through cue-specific temporal means, temporal principal components, and correlations of activity patterns across task epochs. We then generated synthetic data constrained by these signatures, and decoded cue stimuli from these data, separately from persistent and non-persistent neurons. We found that high decoding performance arose from a nuanced interplay of persistent and dynamic activity. Specifically, we could decode stimuli at empirical or above-chance levels across all tasks only from persistent neurons, but only after constraining correlations of activity patterns across epochs. In this way, we showed distinct roles for persistent and dynamic neuronal activity that help to unify two competing theories of working memory. More broadly, we also advanced computational controlled experiments as a principled framework for adjudicating between competing models of neuronal population activity.

neuroscience↗