Supporting files to reproduce all figures in the article "Learning accurate path integration in ring attractor models of the head direction system".

Pantelis Vafidis cbb48cb77e Network w/o learning & architectural asymmetries 2 年之前
Connectome Synapses bff80d51d1 Postsynaptic locations of E-PG neurons in the EB 2 年之前
savefiles cbb48cb77e Network w/o learning & architectural asymmetries 2 年之前
LICENSE 5105704ceb Initial commit 2 年之前
README.md 07c63769f8 Update README 2 年之前

README.md

LearnPI

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Instructions to reproduce all main text, supplementary and appendix figures of the manuscript "Learning accurate path integration in ring attractor models of the head direction system". The code to reproduce results can be found in https://github.com/panvaf/LearnPI. Place a folder containing the code in the parent folder downloaded from this data repository.

Instructions are based on default values of various parameters. After generating figures, please remember to revert parameters to these default values.

The figures are reproduced from saved networks. In order to generate the results from scratch, execute run_simulation.py with the desired parameters for each figure mentioned below. Simulation takes ~8 hours on a mid-range gaming laptop, while the reduced network drastically reduces simulation time to ~3 minutes.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

  • Fig. 1B,C, 2A-C, 3A-C,E,F, Fig. 3 - Fig. Sup. 2: Run generate_plots.py with vel_hist = True.

  • Fig. 1 - Fig. Sup. 1: Run EB_synapses.py. The upper-left panel in A also appears in Fig. 1E.

  • Fig. 2D: Run stability.py.

  • Fig. 3D, 4, Fig. 4 - Fig. Sup. 1A, App. 1 - Fig. 1E, App. 2 - Fig. 1A-C: Run multinet_plots.py. The diffusion coefficients for Fig. S5E were obtained by running stability.py with d_coeff = True for the corresponding networks.

  • Fig. 3 - Fig. Sup. 1: Run generate_plots.py with cut_exc = True.

  • Fig. 3 - Fig. Sup. 3: Run generate_plots.py with data_dir = '\savefiles\trained_networks\Parallel\Perturb_Conn\'. The networks were randomly generated, therefore results can vary. By varying the parameter 'run' in the dictionary params from 0 to 11, one can see multiple examples of such networks.

  • Fig. 4 - Fig. Sup. 1B: Run generate_plots.py with PI_err = False, and 'gain': .125 in the dictionary params.

  • Fig. 4 - Fig. Sup. 1C: Run generate_plots.py with PI_err = False and 'gain': 10 in the dictionary params. Also plot margins in lines 761 and 766 need to be adjusted.

  • Fig. 4 - Fig. Sup. 1D-F: Run generate_plots.py with PI_err = False, sim_run = 'Long', and 'gain': -1 in the dictionary params.

  • App. 1 - Fig. 1A-D: Run generate_plots.py with 'n_sigma': 0.7 in the dictionary params.

  • App. 2 - Fig. 1D,E: Run generate_plots.py with sim_run = '4Medium', PI_err = False and 'tau_s': 1 in the dictionary params.

  • App. 3 - Fig. 1: Run generate_plots.py with 'vary_w_rot': True and 'adj': True in the dictionary params.

  • App. 3 - Fig. 2: Run generate_plots.py with PI_example_dir = '\savefiles\PI_example1.npz', 'vary_w_rot': True in the dictionary params and filename = "fly_rec" + util.filename(params) + 'NoLearn'. Also set err_lim = 180 in line 487.

  • App. 3 - Fig. 3: Run generate_plots.py with PI_example_dir = '\savefiles\PI_example_360_max.npz', PI_err = False, and 'rand_w_rot': True in the dictionary params.

  • App. 5 - Fig. 1-4: Run math_appendix.py.