Working Memory as Programmable Fast Weight Computation
Description
Working Memory As Fast Weight Computation This repository contains code and data organization for the analyses associated with the Working Memory As Fast Weight Computation project. It combines Python computational modeling scripts with MATLAB neural-geometry analysis scripts for synthetic models and monkey neural recording data. The main workflow is: 1. Train or evaluate computational models on synthetic cue-memory tasks. 2. Export model activity, losses, and model-state variables as `.mat` files. 3. Prepare empirical monkey neural data when needed. 4. Run MATLAB analyses to visualize and quantify stimulus-related neural geometry, decoding, and temporal generalization. ## Typical Usage ### Computational Modeling 1. Change into a model folder under `computational_modeling/`. 2. Edit configuration constants in the training script if needed. 3. Run the training script to generate model checkpoints. 4. Run the matching analysis or perturbation script to export `.mat` files. 5. Use MATLAB analysis scripts to inspect geometry, decoding, and temporal dynamics. ### Empirical Neural Data 1. Change into `neural_geometry_analysis/data_preparation/`. 2. Run `data_prepare_step1.m`, `data_prepare_step2.m`, and `data_prepare_step3.m` with a consistent `i_monkey` setting. 3. Optionally run `show_firing_rate.m` to inspect prepared firing-rate tensors. 4. Run PCA, geometry-correlation, or decoding analyses from the corresponding `neural_geometry_analysis/` subfolders. Path Notes The scripts are written with relative paths and are usually intended to be run from their own subfolder. Before running a script, check its `addpath(...)`, `load(...)`, save path, and checkpoint path settings. Update paths or create missing output directories when running from a different working directory. The original data is recollected from https://crcns.org/data-sets/pfc/pfc-3/ Qi, X.-L., Meyer, T., Stanford, T. R., & Constantinidis, C. (2011). Changes in Prefrontal Neuronal Activity after Learning to Perform a Spatial Working Memory Task. Cerebral Cortex, 21(12), 2722–2732. https://doi.org/10.1093/cercor/bhr058 Meyer, T., Qi, X.-L., Stanford, T. R., & Constantinidis, C. (2011). Stimulus Selectivity in Dorsal and Ventral Prefrontal Cortex after Training in Working Memory Tasks. Journal of Neuroscience, 31(17), 6266–6276. https://doi.org/10.1523/JNEUROSCI.6798-10.2011
Files
Steps to reproduce
See README files within the folder system of the package
Institutions
- Tsinghua UniversityBeijing, Beijing