dataesr/scientific-paragraphs-categorization huggingface dataset:
Then, we calculated the cosine distance for each neuron pair of the imaged field. Cosine distance was defined as 1 -cosine similarity, with cosine similarity between s1 and s2 being the following: s1. s2 ‖s1‖‖s2‖ , s1. s2  Hubert and Arabie, 1985). This measure of pairwise cosine distance was used by the clustering algorithm to perform a sensitive measure of similarity between groups of neurons. We used a Hierarchical Cluster Analysis (HCA) that did not require any prior assumptions about the number of clusters that might emerge and computed using the Python Scikit-Learn Package and the agglomerative clustering method. To define the end step of HCA, we calculated a statistical threshold from a surrogate population. The surrogate data sets were obtained by reshuffling the activity onsets within each 15-frames window (1000 iterations), then calculating pairwise cosine distances from shuffled data.
We measured the number of neurons per cluster, the Euclidean spatial pairwise distances between neuron centroids from the same cluster, and the spatial extent of the clusters. Here, spatial extent was calculated by dividing the area of the polygon defined by the cluster's convex hull  (Feldt Muldoon et al. , 2013)  (Fig. 6A, B ), by the total number of DGCs of the cluster. Scripts enabling the detection and analysis of (caption on next page) L. Goirand-Lopez et al. network events (including functional clustering method) are available at GitHub (https://github. com/lgoirandlopez/Goirand-Lopez_NBD2023). For points "1-5" above, in cases where a parameter was not quantifiable due to the absence of activity (e. g. , the average amplitude and duration of single calcium events), or if it involved division by zero (e.
Local field potential recordings Extracellular local field potentials (LFP) were recorded using a multichannel DAM-80 amplifier (WPI), sampled at 20 kHz, bandpass filtered (0. 1-3 kHz), digitized with a Digidata 1322A Digitizer (Molecular Devices), controlled by pCLAMP10. 3 software, and using ACSFfilled glass electrodes that were placed in the granular cell layer as in  (Marissal et al. , 2012).
Statistics For the comparison of multiple matched groups of two factors, we used the two-way repeated measures ANOVA test followed by Sidak's post-hoc test when appropriate. For comparisons between two unpaired groups, the two-tailed Student's t-test was used. For comparisons between two paired groups without normal distribution, the two-sided Wilcoxon test was used. For comparisons between two paired groups with normal distribution, the two-tailed paired Student's t-test was used. Normality was assessed using the Shapiro-Wilk test. The cumulative distribution between two conditions was compared using the Kolmogorov-Smirnov (KS) test. All statistical tests were performed using GraphPad Prism Software and detailed in the figure legends. To facilitate comparison between conditions, the values of calcium activity in the vehicle (no UBP310) or UBP310 conditions (at 2.
E-G. Average frequency (E), amplitude (F), and duration (G) of calcium transients recorded in the dentate gyrus and in each condition in the percentage of the related baseline. H. Average percentage of coactive neurons above chance level (in the percentage of the related baseline). I. Frequency of epileptiform network events per movie in the percentage of the related baseline. J. Average part of neurons participating in epileptiform network events (in the percentage of the related baseline). K. Part of calcium transient onsets detected during epileptiform network events as a function of the total number of calcium events, in the percentage of the related baseline (see Methods). D-K: Data are presented as mean ± s. e. m. Each circle represents the value for a given slice, the number of slices is indicated in parentheses.
Acknowledgments We thank  I. Medina  for his technical help, and  E. Pallesi  and  F. J. Michel  for heading their respective INMED core facilities. This work was supported by the  Institut National de la Santé et de la Recherche Médicale (INSERM) ,  Aix-Marseille University (AMU) , the  Agence Nationale de la Recherche  ( ANR-17-NEU3-0003-02  and  ANR-18-17CE-.
DES and LFP recordings Neurophysiological procedures are presented in brief here (see Supplementary Information for details). DES was alternately applied to one electrode while the evoked responses were recorded on all other electrodes  (Gronlier et al. , 2021). Single pulse electrical stimulation (SPES) was performed at 0. 5 Hz, 400 μA, with a biphasic square pulse of current of 0. 5 ms per phase, with the negative phase coming first. Electrical stimuli were generated with an isolated stimulator (DLS100, World Precise Instruments, Sarasota, USA) triggered by a DS8000 unit (World Precise Instruments, Sarasota, USA). LFP data were recorded using a Micromed system (SD LTM 6400 Express EEG 64 channels, Treviso, Italy) in which they were amplified, filtered and digitized (sampling rate: 1024 Hz, bandpass filter: 0.
Data analyses 2. 5. 1. LFP evoked responses Signals were processed offline with scripts written in Matlab (v. 9. 4. 0 R2018a, Natick, Massachusetts: The MathWorks Inc. ), as previously described  (Gronlier et al. , 2021). Briefly, signals were epoched around each stimulation: [-0. 7 + 1. 9] s relative to the time origin of the start of the stimulation artifact. Each epoch was baseline-corrected from -700 to -3 ms. Stimulation artifacts were removed using the combination of an interpolation with an autoregressive model and a fit with a decreasing two-exponential decay function as used in  (Conde et al. , 2019; Drebitz et al. , 2020). Then, bad trials were automatically detected and removed from further analysis as described in  (David et al. , 2013). Responses were averaged together over trials and obtained LFP evoked responses were baseline-corrected.
PD-related LFP evoked response stability Once we identified this PD-related striatal LFP evoked response in 6-OHDA animals, we investigated its stability during several consecutive weeks. We used injection-free recordings (weeks 4 and 5) and preinjection time-periods collected during pharmacological tests (weeks 6 to 11). The striatal stimulation was the only configuration that revealed such a PD-related LFP evoked response, thus we focused on data from striatal stimulation for further analyses. A limited number of animals went through pharmacological experiments each week, so we grouped data coming from three following weeks. By grouping this way, we had conditions with enough animals to perform statistical analyses. We obtained 4 time points: [week 4], [week 5], [weeks 6 to 8] and [weeks 9 to 11], containing data from 8 to 12 animals as described in Fig.
| METHODS We retrospectively reviewed all the records of patients admitted to the neurology department or intensive care unit of Raymond-Poincaré Hospital (Garches) for suspected GBS between September 2012 and December 2019. All patients were examined by a physician with expertise in peripheral nervous system disorders. GBS was diagnosed according to the usual (Asbury and Brighton) criteria except for areflexia, the initial absence of which did not rule out the diagnosis if all the other elements of the clinical and electrophysiological presentations were highly suggestive of GBS. 2, 13 Clinical, biological, and electrophysiological data were collected and diagnosis was confirmed by follow-up. We reviewed the neurological examination findings, the duration of the progressive phase, therapeutic management and functional status at nadir and at the end of follow-up as a function of GBS disability score (see Table  S1 ).
18  investigated the correlation between electrophysiological parameters and clinical status at the last reported clinical assessment, based on GBS disability score. We used two markers of persistent demyelination: the presence of at least one conduction abnormality suggestive of demyelination, and fulfillment of the EFNS-PNS criteria for definite CIDP. We also investigated the relationship between distal motor nerve CMAP amplitude in the median, ulnar and tibial nerves at 1 y and clinical disability. We reviewed the NCS results available for six periods of interest after symptom onset: less than 21 days, between 21 days and 6 wk, 3 (± 1) mo, 6 (± 1) mo, 12 (± 1) mo, and between 18 and 24 mo. Patients were included if they had NCS results for at least two of the periods of interest. We collected the NCS data recorded up to May 2020.
| Changes in DL and MCV (Figure 4) For each patient, we analyzed the change in each parameter between two successive periods, and then averaged these changes. For the tibial nerve, the greater worsening of DL values was over the period between the second and third NCS, and no improvement was observed for this nerve until 3 to 6 mo after symptom onset. We found similar results for MCV values of the median and ulnar nerves in the forearm. We then evaluated the number of patients whose DL or MCV values were worse on the NCS performed at 3 mo than on that for the previous period. Data were available for both these periods for 21 patients, of whom 11 (52. 4%) showed a worsening of at least two parameters. A similar evaluation for the subsequent period showed that 11 of 36 patients (30. 6%) demonstrated a worsening of at least two conduction parameters at 6 mo.
Constrained by the structure of a generic model of regional dynamics (middle), it learns the dynamical model of node dynamics f and the state-to-observation projection model g. The dynamical model f is shared for all subjects and regions, but it depends on subjectspecific parameters θ s and region-specific parameters θ r. These, too, are inferred from the data, together with the hidden states of the system x and the subject-specific external input u ext , shared by all regions in a given subject. All of the system states, subject-and region-specific parameters, and the external input are inferred probabilistically as normal distributions, that is, we infer the mean and variance for each parameter. In this work, we test our method on two synthetic datasets, generated with the two models commonly used in large-scale brain modeling: the mean field model of conductance-based spiking neural network, or mean field model for short  (7) , and the Hopf bifurcation model  (8).
For both test cases, we use a cohort of eight subjects with realistic structural connectomes and with model parameters varying across subjects and brain regions. We show that the trained generative model can reproduce many features of the original dataset and demonstrate that the method can extract regional and subject-specific parameters strongly related to the original parameters used for the simulation. Last, we apply the method to resting-state fMRI data of 100 subjects from the Human Connectome Project (HCP)  (19). We find that the inferred dynamics can be described as noisy fluctuations around a single fixed point, both on the node and network level. The method reliably discovers three regional parameters with clear and distinct function on the dynamics, one of which is strongly correlated with the first principal component of the gene expression spatial map.
Evaluation workflow We test the proposed method on two synthetic datasets, where the data are generated by models commonly used in whole-brain modeling. First is the Hopf bifurcation model  (8) , shown in Fig. 2. That is a two-equation neural mass model, where, depending on the value of the bifurcation parameter a i , the dynamics is either noise driven around a stable fixed point (for a i < 0) or oscillatory with frequency f i (for a i > 0). In the synthetic dataset, these two parameters are randomly varied across regions. The second model is the parametric mean field model (pMFM)  (7) , shown in Fig. 3. That is an oneequation model, and depending on the network input, it can be pushed into monostable down-or up-state or a bistable regime. The switching between the states is noise driven, and we vary the noise strength across brain regions.
Both models are used to generate synthetic data for eight subjects, each with individual structural connectome containing 68 cortical regions of the Desikan-Killiany parcellation  (20). The connectome is scaled by the global coupling strength G, which we set to increase linearly across subjects for the Hopf model or which we set to the optimal value (in terms of highest produced FC), different for every subject, with pMFM. To establish the performance of the described method, we proceed as follows. First, we simulate the data with the original model and random values of regional parameters (Figs. 2D  and 3D ). Next, using the whole dataset of eight subjects, we train the model, obtaining at the same time the trained generative model described by the function f of the dynamical system, as well as the probabilistic representation of subject-and region-specific parameters (Figs.
For the regions with a < 0, however, inferred θ r 2 have high variance, close to the prior value 1, and overlapping distributions, indicating that not much information is stored in θ r 2 in this regime. (E) Inferred regional parameters for all regions (top left; example nodes highlighted) and inferred subject-specific parameter (bottom left; in gray among parameters for all subjects in the dataset). The span of the crosses/lines corresponds to two SDs of the inferred Gaussian distribution. Bottom: Circles are added for visual aid because of the small SDs. The inferred dynamics in state space of the three example nodes are on the right. The vector field is evaluated assuming zero network input and the inferred parameters. Background color, velocity magnitude; yellow lines, exemplary simulated time series of the node activity; Black-and white-faced circles, stable and unstable fixed points.
Trained model reproduces the features of regional time series A crucial test of the trained model is an evaluation of whether the generated data resemble those used for the initial training. This resemblance should not be understood as reproducing the time series exactly because they depend on a specific noise instantiation, rather that the features that we consider meaningful should be preserved. For both test cases, we evaluate the similarity of the two features. For the Hopf model with its oscillatory dynamics, we evaluate the cosine (E) Inferred regional parameters (top left) and subject-specific parameter. Circles are added for visual aid because of the small SDs. The inferred dynamics in state space of the three example nodes are on the right. The vector field is evaluated assuming network input u = 1 and using the inferred parameters.
4F  and fig. S6 ). We evaluate the measures for 50 different noise instantiations, leading to 50 different time series for each region, obtaining a distribution of goodness-of-fit metrics. The same metrics are also evaluated for three surrogates: First is the original computational model, run with different noise instantiations. That provides an optimistic estimate of what can be achieved in terms of goodness of fit, considering that the features will necessarily depend on the specific noise instantiation used in the initial simulations. The second surrogate is obtained by randomly reshuffling the original data between regions and subjects. The third surrogate is simply white noise with zero mean and variance equal to one (which, because of the data normalization, is equal to the mean and variance of the original dataset taken across all subjects and regions).
Large perturbations of the connectome lead to reduced performance To assess the influence of the inexact structural connectome on the goodness of fit, we have trained the model on the pMFM dataset with perturbed connectomes. That is, instead of the original connectivity matrix W, we have trained the model with W ϵ = W + ϵA, where A is the matrix with elements drawn from standard normal distribution and ϵ > 0 is the perturbation magnitude. In addition, we have also used a log-scaled connectivity matrix. Figure  S9  shows how the indicators of goodness of fit from Fig. 4  are modified by using these surrogate connectomes. High perturbation magnitudes reduce the recovery of regional and subject parameters (fig. S9, A  and B ), as well as the similarity of the generated FC (fig. S9E ). The regional features, on the other hand, are reproduced similarly well even for large perturbations (fig.
Noisy dynamics around a single fixed point The example in Fig. 5  shows a noisy dynamics around a single fixed point for the two example regions. A detailed investigation reveals that this is a universal trait for all nodes. We consider first the discovered neural mass with all parameters θ r , as well as the network input u and external input u ext set to zero (Fig. 6A ). Simulating the (A) Resting-state fMRI data (top left), corresponding FC (top right), and time series of two example regions (bottom). (B) Phase plane of the inferred dynamical system. Each panel shows a 2D projection of a 3D system, with the third variable set to the position of the fixed point (black dot). The vector field is evaluated assuming zero network input and using the inferred region-specific parameters. Background color represents the velocity magnitude; yellow lines are exemplary simulated time series of the node activity when embedded in a network.
6C ). In this setup, the subject structural connectome is used, all nodes have their inferred parameter values, and external input u ext is set to zero. For the example subject, all trajectories converge to a single fixed point. All eigenvalues at the fixed point have a negative real part, but unlike for the isolated node, some eigenvalues are complex, indicating decaying oscillatory dynamics. We analyzed the dynamical regimes of the coupled network for all subjects analogously to single nodes (Fig. 6D ). For all 100 subjects in the dataset, we have used their structural connectome and set the parameters to their inferred values. Choosing random initial conditions, we searched for the fixed points numerically with a root-finding method and again simulated the dynamics in the absence of noise to assess the unsteady behavior.
For most of the subjects in the dataset, the state space contains a single stable fixed point. The system contains multiple stable fixed points only for 6 of 100 subjects; however, the effect of this multistability on the generated dynamics is not immediately obvious (fig. S12 ). Similar to that for the nodal dynamics, in none of the subjects was unsteady behavior observed in the absence of system noise. Three region-specific parameters identified Next, we turn our attention to the region-specific parameters θ r. We first ask the question how many of the parameters can be identified Fig. 6. Discovered node and network dynamics. (A) Node dynamics for an uncoupled node with θ r = 0, u = 0, and u ext = 0. The left subpanel shows the trajectories from random initialization points (triangles) to the stable fixed point (black point).
Another way of analyzing the roles of region-specific parameter is to look at their relations with various features of the structural and functional data. We divide the features into two categories: First, those derived from the individual data that were used for the model training and, second, those obtained from external sources and not specific to the subject in question. Taking the features and using the inferred parameters for all subjects, we performed a multivariate linear regression for the different features (Table  2 ). The features considered in this analysis were selected partly on the basis of the understanding gained from the previous analysis and the features of interest in the related studies  (4) (5) (6). With the individual data, we evaluated the link to features of the structural connectome and the regional fMRI time series.
Main results The main contribution of this work is a method for analysis of whole-brain dynamics based on a data-driven model of networked dynamical systems. Using the structure of the network and the functional data, the method allows us to infer both the unknown generative dynamical system and the parameters varying across regions and subjects. It allows us to analyze the large-scale brain dynamics and the regional heterogeneity without strong assumptions on the underlying dynamical system and thus provides a way for modelbased analysis of brain dynamics. We have tested the method on two synthetic datasets, one generated by a network model composed of nodes with a Hopf model (Fig. 2 ) and one generated by a network model with a pMFM (Fig. 3 ). Detailed analysis of the results has shown that the proposed method can recover the original parameters and reproduce the important features of the original data both on the single-region level and on the network level (Fig.
Fixed structural connectivity Our method assumes that the structural connectome through which the local dynamics is coupled is known. What we can obtain, however, is only an estimate from diffusion tractography, suffering from a range of biases  (39, 40). Our results indicate that while the method can handle small perturbations of the connectome, larger perturbations or different scaling can considerably degrade its performance (fig. S9 ). Conversely, correcting the structural connectome for known biases can improve the model fit, as demonstrated by the better performance of the model on HCP data when homotopic connections are strengthened (fig. S17 ). Further handmade corrections to the structural connections can be considered, but an alternate approach can be also pursued: one that would use the estimated structural connectome not as hard data but only as a soft prior for the effective connectivity of the model.
Furthermore, given a large enough dataset, the dynamically relevant parameters may be linked to the measured quantities (or their combinations). Such link may provide insights into the origin of neurodegenerative diseases if the dynamically relevant parameters differ between the disease stages. The link between dynamically relevant parameters and the measurable quantities can be estimated from a preexisting patient cohort and then only applied to a single subject. That is advantageous if the measurement is difficult, costly, or impossible to perform in clinical setting (such as for cell type composition estimated from post mortem studies); in such cases, the dynamically relevant parameters may instead be estimated from easy-to-obtain resting-state fMRI and then mapped using the known link.
Structural connectomes The structural connectomes used for the application on empirical data, as well as for the generation of synthetic datasets, were derived from the neuroimaging data from HCP  (19). The Washington University-University of Minnesota (WU-Minn HCP) Consortium obtained full informed consent from all participants, and research procedures and ethical guidelines were followed in accordance with Washington University institutional review board approval (Mapping the Human Connectome: Structure, Function and Heritability; IRB #201204036). Specifically, we used the 100 Unrelated Subjects group from the HCP 1200 Subjects cohort. For those, Structural Preprocessed and Diffusion Preprocessed packages were downloaded  (59). Next, the structural connectomes were built for the cortical regions of Desikan-Killiany parcellation (20) using MRtrix 3.
Resting-state fMRI data The resting-state fMRI data were obtained from the HCP for the same subjects as the structural data. We have used the restingstate data preprocessed by the HCP functional pipeline and ICA-FIX pipeline (Resting State fMRI FIX-Denoised package). These were further processed by the DiCER method  (23)  with default parameters. The DiCER method was designed to remove widespread deflection from the fMRI data, and provide a better alternative to global signal regression. Afterward, the processed data were parcellated into 68 regions of Desikan-Killiany parcellation  (20) , and each time series was normalized to zero mean and unit variance. The DiCER preprocessing was performed for all four sessions (REST1_LR, REST1_RL, REST2_LR, and REST2_RL) concatenated. However, only the results from the first session (REST1_LR) were used in the study.