Decision formation in perceptual decision making involves sensory evidence accumulation instantiated by the temporal integration of an internal decision variable toward some decision criterion or threshold, as described by sequential sampling theoretical models. The decision variable can be represented in the form of experimentally observable neural activities. Hence, elucidating the appropriate theoretical model becomes crucial to understanding the mechanisms underlying perceptual decision formation. Existing computational methods are limited to either fitting of choice behavioral data or linear model estimation from neural activity data. In this work, we made use of sparse identification of nonlinear dynamics (SINDy), a data-driven approach, to elucidate the deterministic linear and nonlinear components of often-used stochastic decision models within reaction time task paradigms. Based on the simulated decision variable activities of the models and assuming the noise coefficient term is known beforehand, SINDy, enhanced with approaches using multiple trials, could readily estimate the deterministic terms in the dynamical equations, choice accuracy, and decision time of the models across a range of signal-to-noise ratio values. In particular, SINDy performed the best using the more memory-intensive multi-trial approach while trial-averaging of parameters performed more moderately. The single-trial approach, although expectedly not performing as well, may be useful for real-time modeling. Taken together, our work offers alternative approaches for SINDy to uncover the dynamics in perceptual decision making and, more generally, for first-passage time problems.

Decision making is the keystone to unlocking higher cognitive functions (Dreher & Tremblay, 2016). More specifically, perceptual decision making involves transforming sensory information into motor actions, in which the latter overtly provides choice information such as choice accuracy and reaction time (Luce, 1986; Roitman & Shadlen, 2002). Its neural correlates have also gradually been revealed (Gold & Shadlen, 2007; Dreher & Tremblay, 2016; Hanks & Summerfield, 2017; Najafi & Churchland, 2018; O'Connell et al., 2018; O'Connell & Kelly, 2021).

Previous studies have indicated that the perceptual decision-making process can be described by the sequential sampling modeling framework in which noisy sensory evidence is accumulated over time until reaching some internal decision threshold on which a choice will be committed (Gold & Shadlen, 2007; O'Connell et al., 2018). Popular cognitive computational models of perceptual decision making include the drift-diffusion model (DDM) and its variants (Ratcliff, 1978; Ditterich, 2006; Ratcliff et al., 2016; Asadpour et al., 2024). Connectionist or neural network representation of the sequential sampling models include the leaky competing accumulator (LCA) model (Usher & McClelland, 2001), which was shown to approximate the classic DDM process (LCA-DDM) under finely tuned conditions (Bogacz et al., 2006). In reaction-time tasks, the decision formation process can be mathematically described as a first-passage time problem (Gillespie, 1992; Bogacz et al., 2006; Kampen, 2007; Shinn et al., 2020). Although simple to implement and understand, while being mathematically tractable, these models’ variables and parameters may not directly relate to neurophysiology and may account for limited neural data (Ditterich, 2006; Gold & Shadlen, 2007; Kelly & O'Connell, 2013).

More biologically based models of perceptual decision making have been developed to bridge from neural to behavioral data while providing additional model constraints (Wang, 2002; Wong & Wang, 2006; Roxin & Ledberg, 2008; O'Connell et al., 2018). Models informed by neural activities can better delineate underlying decision processes and reduce model mimicry based only on choice behavior (Ratcliff et al., 2016; O'Connell et al., 2018; Bose et al., 2020). These models are often accompanied by intrinsic nonlinear behaviors that may allow better replication of neural activity profile while accounting for choice behavior (Niyogi & Wong-Lin, 2013). Perhaps the simplest nonlinear dynamical model for two-choice tasks can be mathematically described by a normal form with pitchfork bifurcation, a nonlinear bistable (NLB) model (Zhou et al., 2009) that resembles biologically grounded mean-field models (Wong & Wang, 2006; Roxin & Ledberg, 2008).

Several model-fitting algorithms had been used to identify decision model parameters to account for behavioral data. For decision network modeling, model parameters were fitted to either neural (Friston et al., 2003) or behavioral data (Bogacz & Cohen, 2004; Pinto et al., 2019; Shinn et al., 2020) or did not employ automated learning algorithms (Wong & Wang, 2006; Niyogi & Wong-Lin, 2013). More complex and high-dimensional recurrent neural network models have also been trained on choice behavioral data before comparing their neural activities to those of recorded neurons (Mante et al., 2013). However, there are limited studies that link these high-dimensional models to lower-dimensional models (Roach et al., 2023). Importantly, there is limited data-driven modeling work that automatically and directly uncovers low-dimensional nonlinear dynamical equations underlying decision formation from internally noisy decision variable data, which in turn predicts choice behavior.

In this letter, we adopt a data-driven approach for elucidating the governing dynamical equations of stochastic decision models. Some existing data-driven methods are sensitive to noise, while others are computationally expensive (Raissi et al., 2019) or limited to specific fields (Schmid, 2010). Other methods are black boxes that do not provide explicit equations or explanations (Lipton, 2018). Importantly, none have been tested on stochastic decision dynamical models in reaction-time tasks, which can be mathematically described as first-passage time problems.

