dataesr/scientific-paragraphs-categorization huggingface dataset:
Dataset acquisition A series of digital lung auscultation (DLA) audios were acquired from each of the 572 recruited patients across eight anatomic sites (one in each quadrant of the anterior and posterior thorax). DLAs had an average duration of 28. 4 seconds (range 1. 9-30). Only 2. 8% of patients (n = 16/572) did not have all eight recordings present. Collectively, 4552 audio recordings covered 35. 9 hours of breath sounds. All recordings were acquired on presentation, prior to any medical intervention (e. g. bronchodilators or supplemental oxygen). DLAs were recorded in WAVE (. wav) format with a Littmann 3200 electronic stethoscope (3M Health Care, St. Paul, USA) using the Littmann StethAssist proprietary software v. 1. 3 and Bell Filter option. The stethoscope has a sampling rate of 4,000 Hz and a bit depth of 16 bits.
Dataset description Recordings have one of four clinical diagnostic categories: control (healthy), pneumonia, wheezing disorders (asthma and bronchitis pooled together) and bronchiolitis. The diagnosis was made by an experienced pediatrician after auscultation and was based on all available clinical and paraclinical information, such as chest X-ray when clinically indicated. For the purposes of this study, obstructive bronchitis and asthma are grouped under the label "wheezing disorder" due to their similar audible wheezing sound profile and treatment requirements (bronchodilators). Rather than having a single model with four output classes (listed above), we adopted a "one-versus-rest" approach where four separate binary classification models discriminate between samples of one class and samples of the remaining three classes.
Data partitioning (train:tune:test split and external validation) Considering potential biases in the data collection process, and a model's tendency to overfit in the presence of site-specific background noise, it is particularly important to ensure balanced representation in data splits and even more critical to explicitly report results on an external validation set from an independent clinical setting. As the Geneva (GVA) and Porto Alegre (POA) recordings were the most abundant and diverse in terms of label representation, they were thus used for training, internal validation (i. e. tuning) and testing. To ensure that performance was not dependent on fortuitous data partitioning, nested 5-fold stratified cross validation (CV) was performed to obtain a distribution of performance estimates which are then reported as a mean with standard deviation (SD).
Clinical baseline To assess the clinical value of using DeepBreath as opposed to a simpler model based on basic clinical data, we trained a set of equivalent baseline models using logistic regression on age and respiration rate. These two features are relatively simple to collect and are routinely used to assess patients with respiratory illness. For instance, in our dataset, the age of bronchiolitis patients is significantly lower than for the other disease groups, and the RR of all disease groups differ significantly between each other (see Supplementary Table  2 ). This suggests that these features are likely predictive for the diseases, provided that their distributions are reasonably linearly separable. The same train:tune:test splits as for the training of DeepBreath were used for the baseline.
In this step, only patients for which all eight recordings are available were selected. This new set of features can be used to construct new datasets for the train, tune and test folds. We chose to fit a logistic regression model to these new features, because it has properties pertinent to our setting, such as being interpretable and returning the probability of an event occurring. With this model, there is no need for a tune set to save the best model during training. Thus we concatenated the feature matrices of the train and tune folds, to obtain a new feature matrix that will be used to fit the logistic regression model. The test features will be used to evaluate our model. Note that this is the first time that the test data is used. The CNN model is not trained during this second phase and never sees the test data.
Combining binary classifiers For diagnostic classification, we combine the positional feature vectors (corresponding to the eight anatomical sites) of the four CNN audio classifiers. The feature vectors are concatenated to form a prediction array of size 4 × 8, and the columns are then L1normalized (for each column, the sum of its values is equal to 1). The idea behind this normalization is that recordings-which were identified by multiple CNN models as having a high likelihood of belonging to their respective class-should matter less in the aggregated patient prediction. Similar to the aggregation step in the binary models, we obtain new feature datasets for the training, tune and test folds. Figure  7  shows how that data is generated. A multinomial logistic regression is then trained to predict a patient's diagnosis.
ACKNOWLEDGEMENTS We sincerely thank the patients who contributed their data to this study and the clinicians at each site for their meticulous acquisition. This work was supported the following grants: •  Service de la Solidarité internationale du Canton de Genève  (A. Ge. ) https:// www. geneve-int. ch/fr/service-de-la-solidarit-internationale-2;no grant number. •  Fondation Gertrude Von Meissner  (A. Ge. ) https://www. unige. ch/medecine/fr/recherche/appels-a-projets/fondation-gertrude-von-meissner-appel-a-projets2/; no grant number. • Ligue Pulmonaire Genevoise (M. R. B. ) https://www. lpge. ch/;no grant number. •  Fondation Privée des HUG  (J. S. ) https://www. fondationhug. org/;no grant number. •  Université de Genève  (A. Ge. ) https://www. unige. ch/unitec/en/presentation/innogap-proof-of-principle-fund/; no grant number.
CODE AVAILABILITY The full code and test sets are available at the following GitHub repository: https:// github. com/epfl-iglobalhealth/DeepBreath-NatMed23. The repository also provides instructions on how to access and train this model on DISCO, our web-based platform for distributed collaborative learning https://epfml. github. io/disco/#/ to provide access to privacy-preserving federated and decentralised collaborative training and inference.
Building upon the recent advances and successes in the application of deep learning to the medical field, we propose in this work a new approach to detect and classify early-stage Alzheimer patients using online handwriting (HW) loop patterns. To cope with the lack of training data prevalent in the tasks of classification of neuro-degenerative diseases from behavioral data, we investigate several data augmentation techniques. In this respect, compared to the traditional data augmentation techniques proposed for HW-based Parkinson detection, we investigate a variant of Generative Adversarial Networks (GANs), DoppelGANger, especially tailored for times series and hence suitable for synthesizing realistic online handwriting sequences. Based on a 1D-Convolutional Neural Network (1D-CNN) to perform Alzheimer classification, we show, on a real dataset related to HW and Alzheimer, that our DoppelGANger-based augmentation model allow the CNN to significantly outperform both the current state of the art and the other data augmentation techniques.
motor impairment  [4]. In this respect, several studies have assessed gait impairment, mild parkinsonian signs, fatigue and frailty  [5] ,  [6] ,  [7] ,  [8]. Other studies have investigated fine motor impairment, especially handwriting (HW) changes due to AD  [9] ,  [10] ,  [11]. Such studies make sense given that AD induces cognitive and visuospatial impairment that makes the physical act of writing difficult, thereby triggering HW impairment  [12]. As a result, there have been numerous studies and researches into applying machine learning methods to build a system that can reliably detect Alzheimer at an early stage, so that the patient can receive a timely and successful treatment. These researches work with a wide range of input data recorded from medical experiments and examinations, with handwriting and graphical gestures being ones of the most prominent sources.
Traditionally, research on handwriting analysis applies either statistical tests or traditional classification models. Only recently have deep learning approaches been explored, albeit these were mostly for the detection of Parkinson and not Alzheimer. The goal of our work is to fill this gap and to explore this approach by building a deep learning model that can classify whether a subject is an Alzheimer patient, using online handwriting data. We also look to address one of the most prominent problems in deep learning medical applications, the lack of training data, by investigating the latest data augmentation techniques. Concretely, we introduce, in this work, the following key contributions:.
For problems similar to ours, that is, to deal with medical data that is limited in available samples, and in the form of different channels of long time series, specifically online handwriting, there have been a lot of works on the popular dataset PaHaW  [19]  for Parkinson detection, notably  [20] ,  [21] ,  [22]. Another notable work on Parkinson online handwriting is  [23] , in which the authors experiment with different data augmentation methods and achieve significant improvement compared to using only original data. For Alzheimer's, however, there is no equivalent publicly available dataset. For our work, we use the same dataset presented in the study  [18]  based on K-medoids clustering and Bayesian classifier. This work will serve at the benchmark for our results.
III. METHODOLOGY A. DATASET The dataset, the same that was used in  [18] , was collected at the Broca Hospital in Paris. It consists of 54 subjects, from which 27 are patients who have early stage Alzheimer disease (AD) and 27 healthy control (HC). The Alzheimer patients are diagnosed based on DSM-5 criteria. The selected subjects were all able to understand French fluently and agreed to sign a consent form. The subjects perform multiple handwriting tasks that are recorded on a WACOM Intuos Pro Large tablet with an inking pen. The sampling rate that the tablet records pen position is 125 Hz. The data are recorded in the form of channels of time series, containing static and dynamic information of the pen movement during which the subjects perform the tasks. There are six channels in total: timestamps, x coordinates, y coordinates, pressure, azimuth and altitude.
B. LOOP SEGMENTATION Because our dataset consists of only 54 subjects, it is necessary to come up with a method that increases the number of samples, especially for the training of deep learning models. Inspired by  [18] , we notice the repetitive pattern of the l letter loops that can thus be extracted into individual training samples. As we usually have 16 l letters for each subject, we first split the sample into strokes and then keep only the 16 loops, by discarding the ligatures between them, as illustrated on the right of Figure  1. This gives us about 16 times more data to train with as we now treat the loops and not the subjects as individual training samples.
The final loss function is a combination of the losses from the two discriminators, with a weighting parameter α: min G max D 1 ,D 2 L 1 (G, D 1 ) + αL 2 (G, D 2 ) with L 1 as the Wasserstein loss of the original discriminator and L 2 of the auxiliary. As GANs are notoriously difficult to train, and according to the loop distribution in Figure  2  the number of loops with length greater than 100 is very small. As the more time steps we have the more parameters there are to optimize, we decide to train the model only on loops with maximum length 96. The batch generation parameter S is set as 8. The training labels of our dataset (AD or HC) are considered as attributes and are trained together with the time series. This allows us to later conditionally generate synthetic samples of each class by specifying the attributes.
C. HYPERPARAMETER OPTIMIZATION As indicated in Section III-F, we perform random search in order to find the best hyperparameter combination. To avoid experimental bias, we decide to use, as training/validation data for the process of hyperparameter optimization, the similarly recorded online handwriting dataset PaHaW  [19]  associated with Parkinson disease. The second task of PaHaW, as shown in Figure  4  is also to write repetitive l letters, which then can be splitted into loops using our segmentation process. We show in Figure  5  the 1D CNN architecture that is obtained as the result. The model consists of two 1D convolutional layers, each followed by ReLU activation and Max Pooling. There are 128 1D filters in the first convolutional layer and 64 in the second, all of them have size 4 × 1.
The Max Pooling filters for both layers have size 2 × 1. Dropout is applied after both poolings with a dropout rate set as 0. 2. The output is then flattened and put into a fully connected layer (FC) and finally softmax for classification. This model achieves 78% accuracy, 85% sensitivity and 73% specificity when training with our dataset using all eight available channels as the input. As we work with limited data, such a simple architecture can be enough to learn well without overfitting, in contrast to deeper models.
G. FINAL EVALUATION WITH LEAVE-ONE-OUT CROSS VALIDATION In order to better evaluate the generalization ability of the model, as well as to make comparison with the previous state of the art on the dataset obtained in  [18] , we decide to perform leave-on-out cross validation (LOOCV) in addition to stratified 10-fold cross validation that is used in previous experiments. This means that from the dataset of 54 subjects, we have 54 folds, and for each fold we train on 53 subjects and test on the one left out. For each fold, we also randomly initialize the weights of the model. The model architecture as well as the feature combination (x-velocity, y-velocity) and augmentation method (DoppelGANger) are chosen from the previous best results. We illustrate this finalized training procedure in Figure  8.
V. CONCLUSION In this work, we have been able to develop an effective deep learning approach for the problem of classifying Alzheimer patients. Despite the lack of sufficient training data, the result obtained from training 1D Convolutional Neural Network model is the new state of the art on the dataset, at 87. 04% accuracy, 85. 19% sensitivity and 88. 89% specificity. This is very promising and opens up further possibilities for research. The newly achieved state of the art has been made possible by tackling the problem of limited data through synthetic data generation, based on the application of of Generative Adversarial Network adapted to time series, namely Doppel-GANger. The generated data have been shown to approximate the quality and distribution of the real data, which helped significantly improve the classification performance.
The FEM was connected to a Trigger and Data Concentrator Module (TDCM)  [18]  used for the data transfer to a DAQ computer via a Modular Interactive Data Acquisition System (MIDAS)  [19]  front-end. The TPC prototype was placed at the DESY T24/1 facility  [20]  inside a large-bore superconducting solenoid, called PCMAG, that provides a magnetic field of intensity up to 1. 25 T and it was exposed to a beam of electrons with momenta between 1 and 4 GeV/c, see Fig. 1. As we will show in this paper, this test beam campaign allowed us to validate the performances of the TPCs for tracks with different incident angles with respect to the ERAM detector and for all the drift distances of interest for the T2K TPCs. This paper uses similar methods as those described in Refs. [21, 22]  to analyze the test beam data.
The main novelty of this paper is that the data are also compared with a simulation that has been developed by using the ND280 software  [1] , adding the HA-TPCs ERAM geometry and the features of the resistive layers and of the AFTER chip electronics response. As it will be shown in the rest of this paper, the ERAM detector allows to reach a spatial resolution better than 800 µm for all the incident angles and drift distances, and a dE/dx resolution better than 10% for tracks crossing the entire ERAM module. These performances are in good agreement with the ones predicted by the simulation that is able to reproduce low level variables, such as the charge sharing between neighboring pads or their time difference, as well as the spatial and the dE/dx resolution. The paper is organized as follows.
Section 2 introduces the ERAM technology and its use for the HA-TPC prototype. Section 3 presents the experimental setup. The simulation of the ERAM response is described in Section 4. Section 5 is devoted to the characterization of the ERAM detector. The data collected during the DESY test beam are presented in Section 6, while Section 7 provides a description of reconstruction algorithms. Section 8 is devoted to a comparison of ERAM response between data and simulation. Spatial and dE/dx resolutions are presented in Sections 9 and 10, respectively, while Section 11 discusses a comparison between the data and the simulation. A study of the E×B effect is presented in Section 12. A short discussion on further potential improvements is given in Section 13. The conclusions in Section 14 close the paper.
They are installed parallel to the ERAM modules and two FECs are used to readout one ERAM (1152 channels). The response linearity of the FEC has been measured with a dedicated campaign and showed a uniform response of all the channels with typical differences in linearity among neighboring pads smaller than 2%. The two FECs on each ERAM are connected to a FEM card that performs their control, synchronization and data aggregation. All connections, firstly between ERAM and FEC boards, secondly between FEC and FEM boards, are performed by using "floating" type connectors (HIROSE -FX23/FX23L series) in order to eliminate wired connections and all their drawbacks. The final production of electronic boards -both FECs and FEMs -was performed by the OUESTRONIC company in Rennes, France  [25]. As back-end electronics we used the TDCM, a generic clock, trigger distributor and data aggregator module  [18]  designed for several projects, including the HA-TPCs.
The obtained distributions are convoluted with the derivative of the electronics response to get the waveform (WF unit ) for a unit charge. The final waveform WF(t) can be easily obtained by scaling the pre-computed solution WF unit with the total charge Q i in each sub-pad i, so that: W F (t) = i Q i × W F unit (x i , y i )(t). ( 5 ) The main approximation in this computation is the assumption that all the electrons in a sub-pad arrive at the center of this sub-pad. This implies that no numerical computations are needed during the simulation. The described optimization methods reduce the required CPU time by Two examples of the WF, one for the data and one for the simulation, are shown in Fig. 5  for the leading and for two neighboring pads. Here and in the following of this paper, the leading pad is defined as the pad with the largest maximum of the waveform while neighboring pads are the ones adjacent to the leading pad in the direction perpendicular to the track projection on the ERAM plane (see discussion on clustering algorithms in Sect.
Data collected at DESY The tests at DESY were aimed to ensure that the HA-TPC prototype design fully satisfies the requirement of the ND280 upgrade for drift distances up to 97. 25 cm that corresponds to the maximum drift length of the HA-TPC. Therefore, this test beam covered all the possible tracking conditions of HA-TPC. The HA-TPC prototype equipped with ERAM-01 was flushed with T2K gas mixture and tested at DESY T24/1 facility. The chamber was placed inside the PCMAG solenoid (Fig. 1 ) providing a magnetic field up to 1. 25 T and exposed to the electron beam with tunable momenta between 1 and 4 GeV/c. The solenoid is equipped with a movable stage that allows moving the detector along the horizontal and vertical directions. Most of the data were taken with the cathode high voltage set at 26.
Reconstruction and selection of tracks Tracks in simulated events and real data were reconstructed with the same analysis framework that uses Density-Based Spatial Clustering of Applications with Noise (DBSCAN)  [30]  algorithm and the "pad response function" (PRF) method (discussed in Sect. 9). The track projection on the ERAM plane is composed by clusters that are groups of pads in the direction perpendicular to the track projection. In order to be selected, a track needs to cross the whole detector. Due to a large number of pads per cluster (multiplicity) induced by the resisitive layer, two close parallel tracks may not be separated by a gap and thus can be mis-reconstructed as one single track. To reject such a topology and also to remove superimposed tracks, a cut on the mean multiplicity of the track is applied.
ERAM response in data and simulation To validate the simulation described in Sect. 4, we produced electrons crossing the HA-TPC prototype and compared some low-level variables describing the ERAM response, including charge sharing and time differences between neighboring pads in data and simulation. The comparison between data and simulation for spatial resolution and dE/dx resolution will be shown in Sect. 11. The most important variables for the characterization of resistive feature are the charge ratio and the time difference between the signals observed in the adjacent pads and the one in the leading pad. For these comparisons, the charge in the pad is defined as the maximum of the waveform and the time is defined as the time bin at which the waveform reaches its maximum. The pads in a cluster are then ordered according to their charge (Q 1 and T 1 refer to the pad with the largest charge, Q 2 and T 2 to the second pad, and so on).
Spatial resolution for inclined tracks The collected test beam data allow studying spatial resolution as a function of the angle of inclination of the tracks with respect to the ERAM module plane. The novelty with respect to the studies performed in  [22]  is that we could evaluate the spatial resolution performances for inclined tracks at long drift distances. The results are presented in Fig. 14 (a) , where for angles from 0 to 30 degrees and from 70 to 90 degrees clusters are defined along the rows/columns (horizontal/vertical fit), and for tracks with the angle between 40 and 60 degrees, the clusters are formed along the diagonals as described in Section 7. In  [22]  it has been shown that the use of a diagonal clustering for highly inclined tracks significantly improves the spatial resolution with respect to the use of horizontal or vertical clustering.
Biases in spatial resolution The bias of the track position in each cluster of the ERAM plane is defined as the mean of the Gaussian fit of the distribution of residuals per cluster, and can be referred to as the systematic uncertainty of the track position estimation. In  [22, 34]  it is shown that the biases depend on the track position. The data collected during this campaign allow for a deeper study of biases, in particular their dependence on drift distance for both horizontal and inclined tracks, as well as their behavior for various magnetic field strengths (see Sec. 12). In order to further investigate the behavior observed in Fig. 16 , the dependence of the spatial resolution and bias per column on the drift distance is shown in Fig. 17. For the smallest and largest drift distances, biases have visible patterns with large and opposite biases at the beginning and at the end of the track.