{"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/inferring-stochastic-low-rank-recurrent","title":"Inferring stochastic low-rank recurrent neural networks from neural data","arxiv_id":"2406.16749","date":"2024-06-24","proceeding":null,"authors":["Matthijs Pals","A Erdem Sağtekin","Felix Pei","Manuel Gloeckler","Jakob H Macke"],"abstract":"A central aim in computational neuroscience is to relate the activity of large populations of neurons to an underlying dynamical system. Models of these neural dynamics should ideally be both interpretable and fit the observed data well. Low-rank recurrent neural networks (RNNs) exhibit such interpretability by having tractable dynamics. However, it is unclear how to best fit low-rank RNNs to data consisting of noisy observations of an underlying stochastic system. Here, we propose to fit stochastic low-rank RNNs with variational sequential Monte Carlo methods. We validate our method on several datasets consisting of both continuous and spiking neural data, where we obtain lower dimensional latent dynamics than current state of the art methods. Additionally, for low-rank models with piecewise linear nonlinearities, we show how to efficiently identify all fixed points in polynomial rather than exponential cost in the number of units, making analysis of the inferred dynamics tractable for large RNNs. Our method both elucidates the dynamical systems underlying experimental recordings and provides a generative model whose trajectories match observed variability.","url_abs":"https://arxiv.org/abs/2406.16749v5","url_pdf":"https://arxiv.org/pdf/2406.16749v5.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":"inferring-stochastic-low-rank-recurrent","repo_url":"https://github.com/mackelab/smc_rnns","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2406.16749","atlas_url":"https://app.syntology.ai/?focus=2406.16749","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2406.16749"}},"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":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/mackelab/smc_rnns","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran":23,"unverified":2},"by_repo_kind":{"official":{"samples":25,"ran":23,"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":0,"samples":[{"code_sha256_prefix":"e791be93f5d34005","entry":"PL_Jacobian","repo":"mackelab/smc_rnns","repo_kind":"official","path":"fixed_points/stability.py","file_url":"https://github.com/mackelab/smc_rnns/blob/HEAD/fixed_points/stability.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"e791be93f5d34005"}},{"code_sha256_prefix":"580464f8c0ffe2eb","entry":"Relu_derivative","repo":"mackelab/smc_rnns","repo_kind":"official","path":"fixed_points/stability.py","file_url":"https://github.com/mackelab/smc_rnns/blob/HEAD/fixed_points/stability.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"580464f8c0ffe2eb"}},{"code_sha256_prefix":"bfed00e6f5d83eaa","entry":"calc_isi_stats","repo":"mackelab/smc_rnns","repo_kind":"official","path":"evaluation/calc_stats.py","file_url":"https://github.com/mackelab/smc_rnns/blob/HEAD/evaluation/calc_stats.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"bfed00e6f5d83eaa"}},{"code_sha256_prefix":"8e47cd6071cb66e5","entry":"calculate_correlation","repo":"mackelab/smc_rnns","repo_kind":"official","path":"evaluation/calc_stats.py","file_url":"https://github.com/mackelab/smc_rnns/blob/HEAD/evaluation/calc_stats.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"8e47cd6071cb66e5"}},{"code_sha256_prefix":"58c4df2377e1b0b8","entry":"clean_from_outliers","repo":"mackelab/smc_rnns","repo_kind":"official","path":"evaluation/kl_Gauss.py","file_url":"https://github.com/mackelab/smc_rnns/blob/HEAD/evaluation/kl_Gauss.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"58c4df2377e1b0b8"}},{"code_sha256_prefix":"0dd3d7e404b4a977","entry":"construct_relu_matrix","repo":"mackelab/smc_rnns","repo_kind":"official","path":"fixed_points/constrained_scify.py","file_url":"https://github.com/mackelab/smc_rnns/blob/HEAD/fixed_points/constrained_scify.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"0dd3d7e404b4a977"}},{"code_sha256_prefix":"37f39f6d5b10b7a6","entry":"construct_relu_matrix_list","repo":"mackelab/smc_rnns","repo_kind":"official","path":"fixed_points/constrained_scify.py","file_url":"https://github.com/mackelab/smc_rnns/blob/HEAD/fixed_points/constrained_scify.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"37f39f6d5b10b7a6"}},{"code_sha256_prefix":"28f6dfd84d1926e3","entry":"ensure_length_is_even","repo":"mackelab/smc_rnns","repo_kind":"official","path":"evaluation/pse.py","file_url":"https://github.com/mackelab/smc_rnns/blob/HEAD/evaluation/pse.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"28f6dfd84d1926e3"}},{"code_sha256_prefix":"1f4f2991b2c87ba3","entry":"estimate_cross_correlation","repo":"mackelab/smc_rnns","repo_kind":"official","path":"evaluation/calc_stats.py","file_url":"https://github.com/mackelab/smc_rnns/blob/HEAD/evaluation/calc_stats.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"1f4f2991b2c87ba3"}},{"code_sha256_prefix":"429eb4472c867f62","entry":"fft_smoothed","repo":"mackelab/smc_rnns","repo_kind":"official","path":"evaluation/pse.py","file_url":"https://github.com/mackelab/smc_rnns/blob/HEAD/evaluation/pse.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"429eb4472c867f62"}},{"code_sha256_prefix":"7fe34e5b23ee89f6","entry":"find_fixed_points_analytic","repo":"mackelab/smc_rnns","repo_kind":"official","path":"fixed_points/find_fixed_points_analytic.py","file_url":"https://github.com/mackelab/smc_rnns/blob/HEAD/fixed_points/find_fixed_points_analytic.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"7fe34e5b23ee89f6"}},{"code_sha256_prefix":"cb11c1c39000382f","entry":"get_average_spectrum","repo":"mackelab/smc_rnns","repo_kind":"official","path":"evaluation/pse.py","file_url":"https://github.com/mackelab/smc_rnns/blob/HEAD/evaluation/pse.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"cb11c1c39000382f"}},{"code_sha256_prefix":"93bac9f432ea3e20","entry":"get_default_params","repo":"mackelab/smc_rnns","repo_kind":"official","path":"py_rnn/default_params.py","file_url":"https://github.com/mackelab/smc_rnns/blob/HEAD/py_rnn/default_params.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"93bac9f432ea3e20"}},{"code_sha256_prefix":"ce13363aeb64a0f0","entry":"h5_to_dict","repo":"mackelab/smc_rnns","repo_kind":"official","path":"evaluation/eval_random_search.py","file_url":"https://github.com/mackelab/smc_rnns/blob/HEAD/evaluation/eval_random_search.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"ce13363aeb64a0f0"}},{"code_sha256_prefix":"0763d929a3c9130c","entry":"initialize_loadings","repo":"mackelab/smc_rnns","repo_kind":"official","path":"py_rnn/initializers.py","file_url":"https://github.com/mackelab/smc_rnns/blob/HEAD/py_rnn/initializers.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"0763d929a3c9130c"}},{"code_sha256_prefix":"7489a305dc0b3c32","entry":"initialize_w_inp","repo":"mackelab/smc_rnns","repo_kind":"official","path":"py_rnn/initializers.py","file_url":"https://github.com/mackelab/smc_rnns/blob/HEAD/py_rnn/initializers.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"7489a305dc0b3c32"}},{"code_sha256_prefix":"cec5b0ec7d0fab17","entry":"initialize_w_rec","repo":"mackelab/smc_rnns","repo_kind":"official","path":"py_rnn/initializers.py","file_url":"https://github.com/mackelab/smc_rnns/blob/HEAD/py_rnn/initializers.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"cec5b0ec7d0fab17"}},{"code_sha256_prefix":"3ebb3b68437965d3","entry":"kl_between_two_gaussians","repo":"mackelab/smc_rnns","repo_kind":"official","path":"evaluation/kl_Gauss.py","file_url":"https://github.com/mackelab/smc_rnns/blob/HEAD/evaluation/kl_Gauss.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"3ebb3b68437965d3"}},{"code_sha256_prefix":"229da4a3e2f0ad09","entry":"mask_none","repo":"mackelab/smc_rnns","repo_kind":"official","path":"py_rnn/model.py","file_url":"https://github.com/mackelab/smc_rnns/blob/HEAD/py_rnn/model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"229da4a3e2f0ad09"}},{"code_sha256_prefix":"97e84c476d2b594b","entry":"mean_rate","repo":"mackelab/smc_rnns","repo_kind":"official","path":"evaluation/eval_kl_pse.py","file_url":"https://github.com/mackelab/smc_rnns/blob/HEAD/evaluation/eval_kl_pse.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"97e84c476d2b594b"}},{"code_sha256_prefix":"07159a7ad120cadd","entry":"powerset","repo":"mackelab/smc_rnns","repo_kind":"official","path":"fixed_points/constrained_scify.py","file_url":"https://github.com/mackelab/smc_rnns/blob/HEAD/fixed_points/constrained_scify.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"07159a7ad120cadd"}},{"code_sha256_prefix":"5803a5532384606b","entry":"powerset","repo":"mackelab/smc_rnns","repo_kind":"official","path":"fixed_points/find_fixed_points_analytic.py","file_url":"https://github.com/mackelab/smc_rnns/blob/HEAD/fixed_points/find_fixed_points_analytic.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"5803a5532384606b"}},{"code_sha256_prefix":"d9dd7f86ac752725","entry":"set_nonlinearity","repo":"mackelab/smc_rnns","repo_kind":"official","path":"py_rnn/model.py","file_url":"https://github.com/mackelab/smc_rnns/blob/HEAD/py_rnn/model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"d9dd7f86ac752725"}},{"code_sha256_prefix":"654cda3e3112fd10","entry":"eval_likelihood_gmm_for_diagonal_cov","repo":"mackelab/smc_rnns","repo_kind":"official","path":"evaluation/kl_Gauss.py","file_url":"https://github.com/mackelab/smc_rnns/blob/HEAD/evaluation/kl_Gauss.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"654cda3e3112fd10"}},{"code_sha256_prefix":"69ff95878cf21a72","entry":"predict","repo":"mackelab/smc_rnns","repo_kind":"official","path":"py_rnn/model.py","file_url":"https://github.com/mackelab/smc_rnns/blob/HEAD/py_rnn/model.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"69ff95878cf21a72"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}