{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/modeling-latent-neural-dynamics-with-gaussian","title":"Modeling Latent Neural Dynamics with Gaussian Process Switching Linear Dynamical Systems","arxiv_id":"2408.03330","date":"2024-07-19","proceeding":null,"authors":["Amber Hu","David Zoltowski","Aditya Nair","David Anderson","Lea Duncker","Scott Linderman"],"abstract":"Understanding how the collective activity of neural populations relates to computation and ultimately behavior is a key goal in neuroscience. To this end, statistical methods which describe high-dimensional neural time series in terms of low-dimensional latent dynamics have played a fundamental role in characterizing neural systems. Yet, what constitutes a successful method involves two opposing criteria: (1) methods should be expressive enough to capture complex nonlinear dynamics, and (2) they should maintain a notion of interpretability often only warranted by simpler linear models. In this paper, we develop an approach that balances these two objectives: the Gaussian Process Switching Linear Dynamical System (gpSLDS). Our method builds on previous work modeling the latent state evolution via a stochastic differential equation whose nonlinear dynamics are described by a Gaussian process (GP-SDEs). We propose a novel kernel function which enforces smoothly interpolated locally linear dynamics, and therefore expresses flexible -- yet interpretable -- dynamics akin to those of recurrent switching linear dynamical systems (rSLDS). Our approach resolves key limitations of the rSLDS such as artifactual oscillations in dynamics near discrete state boundaries, while also providing posterior uncertainty estimates of the dynamics. To fit our models, we leverage a modified learning objective which improves the estimation accuracy of kernel hyperparameters compared to previous GP-SDE fitting approaches. We apply our method to synthetic data and data recorded in two neuroscience experiments and demonstrate favorable performance in comparison to the rSLDS.","url_abs":"https://arxiv.org/abs/2408.03330v3","url_pdf":"https://arxiv.org/pdf/2408.03330v3.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"modeling-latent-neural-dynamics-with-gaussian","repo_url":"https://github.com/lindermanlab/gpslds","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"jax","reach":null}],"tasks":[],"methods":[{"method_slug":"gaussian-process","method_name":"Gaussian Process"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2408.03330","atlas_url":"https://app.syntology.ai/?focus=2408.03330","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2408.03330"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"deterministic:regex_extraction","url":"https://github.com/lindermanlab/gpslds","reach":null}],"summary":{"ran_draft_wrong":4,"ran_honours":3,"unverified":10},"by_repo_kind":{"official":{"samples":17,"ran":7,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":17,"samples":[{"code_sha256_prefix":"01539fa5868b696a","entry":"backward_pass","repo":"lindermanlab/gpslds","repo_kind":"official","path":"gpslds/em.py","file_url":"https://github.com/lindermanlab/gpslds/blob/HEAD/gpslds/em.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"01539fa5868b696a"}},{"code_sha256_prefix":"eccd8179d36b008e","entry":"forward_pass","repo":"lindermanlab/gpslds","repo_kind":"official","path":"gpslds/em.py","file_url":"https://github.com/lindermanlab/gpslds/blob/HEAD/gpslds/em.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"eccd8179d36b008e"}},{"code_sha256_prefix":"a7c5f160da2cfdda","entry":"initialize_vem","repo":"lindermanlab/gpslds","repo_kind":"official","path":"gpslds/em.py","file_url":"https://github.com/lindermanlab/gpslds/blob/HEAD/gpslds/em.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a7c5f160da2cfdda"}},{"code_sha256_prefix":"f9158e7f06fbf8cd","entry":"kl","repo":"lindermanlab/gpslds","repo_kind":"official","path":"gpslds/em.py","file_url":"https://github.com/lindermanlab/gpslds/blob/HEAD/gpslds/em.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f9158e7f06fbf8cd"}},{"code_sha256_prefix":"84e9a7c03f3d8afc","entry":"kl_over_time","repo":"lindermanlab/gpslds","repo_kind":"official","path":"gpslds/em.py","file_url":"https://github.com/lindermanlab/gpslds/blob/HEAD/gpslds/em.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"84e9a7c03f3d8afc"}},{"code_sha256_prefix":"076890d8c1ad8081","entry":"update_init_params","repo":"lindermanlab/gpslds","repo_kind":"official","path":"gpslds/em.py","file_url":"https://github.com/lindermanlab/gpslds/blob/HEAD/gpslds/em.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"076890d8c1ad8081"}},{"code_sha256_prefix":"516131e165058691","entry":"update_init_variational_params","repo":"lindermanlab/gpslds","repo_kind":"official","path":"gpslds/em.py","file_url":"https://github.com/lindermanlab/gpslds/blob/HEAD/gpslds/em.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"516131e165058691"}},{"code_sha256_prefix":"5f0281db933e4f38","entry":"compute_elbo","repo":"lindermanlab/gpslds","repo_kind":"official","path":"gpslds/em.py","file_url":"https://github.com/lindermanlab/gpslds/blob/HEAD/gpslds/em.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5f0281db933e4f38"}},{"code_sha256_prefix":"1e6fb8e7a60902a6","entry":"compute_elbo_all_trials","repo":"lindermanlab/gpslds","repo_kind":"official","path":"gpslds/em.py","file_url":"https://github.com/lindermanlab/gpslds/blob/HEAD/gpslds/em.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"1e6fb8e7a60902a6"}},{"code_sha256_prefix":"ddb0c7fb04a66e53","entry":"compute_elbo_per_trial","repo":"lindermanlab/gpslds","repo_kind":"official","path":"gpslds/em.py","file_url":"https://github.com/lindermanlab/gpslds/blob/HEAD/gpslds/em.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ddb0c7fb04a66e53"}},{"code_sha256_prefix":"862793aea2eb9de2","entry":"e_step","repo":"lindermanlab/gpslds","repo_kind":"official","path":"gpslds/em.py","file_url":"https://github.com/lindermanlab/gpslds/blob/HEAD/gpslds/em.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"862793aea2eb9de2"}},{"code_sha256_prefix":"3833cbf98f80abc0","entry":"fit_variational_em","repo":"lindermanlab/gpslds","repo_kind":"official","path":"gpslds/em.py","file_url":"https://github.com/lindermanlab/gpslds/blob/HEAD/gpslds/em.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"3833cbf98f80abc0"}},{"code_sha256_prefix":"1889949c23a245d1","entry":"make_gram","repo":"lindermanlab/gpslds","repo_kind":"official","path":"gpslds/em.py","file_url":"https://github.com/lindermanlab/gpslds/blob/HEAD/gpslds/em.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"1889949c23a245d1"}},{"code_sha256_prefix":"f7e343250fd26034","entry":"sgd","repo":"lindermanlab/gpslds","repo_kind":"official","path":"gpslds/em.py","file_url":"https://github.com/lindermanlab/gpslds/blob/HEAD/gpslds/em.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f7e343250fd26034"}},{"code_sha256_prefix":"4668d8d91c4fa7a2","entry":"update_B","repo":"lindermanlab/gpslds","repo_kind":"official","path":"gpslds/em.py","file_url":"https://github.com/lindermanlab/gpslds/blob/HEAD/gpslds/em.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"4668d8d91c4fa7a2"}},{"code_sha256_prefix":"b877229bff463484","entry":"update_q_u","repo":"lindermanlab/gpslds","repo_kind":"official","path":"gpslds/em.py","file_url":"https://github.com/lindermanlab/gpslds/blob/HEAD/gpslds/em.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b877229bff463484"}},{"code_sha256_prefix":"c83c2cc902919ac8","entry":"variational_step","repo":"lindermanlab/gpslds","repo_kind":"official","path":"gpslds/em.py","file_url":"https://github.com/lindermanlab/gpslds/blob/HEAD/gpslds/em.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c83c2cc902919ac8"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}