Skip to content

Latest commit

 

History

History
55 lines (37 loc) · 1.62 KB

File metadata and controls

55 lines (37 loc) · 1.62 KB

SR experiments (barcode RNN)

Successor-representation (SR) simulations built on the recurrent barcode model from Fang, Lindsey et al., eLife 2025 (DOI 10.7554/eLife.103512).

This directory was copied from the larger barcodes research codebase as a standalone snapshot you can publish under its own GitHub repository.

Setup

pip install -r requirements.txt

Scripts

File Description
sr_anticipatory_bias_simulation.py TD learning of an SR matrix, injection into recurrent weights; structured vs unstructured pretraining
angular_error_shifts_sr.py Signed angular error distributions across recall strength r and search s with optional place remapping
Hilton_SR/ring_T.py Small standalone demo: ring transition matrix and analytical SR ((I-\gamma T)^{-1})

Shared network code: Model.py, PlaceInputs.py, utils.py, place_remapping.py.

Run examples

Anticipatory bias study (writes figures and outputs/sr_anticipatory_bias/):

python sr_anticipatory_bias_simulation.py

Angular-error shifts (check QUICK_PREVIEW and grid flags at the top of the script):

python angular_error_shifts_sr.py

Ring SR figure:

python Hilton_SR/ring_T.py

Push to GitHub

On GitHub, create a new empty repository (no README). Then:

cd /path/to/sr-barcodes
git add -A
git commit -m "Initial import: SR simulations for barcode RNN"
git remote add origin https://github.com/YOUR_USER/YOUR_REPO.git
git push -u origin main

Large .npz outputs are gitignored; regenerate by running the scripts.