{"id":25117902,"url":"https://github.com/brody-lab/findr","last_synced_at":"2025-07-13T15:34:24.130Z","repository":{"id":254717110,"uuid":"847345365","full_name":"Brody-Lab/findr","owner":"Brody-Lab","description":"FINDR: Flow-field Inference from Neural Data using deep Recurrent networks","archived":false,"fork":false,"pushed_at":"2024-10-01T08:41:09.000Z","size":181,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-02-08T03:35:59.031Z","etag":null,"topics":["latent-variable-models","neural-differential-equations","neuroscience"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Brody-Lab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-25T15:06:43.000Z","updated_at":"2024-10-01T08:41:12.000Z","dependencies_parsed_at":"2024-08-25T16:27:24.611Z","dependency_job_id":"5997dc46-8c4f-459d-b09d-97d71b2f2daa","html_url":"https://github.com/Brody-Lab/findr","commit_stats":null,"previous_names":["brody-lab/findr"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Brody-Lab%2Ffindr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Brody-Lab%2Ffindr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Brody-Lab%2Ffindr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Brody-Lab%2Ffindr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Brody-Lab","download_url":"https://codeload.github.com/Brody-Lab/findr/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246814921,"owners_count":20838350,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["latent-variable-models","neural-differential-equations","neuroscience"],"created_at":"2025-02-08T03:36:04.899Z","updated_at":"2025-07-13T15:34:24.122Z","avatar_url":"https://github.com/Brody-Lab.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align='center'\u003eFINDR\u003c/h1\u003e\n\u003ch2 align='center'\u003eFlow-field inference from neural data using deep recurrent networks\u003c/h2\u003e\n\nNeurons work together in large groups to solve tasks — like deciding whether to buy a laptop or not based on online reviews. A central premise in neuroscience is that the brain's algorithm for doing such tasks can be succinctly represented as a differential equation describing how this group activity changes over time. \n\n**FINDR** discovers what this differential equation is, using real brain activity data from animals doing specific tasks. The method does this in two main steps:\n\n1) It separates the brain activity that is relevant to the task from activity that isn't.\n\n2) It learns the most likely differential equation that is consistent with the task-relevant brain activity.\n\n# Installation\nRun the commands below to install FINDR:\n\n```\n$ git clone https://github.com/Brody-Lab/findr\n$ module load anaconda/2024.10\n$ conda create --name findr python=3.12\n$ conda activate findr\n$ cd findr\n$ pip install -e .\n```\n\n# Data format\nThe data needs to be stored as an `.npz` file that contains the following keyword arguments:\n\n`spikes`: contains a 3-d array (# of trials x maximum trial length x # of neurons) of spike counts for each time bin.\n\n`externalinputs`: contains a 3-d array (# of trials x maximum trial length x input stimulus dimension) where the input stimulus dimension can be an integer greater than or equal to 1. The stimulus values themselves can be floating point numbers or integers.\n\n`lengths`: contains a 1-d array (# of trials) of the length of each trial (in the unit of time bins).\n\n`times`: contains a 1-d array (# of trials) of the timestamp of onset of each trial.\n\n# Training FINDR\n\nRun the commands below to run FINDR:\n\n```\n$ module load anaconda/2024.10\n$ conda activate findr\n$ python main.py --datapath=$datafilepath --workdir=$analysispath\n```\n\nMake sure that the `$datafilepath` correctly specifies the location of the data file to fit (in `.npz` format). The `$analysispath` is where the trained FINDR parameters are stored.\n\nIt should take a few hours on a single A100 GPU to finish training.\n\n# Example analyses\nThere are example Jupyter notebooks under the `notebooks` folder. The `plot_example_vector_fields.ipynb` notebook demonstrates how to plot flow fields (or the velocity vector fields) for an example dataset.\n\n# Citation\n\nKim, T.D., Luo, T.Z., Can, T., Krishnamurthy, K., Pillow, J.W., Brody, C.D. (2025). Flow-field inference from neural data using deep recurrent networks. *Proceedings of the 42nd International Conference on Machine Learning (ICML)*.\n\n```bibtex\n@article{kim2025findr,\n    author={Timothy Doyeon Kim and Thomas Zhihao Luo and Tankut Can and Kamesh Krishnamurthy and Jonathan W. Pillow and Carlos D. Brody},\n    title={Flow-field inference from neural data using deep recurrent networks},\n    year={2025},\n    journal={Proceedings of the 42nd International Conference on Machine Learning (ICML)}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrody-lab%2Ffindr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrody-lab%2Ffindr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrody-lab%2Ffindr/lists"}