Here, we use the sparse identification of nonlinear dynamics (SINDy) (Brunton et al., 2016; de Silva et al., 2020) to identify parsimonious linear or nonlinear equations of low-dimensional single-trial decision dynamics, given existing evidence suggesting that decision neural dynamics are embedded in low-dimensional space (Ganguli et al., 2008; Shenoy & Kao, 2021; Steinemann et al., 2023). We evaluate the SINDy algorithm on simulated noisy data generated from often-used decision models: DDM, linear LCA, LCA-DDM, and NLB. We compare decision variable activity, choice behavior, and parameters of the original models at single trials and across trials with that estimated by SINDy. Our focus is on identifying the deterministic components of these models. In addition to the standard single-trial SINDy approach, we make use of approaches using multiple trials to enhance SINDy's performance. Our general findings show that SINDy can readily elucidate the dynamical equations and account for decision models’ variable profile and choice behavior within reaction-time tasks.

2.1  Model Description

Four sequential sampling two-choice decision-making models were simulated, and their decision variable activities and choice behaviors were compared with the respective estimated models elucidated by SINDy. Specifically, we used the standard DDM (Ratcliff, 1978); the linear version of the LCA model (Usher & McClelland, 2001); the LCA, model, which approximates the DDM process (LCA-DDM; Usher & McClelland, 2001; Bogacz et al., 2006); and the NLB model (Zhou et al., 2009).

The two-choice standard DDM can be described by a one-dimensional stochastic differential equation (Ratcliff et al., 2016),
(2.1)

where X denotes some internal decision variable, A is the drift rate determined by the input signal or stimulus, η is a random variable that follows a gaussian distribution with a mean of zero and a standard deviation of one, σ is the noise size, and t is time with time step dt. Values of A were varied between 0 and 0.04 (to mimic varying choice task difficulty) while σ was fixed at 0.11.

During decision formation, X started with an initial value of 0 and was integrated over time via equation 2.1 such that it reaches either a prescribed upper- or lower-decision threshold, indicating one of the two choices being made. The upper threshold for a correct choice (for positive drift rates) was set at 1, while the lower threshold for an error choice was −1. Once a threshold has been reached, the integration process is stopped (i.e., an absorbing threshold), and this time from stimulus onset is defined as the decision time.

The linear LCA model for a two-choice task can be described by two coupled stochastic differential equations (Usher & McClelland, 2001):
(2.2)
(2.3)
where the yi’s are the decision variables for choice i, k and b are the decay rate and inhibitory coupling constants, and Si’s are the stimulus inputs. σ is the noise size, and ηi is a random variable following a gaussian distribution with mean zero and standard deviation of one. Unlike the DDM, there is only one decision for each yi, and when one of the two yi’s reaches its threshold first, the choice i is made and the process is stopped.

With appropriately configured parameter values, the linear LCA can lead to runaway ramping (acceleration) over time for one of the decision variables due to the existence of a metastable saddle steady state (Usher & McClelland, 2001), or it may converge toward some stable steady state (a fixed-point attractor; Usher & McClelland, 2001). We focus on the metastable version of the linear LCA as the stable steady-state version will be investigated using the NLB model (see below).

Importantly, the DDM process can be approximated from the linear LCA model when the decay rate term (-kyi) and mutual inhibition (-byj) are equal and high, that is, finely tuned parameters (Bogacz et al., 2006). For the linear LCA model, the mutual inhibitory factor b and decay rate k were set at 4 and 3, respectively, while S1 was varied between 1.85 and 3.05 and S2 fixed at 1.85. For the LCA-DDM model, b and k were both 10, while S1 was varied between 3 and 3.04 and S2 fixed at 3. Both models had noise σ at 0.11.

The NLB model is described by the following stochastic differential equation (Zhou et al., 2009),
(2.4)
where X is the decision variable, b0 and ε represent the biased (signal) and nonbiased stimulus inputs, respectively, while σ is the noise size and η is a random variable following a gaussian distribution with mean zero and standard deviation of one. τX is some characteristic time constant of the system. Two decision thresholds were placed equidistant from the starting point. As in the DDM, when either decision threshold was reached, the temporal integration of the decision variable was stopped, and a choice was made. b0 varied between 0 and 0.004, and ε had a constant value of 0.05. A, noise size σ of 0.01 was used.

2.2  Model Simulations

A wide range of values of the signal-to-noise ratios (SNR) for each model was used. The appropriate number of trials for each model is based on the results of the confidence intervals of the predicted choice behavior meeting the 90% confidence interval criterion. Each set of model parameters is generated over 10,000 trials. To compare across models, we normalized the decision times with min-max normalization for both the decision and derived SINDy models.

To numerically integrate the stochastic differential equations in all the models, we employed the Euler-Maruyama method (Higham, 2001). For DDM, a time step of 0.1 arbitrary unit (a.u.) was used, while it was 0.01 a.u. for LCA, LCA-DDM, and NLB models. Smaller time steps did not affect the results.

2.3  Sparse Identification of Nonlinear Dynamics

