This is the repo for the following paper:
Lu, Q., Nguyen, T. T., Zhang, Q., Hasson, U., Griffiths, T. L., Zacks, J. M., Gershman, S. J., & Norman, K. A. (2023). Reconciling Shared versus Context-Specific Information in a Neural Network Model of Latent Causes. In arXiv [q-bio.NC]. arXiv. http://arxiv.org/abs/2312.08519
This repo contains the code for Simulation 1 and Simulation 2. The code for simulation 3 is in a separate repo here.
For Simulation 1, run the following code under src
python sim-poly.pyFor Simulation 2, run the following code under src
python sim-csw.py.
βββ LICENSE
βββ README.md
βββ src
βββ demo
βΒ Β βββ ......
βββ model # model components
βΒ Β βββ A2C.py
βΒ Β βββ CGRU.py
βΒ Β βββ CRPLSTM.py
βΒ Β βββ CRPNN.py
βΒ Β βββ ContextRep.py
βΒ Β βββ GRUA2C.py
βΒ Β βββ PECRP.py
βΒ Β βββ PEKDECRP.py
βΒ Β βββ PEKNN.py
βΒ Β βββ PEKNNCRP.py
βΒ Β βββ PETracker.py
βΒ Β βββ ShortCut.py
βΒ Β βββ SimpleContext.py
βΒ Β βββ SimplePETracker.py
βΒ Β βββ TabularShortCut.py
βΒ Β βββ TabularShortCutIS.py
βΒ Β βββ __init__.py
βΒ Β βββ anderson91.py
βΒ Β βββ utils.py
βββ task # definition for the tasks
βΒ Β βββ _Polynomial.py # task used in Simulation 1
βΒ Β βββ _CSW.py # task used in Simulation 2
βΒ Β βββ _ContextualBandit.py
βΒ Β βββ _MixedCSW.py
βΒ Β βββ _SimpleTwoArmBandit.py
βΒ Β βββ _Waves.py
βΒ Β βββ __init__.py
βββ sim-poly.py # code for Simulation 1
βββ sim-csw.py # code for Simulation 2 - model training
βββ sim-mixedcsw.py
βββ stats.py
βββ utils.py
βββ vis-group-poly.py # code for Simulation 2 - result visualization
βββ vis.py