Abstract
The interpretation of neuronal spike train recordings often relies on abstract statistical models that allow for principled parameter estimation and model selection but provide only limited insights into underlying microcircuits. In contrast, mechanistic models are useful to interpret microcircuit dynamics, but are rarely quantitatively matched to experimental data due to methodological challenges. Here we present analytical methods to efficiently fit spiking circuit models to single-trial spike trains. Using the maximal-likelihood approach, we statistically infer the mean and variance of hidden inputs, neuronal adaptation properties and connectivity for coupled integrate-and-fire neurons. Evaluations based on simulated data, and validations using ground truth recordings in vitro and in vivo demonstrated that parameter estimation is very accurate, even for highly sub-sampled networks. We finally apply our methods to recordings from cortical neurons of awake ferrets and reveal population-level equalization between hidden excitatory and inhibitory inputs. The methods introduced here enable a quantitative, mechanistic interpretation of recorded neuronal population activity.
Introduction
In recent years neuronal spike train data have been collected at an increasing pace, with the ultimate aim of unraveling how neural circuitry implements computations that underlie behavior. Often these data are acquired from extracellular electrophysiological recordings in vivo without knowledge of neuronal input and connections between neurons. To interpret such data, the recorded spike trains are frequently analyzed by fitting parametric phenomenological models that describe statistical dependencies in the data. A typical example consists in fitting generalized linear models to characterize the mapping between measured (sensory) input and neuronal spiking activity [1–5]. These approaches are very useful for quantifying the structure in the data, and benefit from statistically principled parameter estimation and model selection methods. However, their interpretative power is limited as the underlying models typically do not incorporate prior biophysical constraints, and therefore have a limited capacity for identifying circuit mechanisms.
Mechanistic models of coupled neurons on the other hand involve interpretable variables and parameters, and have proven essential for analyzing neural circuits. A prominent class of models for this purpose are spiking neuron models of the integrate-and-fire (I&F) type. Models of this class implement in a simplified manner the key biophysical constraints and can reproduce and predict neuronal activity with a remarkable degree of accuracy [6–8], essentially matching the performance of biophysically detailed models with many parameters [9,10]; thus, they have become state-of-the-art models for describing neural activity in in-vivo like conditions [7,11,12]. In particular, they have been applied in a multitude of studies on local circuits [13–19], network dynamics [20–24] as well as in neuromorphic hardware systems [25–27]. I&F neurons can be fit in straightforward ways to membrane voltage recordings with knowledge of the neuronal input, typically from in-vitro preparations [7,9,11,12,28–30]. Having only access to the spike times as in a typical in-vivo setting however poses a substantial challenge for the estimation of parameters. Estimation methods that rely on numerical simulations to maximize a likelihood or minimize a cost function [31–33] strongly suffer from the presence of intrinsic variability (noise) in this case. Consequently, qualitatively comparing the model output with experimental data is typically the only validation of mechanistic spiking circuit models.
To date, model selection methods based on extracellular recordings are thus much more advanced and principled for statistical/phenomenological models than for mechanistic circuit models. To bridge this methodological gap, here we present analytical tools to efficiently fit I&F circuits to observed spike times from a single trial. By maximizing analytically computed likelihood functions, we infer the statistics of hidden inputs, neuronal adaptation properties and synaptic coupling strengths, and evaluate our approach extensively using simulated data. Importantly, we validate our inference methods for these three features using in-vitro and in-vivo ground truth data from whole-cell [34] and combined juxtacellular-extracellular recordings [35]. We finally apply the methods to extracellular recordings from primary auditory cortex of awake behaving ferrets, in particular, assessing the hidden neuronal inputs based on single-unit spike times.
Our work demonstrates that neuronal and network properties can be accurately and efficiently estimated from spike trains using biophysically constrained I&F models, and indicates the potential of this approach for the inference of microcircuit models from extracellular recordings. Numerical implementations for our methods are provided under a free license as an open source project.
Results
Our results are structured as follows. We outline our methods in section 1 and evaluate them in the subsequent sections using both simulated data and ground truth recordings: for statistical inference of fluctuating background input in section 2, input perturbations in section 3, synaptic coupling in section 4, and neuronal adaptation in section 5. In section 6 we then apply our methods to spike trains from extracellular recordings of behaving ferrets. Section 7 summarizes information on implementation and computational demands.
1. Maximum likelihood estimation for integrate-and-fire neurons
Maximum likelihood estimation is a principled method for fitting statistical models to observations. Given observed data D and a model that depends on a vector of parameters θ, the estimated value of the parameter vector is determined by maximizing the likelihood that the observations are generated by the model,
This method features several attractive properties, among them: (i) the distribution of maximum likelihood estimates is asymptotically Gaussian with mean given by the true value of θ; (ii) the variances of the parameter estimates achieve a theoretical lower bound, the Cramer-Rao bound (given by the reciprocal of the Fisher information) as the sample size increases [36]. It should further be noted that maximizing the likelihood p(D|θ) within plausible limits for the parameter values is equivalent to maximizing the posterior probability density for the parameters given the data, p(θ|D), without prior knowledge about the parameters except for the limits (i.e., assuming a uniform prior distribution of θ).
Let us first focus on single neurons (for networks see Results section 4). The data we have are neuronal spike times, which we collect in the ordered set
We consider neuron models of the integrate-and-fire (I&F) type, which describe the membrane voltage dynamics by a differential equation together with a reset condition that simplifies the complex, but rather stereotyped, dynamics of action potentials (spikes). Here we focus on the classical leaky I&F model [37] but also consider a refined variant that includes a nonlinear description of the spike-generating sodium current at spike initiation and is known as exponential I&F model [38]. An extended I&F model that accounts for neuronal (spike rate) adaptation [9,39,40] is included in Results section 5. Each model neuron receives fluctuating inputs described by a Gaussian white noise process with (time-varying) mean μ(t) and standard deviation σ.
We would like to point out that not all model parameters need to be estimated. The membrane voltage can be scaled such that the remaining parameters of interest for estimation are those for the input together with the membrane time constant τm in case of the leaky I&F model, and additionally the reset voltage Vr in case of the exponential I&F model (for details see Methods section 1).
We are interested in the likelihood p(D|θ) of observing the spike train D from the model with parameter vector θ. As spike emission in I&F models is a renewal process (except in presence of adaptation, see below) this likelihood can be factorized as where μ[tk, tk+1]:= {μ(t)|t ∈ [tk, tk+1]} denotes the mean input time series across the time interval [tk, tk+1]. In words, each factor in Eq. (3) is the probability density value of a spike time conditioned on knowledge about the previous spike time, the parameters contained in θ and the mean input time series across the inter-spike interval (ISI). We assume that μ[tk,tk+1] can be determined using available knowledge, which includes the parameters in θ as well as previous (observed) spike times.
For robust and rapid parameter estimation using established optimization techniques we need to compute p(D|θ) as accurately and efficiently as possible. Typical simulation-based techniques are not well suited because they can only achieve a noisy approximation of the likelihood that depends on the realization of the input fluctuations and is difficult to maximize. This poses a methodological challenge which can be overcome using analytical tools that have been developed for I&F neurons in the context of the forward problem of calculating model output for given parameters [41–45]. These tools led us to the following methods that we explored for the inverse problem of parameter estimation:
Method 1 calculates the factors of the likelihood (Eq. (3), right hand side) via the inter-spike interval (ISI) probability density pISI, using where sk:= tk+1 – tk is the length of the k-th ISI and μISI is the mean input across that ISI given by μISI[0, sk] = μ[tk,tk+1]. We obtain pISI by solving a Fokker-Planck partial differential equation using two different numerical solution schemes which serve for different model scenarios (for details see Methods section 2). One of these schemes relies on the Fourier transform and provides an efficient approximation for small amplitude variations of the mean input, with and , for small |J|. We refer to it as method 1a. The other numerical scheme employs a finite volume discretization and is accurate for arbitrary variations of the mean input but computationally more demanding. We refer to it as method 1b.
Method 2 uses an approximation of the spike train by an inhomogeneous Poisson (point) process. The spike rate r(t) of that process is effectively described by a simple differential equation derived from the integrate-and-fire model and depends on the mean input up to time t as well as the other parameters in θ (for details see Methods section 3). In this case the factors in Eq. (3), right, are expressed as
The most accurate and advantageous method depends on the specific setting, as illustrated for different scenarios in the following sections.
2. Inference of background inputs
We first consider the spontaneous activity of an isolated recorded neuron. This situation is modeled with an I&F neuron receiving a stationary noisy background input with constant mean μ and standard deviation σ which are the parameters to be estimated. For this scenario method 1a is very efficient and sufficiently accurate, and therefore well suited.
2.1 Evaluation using in-silico ground truth data
An example of the simulated ground truth data, which consists of the membrane voltage time series including spike times, is shown in Fig. 1A together with ISI and membrane voltage histograms. Note that for estimation we only use the spike times. By maximizing the likelihood (specifically, its logarithm, see Methods section 4) the true parameter values are well recovered (Fig. 1B) and we obtain an accurate estimate of the ISI density. In addition, we also obtain an accurate estimate for the (unobserved) membrane voltage density, which can be calculated using a slight modification of method 1 in a straightforward way once the parameter values are determined. Here the remaining parameter of interest, the membrane time constant τm, was set to the true value; fixing τm at a wrong value instead (e.g., with a relative error of 50 %) still leads to a good fit in terms of spike train likelihood (relative error < 0.1 %).
We next evaluated the estimation accuracy for different numbers of observed spikes (Fig. 1C). As little as 50 spikes already lead to a good solution with a maximum average relative error (with respect to the true parameter values) of about 10 %. Naturally, the estimation accuracy increases with the number of observed spikes. Moreover, the variance of the parameter estimates decreases as the number of spikes increases, and approaches the Cramer-Rao bound (which we calculated analytically, see Methods section 5) as expected for a maximum likelihood estimator. This quantity limits the variance of any unbiased estimator from below.
To further quantify how well the different parameters can be estimated from a spike train of a given length, we computed the Fisher information (per ISI), shown in Fig. 1D. For a reasonable range of input parameter values, we consistently find that μ is easier to estimate than σ. τm is clearly more difficult to estimate than both other parameters. For comparison, we considered the exponential I&F model which involves additional parameters (Fig. 1E): according to the Fisher information for this model, estimation of μ is again easier than σ, and τm is the most difficult to estimate. For each parameter, the Fisher information appears to vary weakly with the value of the parameter.
2.2 Validation using in-vitro ground truth data
We validated our inference method using somatic whole-cell recordings of cortical pyramidal cells (PYRs) [34] and fast-spiking interneurons (INTs) exposed to injected fluctuating currents. A range of stimulus statistics, in terms of different values for the mean μI and standard deviation σI of these noise currents, was applied and each cell responded to multiple different stimuli (examples are shown in Fig. 2A; for details see Methods section 7.1). We estimated the input parameters (μ and σ) of an I&F neuron from the observed spike train for each stimulus by maximizing the spike train likelihood. Note that since we considered only spikes, and not the membrane potential, we did not estimate the input resistance and rest potential; therefore, the input parameters were defined up to arbitrary offset and scale factors.
Model fitting yielded an accurate reproduction of the ISI distributions (Fig. 2A). Importantly, the estimated input statistics well captured the true stimulus statistics (Fig. 2B,C). In particular, estimated and true mean input as well as estimated and true input standard deviations were strongly correlated for all cells (Fig. 2 B, C). The correlation coefficients between estimated and ground truth values for INTs are larger than those for PYRs, as reflected by the concave shape of the estimated μ values as a function of μI. This shape indicates a saturation mechanism that is not included in the I&F model. Indeed, it can in part be explained by the intrinsic adaptation property of PYRs (see Results section 5 below). Furthermore, correlation coefficients are slightly increased for longer stimuli (15 s compared to 5 s duration) due to improved estimation accuracy for longer spike trains.
3. Inference of input perturbations
We next consider the effects of partially known, time-dependent inputs to the recorded neuron. These inputs may reflect hypothesized synaptic or stimulus-driven inputs at known times. Specifically, for the evaluation we consider μ(t) = μ0 + Jμ1(t), where μ0 denotes the background mean input (cf. Results section 2) and μ1(t) is described by the superposition of alpha functions with time constant t, which are triggered at known times (for details see Methods section 1). These times can be thought of, for example, as observed spike times of another (pre-synaptic) neuron. We estimate the perturbation strength J as well as τ which determines the temporal extent over which the perturbation acts. For this scenario we apply and compare the methods 1a and 2. Method 1b is computationally too costly here because pISI needs to be computed for each ISI separately (since the mean input variation across an ISI depends on the time of ISI onset relative to the trigger times).
Estimation accuracy for a range of perturbation strengths is shown in Fig. 3A,B. Note that the input perturbations are relatively weak, producing mild deflections of the membrane voltage which are difficult to recognize visually in the membrane voltage time series in the presence of noisy background input (Fig. 3A). Both methods perform comparably well for weak input perturbations. As |J| increases the estimation accuracy of method 2 increases, whereas that of method 1a decreases (Fig. 3B) because it is based on a linear, weak coupling approximation.
We further assessed the sensitivity of the estimation methods to detect (weak) input perturbations in comparison to a model-free method based on cross-correlograms (CCGs) between spike trains and perturbation times (Fig. 3C,D; for details see Methods section 6). The model-free approach estimates the probability that the input and the spike train are coupled, but does not provide additional information on the shape of that coupling. Both model-based estimation methods are more sensitive in detecting weak perturbations than the model-free approach, with method 1a expectedly performing best (Fig. 3D).
4. Inference of synaptic coupling
In the previous section we showed that we can successfully estimate the perturbations in the spiking of an individual neuron that may be elicited by inputs from another neuron. We now turn to estimating synaptic couplings in a network. We consider the situation in which we have observed spike trains of N neurons. We fit these data using a network model in which each neuron i receives independent fluctuating background input with (neuron-specific) mean and variance μi and , and neurons are coupled through delayed current pulses which cause post-synaptic potentials of size Ji,j, for i, j ∈ {1, …, N}. Our aim is therefore to estimate the coupling strengths in addition to the statistics of background inputs caused by unobserved neurons.
We collect the observed spike times of all N neurons in the set D and separate the matrix of coupling strengths J from all other parameters in θ for improved clarity. Note that the overall mean input for neuron i can therefore be expressed as where describes the synaptic input for neuron i elicited by neuron j. The likelihood p(D|θ, J) can be factorized into ISI probability density values, where each factor is determined by the parameters in θ together with a specific subset of all coupling strengths and knowledge of the spike times that we have observed. Assuming reasonably weak coupling strengths each of these factors can be approximated by the sum of the ISI probability density value in absence of input perturbations and a first order correction due to neuronal coupling (cf. Eq. (6) and Methods section 2) to obtain with and , where denotes the k-th of Ki observed spike times and the length of the k-th ISI of neuron i. Note that the mean input perturbations depend on the spike times of neuron j. The approximation (8) allows for the application of method 1a, by which the likelihood can be calculated in an efficient way.
4.1 Evaluation using network simulations
We first evaluated our method on simulated ground truth data for relatively small (N = 10) as well as larger (N = 50) fully observed networks of neurons. The estimated parameters show a remarkable degree of accuracy (Fig. 4A-D).
In a realistic scenario, the N recorded neurons belong to a larger network that is sub-sampled through the measurement process. The unobserved neurons therefore contribute additional, hidden inputs. In the fitted model, the effect of these unobserved neurons on neuron i is absorbed in the estimated statistics (μi, σi) of the background noise. Specifically, the total external input of neuron i, originating from a large number Mi of unobserved neurons whose spike trains are represented by independent Poisson processes with rates rj, can be approximated for reasonably small coupling strengths with a background noise of mean and variance (diffusion approximation [46]). Because of shared connections from unobserved neurons, the inputs received by the different observed neurons are in general correlated, with correlation strength that depends on the degree of overlap between the unobserved pre-synaptic populations. The model we fit to the observed data however assumes uncorrelated background inputs (conditioned on possibly correlated means and variances).
To assess the influence of correlations due to unobserved common inputs, we first fitted our model to data generated from a network with correlated background inputs. The estimation accuracy of synaptic strengths is still good in case of weak correlations of the external input fluctuations (correlation coefficient c ≤ 0.05 for each pair of observed neurons) but clearly decreases as these correlations increase (Fig. 4E). In particular, positive correlations c > 0 lead to an overestimation of the coupling strengths. Empirical values for these so-called noise correlations from experimental studies are typically very small [24, 47, 48].
We next evaluated our method on data generated by explicitly sub-sampling (partially observed) networks of 800 excitatory and 200 inhibitory neurons that were rather sparsely and randomly connected with probabilities 0.1-0.2 (Figs. 4F,G). Estimation accuracy of connectivity structure and coupling strengths was surprisingly good for sufficiently long simulated recordings in this scenario.
In sum, our approach yields good estimation results for sub-sampled networks as long as the correlations between the hidden (external) input fluctuations on a fine timescale are not too large. Notably, the method can further be accommodated for shared (unknown) variations of input statistics, and thus, time-varying spike rates, caused by unobserved neurons or network interaction (see next section).
4.2 Validation using in-vivo ground truth data
We validated our inference of synaptic coupling using simultaneous extracellular recordings and juxtacellular stimulations of hippocampal neuronal ensembles in awake mice [35]. Following the approach developed in [35], we estimated connectivity by applying our model-based method to spontaneous, extracellularly recorded spiking activity, and assessed the accuracy of our estimates by comparison with ground-truth data. Ground-truth connectivity was obtained by evoking spikes in single PYRs juxtacellularly using short current pulses, while recording extracellular spike trains of local INTs (for an example see Fig. 5A). Ground truth values for the presence and absence of synaptic connections were derived from spike train CCGs using the evoked presynaptic spikes, taking into account co-modulation caused by common network drive (for details see Methods section 7.2).
An important issue with respect to the basic assumptions of our model is that spontaneous activity appeared to be highly non-stationary, so that the spike trains of the recorded neurons were typically comodulated. To infer synaptic couplings from the spontaneous spike trains with our model-based approach, we accounted for network co-modulation in two ways: (i) through small temporal perturbations of the PYR spike times, used to compute coupling strength z-scores; (ii) through estimated variations of the background mean input for the (potentially postsynaptic) INTs, that is, in Eq. (8) was allowed to vary between ISIs. These variations were inferred from the instantaneous spike rate, which typically varied at multiple timescales over the duration of the recordings that lasted up to ~2 h (Fig. 5A). We, therefore, estimated the variations of mean input at three different timescales separately and inferred synaptic couplings for each of these (see Methods section 7.2). In addition, we combined those results, using the largest absolute z-score across the three timescales for each connection.
Although spontaneous activity was highly non-stationary, our inference of the connectivity appeared to be very accurate. Comparisons with ground truth estimates demonstrated (balanced) accuracy of up to 0.95 (for the intermediate timescale variant; Fig. 5B). Moreover, reducing the number of spikes used for inference did not lead to an appreciable decrease of reproduction accuracy. Notably, our method exhibited high sensitivity as revealed by large z-score values for all true connections (2.47-7.36) and maximal accuracy attained at a large discrimination value for the combined timescales variant; when using all instead of max. 1000 PYR spikes for estimation that discrimination value becomes even larger .
5. Inference of neuronal adaptation
We next extend the model neurons to account for spike rate adaptation – an important property of many types of neurons, including pyramidal cells [49–51]. It can be observed by a gradual change in spiking activity following an immediate response upon an abrupt change of input strength, as shown in Fig. 6A (see also Fig. 7A). This behavior is typically mediated by a slowly decaying transmembrane potassium current, which rapidly accumulates when the neuron spikes repeatedly. In the extended I&F neuron model [39, 40] this adaptation current is represented by an additional variable w that is incremented at spike times by a value Δw, exponentially decays with (slow) time constant τw in between spikes, and subtracts from the mean input μ0, acting as a negative feedback to the membrane voltage (Fig. 6A, see Methods section 1).
In contrast to classical I&F neurons, in the generalized model with adaptation, spiking is not a renewal process: given a spike time tk the probability of the next spike depends on all previous spike times. That dependence is however indirect, as it is mediated through the effective mean input μ(t) – w(t) across the ISI [tk, tk+1]. This effective mean input can be explicitly expressed using the parameter values in θ together with the observed spike times, and then inserted in Eqs. (3) and (4) for estimation. Here, method 1b is best suited and can be applied efficiently by exploiting the fact that w varies within ISIs in a rather stereotyped way; that is, pISI does not need to be computed for each ISI separately (for details see Methods section 1). Methods 1a and 2 are less well suited for this scenario because the adaptation variable can accumulate to substantial values, thereby opposing the assumption of weak variations of the mean input; moreover, the spike train of an adapting neuron deviates strongly from a Poisson process.
5.1 Evaluation using in-silico ground truth data
We first evaluated the inference method using simulated ground truth for constant statistics of the background inputs (cf. Results section 1). An example of the membrane voltage and adaptation current time series is depicted in Fig. 6B. The true values for the adaptation parameters (the strength Δw and time constant τw) are well recovered and we obtain an accurate estimate of the adaptation current as it evolves over time. Here, too, the estimation accuracy depends on the number of observed spikes (Fig. 6C) and relative errors are on average less than 10 % for 500 spikes.
5.2 Validation using in-vitro recordings
To validate our inference method for adaptation parameters, we used the recordings of neurons stimulated by noise currents that we examined in Results section 2. Several cells, predominantly PYRs, exhibited spike rate adaptation (for an example see Fig. 7A). Accordingly, the adaptive I&F model yielded a clearly improved fit compared to the nonadaptive model for all but one PYRs as shown by the Akaike information criterion (AIC), which takes into account both goodness of fit and complexity of a model (Fig. 7B; for details see Methods section 7.1). On the other hand, for all except one INTs the nonadaptive model turned out to be the preferred one, which is consistent with the observation that INTs (generally) exhibit little spike rate adaptation compared to PYRs [52].
We examined the mean input estimates from the adaptive model in comparison to the nonadaptive model for the neurons where the adaptive model was preferred (Fig. 7C,D). Note that the intrinsic adaptation current effectively subtracts from the mean input (but does not affect the input standard deviation). For all of those cells, including adaptation increased the correlation coefficient between estimated and empirical mean input. The remaining room for improvement of this correlation for PYRs indicates that there are likely multiple adaptation mechanisms (with different timescales) at work [52].
These results provide an indirect validation of our method and demonstrate its potential to infer intrinsic neuronal adaptation properties based on observed spike trains alone.
6. Estimation of neuronal inputs from in-vivo spike train data
Finally, we apply our method to spike train data obtained from extracellular multi-channel recordings in primary auditory cortex of awake behaving ferrets [53]. The animals were listening to regular sequences of click stimuli separated by periods of silence. Using a spike sorting algorithm, single unit spike trains were extracted (for details see Methods section 7.3).
We fitted a simple microcircuit model to these data. In the model, a leaky I&F model neuron received feed-forward excitatory and inhibitory inputs triggered by the clicks [17, 54, 55], as well as a fluctuating background input. The background input is characterized by its mean μ0 and standard deviation σ, the click-triggered inputs are described using alpha functions with strengths Je, Ji and time constants τe, τi, respectively. Note that this model is a slightly extended version of the one used in Results section 3. For each cell (single unit) we first estimated the parameters for the background input (with click-triggered inputs set to zero) from the spontaneous spike trains during periods of silence using method 1a, and then estimated the parameters of the additional inputs from the data during click trains using method 2.
To assess whether the complexity of this model is adequate given the available data we considered simpler models for comparison. For spontaneous activity, we compared our model to a Poisson process with constant rate. For click-evoked activity, we examined two additional models: (i) the leaky I&F model with only one (either excitatory or inhibitory) click-triggered input described by a delayed alpha function; (ii) a model in which the stimulus induced only a constant additional input. As a measure of quality we applied the AIC (cf. Results section 5).
The I&F model appears to be the preferred one for spontaneous activity for almost all cells according to the AIC (Fig. 8A). Examples of baseline data in terms of ISI histograms together with estimation results are shown in Fig. 8B, and estimated parameter values of the background input for all cells are visualized in Fig. 8C. The I&F model with fluctuating background input captures well a range of ISI histograms that characterize the baseline spiking activity of cortical neurons.
For click-evoked activity, the I&F model with click-triggered feed-forward excitatory and inhibitory inputs is the preferred one for 46 % of the cells, the simpler I&F model with a single click-triggered (dynamic) input is preferred for 14 % of the cells, and the I&F model with constant mean input fits best for 40 % of the cells which did not respond phasically to clicks. Examples of spiking activity across click trains measured by peri-stimulus time histograms (PSTHs) together with the spike rates and estimated click-triggered inputs of the fitted model neurons are shown in Fig. 8D, and distributions of the parameter estimates for the click-triggered inputs are visualized in Fig. 8E,F. It should be noted that the (trial-averaged) PSTHs were not used for parameter estimation, but they allow to conveniently visualize the spiking activity of real and model neurons. The estimated inputs generate spike rates that match well with a range of observed PSTHs.
In cells for which click-triggered excitatory-inhibitory inputs provided the best fits, we found that the values of the estimated input strengths and timescales were strongly correlated between the excitatory and the inhibitory components for each cell (Fig. 8E,F). Visual inspection shows that such balance between excitatory and inhibitory inputs is required to produce strongly biphasic responses to individual clicks seen in the PSTHs. This result is reminiscent of the finding (obtained through intra-cellular voltage-clamp recordings) that excitatory and inhibitory inputs are equalized throughout the population at the level of individual cells in the primary visual cortex [56]. Fitting only spike-trains, our approach therefore uncovers fundamental constraints on synaptic inputs and the local microcircuit without access to the values of the intra-cellular membrane potential.
7. Implementation and computational complexity
We have implemented all three methods for parameter estimation using the Python programming language and applying the libraries Scipy [57] for optimization and Numba [58] for low-level machine acceleration. The code for representative estimation examples from sections 2–5 is available as open source software under a free license at GitHub: https://github.com/neuromethods/inference-for-integrate-and-fire-models. Computation times for example inference problems are summarized in table 1.
Discussion
We presented efficient methods to fit simple integrate-and-fire circuit models to single-trial spike train data, and we evaluated and validated them extensively using in-silico, in-vitro and in-vivo ground truth data. Our approach allows to accurately infer hidden neuronal input statistics and adaptation currents as well as coupling strengths for I&F networks. We demonstrated that (i) the mean and variance of neuronal inputs are well recovered even for relatively short spike trains; (ii) for a sufficient, experimentally plausible number of spikes, weak input perturbations are detected with high sensitivity, (iii) coupling strengths are faithfully estimated even for partially observed (sub-sampled) networks, and (iv) neuronal adaptation strength and timescale are accurately inferred. By applying our methods to suitable electrophysiological datasets, we successfully validated our approach on inference of the statistics for in-vivo-like fluctuating inputs, intrinsic adaptation mechanisms, as well as in-vivo synaptic connectivity. Finally, we showed as a proof of principle that our methods can provide insights about local micro-circuitry using data from extracellular recordings of awake behaving animals.
Related approaches
Previously a small number of likelihood-based methods related to ours have been proposed, considering uncoupled I&F neurons with [59] or without adaptation [28,60,61] for constant [60] or time-varying [28,59,61] input statistics. The methods presented in Refs. [60, 61] only rely on observed spike trains, while those in Refs. [28,59] additionally require the neuronal (mean) input time series to be known. All of these approaches employ the Fokker-Planck equation and numerically calculate the spike train likelihood [60] or use approximations [28, 59, 61]. Therefore, our methods differ from and extend the mentioned approaches in that they allow to efficiently infer, without knowledge of the neuronal input, (i) background input statistics for nonlinear I&F neurons, (ii) synaptic coupling of neuronal networks, and (iii) neuronal adaptation properties.
In the absence of likelihoods, methods for parameter fitting typically involve numerical simulations and distance measures that are defined on possibly multiple features of interest [31–33,62,63]. Evolutionary algorithms [31,32,62], brute-force search [33] or more principled Bayesian techniques [63] are then used to minimize the distances between observed and model-derived features. While these likelihood-free, simulation-based methods can be applied to more complex models they exhibit two disadvantages: the distance measures usually depend on (additional) parameters and their evaluation depends on the particular realization of noise or randomness considered in the model. Optimization can therefore be exceedingly time-consuming.
Estimation of synaptic coupling
Here we directly estimated synaptic coupling strengths for leaky I&F networks with fluctuating external inputs from observed spike trains. Our method is conceptually similar to those presented in [64,65], but does not rely on an approximation of the ISI probability density that assumes vanishing [64] or small [65] amplitudes of input fluctuations (background noise).
We validated our approach first using simulations of network models. Applying our methods to a subset of randomly selected neurons, we found that our approach accurately uncovers the true connections and coupling strengths in spite of co-modulation from unobserved units in the network. We next tested our approach on in-vivo, extracellularly recorded data [35]. Comparison with ground-truth estimates obtained using juxta-cellular stimulations showed that our methods accurately identified the existing connections, although the network activity was highly non-stationary and generated strong co-modulations. Note that in that case, we did not have access to ground truth estimates of coupling strengths, and could therefore only validate the detection of connections.
Alternative approaches to infer connectivity from spike trains have employed phenomenological, generalized linear models [3,35,66], models of sparsely and linearly interacting point processes [67], or have been designed in a model-free manner, for example, using spike train cross-correlations [35, 68]. One of the advantages of our approach is that it includes an explicit (principled) mechanism to account for the effects of unobserved units (network co-modulation) which are condensed in the estimated dynamics of the background mean input for each neuron. This enables to better isolate pairwise interactions from (ubiquitous) fluctuating drive which has the potential to synchronize neurons that lack direct synaptic coupling. Considering its demonstrated high sensitivity to detect elicited weak inputs (cf. Fig. 3D), excellent agreement with (CCG-derived) ground truth (cf. Fig. 5) and superior fitting performance compared to simpler models in a basic setting (cf. Fig. 8A) our mechanistic model approach thus seems promising for inference of couplings in comparison with more phenomenological approaches.
Several related studies have focused on a theoretical link between network structure and correlated spiking activity recorded from a large number of neurons (without attempt to explicitly estimate synaptic connections) [69–73] and [74] for review. Of major relevance in this regard is the extent to which effective interactions among observed neurons are reshaped by coupling to unobserved neurons [75,76]. Current methods to estimate coupling strengths from observed spike trains may be further advanced using these theoretical insights.
Possible methodological extensions
Here we described synaptic interaction by a simple form of delayed current pulses that cause (connection-specific) post-synaptic potentials. A conductance-based model of synaptic coupling could also be considered in principle. For this case the presented methods may be adjusted accordingly using results from [77], but it would generally complicate the calculations in methods 1 and 2.
Throughout this work we assumed that the mean input trajectory across an ISI can be determined using available knowledge (e.g., about the parameters and previous spike times). A useful extension may be to incorporate an additional fluctuating component for the mean input, using a separate stochastic process that governs the evolution of μ(t) (on a slower time scale than the fluctuations ξ(t)), which results in a doubly stochastic model [61]. This could be advantageous for assessing shared variations of the external drive in terms of correlated fluctuating mean input caused from unobserved neurons on the population level. Here we accounted for network co-modulation by estimating the mean input dynamics from instantaneous neuronal spike rates at multiple (chosen) timescales (cf. Results section 4.2). A doubly stochastic model would allow to extract the most appropriate timescale from the data, which in turn could benefit the estimation of synaptic couplings using our mechanistic approach.
An important direction for future work would be to extend our approach to include various forms of synaptic plasticity, such as short-term depression/facilitation and spike-timing-dependent plasticity, and to infer its (additional) parameters from observed spike trains [78–80]. In term, short-term plasticity is particular apparent in in-vivo recordings [35], and including it in our models would be important for estimating coupling strengths.
Towards a quantitative inference of neural circuits from spiking activity
Integrate-and-fire neurons are a popular tool for interpreting spiking activity in terms of simple circuit models (see, e.g., [13–15,17–19]). Such approaches typically start by hypothesizing a structure for the underlying circuit based on available physiological information, and then examine the behavior of the resulting model as a function of the critical biophysical parameters. The model is then validated by qualitatively comparing the model output with experimental data. Specifically, the model activity is required to resemble key features of the experimental data in an extended region of the parameter space. If that is not the case, the model is rejected and a different one is sought.
An important benefit of this approach is that it provides a mechanistic interpretation and understanding of recorded activity in terms of biological parameters in a neural circuit. A major limitation is, however, that it typically relies on a qualitative comparison with the data to select or reject models. The methods presented here open the door to a more quantitative, data-driven approach, in which mechanistic circuit models can be evaluated and compared based on their fitting performance (cf. Figs. 7B and 8A for such comparisons) as is routinely the case for more abstract statistical models (see, e.g., [4]).
Materials and Methods
1. Neuron and network models
1.1 Integrate-and-fire neuron models
We consider typical I&F models subject to a fluctuating input. The dynamics of the membrane voltage V are governed by where μ is the mean input, σ the standard deviation of the input, ξ a (unit) Gaussian white noise process, i.e., 〈ξ(t)ξ(t + τ)〉 = δ(τ) with expectation 〈·〉, VS is the threshold (or spike) voltage and VΓ the reset voltage. For the leaky I&F model the function f is given by where τm denotes the membrane time constant, whereas for the exponential I&F model f is defined by where ΔT is the threshold slope factor and VT denotes the effective threshold voltage. The exponential term in Eq. (12) effectively approximates the rapidly increasing Na+ current at spike initiation [38] and yields an improved fit to intracellular measurements of current-voltage relationships (typically obtained in-vitro) [7,11]. For the exponential I&F model VS does not play an important role as long as it is sufficiently larger than the effective threshold VT. In fact, when V increases beyond VT, it diverges to infinity in finite time due to the exponential term, which defines a spike. In practice, however, the spike is said to occur when V reaches VS. It should be noted that for the methods used in this paper f can be any arbitrary (well-behaved) real-valued function.
The parameter values were VS = −40 mV, Vr = −70 mV, τm = 20 ms, ΔT = 1.5 mV, VT = −50 mV, μ = −1.75 mV/ms, if not stated otherwise in figures or captions.
1.2 Voltage scaling
It is not meaningful to estimate all model parameters: a change of Vs or Vr in the leaky I&F model can be completely compensated in terms of spiking dynamics (in particular, the ISI density pISI) by appropriate changes of μ and σ; similarly, a change of VT or ΔT in the exponential I&F model can be completely compensated by appropriate changes of μ, σ, Vr and VS. This can be seen using the change of variables for the leaky I&F model and for the exponential I&F model model. Consequently, we may restrict the estimation to μ, σ, τm (leaky I&F model), and additionally Vr (exponential I&F model) and set the remaining parameters to reasonable values.
1.3 Input perturbations
In Results section 3 we consider input perturbations of the form μ(t) = μ0 + Jμ1(t) (cf. Eq. (5)) with μ1(t) given by the superposition of alpha functions with time constant τ, triggered at times , with Heaviside step function H. The alpha functions are normalized such that their maximum value is 1 (when considered in isolation). The perturbation onset (trigger) times were generated by randomly sampling successive separation intervals from a Gaussian distribution with 200 ms mean and 50 ms standard deviation.
1.4 Network model
In Results section 4 we consider networks of Ntot coupled leaky I&F neurons from which the spike trains of N ≤ Ntot neurons have been observed. These networks are given by for i ∈ {1, …, Ntot}, where Ji,j denotes the coupling strength between pre-synaptic neuron j and post-synaptic neuron is the k-th of Ki spike times of neuron i, and d is the delay which we set to 1 ms. ηi describes the fluctuations of external input received from unobserved neurons, where ξi, ξc are independent unit Gaussian white noise processes, i.e., 〈ξi(t)ξj(t + τ)} = δijδ(τ), i, j ∈ {1, …, Ntot, c}, and c is the input correlation coefficient. We exclude autapses, i.e., Ji,i = 0, and consider uncorrelated or weakly correlated external input fluctuations, 0 ≤ c ≤ 0.1. Note that the input variation for neuron i caused by neuron j across the interval , denoted by (as used in Eq. (8)), is determined by the (observed) spike times of neuron j that occur in the interval . In Results section 4.1 the mean input μj(t) was assumed constant, whereas in section 4.2 it varied between ISIs.
The (logarithmized) spike train likelihood (8) was optimized in the following way, justified by the assumption of (reasonably) weak coupling: first, the parameters for the background input were estimated for each neuron in isolation (all Ji,j = 0); then, the coupling strength Ji,j was estimated given μi(t) and σi for each i, j - pair.
Network simulations for Figs. 4F,G were performed using the Python-based Brian2 simulator [81]. A discrimination threshold Jthresh for the presence/absence of connections was applied to estimated coupling strengths . Accordingly, the presence of a connection (i, j - pair) was assured by the condition . The true positive rate (sensitivity) was given by the number TP of connections for which the estimation satisfied and a true connection was present (|Ji,j| > 0), divided by the number P of true connections. The true negative rate (specificity) was given by the number TN of connections for which and a true connection was absent (Ji,j = 0), divided by the number N of absent connections. Receiver operating characteristic (ROC) curves were generated from sensitivity and specificity as a function of Jthresh. Accuracy (ACC) and balanced accuracy (BACC) are defined as ACC = (TP + TN)/(P + N), BACC = (TP/P + TN/N)/2. The value of Jthresh used in Fig. 4F corresponds to the maximal BACC.
1.5 Spike rate adaptation
In Results section 5 we consider an extended I&F neuron model that includes an additional adaptation (current) variable w that is incremented at spike times, slowly decays, and counteracts the input to the neuron [39,40]: Eqs. (9) and (10) where the mean input μ(t) is replaced by an effective mean input μ(t) – w(t), with τw is the adaptation time constant and Δw denotes the spike-triggered increment.
For known spike times (contained in set D) the effective mean input can be written as μ(t) – Δw μ1(t|D, τw), where μ1 between spike times tk and tk+1 is explicitly expressed by t ∈ [tk,tk+1], with Heaviside step function H, assuming the adaptation current just prior to the first spike is zero, . This means, for given parameters μ, Δw, τw the effective mean input time series is determined by the observed spike train (up to tk). Note, that in general the mean input perturbations caused by adaptation vary from spike to spike, μ1(tk |D,τw) ≠ μ1(tl|D,τw) for tk ≠ tl ∈ D. To efficiently evaluate the likelihood p(D|θ) using Eqs. (3) and (4) we calculate pISI(s|μISI[0, s], θ) with μISI(s) = μ(s) – w0 exp(−s/τw), s ≥ 0 for a reasonable range of values for w0 and interpolate to obtain pISI(sk |μISI[0, sk], θ) with μISI[0, sk] = μ[tk, tk+1] – Δw μ1 [tk, tk+1] using Eq. (20).
2. Method 1: calculation of ISI density
Given a spike at t = t0 the probability density of the next spike time is equal to the ISI probability density pISI(s) where s:= t – t0 ≥ 0 denotes the time since the last spike. This quantity can be approximated by numerical simulation in an intuitive way: starting with initial condition V(t0) = Vr one follows the neuronal dynamics given by Eq. (9) in each of n realizations (of the noise process) until the membrane voltage crosses the value Vs and records that spike time ti (i-th realization). The set of times {ti} can then be used to compute pISI, where the approximation error decreases as n increases. Fortunately, we can calculate pISI analytically in the limit n ⊒ ∞ by solving the Fokker-Planck partial differential equation (PDE) [82,83] that governs the dynamics of the membrane voltage probability density pV(V, s), with mean input μISI(s) = μ(t) (μISI(s) = μ(t) – w(t) in case of the adaptive I&F model, cf. Methods section 1.5), subject to the initial and boundary conditions
The ISI probability density is then given by the probability flux at Vs,
In the field of probability theory pISI is also known as first passage time density.
2.1 Method 1a: numerical solution based on Fourier transform
The method described below is inspired by [41] and provides a solution of Eqs. (21)–(25) for constant mean input or small amplitude variations of it through a perturbative approach. It extends the technique proposed in [41] to the case of time-varying mean input within the ISI, and can be adjusted for small amplitude variations of other parameters in a straightforward way.
We consider with small |J| according to Eq. (5). The solution of the first passage time system to first order in J can be expressed as . We insert this in the Fokker-Planck system and neglect terms of order > 1 in J. The resulting system is then Fourier-transformed over time using separation of variables, pV(V, s) = x(V)y(s), such that , with Fourier transform and the inverse transform defined by where ω denotes angular frequency. This yields the following two (coupled) systems, one for the steady-state solution , subject to and one for , with function , subject to
The ISI density (in the frequency domain) is then given by
We solve the linear ordinary differential equations (boundary value problems) (28)–(34) for each fixed frequency ω by splitting the solutions, and analogously for . The components and respectively solve Eqs. (28)–(29) with and at V = VS and . The components and solve Eqs. (32)–(33) with and at V = VS. These solution components can be conveniently computed by backward integration from Vs to a sufficiently small lower bound Vlb < Vr. We then obtain and by satisfying the reflecting boundary conditions (in (30) and (34)):
The ISI density (in the time domain) is finally calculated by the inverse transform, using Eqs. (35) and (37).
In practice, we first solve the steady-state system (28)–(31), evaluate the function which appears in Eq. (33) and then solve the system for the change in ISI density due to the perturbation, (32)–(34). Note that knowledge of for s ≥ 0 is required to calculate . If the input perturbations are given by delta pulses (as for the network in Results section 4) the calculation of is greatly simplified; e.g., for a pulse at we have .
2.2 Method 1b: numerical solution based on finite volume discretization
This method employs a recently developed finite volume numerical scheme with implicit time discretization and Scharfetter-Gummel flux approximation, adapted from [42] for the first passage time problem. It provides an accurate solution of Eqs. (21)–(25) for arbitrary variations of the mean input. In brief, we first discretize the domain [Vlb, VS] into NV equidistant grid cells with centers Vm, m ∈ {1, …, NV}, V1 < V2 < … < VNv, where and are the out-most cell borders. Within each cell the numerical approximation of pV(V, s) is assumed to be constant and corresponds to the average value denoted by pV(Vm, s). Integrating Eq. (21) over the volume of cell m, and applying the divergence theorem, yields where ΔV = V2 – V1. To solve Eq. (38) forward in time (represented by the ISI variable s) the fluxes at the borders of each cell are approximated using the first order Scharfetter-Gummel flux [84], where and denote the drift and diffusion coefficients, respectively.
For the time discretization we rewrite Eq. (38) (with Eq. (39)) in vectorized form and approximate the involved time derivative as first order backward difference to ensure numerical stability. This yields in each time step of length Δs a linear system for the vector pn+1 of probability density values at sn+1, given the values pn at the previous time step sn, with vector elements , where I is the identity matrix and is a tridiagonal matrix that contains the discretization of the membrane voltage (cf. Eqs. (38), (39)), including the absorbing and reflecting boundary conditions (Eqs. (24) and (25)).
The ISI density, Eq. (26), in this representation is obtained by evaluating the flux, Eq. (39), at the spike voltage Vs, taking into account the absorbing boundary condition, Eq. (24), and introducing an auxiliary ghost cell [85] with center VNv+1, which yields
For additional details we refer to [42] (incl. supplemental material therein). Note that this method also allows for the variation of other parameters (in addition to the mean input) within the ISI. Naturally, the finite volume scheme can also be used as an alternative to the Fourier-based technique for computing and in method 1a (using small amplitude variations of the mean input, cf. Eqs. (5) and (6)), which may be computationally more efficient in some cases; a comparison is provided at https://github.com/neuromethods/inference-for-integrate-and-fire-models.
3. Method 2: derived spike rate model
Method 2 requires the (instantaneous) spike rate r(t) of the model neuron described by Eqs. (9) and (10), which can be calculated by solving a Fokker-Planck system similar to Eqs. (21)–(25): subject to the conditions where Eq. (44) accounts for the reset condition (10). The steady-state solution of this system (for constant mean input) can be conveniently calculated [41]. To obtain the time-varying solution of Eqs. (42)–(44) is computationally more demanding and can be achieved, e.g., using a finite volume method as described in the previous section (see [42]).
As an efficient alternative reduced models have been developed which approximate the spike rate dynamics of this Fokker-Planck system by a low-dimensional ODE that can be solved much faster [42–44, 86]. Here we employ a simple yet accurate reduced model from [42] (the LNexp model, based on [43]) adapted for leaky I&F neurons with constant input variance σ2. This model is derived via a linear-nonlinear cascade ansatz, where the mean input is first linearly filtered and then passed though a nonlinear function to yield the spike rate. Both components are determined from the Fokker-Planck system and can be conveniently calculated without having to solve Eqs. (42)–(44) forward in time: the linear temporal filter is obtained from the first order spike rate response to small amplitude modulations of the mean input and the nonlinearity is obtained from the steady-state solution [42, 43]. The filter is approximated by an exponential function and adapted to the input in order to allow for large deviations of μ. This yields a one-dimensional ODE for the filter application, where μf is the filtered mean input and τμ is the (state dependent) time constant. The spike rate is given by the steady-state spike rate of the Fokker-Planck system evaluated at μ = μf,
In order to efficiently simulate this model we pre-calculate τμ and r∞ for a reasonable range of mean input values and use look-up tables during time integration. We would like to remark that this model is based on the derivation in [43] with filter approximation scheme proposed in [42] which leads to improved accuracy of spike rate reproduction for the sensitive low input regime [42]. For a given mean input time series μ[t0,t] we calculate r(t|μ[t0,t], θ) using the initial condition μf (t0) = μ(t0).
4. Likelihood maximization
We maximized the logarithm of the likelihood (log-likelihood), for individual neurons (where we have used Eq. (3)) and similarly for networks (using the logarithm in Eq. (8)). Optimization was performed using a simplex algorithm [87] as implemented in the Scipy package for Python. It should be noted that our method is not restricted to this algorithm, other (e.g., gradient-based) optimization techniques may also be applied.
5. Fisher information per ISI
To quantify how well the parameters can be estimated we calculate the Fisher information per ISI for parameter θ (component of θ) defined by
In case of a single (non-adapting) model neuron with constant input moments the Fisher information for spike trains with K spikes is given by due to additivity. In this case we can analytically calculate the Cramer-Rao bound by , which limits the variance of any unbiased estimator of θ from below. A maximum likelihood estimator is known to achieve this bound as the sample size grows large (i.e., K → ∞).
6. Detection of input perturbations
We quantified the sensitivity to detect weak input perturbations using our estimation methods (1a and 2) in comparison with a detection method based on the generated data only. For a given parametrization Nr spike trains were simulated using different realizations of neuronal input noise and perturbation onset (trigger) times. Detection sensitivity based on the estimation methods was assessed by the fraction of Nr = 50 estimates of J for true J > 0 (J < 0) that exceeded the 95 %-ile (fell below the 5 %-ile) of estimates without perturbation (i.e., J = 0).
The data-driven reference method was based on CCGs between the spike trains and perturbation times (in other words, spike density curves aligned to perturbation onset times). For each of Nr = 300 realizations one such curve was calculated by the differences between spike times and the perturbation onset times using a Gaussian kernel with 3 ms standard deviation (kernel density estimation). Detection sensitivity was assessed by the fraction of spike density curves for which a significant peak (for J > 0) or trough (for J < 0) appeared in the interval [0, 100 ms]. Significance was achieved for true J > 0 (J < 0) if the curve maximum (minimum) exceeded the 95 %-ile (fell below the 5 %-ile) of maxima (minima) without perturbation in that interval.
7. Fitting I&F neurons to spike trains from electrophysiological recordings
7.1 Estimation of neuronal input statistics using in-vitro ground truth data
We used somatic whole-cell current clamp recordings from primary somatosensory cortex in acute brain slices (for details see [34]). Layer 5 PYRs were recorded in wild-type mice [34], fast-spiking layer 5 INTs were selected among the fluorescing cells of a GAD67-GFP transgenic line [88]. Only cells with an access resistance ≤25 MΩ (PYR: 18.3±1.5 MΩ, n = 7; INT: 19.5±4.0 MΩ, n = 6) and a drift in the resting membrane potential ≤7.5 mV (PYR: 3.2±3.0 mV, n = 7; INT: 3.1±3.7 mV, n = 6) throughout the recording were retained for further analysis. Seven PYRs and six INTs were stimulated with a fluctuating current I(t) generated according to an Ornstein-Uhlenbeck process, where τI denotes the correlation time, μI and σI are the mean and standard deviation of the stationary normal distribution, i.e., , and ξ is a unit Gaussian white noise process. Somatic current injections lasted 5 s and were separated by inter-stimulus intervals of at least 25 s. Different values for μI and σI were used and each combination was repeated three times. The correlation time was set to 3 ms. Spike times were defined by the time at which the membrane voltage crossed 0 mV from below, which was consistent with a large depolarization rate dV/dt > 10 mV/ms [34]. An absolute refractory period of 3 ms was assumed.
For each neuron we fitted a leaky I&F model with and without adaptation (cf. Methods sections 1.1 and 1.4). Note that the injected current I(t) can be well approximated by a Gaussian white noise process as considered in our model because of the small correlation time τI. In Results section 2 we estimated the input parameters μ and σ for nonadaptive model neurons from each 5 s-long spike train recording as well as from each combined 3×5 s-long recording (using the three repetitions with identical stimulus parameters which effectively yielded 15 s long stimuli). To exclude onset transients (i.e., increased spike rate upon stimulus onset) we used the central 90% of ISIs for each stimulus, ensuring that ISIs lasted > 5 ms. In Results section 5 we additionally estimated the adaptation parameters Δw and τw per neuron across all available stimuli in the combined 15 s stimulus setting. Here we used all ISIs (including the short ones at stimulus onset) in order to unmask adaptation effects. Parameter estimation was accomplished using methods 1a and 1b. To compare the quality of the two models and avoid over-fitting we used the Akaike information criterion (AIC, [36,89]), given by 2Nθ – maxθ logp(D|θ), where Nθ denotes the number of estimated parameters for a particular model. The preferred model from a set of candidate models is the one with the smallest AIC value.
7.2 Estimation of synaptic connections using in-vivo ground truth data
We used combined juxtacellular-extracellular recordings of neuronal ensembles from the hippocampal CA1 region in awake mice (for details see [35]). Neurons were separated into PYRs and INTs according to their spiking statistics. Spikes were evoked in single PYRs by short current pulses (50-100 ms) applied at intervals of variable length using juxtacellular electrodes while recording extracellular spikes of local INTs. PYR spikes which occurred during a stimulus were considered as evoked, and those which occurred at all other times were considered as spontaneous. All spikes that occurred during sharp-wave ripple events were discarded from the analyses, and we only considered INTs that fired at least 3 spikes/s on average. A total of 78 PYR-INT pairs were included for estimation of synaptic couplings.
For each INT we considered a leaky I&F neuron receiving background input and (potential) synaptic input from the recorded PYR such that each presynaptic spike causes a delayed (with delay d) postsynaptic potential of size J: where tk denotes the k-th spike time of K PYR spikes (cf. Methods section 1.4). To account for changes in background input statistics over the recording duration (which lasted up to ~2h) and to reflect low-frequency network co-modulation induced by common network drive the background mean input was allowed to vary over time. The parameters to be estimated are thus μ(t), J, d and σ. Estimation consisted of three steps. First, we inferred the statistics μ(t) and σ of background inputs (described by a non-stationary stochastic process) for J = 0 in the following way. We computed the empirical instantaneous spike rate r(t) of the INT from the observed spike train via kernel density estimation using a Gaussian kernel with width σG ∈ {0.1, 0.5,1} s. The estimated empirical spike rate varies over time much slower than the timescale at which changes of mean input translate to changes of spike rate in the I&F model. This justifies the approximation r(t) ≈ r∞(μ(t)) (cf. methods section 3), which allowed us to efficiently evaluate the spike train likelihood for fixed σ by applying method 1a with mean input assumed constant within each ISI, given by μ(t) = 1(r(t)) (at the center between consecutive spike times). The likelihood was then maximized with respect to σ. Given the parameters for the background inputs (one value of μ per ISI and one for σ) we next maximized the likelihood of the (full) model in the second step with respect to J and d using method 1a. In the third step we assessed the significance of synaptic coupling estimates using pseudo data. We perturbed the presynaptic spike times by a small temporal jitter (random values between -5 and +5 ms) and (re-)estimated J and d. This was repeated 100 times and z-scores were computed from the estimated coupling strengths. Notably, since spike times are shifted by only small values, effects due to network co-modulation (which occurs on a slower timescale) are preserved in the pseudo data. In this way we obtained a coupling strength z-score for each PYR-INT pair and for each of the three values of σG. In addition, we combined these results and computed a “combined timescale” estimate as the largest absolute z-score across the three timescales (σG values) for each connection.
We validated our results against ground-truth data obtained from juxtacellular evoked activity using a model-free method based on spike train CCGs [35]. (Mono)synaptic connections were assumed to produce excess synchrony above baseline co-modulation in a short interval following PYR spikes. To generate estimated ground truth connection labels a CCG (0.4 ms binning) was computed for each PYR-INT pair using the evoked PYR spikes. For positive labels the peak of the CCG in the interval [0.8, 2.8] ms needed to exceed that from the slowly co-modulated baseline, and it needed to be significantly larger than the largest peak in the anticausal direction (short negative lags). The lower frequency baseline was computed by convolving the observed CCG with a “partially hollow” Gaussian kernel, with a standard deviation of 10 ms and a hollow fraction of 60%. We estimated the probability of obtaining a spike count sc of n as observed (or higher) in the mth time lag within [0.8, 2.8] ms of the CCG, given the expected, low frequency baseline rate λs(m) using the Poisson distribution with a continuity correction,
Similarly, we estimated the probability of obtaining the observed spike count n (or higher) in the mth time lag within [0.8, 2.8] ms of the CCG as expected from the maximum rate λa across negative lags within [−2, 0] ms using the Poisson distribution with a continuity correction,
Connections were labeled as synapses if Pfast < 0.001 and Pcausal < 0.0026 for all (binned) lags in [0.8, 2.8] ms, according to the rigorous criterion defined in [35].
Based on these labels we computed ROC curves as well as ACC and BACC (cf. methods section 1.4) using a classification (z-score) threshold value . Accordingly, the presence of an estimated connection was assured by the condition , where denotes the connection strength (z-score) estimate for a given PYR-INT pair. Note, that the ground truth labels indicate positive excitatory connections (positives) and absent connections (negatives).
To test the validity of our approach we estimated connectivity using only the first evoked PYR spikes of each stimulation pulse (which are maximally decoupled from network co-modulation) and compared the results with the ground truth labels. This assessment yielded excellent agreement, with ACC and BACC values of up to 0.97 and 0.95, respectively (for σG = 0.1 s).
7.3 Estimation of hidden neuronal inputs using data from awake animals
We further used single unit spike trains from extracellular recordings of two adult female ferrets in different behavioral conditions. The animals were either passively listening or actively discriminating click trains of different rates. Each stimulus trial contained a period of silence lasting 0.4 s and a periodic click train (with sound level 70 dB SPL) over a duration of 0.75 s. Neural activity from primary auditory cortex was recorded using a 24 channel electrode and spike sorted using an automatic clustering algorithm followed by a manual adjustment of the clusters (for details see [53]: click rate discrimination task with spike sorting performed on the pre-passive and active sessions). Spike trains with > 50 ISIs during silence periods were considered for model fitting. 71 single units (out of 82 in total) passed that threshold in each of the two behavioral conditions.
Model neurons were fit in either behavioral condition separately (resulting in 142 sets of estimated parameters). We employed the leaky I&F model (Eqs. (9), (10)) with μ(t) = μ0 + Jeμe(t) + Jiμi(t), Je ≤ 0, Ji < 0, where μe(t), μi(t) are given by the superposition of alpha functions with time constants τe, τi, respectively, triggered at the click times (cf. Eq. (13)). The parameters of the background input (μ0 and σ) were first estimated from baseline spike train data using method 1a with Je = Ji = 0. For robust estimation we used the central 95% of ISIs, ensuring that ISIs lasted > 2.5 ms. The parameters of the click-triggered inputs (Je, τe, Ji and τi) were then estimated from the data during click train periods using method 2, where we omitted the first click to exclude transients related to the noise stimulus that immediately preceded the click period. Specifically, we minimized — logp(D|θ) + J2 + J2, i.e., the negative log-likelihood plus a quadratic regularization term to prevent solutions with large excitatory and inhibitory inputs that cancel each other. Beforehand we re-estimated μ0 from baseline data using method 2 (with pre-determined σ) to avoid a potential bias caused by the switch between estimation methods. Method 2 was used instead of method 1 in order to correctly estimate potentially strong click-triggered inputs in a computationally efficient way.
For comparison we considered three simpler models: a Poisson process with constant rate for the baseline setting, an I&F model with constant mean input μ(t) = μ0 + Δμ for the click periods, and an I&F model with mean input μ(t) = μ0 + Jμ1(t), where μ1(t) is given by the superposition of alpha functions with time constant τ and latency d, triggered at the click times (i.e., using Eq. (13) with click time replaced by ). Parameter estimation for these models was performed using method 2 (without regularization). To compare the quality of the models we used the AIC.
Acknowledgments
This work was supported by Deutsche Forschungsgemeinschaft in the framework of Collaborative Research Center 910, the Programme Emergences of the City of Paris, ANR project MORSE (ANR-16-CE37-0016), and the program “Investissements d’Avenir” launched by the French Government and implemented by the ANR, with the references ANR-10-LABX-0087 IEC and ANR-11-IDEX-0001-02 PSL* Research University. The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.
References
- 1.↵
- 2.
- 3.↵
- 4.↵
- 5.↵
- 6.↵
- 7.↵
- 8.↵
- 9.↵
- 10.↵
- 11.↵
- 12.↵
- 13.↵
- 14.
- 15.↵
- 16.
- 17.↵
- 18.
- 19.↵
- 20.↵
- 21.
- 22.
- 23.
- 24.↵
- 25.↵
- 26.
- 27.↵
- 28.↵
- 29.
- 30.↵
- 31.↵
- 32.↵
- 33.↵
- 34.↵
- 35.↵
- 36.↵
- 37.↵
- 38.↵
- 39.↵
- 40.↵
- 41.↵
- 42.↵
- 43.↵
- 44.↵
- 45.↵
- 46.↵
- 47.↵
- 48.↵
- 49.↵
- 50.
- 51.↵
- 52.↵
- 53.↵
- 54.↵
- 55.↵
- 56.↵
- 57.↵
- 58.↵
- 59.↵
- 60.↵
- 61.↵
- 62.↵
- 63.↵
- 64.↵
- 65.↵
- 66.↵
- 67.↵
- 68.↵
- 69.↵
- 70.
- 71.
- 72.
- 73.↵
- 74.↵
- 75.↵
- 76.↵
- 77.↵
- 78.↵
- 79.
- 80.↵
- 81.↵
- 82.↵
- 83.↵
- 84.↵
- 85.↵
- 86.↵
- 87.↵
- 88.↵
- 89.↵