The SINDy method makes use of compressed sensing for signal detection to uncover the mathematical equations governing dynamical systems by estimating their model parameters based on the observed system's trajectory in state space (Brunton et al., 2016; de Silva et al., 2020). Specifically, suppose we have a general dynamical system that can be described by X˙=dXdt=f(X(t)) where X(t)Rn is some n-dimensional dynamical state vector, f a nonlinear function defining the equations of motion, and the state variables X and X˙ in matrix form. We can then define a library Θ(X) of nonlinear candidate functions of the X columns, which can include constants, polynomials, and other mathematical functions,
(2.5)
and a vector of parameters or coefficients Ξ=[ξ1ξ2...ξn] that find the active terms in f(X(t)).
With this setup, SINDy can be implemented in three general steps. First, numerical differentiation of the (decision) dynamical variable(s) X is performed to obtain X˙. Second, feature library is used to find a sparse linear combination that can recreate the dynamics of the system for the appropriate candidate function Θ to estimate X˙Θ(X)Ξ. Third, a sparse regression algorithm is used to determine the active coefficients of Ξ, assuming that f(X(t)) admits a sparse representation in Θ(X). Thus, a parsimonious model of the system can be obtained via least squares regression with sparsity promoting L1 regularization with parameter λ
(2.6)
Elucidating the sparse ξk will enable replicating the original dynamics, and the k index denotes the active coefficients for the sparse vector making up Ξ. Thus, given some state trajectory, one can consider SINDy to optimize the minimal combinations of “basis” functions that can replicate the observable trajectory.

Here, we used the Python version of SINDy (PySINDy) (de Silva et al., 2020). We only used polynomials as f in all the considered decision models can be described by a combination of polynomials. We used the Savitsky-Golay filter (Press & Teukolsky, 1990) in PySINDy to smooth out noise. As decision models entail more noise than in previous SINDy studies, we also performed approaches that made use of multiple trials. Specifically, to handle noise effects, we used the multi-trial approach available in SINDy (Brunton et al., 2016), which estimates a model based on trajectories from multiple trials. We also employed a less computationally memory-intensive, trial-averaging method of model parameters deduced from single trials. It should be noted that SINDy elucidates only the deterministic part of a dynamical system.

For each SNR and model, we compare the SINDy-recreated dynamics to that of the original model in terms of (1) single-trial decision variable dynamics and predicted choice accuracy and mean decision time and (2) across-trial decision variable dynamics, choice accuracy, and mean decision time. We used the same noise generalization, that is, the same random seed, for both the original model and estimated model for single-trial, across-trial, and multi-trial comparisons. This allowed us to clamp the noise factor to understand the effects due purely to the deterministic terms in the models. These steps are summarized in Figure 1.
Figure 1:

Schematic of workflow for SINDy processing and comparison with original models. DV: decision variable.

Figure 1:

Schematic of workflow for SINDy processing and comparison with original models. DV: decision variable.

Close modal

When using SINDy, it is important to set the polynomial order, as this dictates the complexity of the estimated model. To identify the best polynomial order, we ran simulations with various polynomial orders on the trial-averaged parameters and multi-trial approaches to determine the order that best fits the choice behavior. For multi-trial DDM, LCA-DDM, and LCA, SINDy parameter estimation was performed using all 10,000 time courses for all 41 SNRs; however, for NLB, due to the memory-intensive operations resulting from the time step and SINDy fitting, we could use only 4,000 of the time courses for parameter estimation (see online supplementary note 5).

It is worth noting that fitting each model by trial-averaging the time course of truncated decision variables will lead to an artifact that may seemingly look like some stable steady state (fixed point) lying beneath decision thresholds even if the considered models are perfect neural integrators such as DDM or actually have a stable steady state beyond the decision thresholds (as in NLB). This approach leads to confusion and poor performance by SINDy. To evade this, one may consider applying SINDy only on an earlier time epoch of the trial-averaged decision variable; however, this would again lead to low SINDy performance with fewer data available for SINDy. Hence, we did not pursue these directions.

2.4  Statistical Analysis

To assess the choice behavior of simulated decision models versus SINDy's derived decision models, we employed the Kolmogorov-Smirnov (KS) test (Smirnov, 1948). We used Cliff's Delta (Cliff, 1993) to quantify the effect size of the differences between choice behavior distributions.

For both single-trial condition and conditions over multiple trials, we employed a nonparametric bootstrap resampling technique approach (Davison & Hinkley, 1997) to calculate confidence intervals, using a predefined number of bootstrap samples (1,000) and aiming for a confidence level of 90%. We derived the lower and upper bounds of the confidence intervals based on the 10th and 90th percentiles of the bootstrap mean distributions (Efron & Tibshirani, 1994).

To compare the averaged decision variable activities between the original models and the corresponding SINDy-derived models, we split the SNR into four different values. First, we identified the high SNR based on two conditions: when the choice accuracy for both the original and SINDy-derived models attained 95% or more and their differences are 1% or less. Then we equally divide between this SNR value and zero SNR into three equal intervals, leading to categorization of low and medium SNR values.

To quantify the differences between the model parameters obtained by SINDy and those of the corresponding original models, we compute room mean squared error (RMSE) of the parameters for each condition per trial and then aggregate the values (see supplementary Figure S3).

2.5  Software and Hardware

The simulations and analyses used Jupyter Notebook running on Python 3. We used a Windows machine with four memory cores, Intel i7-7300HQ, and 32GB RAM, and the Northern Ireland High Performance Computing (NI-HPC) facility (www.ni-hpc.ac.uk). Source codes are available at https://github.com/Lenfesty-b/SINDy.

We first investigate how SINDy can estimate single-trial decision variable dynamics simulated from the stochastic decision models considered in the reaction-time task. We then determine how well the single-trial estimated dynamics can predict the aggregated choices for specific SNR. This is followed by SINDy approaches using multiple trials.

