Skip to content

ThomasAkam/PFC-BG_model

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PFC - Basal-ganglia network model

Figure

DOI

This repository contains code used to generate the neural network model figure from the manuscript:

Blanco-Pozo, M., Akam, T., & Walton, M. (2023). Dopamine-independent effect of rewards on choices through hidden-state inference. Nature Neuroscience 27.2 (2024): 286-297.

The model consists of a recurrent neural network representing prefrontal cortex (PFC) and a feedforward network representing basal-ganglia. The PFC network is trained to predict the next observation and in doing so learns to infer hidden task states. The basal ganglia network is trained using actor-critic RL (A2C) to predict future reward and choose appropriate actions given the current observation and PFC activity.

The main branch of the repository contains the original Tensorflow/Keras implementation of the model used in the manuscript. The pyTorch branch contains a re-implementation of the model in pyTorch by @dylanhxzhao.

Usage:

The file run_experiment.py in the code folder contains functions to run a simulation experiment and analyse the data.

  • run_experiments() runs 12 simulation runs each for the two model variants shown in the figure and saves the data in the data folder.
  • analyse_experiments() loads the saved data and runs the analyses, saving figure panels and stats output in the plots folder.

Requirements:

  • Python 3
  • tensorflow
  • numpy
  • pandas
  • matplotlib
  • seaborn
  • scipy
  • scikit-learn
  • statsmodels

The figure was generated using Python 3.10.8 and the package versions listed in requirements.txt

About

Code for implementing neural network model of PFC-basal-ganglia circuit from Blanco-Pozo et al 2023.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages