RotationalDynamics
Code for creating recurrent neural network with rotational dynamics. Model is discussed in detail in "Rotational Dynamics Reduce Interference Between Sensory and Memory Representations" by Libby and Buschman.
Install / Use
/learn @buschman-lab/RotationalDynamicsREADME
Rotational Dynamics
Neural Network Model of Rotational Dynamics
The neural network model was designed to simulate observed dynamics in auditory cortex during associative learning. The same analyses applied to the neural data are applied here. For each model run, classifiers are trained and trial data is projected on to the classifiers. Additionally, z-scored firing rate differences and neuron selectivity counts are calculated per model run across the population.
Software
Python 3.7
jupyter notebook (for demo)
packages
numpy 1.16.2, torch 1.0.1, sklearn 0.21.1 (version 0.19 or later), scipy 1.2.1
Installing
Install python 3.7 and necessary packages (listed above). Then download files and place script/notebook(s) into the same folder as helper functions. Install time for python, dependencies, and files is about 30 minutes to 2 hours.
Running Model
Script: network_model_rnn.py
Choose number of model runs - line 43
Choose a directory for model save file - line 45-47
Choose network parameters - defaults match paper
Notebook: Model Demo 2020
Ensure all helper .py files are in the same folder as the notebook. Run each cell in order. The model parameters are set to run example network models with a range of parameters for the level of association and levels of structure in the rotation. Expected time to run is 5-20 minutes.
Expected output:
All accuracy of classifier are saved at each time point. Accuracy is measured by AUC or area under the curve. Values above .5 indicate accurate performance.
A/X Sensory and Memory classifiers should perform well during the first and second time points.
For example:
AX AUC per tp: [0.906425 0.733425]
C/C* sensory classifier should perform well during the second time point (tp) only.
For example:
CCprime AUC per tp: [0.489225 0.865125]
When Association levels are high, A/X sensory classifier should fail during unexpected trials at time point 2. However, A/X memory classifier should perform well on these trials.
Full network output example:
New Run - p_index: 5 run: 0
current association level 0.95
current level of structure in rotation 0.49889135254988914
AX AUC per tp: [0.906425 0.733425]
CCprime AUC per tp: [0.489225 0.865125]
A/X Sensory AUC on Unexpected trials: 0.33799999999999997
A/X Memory AUC on Unexpected trials: 0.7418
License
This project is licensed under the MIT License - see the LICENSE file for details
Related Skills
node-connect
342.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
85.3kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
342.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
342.5kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