3.1  Mixed Results of Choice Prediction from SINDY's Single-Trial Parameter Estimation

Figures 2A to 2D (left, blue) show sample simulated decision-variable dynamics with specific SNR for the different decision models. Plotted alongside are the corresponding SINDy's recreated dynamics (see Figures 2A to 2D, left, orange) based on the estimation of model parameters of the same trial and using the same random seed as the original model (see Figure 1, top). The optimal polynomial order for each trial-averaged or multi-trial model was selected based on the best fit to choice behavior (choice accuracy and decision time; see Figures S1 and S2). Because LCA-DDM was originally a model of first-order polynomial, we consider this order before investigating the optimal zero order.
Figure 2:

Single-trial parameter estimation by SINDy produced mixed results. (A–D) Models from top to bottom: DDM, LCA-DDM, LCA, and NLB. Same within-trial random seed used for original and estimated data. Reaction time task (i.e., first-passage time process). Blue (orange): original (estimated) model's data. Left: SINDy-generated decision variable dynamics compared to that of original models. Time from stimulus onset. Dashed: decision threshold. (B, C, left) Faded: Activity of losing competing units. Middle: Choice accuracy. Right: Normalized decision time. Middle, right: Color label as in left column; (B, middle, left): gold for the optimal zero-order SINDy-derived model. Confidence interval (90%) shown. Asterisks at bottom: statistical significance (p<0.05) between original and derived models.

Figure 2:

Single-trial parameter estimation by SINDy produced mixed results. (A–D) Models from top to bottom: DDM, LCA-DDM, LCA, and NLB. Same within-trial random seed used for original and estimated data. Reaction time task (i.e., first-passage time process). Blue (orange): original (estimated) model's data. Left: SINDy-generated decision variable dynamics compared to that of original models. Time from stimulus onset. Dashed: decision threshold. (B, C, left) Faded: Activity of losing competing units. Middle: Choice accuracy. Right: Normalized decision time. Middle, right: Color label as in left column; (B, middle, left): gold for the optimal zero-order SINDy-derived model. Confidence interval (90%) shown. Asterisks at bottom: statistical significance (p<0.05) between original and derived models.

Close modal

The samples presented here had the recreated dynamics reaching the same decision threshold as that of the original models; that is, they correctly predicted the trials. There were also trials where they reached a different decision threshold, incorrectly predicting the trials (not shown). SINDy's recreated dynamics readily replicated the original time course well, especially at the beginning, before diverging, and hence reaching the decision threshold at a different time point (i.e., different decision/first-passage time) than that of the original model despite having the same seeded noise. This suggested that SINDy might estimate the model parameters slightly differently from that of the original models. This was indeed the case for DDM in Figure 2A (see supplementary note 2 for details). For the LCA-DDM, assuming the underlying model order to be of polynomial one, we found that the SINDy-derived model was not as asymmetrical as the original LCA-DDM (see supplementary note 2). SINDy's derived model of the linear LCA provided a closer approximation and hence better prediction of the dynamics than the LCA-DDM derived model (see supplementary note 2). Finally, the NLB replicated the activity well despite not capturing the original model parameters as closely as for the LCA (see supplementary note 2).

We next aggregated the trials for specific SNR. From this, we compared the choice accuracy and decision time between the original models and the corresponding models by SINDy. We found that as SNR increased from zero, the choice accuracy for DDM, LCA-DDM, and NLB deviated from that of SINDy's models (see Figure 2B, middle; compare blue with orange). Higher SNR generally led to faster decisions and, hence, fewer generated data revealed to SINDy. This results in higher difficulty in elucidating the model parameters well. However, there are some nuances. First, for DDM, sufficiently high SNR led to better SINDy prediction (see Figure 2A, middle, right). Second, SINDy predicted LCA better with higher SNR, and attained the best prediction among the models (see Figure 2C, middle, right). This was due to the more unstable (runaway) dynamics of LCA, such that noise became relatively less important to contributing to the overall dynamics. Third, SINDy did not predict LCA-DDM choice behavior generally well when first-order polynomial was used (see Figure 2B orange, middle, right). However, when zero-order polynomial was used, the prediction improved substantially (see Figure 2B, gold). This is not surprising, given that the LCA-DDM behaves similar to DDM through model parameter fine tuning (Bogacz et al., 2006). Interestingly, SINDy predicted readily well for NLB despite its multistable states and the presence of noise.

Overall, SINDy predicted noisy single-trial decision variable dynamics and choice behavior with mixed results, performing well only for certain models and SNR ranges. We next investigate whether trial-averaged estimated model parameters and multi-trial SINDy can improve the prediction of the averaged decision variable dynamics and choice behavior.

3.2  Trial-Averaged and Multi-Trial Parameter Estimation Enhanced Choice Prediction for SINDy

For the trial-averaging-of-parameters approach, we took SINDy's estimated parameters across trials and then used these averaged parameters. With the multi-trial approach, we fit all trials for each SNR and used the generated models’ parameters. Each was used to recreate the decision variable dynamics choice behavior (see Figure 1). Figure 3 (compared to Figure 2) shows smaller confidence intervals for the choice behavior as compared to that for single-trial-choice behavior. Note that for the LCA-DDM (see Figure 3B), only the zero-order polynomial was shown as it provided the best fit to choice behavior for the trial-averaged and multi-trial approaches, as compared to the original order of polynomial one (see Figure S1). Importantly, the SINDy predictions of choice behavior were improved, further supporting trial-averaged and multi-trial approaches.
Figure 3:

