{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"institution":[{"name":"bioRxiv"}],"indexed":{"date-parts":[[2026,10,5]],"date-time":"2026-10-05T19:36:43Z","timestamp":1791229003008,"version":"4.1.0"},"posted":{"date-parts":[[2025,10,3]]},"group-title":"Neuroscience","reference-count":42,"publisher":"openRxiv","license":[{"start":{"date-parts":[[2025,10,3]],"date-time":"2025-10-03T00:00:00Z","timestamp":1759449600000},"content-version":"vor","delay-in-days":0,"URL":"http:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"funder":[{"name":"Office of Research and Development, Rehabilitation R\\&D Service, Department of Veterans Affairs","award":["N9228C"],"award-info":[{"award-number":["N9228C"]}]},{"name":"Office of Research and Development, Rehabilitation R\\&D Service, Department of Veterans Affairs","award":["N2864C"],"award-info":[{"award-number":["N2864C"]}]},{"name":"Office of Research and Development, Rehabilitation R\\&D Service, Department of Veterans Affairs","award":["A2295R"],"award-info":[{"award-number":["A2295R"]}]},{"name":"Office of Research and Development, Rehabilitation R\\&D Service, Department of Veterans Affairs","award":["B6453R"],"award-info":[{"award-number":["B6453R"]}]},{"name":"Office of Research and Development, Rehabilitation R\\&D Service, Department of Veterans Affairs","award":["P1155R"],"award-info":[{"award-number":["P1155R"]}]},{"name":"NIH-NIDCD","award":["R01DC009899"],"award-info":[{"award-number":["R01DC009899"]}]},{"name":"NIH-NIDCD","award":["U01DC17844"],"award-info":[{"award-number":["U01DC17844"]}]},{"name":"NIH-NIDCD","award":["R01DC014034"],"award-info":[{"award-number":["R01DC014034"]}]},{"name":"NIH-NINDS","award":["U01NS098968"],"award-info":[{"award-number":["U01NS098968"]}]},{"name":"NIH-NINDS","award":["UH2NS095548"],"award-info":[{"award-number":["UH2NS095548"]}]},{"DOI":"10.13039\/100000968","name":"American Heart Association","doi-asserted-by":"crossref","id":[{"id":"10.13039\/100000968","id-type":"DOI","asserted-by":"crossref"}]},{"name":"Wu Tsai Neurosciences Institute at Stanford"},{"name":"Larry and Pamela Garlick"},{"name":"Milton Safenowitz ALS Fellowship"}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":[],"accepted":{"date-parts":[[2025,10,3]]},"abstract":"<jats:title>Abstract<\/jats:title>\n                <jats:p>The computation-through-dynamics perspective argues that biological neural circuits process information via the continuous evolution of their internal states. Inspired by this perspective, Latent Factor Activity using Dynamical systems (LFADS, [1]) identifies a generative model consistent with the neural activity recordings. LFADS models neural dynamics with a recurrent neural network (RNN) generator, which results in excellent fit to the data. However, it has been difficult to understand the dynamics of the LFADS generator. In this work, we show that this poor interpretability arises in part because the generator implements complex, multi-stable dynamics.<\/jats:p>\n                <jats:p>We introduce a simple modification to LFADS that ameliorates issues with interpretability by providing an inferred per-trial bias (modeled as a constant input) to the RNN generator, enabling it to contextually adapt a simpler dynamical system to individual trials. In both simulated neural recordings from pendulum oscillations and real recordings during arm movements in nonhuman primates, we observed that the standard LFADS learned complex, multi-stable dynamics, whereas the modified LFADS learned easier-to-understand contextual dynamics. This enabled direct analysis of the generator, which reproduced at a single-trial level previous results shown only through more complex analyses at the trial average. Finally, we applied the per-trial inferred bias LFADS model to human intracortical brain computer interface recordings during attempted finger movements and speech. We show that modifying neural dynamics using linear operations of the per-trial bias addresses non-stationarity and identifies the extent of behavioral variability, problems known to plague BCI. We call our modification to LFADS as \u201ccontextual LFADS\u201d.<\/jats:p>","DOI":"10.1101\/2025.10.03.680303","type":"posted-content","created":{"date-parts":[[2025,10,4]],"date-time":"2025-10-04T03:05:15Z","timestamp":1759547115000},"source":"Crossref","is-referenced-by-count":1,"title":["Improved interpretability in LFADS models using a learned, context-dependent per-trial bias"],"prefix":"10.64898","author":[{"ORCID":"https:\/\/orcid.org\/0000-0002-1275-0381","authenticated-orcid":false,"given":"Nishal P.","family":"Shah","sequence":"first","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-8539-5096","authenticated-orcid":false,"given":"Benyamin Abramovich","family":"Krasa","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0009-0003-5246-6937","authenticated-orcid":false,"given":"Erin","family":"Kunz","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0009-0004-1663-2018","authenticated-orcid":false,"given":"Nick","family":"Hahn","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0009-0000-2734-3247","authenticated-orcid":false,"given":"Foram","family":"Kamdar","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-7974-0153","authenticated-orcid":false,"given":"Donald","family":"Avansino","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-0261-2273","authenticated-orcid":false,"given":"Leigh R.","family":"Hochberg","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-3276-2267","authenticated-orcid":false,"given":"Jaimie M.","family":"Henderson","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-1620-1264","authenticated-orcid":false,"given":"David","family":"Sussillo","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"54368","reference":[{"issue":"10","key":"2025100617254585000_2025.10.03.680303v1.1","doi-asserted-by":"crossref","first-page":"805","DOI":"10.1038\/s41592-018-0109-9","article-title":"Inferring single-trial neural population dynamics using sequential auto-encoders","volume":"15","year":"2018","journal-title":"Nature methods"},{"key":"2025100617254585000_2025.10.03.680303v1.2","doi-asserted-by":"publisher","DOI":"10.1146\/annurev-neuro-092619-094115"},{"issue":"1","key":"2025100617254585000_2025.10.03.680303v1.3","doi-asserted-by":"crossref","first-page":"633","DOI":"10.1038\/s41467-020-20371-1","article-title":"Measurement, manipulation and modeling of brain-wide neural population dynamics","volume":"12","year":"2021","journal-title":"Nature communications"},{"key":"2025100617254585000_2025.10.03.680303v1.4","doi-asserted-by":"publisher","DOI":"10.1038\/s41583022006420"},{"key":"2025100617254585000_2025.10.03.680303v1.5","article-title":"Recurrent switching linear dynamical systems","year":"2016","journal-title":"arXiv preprint"},{"key":"2025100617254585000_2025.10.03.680303v1.6","doi-asserted-by":"publisher","DOI":"10.48550\/arXiv.2206.06821"},{"key":"2025100617254585000_2025.10.03.680303v1.7","first-page":"104443","article-title":"Probabilistic decomposed linear dynamical systems for robust discovery of latent neural dynamics","volume":"37","year":"2024","journal-title":"Advances in Neural Information Processing Systems"},{"key":"2025100617254585000_2025.10.03.680303v1.8","first-page":"7234","article-title":"Learning identifiable and interpretable latent models of high-dimensional neural activity using pi-vae","volume":"33","year":"2020","journal-title":"Advances in neural information processing systems"},{"key":"2025100617254585000_2025.10.03.680303v1.9","first-page":"16700","article-title":"Reverse engineering recurrent neural networks with jacobian switching linear dynamical systems","volume":"34","year":"2021","journal-title":"Advances in Neural Information Processing Systems"},{"key":"2025100617254585000_2025.10.03.680303v1.10","article-title":"Representation learning for neural population activity with neural data transformers","year":"2021","journal-title":"arXiv preprint"},{"key":"2025100617254585000_2025.10.03.680303v1.11","first-page":"44937","article-title":"A unified, scalable framework for neural population decoding","volume":"36","year":"2023","journal-title":"Advances in Neural Information Processing Systems"},{"key":"2025100617254585000_2025.10.03.680303v1.12","first-page":"80495","article-title":"Towards a\u201d universal translator\u201d for neural dynamics at single-cell, single-spike resolution","volume":"37","year":"2024","journal-title":"Advances in Neural Information Processing Systems"},{"key":"2025100617254585000_2025.10.03.680303v1.13","unstructured":"Josue Ortega Caro , Antonio H de O Fonseca , Christopher Averill , Syed A Rizvi , Matteo Rosati , James L Cross , Prateek Mittal , Emanuele Zappala , Daniel Levine , Rahul M Dhodapkar , et al. Brainlm: A foundation model for brain activity recordings. bioRxiv, pages 2023\u201309, 2023."},{"key":"2025100617254585000_2025.10.03.680303v1.14","first-page":"17926","article-title":"Stndt: Modeling neural population activity with spatiotemporal transformers","volume":"35","year":"2022","journal-title":"Advances in Neural Information Processing Systems"},{"issue":"12","key":"2025100617254585000_2025.10.03.680303v1.15","doi-asserted-by":"crossref","first-page":"1572","DOI":"10.1038\/s41592-022-01675-0","article-title":"A large-scale neural network training framework for generalized estimation of single-trial population dynamics","volume":"19","year":"2022","journal-title":"Nature Methods"},{"key":"2025100617254585000_2025.10.03.680303v1.16","doi-asserted-by":"publisher","DOI":"10.1038\/s41593-022-01189-0"},{"key":"2025100617254585000_2025.10.03.680303v1.17","doi-asserted-by":"publisher","DOI":"10.1162\/NECO_a_00409"},{"issue":"31","key":"2025100617254585000_2025.10.03.680303v1.18","doi-asserted-by":"crossref","first-page":"1003","DOI":"10.21105\/joss.01003","article-title":"Fixedpointfinder: A tensorflow toolbox for identifying and characterizing fixed points in recurrent neural networks","volume":"3","year":"2018","journal-title":"Journal of Open Source Software"},{"key":"2025100617254585000_2025.10.03.680303v1.19","doi-asserted-by":"publisher","DOI":"10.1016\/j.cell.2022.08.019"},{"key":"2025100617254585000_2025.10.03.680303v1.20","unstructured":"Google Research. Computation through dynamics. https:\/\/github.com\/google-research\/computation-thru-dynamics, 2025. Accessed: 2025-04-28."},{"key":"2025100617254585000_2025.10.03.680303v1.21","unstructured":"TensorFlow Authors. Lfads: Latent factor analysis via dynamical systems (tensorflow models). https:\/\/github.com\/tensorflow\/models\/tree\/master\/research\/lfads, 2025. Accessed: 2025-04-28."},{"key":"2025100617254585000_2025.10.03.680303v1.22","article-title":"lfads-torch: A modular and extensible implementation of latent factor analysis via dynamical systems","year":"2023","journal-title":"arXiv preprint"},{"key":"2025100617254585000_2025.10.03.680303v1.23","doi-asserted-by":"publisher","DOI":"10.1038\/nature11129"},{"key":"2025100617254585000_2025.10.03.680303v1.24","doi-asserted-by":"publisher","DOI":"10.1038\/s41593-024-01668-6"},{"key":"2025100617254585000_2025.10.03.680303v1.25","doi-asserted-by":"crossref","first-page":"134","DOI":"10.1016\/j.cobeha.2019.07.001","article-title":"How to study the neural mechanisms of multiple tasks","volume":"29","year":"2019","journal-title":"Current opinion in behavioral sciences"},{"key":"2025100617254585000_2025.10.03.680303v1.26","doi-asserted-by":"publisher","DOI":"10.1038\/s41593-018-0310-2"},{"key":"2025100617254585000_2025.10.03.680303v1.27","doi-asserted-by":"publisher","DOI":"10.1016\/j.neuron.2018.07.003"},{"issue":"1","key":"2025100617254585000_2025.10.03.680303v1.28","doi-asserted-by":"crossref","first-page":"013111","DOI":"10.1103\/PhysRevResearch.2.013111","article-title":"Dynamics of random recurrent networks with correlated low-rank structure","volume":"2","year":"2020","journal-title":"Physical Review Research"},{"key":"2025100617254585000_2025.10.03.680303v1.29","doi-asserted-by":"publisher","DOI":"10.1162\/neco_a_01381"},{"key":"2025100617254585000_2025.10.03.680303v1.30","doi-asserted-by":"publisher","DOI":"10.1038\/s41593-022-01088-4"},{"key":"2025100617254585000_2025.10.03.680303v1.31","article-title":"Inferring stochastic low-rank recurrent neural networks from neural data","year":"2024","journal-title":"arXiv preprint"},{"issue":"6","key":"2025100617254585000_2025.10.03.680303v1.32","doi-asserted-by":"crossref","first-page":"e1005542","DOI":"10.1371\/journal.pcbi.1005542","article-title":"A state space approach for piecewise-linear recurrent neural networks for identifying computational dynamics from neural measurements","volume":"13","year":"2017","journal-title":"PLoS computational biology"},{"key":"2025100617254585000_2025.10.03.680303v1.33","article-title":"Generalized teacher forcing for learning chaotic dynamics","year":"2023","journal-title":"arXiv preprint"},{"key":"2025100617254585000_2025.10.03.680303v1.34","doi-asserted-by":"publisher","DOI":"10.1162\/neco"},{"key":"2025100617254585000_2025.10.03.680303v1.35","unstructured":"Manuel Brenner , Florian Hess , Jonas M Mikhaeil , Leonard F Bereska , Zahra Monfared , Po-Chen Kuo , and Daniel Durstewitz . Tractable dendritic rnns for reconstructing nonlinear dynamical systems. In International conference on machine learning, pages 2292\u20132320. Pmlr, 2022."},{"key":"2025100617254585000_2025.10.03.680303v1.36","first-page":"70511","article-title":"Bifurcations and loss jumps in rnn training","volume":"36","year":"2023","journal-title":"Advances in Neural Information Processing Systems"},{"key":"2025100617254585000_2025.10.03.680303v1.37","article-title":"Diversity of emergent dynamics in competitive threshold-linear networks","year":"2016","journal-title":"arXiv preprint"},{"key":"2025100617254585000_2025.10.03.680303v1.38","unstructured":"Timothy D Kim , Thomas Z Luo , Jonathan W Pillow , and Carlos D Brody . Inferring latent dynamics underlying neural population activity via neural differential equations. In International Conference on Machine Learning, pages 5551\u20135561. PMLR, 2021."},{"key":"2025100617254585000_2025.10.03.680303v1.39","first-page":"10","article-title":"Expressive architectures enhance interpretability of dynamics-based neural population models","volume":"2023","year":"2023","journal-title":"Neurons, behavior, data analysis, and theory"},{"key":"2025100617254585000_2025.10.03.680303v1.40","article-title":"Empirical evaluation of gated recurrent neural networks on sequence modeling","year":"2014","journal-title":"arXiv preprint"},{"issue":"1","key":"2025100617254585000_2025.10.03.680303v1.41","doi-asserted-by":"crossref","first-page":"7007","DOI":"10.1038\/s41467-024-51308-7","article-title":"Reach-dependent reorientation of rotational dynamics in motor cortex","volume":"15","year":"2024","journal-title":"Nature Communications"},{"key":"2025100617254585000_2025.10.03.680303v1.42","doi-asserted-by":"publisher","DOI":"10.1038\/s41586-023-06377-x"}],"container-title":[],"original-title":[],"link":[{"URL":"https:\/\/syndication.highwire.org\/content\/doi\/10.1101\/2025.10.03.680303","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,1,15]],"date-time":"2026-01-15T09:43:25Z","timestamp":1768470205000},"score":1,"resource":{"primary":{"URL":"http:\/\/biorxiv.org\/lookup\/doi\/10.1101\/2025.10.03.680303"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2025,10,3]]},"references-count":42,"URL":"https:\/\/doi.org\/10.1101\/2025.10.03.680303","relation":{},"subject":[],"published":{"date-parts":[[2025,10,3]]},"subtype":"preprint"}}