NeuroGym: An open resource for developing and sharing neuroscience tasks

Manuel Molano-Mazón*, Joao Barbosa, Jordi Pastor-Ciurana, Marta Fradera, Ru-Yuan Zhang, Jeremy Forest, Jorge del Pozo, Li Ji-An, Christopher J Cueva, Jaime de la Rocha, Devika Narain, Guangyu Robert Yang

*Corresponding author for this work

Research output: Working paperPreprintAcademic

149 Downloads (Pure)


Artificial Neural Networks (ANNs) trained on specific cognitive tasks have re-emerged as a
useful tool to study the brain. However, ANNs would better aid cognitive neuroscience if a
given network could be easily trained on a wide range of tasks for which neural recordings
are available. Moreover, unintentional divergent implementations of cognitive tasks can
produce variable results, which limits their interpretability. Towards this goal, we present
NeuroGym, an open-source Python package that provides a large collection of customizable
neuroscience tasks to test and compare network models. Building upon the OpenAI Gym
toolbox, NeuroGym tasks (1) are written in a high-level flexible Python framework; (2)
possess a shared interface tailored to common needs of neuroscience tasks that facilitates
their design and usage; (3) support the training of ANNs using both Reinforcement and
Supervised Learning techniques. The toolbox allows easy assembly of new tasks by
modifying existing ones in a hierarchical and modular fashion. These design features make it
straightforward to take a network designed for one task and train it on many other tasks.
NeuroGym is a community-driven effort that contributes to a rapidly evolving open
ecosystem of neural network development, data analysis, and model-data comparison.
Original languageEnglish
Number of pages20
Publication statusPublished - 7 Feb 2022


Dive into the research topics of 'NeuroGym: An open resource for developing and sharing neuroscience tasks'. Together they form a unique fingerprint.

Cite this