Improved SINDy-derived model predictions of choice behavior with trial-averaging and multi-trial approaches. (B) Only with model with zero-order polynomial. Labels as in Figure 2. Choice behavior shown only for the optimal polynomial order.

Figure 3:

Improved SINDy-derived model predictions of choice behavior with trial-averaging and multi-trial approaches. (B) Only with model with zero-order polynomial. Labels as in Figure 2. Choice behavior shown only for the optimal polynomial order.

Close modal
Next for the trial-averaging-of-parameters approach, we sorted the SNRs into zero, low, medium, and high values (see section 2) and averaged the decision-variable activities regardless of choice. For the DDM, higher SNRs could replicate the decision dynamics well, but not as much for low and zero SNRs (see Figure 4A), consistent with SINDy's predicted choice (see Figure 3A). The finely tuned LCA-DDM parameters also struggled to be replicated by SINDy even with the trial-averaging approach; the averaged LCA-DDM activity for low and zero SNR (see Figure 4B, two left columns) struggled to predict the decision time as decisions occurred much earlier than the LCA-DDM (see Figure 3B, right column). Despite this, there was a slight improvement for decision time than that using single trials, but much more so for choice accuracy. The fine-tuned parameters meant that any slight difference in predicted values between its inhibitory term and decay rate by SINDy might lead to very different dynamics, for example, unstable, runaway dynamics, with much faster decision times than the original ones.
Figure 4:

Trial-averaging-of-parameter approach's decision variable activities for different SNRs explain choice behavioral fits. Zero, low, medium, high SNRs; high SNR based on choice accuracy of both original and SINDy-derived models 95% or higher and their differences being 1% or less. Low and medium SNRs determined from equally divided intervals between these two SNR values. Higher SNRs improved SlNDY's model prediction. Labels as in Figure 2.

Figure 4:

Trial-averaging-of-parameter approach's decision variable activities for different SNRs explain choice behavioral fits. Zero, low, medium, high SNRs; high SNR based on choice accuracy of both original and SINDy-derived models 95% or higher and their differences being 1% or less. Low and medium SNRs determined from equally divided intervals between these two SNR values. Higher SNRs improved SlNDY's model prediction. Labels as in Figure 2.

Close modal

For the LCA model, this approach seemingly proved most effective; SINDy was readily able to capture the decision variable dynamics (see Figure 4C) in addition to choice behavior for the model (see Figure 3C). For the case of the NLB model, SINDy's predictive performance also improved, especially with higher SNR (see Figure 4D).

For the multi-trial approach, we followed the same data analysis as for the trial-averaged approach to allow for fair comparison. For DDM, the decision dynamics were well replicated, especially for higher SNRs, following a similar trend to the trial-averaged approach but with much improvement in terms of time-course replication across SNRs (see Figure 5A). The choice behavior was drastically improved using the multi-trial approach (see Figure 3A), demonstrating its utility clearly for such a model. However, for LCA-DDM, it struggled to replicate the decision dynamics due to similar reasons mentioned in the trial-averaging approach above (see Figure 5B). The choice behavior using the best-performing polynomial (order 0) still leaves something to be desired, but it definitely offers an improvement on the trial-averaged approach's predictions. The LCA did perform well at replicating the decision dynamics (see Figure 5C) and predicting choice behavior, but it is the only model that the multi-trial approach did not offer any improvement compared to the trial-averaged approach. For NLB, the multi-trial approach improves on the trial-averaged method in terms of estimated decision dynamics (see Figure 5D). The choice behavior also improves overall, but it does struggle to capture higher SNR choice accuracies, which could be due to the acceleration toward the steady state and leaving SINDy with fewer data to work with and an inaccurate model fit (see supplementary Figure S3).
Figure 5:

Multi-trial approach's decision variable activities for different SNRs explain choice behavioral fits. Decision variable dynamics averaged over the same SNRs for comparison with those for the trial-averaged approach (compared with Figure 4). Blue (red): original (estimated) averaged decision variable activities.

Figure 5:

Multi-trial approach's decision variable activities for different SNRs explain choice behavioral fits. Decision variable dynamics averaged over the same SNRs for comparison with those for the trial-averaged approach (compared with Figure 4). Blue (red): original (estimated) averaged decision variable activities.

Close modal

Thus, with the trial-averaging approach, SINDy can generally handle the noisy dynamics better than the single-trial SINDy approach and therefore predict choice behavior with greater confidence compared to that of the single-trial approach. The multi-trial SINDy further enhances SINDy's performance, with predicted choice behaviors and decision variable dynamics even closer to those of the original models. These results were also validated based on the differences between the model parameters (see supplementary notes 1 to 3 for the highest SNR) and quantified by their RMSE values (see supplementary Figure S2).

