Skip to content

Repository files navigation

Neural-Speed-Encdoing-Model

This is a repository to showcase some results in speed encoding model paper: 'Neural trajectories improve motor precision.'
Here We will walk through toy data generation to create neural data that tunes to speed under 4 different encoding scheme.
(1) a proportional activation model;
(2) a selective timing model with neurons activated differentially in the timing of their peak firing relative to peak movement speed;
(3) a selective co-activation model created with preferentially activated neurons within distinct neural subpopulations;
(4) a combined model with both selective timing and co-activation. \

Then have a RNN model trained to test the decoding performance of speed from created encoding models.

configure virtual environment for pytorch

Follow the requirement.txt to install the virtual environment we use to run the models run this in conda cmd to install pytorch

##Using Anaconda navigator Can go to Envioronments and import Neural-Speed-condaEnvironment.yaml

Or

conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia

Building a neural encoding model

Use Generate_Speed_Encoding_Model.m to generate the toy speed encoding model with different encoding scheme described in the paper

Building a RNN decoding model

Use Run_torch_SpeedEncoding_model_repo.ipynb to load and run RNN model to test and analyze the toy encoding models.

decoding performance analysis

Refer to Results plotting section in Run_torch_SpeedEncoding_model_repo.pynb for the decoding performance and dimension/phase sweeping analysis.

A preprint of our publication can be viewed at:
https://www.biorxiv.org/content/10.1101/2025.07.01.662682v1

About

This is a prep repo for the speed encoding model paper

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages