PT - JOURNAL ARTICLE AU - Omid G. Sani AU - Bijan Pesaran AU - Maryam M. Shanechi TI - Where is all the nonlinearity: flexible nonlinear modeling of behaviorally relevant neural dynamics using recurrent neural networks AID - 10.1101/2021.09.03.458628 DP - 2021 Jan 01 TA - bioRxiv PG - 2021.09.03.458628 4099 - http://biorxiv.org/content/early/2021/09/06/2021.09.03.458628.short 4100 - http://biorxiv.org/content/early/2021/09/06/2021.09.03.458628.full AB - Understanding the dynamical transformation of neural activity to behavior requires modeling this transformation while both dissecting its potential nonlinearities and dissociating and preserving its nonlinear behaviorally relevant neural dynamics, which remain unaddressed. We present RNN PSID, a nonlinear dynamic modeling method that enables flexible dissection of nonlinearities, dissociation and preferential learning of neural dynamics relevant to specific behaviors, and causal decoding. We first validate RNN PSID in simulations and then use it to investigate nonlinearities in monkey spiking and LFP activity across four tasks and different brain regions. Nonlinear RNN PSID successfully dissociated and preserved nonlinear behaviorally relevant dynamics, thus outperforming linear and non-preferential nonlinear learning methods in behavior decoding while reaching similar neural prediction. Strikingly, dissecting the nonlinearities with RNN PSID revealed that consistently across all tasks, summarizing the nonlinearity only in the mapping from the latent dynamics to behavior was largely sufficient for predicting behavior and neural activity. RNN PSID provides a novel tool to reveal new characteristics of nonlinear neural dynamics underlying behavior.Competing Interest StatementThe authors have declared no competing interest.