Identifying the right decision-making model is important for understanding underlying decision mechanisms. We have shown that the SINDy algorithm, especially using multiple trials, performs reasonably well at recovering the underlying governing equations for the various often-used sequential- sampling-based decision-making models. Specifically, this was achieved by uncovering the dynamical equations from the DDM, linear and metastable LCA, its approximation to DDM (LCA-DDM), and the NLB model (Ratcliff, 1978; Usher & McClelland, 2001; Usher & McClelland, 2001; Bogacz et al., 2006; Zhou et al., 2009). We showed the potential of SINDy's utility replicating the deterministic portion of the decision variable profiles, which aid in predicting choice behaviors. This not only advances our computational tool kit but also enriches our understanding of underlying decision-making processes, extending the foundational work by Brunton et al. (2016). Further, as the reaction-time task in the decision-making models is akin to first-passage-time problems, wherein the systems’ dynamics may be only partially observable, our results show that the application of SINDy may be extended to similar problems in other fields, such as engineering, physics, mathematics, and biology (Gillespie, 1992; Kampen, 2011).

The adaptability of SINDy to predict choice accuracy and decision times across different SNR underscores its versatility. Moreover, SINDy can readily handle complex, nonlinear, and multistable models (NLB) and finely tuned LCA-DDM. Additional spurious terms of higher orders for SINDy-derived NLB model may be minimized by considering smaller decision variable values, for instance, closer to the beginning of trials.

We investigated three different SINDy approaches in this study. The multi-trial SINDy approach demonstrated the best performance in elucidating choice behaviors and decision variable dynamics of all the original models. It also provided the fastest performance but was more computationally memory intensive (see supplementary note 4). This is because the multi-trial SINDy approach used all the data and created a large library of candidate functions due to the large data size and variability. This became memory intensive when the large numbers of nonzero candidate functions were fed into the least square regression algorithm, which involved inverting or factoring the large matrices, further increasing the need for larger memory.

More modest performance was obtained using trial-averaging of model parameters across trials and doing especially well for the LCA model. This approach took much longer than the multi-trial approach but was less memory intensive. Although the single-trial SINDy approach's performance was not as high as the above two methods, its utility might lie in modeling neural data in real time (Raza et al., 2020). When compared with the other two approaches to fit both models using all trials at once, its memory requirements are less but its run time is longer than the multi-trial approach (see supplementary note 4). Hence, our work offers alternative SINDy approaches depending on the needs.

Although the methods that used multiple trials were able to handle noise, the assumption of known noise characteristics may present some limitation, particularly when translating these models to analyze real neural data where noise information may not be readily available. This challenge is accentuated in LCA-DDM, where SINDy's performance varied, highlighting the algorithm's sensitivity to finely tuned parameters.

With some assumptions on the characteristics of the noise (e.g., additive and white noise like), perhaps more exact determination can be obtained through optimal fitting of the choice behavior of the original respective model, after the deterministic portion of the model is identified using the methods shown in this study. Future work should also evaluate SINDy on other nonlinear decision-making models (Marshall et al., 2022; Pirrone et al., 2022; Asadpour et al., 2024). Other similar data-driven methods could be explored and compared with SINDy (Pandarinath et al., 2018) within decision making or first-passage-time processes.

