dataesr/scientific-paragraphs-categorization huggingface dataset:
To mitigate this issue, we subtract min(σ 2 , λ min ) instead of σ 2 , where λ min is the smallest eigenvalue of the Toepliz autocorrelation matrix. The right-hand side is the overlap between the kernel K and its delayed version K (t) = K(t + l∆t). We can normalize both terms to 1 for l = 0, and use a least square fit to estimate K. Lastly, the spike amplitude a and frequency ν can be deduced from the following equations, that hold under the model assumption: < F >= aν∆t i K [i∆t] < F 2 > -< F > 2 = a 2 ν∆t i K [i∆t] 2 (32) Although they yield very good results for synthetic datasets, these estimators can fail in several frequently encountered situations in practice: • When the neural activity is not sparse, we do not expect b to be the most frequent fluorescence value. An error in the estimation of b can result in a misestimation of σ as well.
We also demonstrate super-resolution capabilities for a wide range of experimental conditions. In Section II C , we apply BSD to the SpikeFinder contest, a collection of joint electrophysiological and fluorescence recordings. We show that i) our choice of sparsity prior outperforms others ii) the kernel inference is accurate, allows robust performance even in the absence of training data and can improve spike detection performance when interneuron variability is important. iii) the predicted temporal errors are consistent with empirical errors and that integrating it into the prediction can improve spike detection. iv) super-resolution significantly increases the temporal accuracy for some datasets. Overall, our best submission is competitive across all datasets with state-ofthe-art Machine Learning algorithms, while not requiring any training data or hyperparameter fine-tuning.
In particular, if the noise level is underestimated by con-oopsi, the error constraint is tighter and adding the positivity constraint may lead to no solutions at all -yielding many iterations in vain and increased computational time, see Table  I. This reflects in the fact that the computing time is largely dependent on whether or not the noise level is provided. Notice that the exact gain in speed depends on which version of con-oopsi is used (here, Matlab implementation, con-oopsi version of Dec. 2015, with cvx). Although we did not test the PAVA optimizer  [17] , we expect a gain of the same order of magnitude between constrained-PAVA and BSD-like PAVA. Such a difference in computation load may prove highly beneficial for real-time inference in high data-throughput recordings, as illustrated in Section II-D.
However, most real datasets feature bursts of spikes, temporally correlated noise, artifacts, limited spike counts and low signal-to-noise ratio. Under these conditions, Eqn. 31 becomes incorrect. We thus build a more realistic collection of synthetic fluorescence traces as follows: for each recording of the SpikeFinder dataset (see next section), we generate five synthetic fluorescence recordings according to the generative model of Eqn. 1 using the actual spike train measured by electrophysiology and the rise and decay time constants and signal-to-noise ratio inferred from the recording (see next section). This synthetic dataset has diverse spike counts, signal-to-noise ratios, sampling rates, kernel parameters and spiking patterns. We jointly infer the spike trains and kernel parameters using either BSD or adaptive BSD (iterative parameter estimation).
Super-resolution Figure  4a  shows an example of reconstruction of a signal generated at f 0 = 20Hz, and sampled at 5Hz. We observe a good agreement with the original spike train. In particular, it appears that in spite of the sparse sampling, the onsets of the green and dark curves transients are very close to one another. We test our algorithm on synthetic datasets generated using the model Eqn. 39 at f 0 = 500Hz, with τ r = 0. 1, τ d = 0. 5, spike frequency ν = 2Hz. The fluorescence signal is down sampled to recording frequencies ranging from f = 1 Hz to 500Hz. Spike trains are inferred with and without super-resolution. For super-resolution, we use a frequency gain s = f0 f in order to reconstruct a spike train at the original frequency f 0. We perform the spike inference for various sampling frequencies and noise levels, and we estimate the point spread function of the inferred spike train (i.
codeneuro. org/) [32]  is a public contest for spikes train inference from calcium recordings. It consists of a compilation of 10 datasets of joint electrophysiological and calcium recordings from mouse V1 or retina, for six different calcium probes (OGB-1,GCaMP5k,GCaMP6s,GCaMP6f, jRCaMP1a,jRGECO1a) at various sampling rate, see Table  II. The data was compiled from various sources  [14, 31, 33, 34]. All the recordings are upsampled to f = 100Hz, and the metric used to assess performance is the correlation between the inferred spike train and the electrophysiological spike train, computed after downsampling at 20Hz. Dozens of algorithms based on Supervised Machine Learning, generative models and others have been benchmarked on SpikeFinder, and the results are publicy available. We benchmark several inference algorithms and postprocessing variants on the SpikeFinder dataset using the following pipeline: • Preprocessing.
For all datasets, we started from the raw data, before upsampling or detrending. Indeed, when the fluorescence is upsampled, the noise becomes temporally correlated between time frames and the white noise assumption used to compute the sparsity prior λ is violated. Then, each fluorescence recording is normalized (zero mean and unit variance). The variable component of the baseline is further removed by substracting a moving percentile (quantile q = 0. 15, variable window size ∈ [10s, 60s] adjusted by validation). Such baseline slow modulations are unrelated to the calcium signal but reflect experimental artefact such as photobleaching or minute axial motions of the specimen. • Initial values of rise and decay time. We tested four initialization procedures: Blind: no information is provided and the automated initial kernel estimation described in Section I E 1 is used; Literature parameters are taken from the literature, see values and sources in Supplementary Table  VI ; Ground Truth for each recording, we compute ground truth rise and decay time constants by temporal regression of the fluorescence from the true spikes, see Section I G 3.
Train Set for each dataset, we use the median values of the ground truth rise and decay time as initial values, see values in Table  II. We also use the minimum and maximum values found in the dataset as bounds for adaptive BSD. Note that the ground-truth initialization is not a valid algorithm as it requires prior knowledge of the spikes for each neuron. We thys only use it as a reference for validating the kernel inference and as an upper bound of performance. • Inference Algorithm We tested four sparse deconvolution variants: non-negative deconvolution (i. e. with λ = 0), con-oopsi, BSD and adaptive BSD. • Postprocessing. The inferred signal is upsampled to 100Hz by linear interpolation, and we add a temporal offset (adjusted on the training set). it is mostly relevant for datasets 3 and 5 to account for a delay between the fluorescence time and electrophysiological time, in agreement with other submissions  [32].
Then, the inferred spike is optionally convolved with the point-spread function computed in Section I D 2, using the parameters inferred from the recording. This can be viewed as a poor man (but computationally efficient) version of posterior averaging: one first computes the most likely spike train given the fluorescence using BSD, and then convolve it with the point-spread function (PSF) to account for the temporal uncertainty, see examples in Fig. 6  Quantitative results are displayed in Table  III  and selected examples are shown in Figure  6. II ; Ground-truth = using different parameters for each neuron, derived using the knowledge of the spike positions. The best score for each dataset and configuration is indicated in bold Sparsity prior. As expected, introducing a sparsity prior reduces the false detection rate (see Figure  6 ) and significantly improves the correlation regardless of the kernel choice.
At fixed kernel parameters, BSD and con-oopsi are virtually equivalent but the former is faster. Dataset Kernel Inference. When no training data is available, adaptive kernel inference is critical for performance as was found in the simulated data. Even when training data is available, adaptive kernel inference is always equivalent or better to using fixed kernels derived from training data as it takes into account inter-neuron variability. The most important gains is found for dataset 8, where non-linear effects result in large variability of decay rates. The quantitative results are corroborated by Figure  7 , which compares the rise and decay time constants and transient amplitude a inferred by the blind algorithm with their ground truth counterparts. Adaptive BSD successfully captures the rise and decay time constants variability both across experiments, and across neurons in a given experiment, notably for dataset 8 where the decay time can vary by more than two-fold.
When the training data is of low quality as for data sets 3 and 5, blind inference actually outperforms the ground-truth. Importantly, although our best submission was obtained with the train set initial value, the blind and literature initialization follow closely: BSD almost does not require any training data. We note however that the correlations are slightly smaller than the values found using synthetic data with similar parameters (see Figure  3 ). This can be explained by artifacts, temporally correlated noise and non-linear effects. The inferred transient amplitudes also correlate with the ground-truth values, but less accurately. For the OGB-1 datasets, which have low signal-to-noise ratio, a is systematically overestimated because the algorithm frequently misses isolated spikes and can only detect bursts of consecutive spikes, see Figure  6 panel (c) ; it therefore confuses the latter with individual spikes.
Such confusion is expected and inevitable: for instance, in dataset 4, only bursts of more than 10 spikes produce visually detectable transients. For dataset 8 (GCaMP6s), we find conversely that some transients amplitudes are largely underestimated, because the algorithm infers many small (but above threshold) spurious spikes due to artifacts or non-linear effects, and confuses them with real spikes. Temporal resolution. We assess the temporal accuracy of the algorithms as follows: for each recording, we computed the empirical point-spread function (PSF) between the ground-truth spikes and the inferred spikes using Eqn. 45. An average PSF is then computed for each dataset by weighted average of the PSFs (normalized to max = 1, then weighted by the number of spikes). We also predicted for each dataset a theoretical Point-Spread Function, using Eqn.
29 and either the parameters of Table  II  or the parameters inferred by BSD for each recording. Results are shown in Table  IV  and Figure  8. Empirical PSF and the fluorescence kernel for the last five datasets are displayed in Figure  8. The PSF have smaller width than the kernel, i. e. the temporal resolution is significantly improved by deconvolution; it is in general of order ∆t (the inter-frame period) rather than τ d (the calcium reporter decay time), see Table  II. The results hold even in the absence of information about the kernel: in most datasets, the temporal resolution of blind adaptive BSD is very close if not equal to the one of BSD with ground-truth kernel parameters. Importantly, we find an excellent overall agreement between the empirical PSF and the predicted one using the train set parameters: except for datasets 3 and 5 which have unreliable ground-truth, the predicted widths are notably more accurate than naive estimates such as the rise time τ r or the sampling rate ∆t.
The prediction is overly pessimistic for dataset 4 because the PSF is computed for an isolated spikes, whereas only spike bursts are detected in practice. The offsets are accurate for datasets 6-10 but not for datasets 1-5, probably due to delays between the electrophysiological and fluorescence recordings. When the inferred parameters are used, the prediction is less accurate owing to the difficulty to estimate the signal-to-noise ratio for single spikes. Interestingly, we found that convolving the inferred spike train with the point-spread function computed using the inferred parameters significantly improves the accuracy for all algorithms and kernel initializations for the first five datasets, and has little to no impact for the last five datasets. Indeed at low signal-to-noise ratio, fluorescence transients may appear in advance (Fig.
6 b ) or delayed (Fig. 6 c ) with respect to the action potential and the corresponding point-spread function spans across several time windows. In contrast, datasets 6,7,8,10 have higher signal-to-noise ratio, hence thinner point-spread function (see Fig. 6 (d)  ) and convolution does not change significantly the prediction at 20Hz. The small performance drop for dataset 8 can be explained by the overall underestimation of the signal-to-noise ratio. Super-resolution We tested super-resolution for the datasets 6-10 which have the largest signal-to-noise ratios. The same pipeline is used, but BSD is applied with super-resolution upsamplings factors of 2 (datasets 6,7,8), 6 (dataset 9) and 3 (dataset 10). Figure  8  shows for each dataset the empirical point-spread function of the inferred spikes with (yellow) and without (red) super-resolution.
Super-resolution reduces both the offset and the width of the point-spread function for all datasets, see Table  IV. The most significant improvement is for dataset 9, which has high a signal-to-noise ratio and a relatively low sampling rate. Overall, super-resolution is relevant when the main source of temporal error is the sampling rate rather than the noise level. Comparison with other submissions Our algorithm compares positively with other algorithms that have been tested during the competition. According to the current leaderboard, it performs similarly as Team 6 (OASIS  [17] ), and is above Team 7 (Suite2p  [35] ) of the original contest. Both teams also used a non-negative deconvolution framework, followed by a reconvolution by a PSF-like kernel. Both teams used the training set to determine hyperparameter values: Team 6 for the convolution kernel, sparsity prior and PSF and Team 7 for the convolution kernel and the PSF; for Team 7 the sparsity prior λ = 0 was used as in the non-negative deconvolution baseline presented here.
In contrast, our approach does not require any training set; the fluorescence kernel, sparsity prior and PSF are determined automatically for each neuron; it can therefore be applied to any experimental configuration. IV: Empirical and predicted point-spread functions for the SpikeFinder challenge. For each dataset and each algorithm, the point-spread function is fitted with a Gaussian distribution of mean µ and standard deviation σ. the latter are displayed as µ ± σ in ms. For super-resolution BSD, we also indicate in parenthesis the relative gain in mean square temporal error µ 2 + σ 2 compared to regular BSD.
D. Light-sheet Imaging of Zebrafish Compared to standard fluorescence microscopy techniques, such as confocal or two-photon epifluorescence microscopy, light-sheet imaging allows for a parallelization of the recording, yielding ∼ 100-fold increase in datathroughput  [2] [3] [4]. When applied to zebrafish larvae, this enables simultaneous recording of the quasi-entirety of the neurons (∼ 100, 000 units) at typically 1 brain/second. The BSD algorithm might prove to be particularly useful for such experiments, as the size of individual datasets precludes supervision. Furthermore, the gain in speed with respect to con-oopsi should also be beneficial as it may allow one to carry out the spike inference on the fly. To illustrate this latter claim, we test con-oopsi and BSD inference algorithms, as well as MLspike, one of the top performing algorithms of the SpikeFinder contest  [13]  on a typical whole-brain recording, consisting of 1,800 successive volumetric stacks sampled at 1 stack/second, each of them comprising 20 z-sections.
Discussion The last few years have seen the release of numerous spike inference algorithms  [32]. Their increasing complexity make them poorly interpretable and their performance, beyond the specific conditions for which they have been optimized, can thus be difficult to predict. This is particularly true for supervised machine learning approaches. Although they can offer excellent results on datasets on which they have been trained  [14]  -which requires the availability of a ground truth, i. e. a simultaneous electrophysiological measurement of the actual spike train -they become less reliable when generalized to other experimental conditions and/or calcium reporters. In this context, forward generative models, such as non-negative sparse deconvolution, offer a more robust and tractable solution to this problem.
These models are based on explicit hypothesis regarding the form of the fluorescence response kernel, the statistics of the spike train and the noise signal, and are thus less prone to systematic bias. However, their performance can still be very sensitive to the way the different model parameters are set, as exemplified by the unreliable results that we obtained with the oopsi algorithm. Due to a paucity of theoretical understanding of the expected performances, these failures are generally impossible to anticipate. The broad implementation of inference methods in functional imaging laboratories will thus depend on the robustness of these algorithms as much as on their optimal performance. Neuroscientists need algorithms that are not only efficient and fast, to accommodate the rapidly growing size of calcium imaging datasets, but that also provide them with a reliable way to assess the quality of the inferred signals.
SpikeFinder data sets summary. For recording-specific variables, the median value across recordings was provided. The rise and decay time constants and signal-to-noise ratios, as defined by Eqn. 2, are obtained by a parametric linear regression of the true spikes against the fluorescence, see Section I G 3. The rise time for datasets 3 and 5 are unreliable because of important delays between the fluorescence and electrophysiological recordings.
Availability The spike inference program BSD and its companion program for evaluating its accuracy are implemented in MATLAB and both available at https://github. com/jertubiana/BSD. By design, it is straightforward to infer spike trains and evaluate a posteriori the precision-recall and temporal accuracy for each recording. Then, users can optionally convolve the inferred spikes with the predicted point-spread function to account for the uncertainty on the spike location. Tutorial scripts are provided for all use cases and the scripts for generating all figures of this article and reproducing the SpikeFinder experiments are also made available.
Global water erosion strongly affects the terrestrial carbon balance. However, this process is currently ignored by most global land surface models (LSMs) that are used to project the responses of terrestrial carbon storage to climate and land use changes. One of the main obstacles to implement erosion processes in LSMs is the high spatial resolution needed to accurately represent the effect of topography on soil erosion and sediment delivery to rivers. In this study, we present an upscaling scheme for including erosion-induced lateral soil organic carbon (SOC) movements into the ORCHIDEE LSM. This upscaling scheme integrates information from high-resolution (3″) topographic and soil erodibility data into a LSM forcing file at 0. 5°spatial resolution. Evaluation of our model for the Rhine catchment indicates that it reproduces well the observed spatial and temporal (both seasonal and interannual) variations in river runoff and the sediment delivery from uplands to the river network.
, 2007; Doetterl, Van Oost, & Six, 2012; Borrelli et al. , 2018). However, these studies did not represent the temporal evolution of terrestrial ecosystem fluxes as they relied on static vegetation and SOC maps (Table  S1  in the supporting information). Naipal et al. (2015 Naipal et al. ( , 2016 Naipal et al. ( , 2018) )  went one step further and introduced a scheme that couples a sediment C removal module with biomass and soil C dynamics controlled by climate, CO 2 and land use to simulate the large-scale lateral movement of sediment and C during the last century. However, as the sediment budget module was not embedded into the terrestrial C cycle model (in this case, the ORCHIDEE LSM), this approach cannot account for the feedbacks of soil erosion on the ecosystem C cycle. Tian et al. (2015)  developed a scheme that simulates lateral C and nutrient fluxes from land to ocean by coupling a soil erosion model to DLEM  (Dynamic Land Ecosystem Model, v2.
For this purpose, the erosion model MUSLE is coupled to the ORCHIDEE LSM. Calibration and evaluation of the coupled ORCHIDEE-MUSLE model (and its upscaling scheme) is achieved by applying it to the Rhine catchment in Central Europe (Figure  S1 ). The Rhine catchment is characterized by contrasted topography, climate and vegetation conditions and has been widely monitored over the past decades. We evaluate the model results with observed runoff data and previous high-resolution model estimates of net soil erosion/deposition rates from  Borrelli et al. (2017). Next, we present the simulated spatial and temporal (interannual and seasonal) variations of soil and SOC delivery rates from uplands to the Rhine river. Finally, we quantify the effects of lateral soil and C redistribution on the SOC stock in the Rhine Catchment over the period 1901-2014.
, 2005). There can be multiple PFTs (up to 13 in the default ORCHIDEE-SOM) growing in 1 pixel of the model although the specific locations of different PFTs in each pixel are not explicitly represented. Area fractions (0-1, unitless) of different PFTs in each of the simulated pixel can be obtained from land cover forcing data every year or simulated by the vegetation dynamic module, depending on the model settings. Plant phenology, canopy photosynthesis, C allocation, litterfall production, and the dynamic of litter and SOC in every pixel are simulated for each PFT separately. The average conditions (e. g. , average LAI, living biomass stock, SOC density) in each pixel are calculated from specific values for each PFT present on that pixel and their corresponding area fractions. The hydrological processes in ORCHIDEE are simulated at a time step of 30 min  (Campoy et al.
Forcing Data and Model Protocol The meteorological forcing data used for our simulations were obtained from the global reanalysis product of the Global Soil Wetness Project Phase 3 (GSWP3, Table  1 ). The GSWP3 data set contains globally gridded data of near surface wind, air temperature, humidity, air pressure, incoming short-wave and long-wave radiation, rainfall and snowfall rates for the period 1901 to 2014 on a 3-hourly time step at 0. 5°resolution (http://forge. ipsl. jussieu. fr/orchidee/wiki/Documentation/Forcings). Every year during the whole simulation period since 1901, the vegetation distribution was dynamically prescribed using PFT maps obtained from the LUHa. rc2 data set (Land Use History). Soil type was defined based on  Zobler (1999). Soil bulk density was taken from the HWSD database (Harmonized World Soil Database v1.