Although applying SINDy to empirical neural data is beyond the scope of our investigation, neural correlates of evidence accumulation for decision making in the form of time-series data are well known and have been identified in invasive and noninvasive recordings across species (Hanks & Summerfield, 2017; O'Connell et al., 2018). For large-scale or brain-wide neural data, dimensional reduction may be required before further analysis or modeling (Cunningham & Yu, 2014). This is especially the case for decision making, which often resides in lower-dimensional neural space (Ganguli et al., 2008; Shenoy & Kao, 2021; Steinemann et al., 2023). In fact, one of the advantages of SINDy is its ability to handle high-dimensional data (Brunton et al., 2016). Thus, this would be an interesting future direction to apply our developed methods.

In conclusion, while we have successfully demonstrated the SINDy algorithm's performance on cognitive computational models, its areas for improvement have also been revealed in the process. For instance, improving the algorithm's handling of noise and its applicability to more complex models will be crucial for its successful integration into decision neuroscience research. Such advancements will provide deeper insights into the computational basis of decision making and improve our ability to interpret and predict neural activity underlying cognitive processes.

B.L. and K.W.-L. designed and conceptualized the analyses. B.L. performed the simulations and analyses. S.B. and K.W.-L. validated the codes, data, and analyses. B.L., S.B., and K.W.-L. wrote the letter. K.W.-L. supervised the research.

We thank Abdoreza Asadpour and Cian O'Donnell for useful discussions. B.L. was supported by Ulster University via the Northern Ireland Department for the Economy. K.W.-L. was supported by Health and Social Care Research and Development (HSC R&D; STL/5540/19) and UK Research and Innovation (UKRI) Medical Research Council (MRC) (MC_OC_20020). We are grateful for access to the Tier 2 High Performance Computing resources provided by the Northern Ireland High Performance Computing facility funded by the UK Engineering and Physical Sciences Research Council, grant EP/T022175/1.

Asadpour
,
A.
,
Tan
,
H.
,
Lenfesty
,
B.
, &
Wong-Lin
,
K.
(
2024
).
Of rodents and primates: Time-variant gain in drift–diffusion decision models
.
Computational Brain and Behavior
,
7
,
195
206
.
Bogacz
,
R.
,
Brown
,
E.
,
Moehlis
,
J.
,
Holmes
,
P.
, &
Cohen
,
J. D.
(
2006
).
The physics of optimal decision making: A formal analysis of models of performance in two-alternative forced-choice tasks
.
Psychological Review
,
113
,
700
765
.
Bogacz
,
R.
, &
Cohen
,
J. D.
(
2004
).
Parameterization of connectionist models
.
Behavior Research Methods, Instruments, and Computers
,
36
(
4
),
art. 4
.
Bose
,
T.
,
Pirrone
,
A.
,
Reina
,
A.
, &
Marshall
,
J. A. R.
(
2020
).
Comparison of magnitude-sensitive sequential sampling models in a simulation-based study
.
Journal of Mathematical Psychology
,
94
, 102298.
Brunton
,
S. L.
,
Proctor
,
J. L.
, &
Kutz
,
J. N.
(
2016
).
Discovering governing equations from data by sparse identification of nonlinear dynamical systems
.
Proceedings of the National Academy of Sciences
,
113
(
15
),
3932
3937
.
Cliff
,
N.
(
1993
).
Dominance statistics: Ordinal analyses to answer ordinal questions
.
Psychological Bulletin
,
114
(
3
),
494
509
.
Cunningham
,
J. P.
, &
Yu
,
B. M.
(
2014
).
Dimensionality reduction for large-scale neural recordings
.
Nature Neuroscience
,
17
(
11
),
1500
1509
.
Davison
,
A. C.
, &
Hinkley
,
D. V.
(
1997
).
Bootstrap methods and their application
.
Cambridge University Press
.
de Silva
,
B. M.
,
Champion
,
K.
,
Quade
,
M.
,
Loiseau
,
J.-C.
,
Kutz
,
J. N.
, &
Brunton
,
S. L.
(
2020
).
PySINDy: A Python package for the sparse identification of nonlinear dynamics from data
.
Ditterich
,
J.
(
2006
).
Evidence for time-variant decision making
.
European Journal of Neuroscience
,
24
(
12
),
3628
3641
.
Dreher
,
J.-C.
, &
Tremblay
,
L.
(
2016
).
Decision neuroscience: An integrative perspective
.
Elsevier Academic Press
.
Efron
,
B.
, &
Tibshirani
,
R. J.
(
1994
).
An introduction to the bootstrap
.
Chapman and Hal
.
Friston
,
K. J.
,
Harrison
,
L.
, &
Penny
,
W.
(
2003
).
Dynamic causal modelling
.
NeuroImage
,
19
(
4
),
1273
1302
.
Ganguli
,
S.
,
Bisley
,
J. W.
,
Roitman
,
J. D.
,
Shadlen
,
M. N.
,
Goldberg
,
M. E.
, &
Miller
,
K. D.
(
2008
).
One-dimensional dynamics of attention and decision making in LIP
.
Neuron
,
58
(
1
),
art. 1
.
Gillespie
,
D. T.
(
1992
).
Markov processes: An introduction for physical scientists
.
Gulf Professional Publishing
.
Gold
,
J. I.
, &
Shadlen
,
M. N.
(
2007
).
The neural basis of decision making
.
Annual Review of Neuroscience
,
30
(
1
),
art. 1
.
Hanks
,
T. D.
, &
Summerfield
,
C.
(
2017
).
Perceptual decision making in rodents, monkeys, and humans
.
Neuron
,
93
(
1
),
15
31
.
Higham
,
D. J.
(
2001
).
An algorithmic introduction to numerical simulation of stochastic differential equations
.
SIAM Review
,
45
(
3
).
Kampen
,
N. G. V.
(
2007
).
Stochastic processes in physics and chemistry
(3rd ed.).
North-Holland
.
Kelly
,
S. P.
, &
O'Connell
,
R. G
. (
2013
).
Internal and external influences on the rate of sensory evidence accumulation in the human brain
.
Journal of Neuroscience
,
33
(
50
),
19434
19441
.
Lipton
,
Z. C.
(
2018
).
The mythos of model interpretability: In machine learning, the concept of interpretability is both important and slippery
.
Queue
,
16
(
3
),
31
57
.
Luce
,
R. D.
(
1986
).
Response times: Their role in inferring elementary mental organization
.
Oxford University Press
.
Mante
,
V.
,
Sussillo
,
D.
,
Shenoy
,
K. V.
, &
Newsome
,
W. T.
(
2013
).
Context-dependent computation by recurrent dynamics in prefrontal cortex
.
Nature
,
503
(
7474
),
78
84
.
Marshall
,
J. A. R.
,
Reina
,
A.
,
Hay
,
C.
,
Dussutour
,
A.
, &
Pirrone
,
A.
(
2022
).
Magnitude-sensitive reaction times reveal non-linear time costs in multi-alternative decision-making
.
PLOS Computational Biology
,
18
(
10
), e1010523.
Najafi
,
F.
, &
Churchland
,
A. K.
(
2018
).
Perceptual decision-making: A field in the midst of a transformation
.
Neuron
,
100
(
2
),
art. 2
.
Niyogi
,
R.
, &
Wong-Lin
,
K.
(
2013
).
Dynamic excitatory and inhibitory gain modulation can produce flexible, robust and optimal decision-making
.
PLOS Computational Biology
,
9
(
6
).
O'Connell
,
R. G.
, &
Kelly
,
S. P.
(
2021
).
Neurophysiology of human perceptual decision-making
.
Annual Review of Neuroscience
,
44
(
1
),
art. 1
.
O'Connell
,
R. G.
,
Shadlen
,
M. N.
,
Wong-Lin
,
K.
, &
Kelly
,
S. P.
(
2018
).
Bridging neural and computational viewpoints on perceptual decision-making
.
Trends in Neurosciences
,
41
(
11
),
838
852
.
Pandarinath
,
C.
,
O'Shea
,
D. J.
,
Collins
,
J.
,
Jozefowicz
,
R.
,
Stavisky
,
S. D.
,
Kao
,
J. C.
, . . .
Sussillo
,
D.
(
2018
).
Inferring single-trial neural population dynamics using sequential auto-encoders
.
Nature Methods
,
15
(
10
),
805
815
.
Pinto
,
L.
,
Rajan
,
K.
,
DePasquale
,
B.
,
Thiberge
,
S. Y.
,
Tank
,
D. W.
, &
Brody
,
C. D.
(
2019
).
Task-dependent changes in the large-scale dynamics and necessity of cortical regions
.
Neuron
,
104
(
4
),
810
824
.
Pirrone
,
A.
,
Reina
,
A.
,
Stafford
,
T.
,
Marshall
,
J. A. R.
, &
Gobet
,
F.
(
2022
).
Magnitude-sensitivity: Rethinking decision-making
.
Trends in Cognitive Sciences
,
26
(
1
),
66
80
.
Press
,
W. H.
, &
Teukolsky
,
S. A.
(
1990
).
Savitzky-Golay smoothing filters
.
Computers in Physics
,
4
(
6
),
669
672
.
Raissi
,
M.
,
Perdikaris
,
P.
, &
Karniadakis
,
G. E.
(
2019
).
Physics-informed neural networks: A deep learning framework for solving forward and inverse problems involving nonlinear partial differential equations
.
Journal of Computational Physics
,
378
,
686
707
.
Ratcliff
,
R.
(
1978
).
A theory of memory retrieval
.
Psychological Review
,
85
,
59
108
.
Ratcliff
,
R.
,
Smith
,
P. L.
,
Brown
,
S. D.
, &
McKoon
,
G.
(
2016
).
Diffusion decision model: Current issues and history
.
Trends in Cognitive Sciences
,
20
(
4
),
260
281
.
Raza
,
H.
,
Chowdhury
,
A.
,
Bhattacharyya
,
S.
, &
Samothrakis
,
S.
(
2020
).
Single-trial EEG classification with EEGNet and neural structured learning for improving BCI performance
. In
Proceedings of the 2020 International Joint Conference on Neural Networks
(pp.
1
8
).
Roach
,
J. P.
,
Churchland
,
A. K.
, &
Engel
,
T. A.
(
2023
).
Choice selective inhibition drives stability and competition in decision circuits
.
Nature Communications
,
14
(
1
),
art. 1
.
Roitman
,
J. D.
, &
Shadlen
,
M. N.
(
2002
).
Response of neurons in the lateral intraparietal area during a combined visual discrimination reaction time task
.
Journal of Neuroscience
,
22
(
21
),
9475
9489
.
Roxin
,
A.
, &
Ledberg
,
A.
(
2008
).
Neurobiological models of two-choice decision making can be reduced to a one-dimensional nonlinear diffusion equation
.
PLOS Computational Biology
,
4
(
3
), e1000046.
Schmid
,
P. J.
(
2010
).
Dynamic mode decomposition of numerical and experimental data
.
Journal of Fluid Mechanics
,
656
,
5
28
.
Shenoy
,
K. V.
, &
Kao
,
J. C.
(
2021
).
Measurement, manipulation and modeling of brain-wide neural population dynamics
.
Nature Communications
,
12
(
1
),
art. 1
.
Shinn
,
M.
,
Lam
,
N. H.
, &
Murray
,
J. D.
(
2020
).
A flexible framework for simulating and fitting generalized drift-diffusion models
.
eLife
,
9
, e56938.
Smirnov
,
N.
(
1948
).
Table for estimating the goodness of fit of empirical distributions
.
Annals of Mathematical Statistics
,
19
(
2
),
279
281
.
Steinemann
,
N. A.
,
Stine
,
G. M.
,
Trautmann
,
E. M.
,
Zylberberg
,
A.
,
Wolpert
,
D. M.
, &
Shadlen
,
M. N.
(
2023
).
Direct observation of the neural computations underlying a single decision
.
eLife
,
12
.
Usher
,
M.
, &
McClelland
,
J. L.
(
2001
).
The time course of perceptual choice: The leaky, competing accumulator model
.
Psychological Review
,
108
,
550
592
.
Wang
,
X.-J.
(
2002
).
Probabilistic decision making by slow reverberation in cortical circuits
.
Neuron
,
36
(
5
),
955
968
.
Wong
,
K.-F.
, &
Wang
,
X.-J.
(
2006
).
A recurrent network mechanism of time integration in perceptual decisions
.
Journal of Neuroscience
,
26
(
4
),
1314
1328
.
Zhou
,
X.
,
Wong-Lin
,
K.
, &
Holmes
,
P.
(
2009
).
Time-varying perturbations can distinguish among integrate-to-threshold models for perceptual decision making in reaction time tasks
.
Neural Computation
,
21
(
8
),
2336
2362
.
This is an open-access article distributed under the terms of the Creative Commons Attribution 4.0 International License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited. For a full description of the license, please visit https://creativecommons.org/licenses/by/4.0/legalcode

Supplementary data