dataesr/scientific-paragraphs-categorization huggingface dataset:
Global Architecture The architecture of our Docker server is illustrated in Figure  18. The main components are: (i) an ETL (Extract/Transform/Load) process that receives music documents and produces their musical features, (ii) an Elasticsearch server that indexes music features, supports searches, and ranks results, and (iii) implementation of several utility functions, including the matching occurrence identification. All these modules are written in Python. Once instantiated, the server communicates via a REST API which supplies insertion and search services. An external application (such as Neuma) can rely on this API to integrate a search module. Elasticsearch  [77]  is a tunable search engine that provides several interesting features fitting our needs. It supports scalable data management based on a multi-server architecture with collections sharding, a rich query language, and the capability to tune the scoring function.
Note that these features are shared with other search engines such as, for instance, Solr  [78]  or Sphinx  [79]. The design of our framework relies on its ability to exploit these standard functionalities. Any of the above search engines would be a suitable candidate for supporting our solution and supplying a scalable search operation without any further implementation. The main difficulty lies in the integration of an ad hoc scoring function. The server receives music documents via its REST API. Each document is then submitted to a pre-processing phase composed of three steps: Extract, Transform, and Load. The Extract phase produces the music content descriptors (see Section 3). A specific extractor is required for each input format. In the case of XML-encoded scores, there exists ready-to-use toolkits such as Music21  [80]  for parsing the input, accessing relevant data, and structuring this data according to our model.
Query Processing A query is submitted to the server as a pattern P along with the feature type T. We accept the Plaine and Easie coding formats for P. From this encoding a content descriptor D = extract(P) is built using a dedicated extractor, and a feature of type T is obtained through the standard feature production function. This feature is n-gram encoded and submitted to ElasticSearch as part of a "match_phrase" query. This is illustrated by the following query from the ElasticSearch Domain-Specific Language (https: //www. elastic. co/guide/en/elasticsearch/reference/current/query-dsl. html (accessed on 17 January 2022)), showing a match_phrase query with a chromatic feature with two 3-grams encoding the following chromatic fragment: two ascending semitones, two descending, one ascending, and five descending.
{ "query": { "match_phrase": {"chromatic": "2+;2-;1+ 2-;1+;5-"} }, "highlight": {"fields" : {"chromatic" : {}}} } ElasticSearch carries out the search operation, and at this point, we benefit from all the capacities of a top-level indexing system: a set of all the matching documents is retrieved. The non-standard part then occurs: we must rank this set according to the relevant distance (which is not the default one supplied by ElasticSearch for textual data). Elasticsearch is a tunable search engine that can be extended with a specific ranking algorithm. We implemented our own SearchScript (https://www. elastic. co/guide/en/elasticsearch/reference/ current/modules-scripting. html (accessed on 17 January 2022)), as a Java implementation of the proposed ranking procedures (Sections 5. 3 and 5.
4). The following example shows how to use our custom ScoreSim ranking function, for a diatonic search that requires a ranking on the rhythmic part. SearchScript requires specifying the custom plugin name (here "lang:ScoreSim"), and input parameters (here "params") that will be used in the procedure. Here two parameters are given, the first one gives the searched pattern "query" and the type of similarity that is applied "similarity". { "query": { "function_score": { "functions":[ {"script_score": {"script": { "lang": "ScoreSim", "params": { "query": "(0|1/2)(1|1)(2|1)", "similarity":"rhythmic" } }}} ]}} }.
Data and Performance Evaluation In order to study the performances of our approach, we compare our architecture implemented with Elasticsearch to a traditional pattern search, based on regular expressions. We have imported in the Neuma platform  [76]  a corpus of 14,637 scores from various sources, including Kern@HumDrum (https://kern. humdrum. org/ (accessed on 17 January 2022)). We then apply different queries on the whole corpora and report the computation times. We especially focus on applying various patterns, from infrequent to more frequent ones, based on the popularity of the indexed n-grams. We sampled 40 patterns from each of the three chromatic, diatonic and rhythmic feature domains, with different distributions of pattern occurrences. The patterns exhibit different lengths, from 3-grams to 11-grams (which are rather infrequent).
This simplifies the target but does not keep from addressing the other important issues regarding in particular the quality of the result. The search engine could also be extended with a faceting capability, to enhance filtering the search result page and organize relevant documents. Another future direction is to add new features. Some could be extracted from symbolic music data, such as harmony and tonality. Some may require data in audio format, like timbre, since certain types of features are only available for extraction in audio. The major challenge of this task is to rank the search result of queries targeted at such features. Finally, the ranking part of the search engine could be more versatile. In the future, ranking with geometric measures  [82] , transposition distance  [83] , or dynamic time warping based approaches  [84, 85]  could be integrated into the system.
We benchmark our method against alternative artifact removal techniques. We assessed the performance of the proposed method on publicly available datasets comprising ocular, muscular, and movement artifacts. The proposed method shows superior performances on different kinds of artifacts and signal-to-noise levels. Finally, we present an application of our method to the monitoring of general anesthesia. We show that our method can successfully attenuate various types of artifacts in single-channel EEG. Thanks to its data-driven approach and low computational cost, the proposed method provides a valuable tool to remove artifacts in real-time EEG applications with few electrodes, such as monitoring in special care units.
Most EEG monitoring devices already include artifact detection algorithms so that automated analysis can be suspended when the signal quality is degraded. This paper is organized as follows. In section II we introduce the notation and the discrete wavelet transform (II-A), we briefly present the classical wavelet denoising approaches which we used to benchmark our method (II-B), and finally we present the wavelet quantile normalization method (II-C). 1 n section III, we describe the validation datasets and methodology: we briefly present the datasets used for benchmarking (III-A), the performance metrics (III-B), and the parameters used in the comparison (III-C). In section IV we discuss the results and present potential application to anesthesia monitoring. Finally, we present our conclusions in section V.
A. Datasets for Benchmarking To validate the proposed method, we compare its performances on both unmodified and semi-simulated EEG recordings using publicly available datasets  [47] ,  [50] ,  [51]. Each dataset comprises an artifacted EEG signal and a corresponding reference EEG signal used as ground truth. Artifact detection labels are given as input to the different algorithms. 1) Physiobank Motion Artifacts Dataset  [47] ,  [52] : This dataset contains 24 EEG recordings. The EEG signal was acquired by two closely placed electrodes producing highly correlated signals. The cable of one electrode was pulled at intervals of roughly 2 minutes to produce random artifacts, while the other electrode was kept still. Artifact removal can then be applied on the signal produced by the contaminated electrode, while the other channel is used as a ground truth reference.
We filtered both channels in the range 0. 1 Hz to 100 Hz with a Butterworth forward-backward filter of order 4 and down sampled to 256 Hz. Labelling of the artifacts was performed by thresholding the difference between the reference and the artifacted electrode. Recordings 10, 20, 21 were partially excluded after visual inspection revealed artifacts in the reference channel. 2) Semi-Simulated EEG/EOG  [50] : This dataset contains 55 recordings from 19 EEG electrodes (200 Hz) and an equal number of EOG signals. The EOG signals are combined linearly to the EEG signal  [50]  to produce artifacted recordings. We modified the dataset to obtain 30 seconds recordings where the central 10 seconds are corrupted by EOG and marked as an artifact. Recording 36 was excluded after visual inspection. 3) Denoise-Net  [51] : This dataset includes thousands of 2-second epochs of EEG, EOG and EMG recorded at 256 Hz.
We combined the clean EEG epochs with EOG and EMG to produce simulated datasets with 3400 artifacted epochs. These epochs were produced by summing one second artifact signal (EOG, EMG, or EOG+EMG) to the second half of the clean epoch. The amplitude of the artifact was rescaled to obtain SNR values in the range -20 dB to 5 dB (Fig. 3 ). A limitation of this dataset is that the clean and artifacted epochs are independent and there is no guarantee that they belong to the same subject.
B. Performance Metrics We employed different metrics to evaluate the performances of the artifact removal methods. Benchmarks were run with Python 3. 9. 7 on a Linux workstation equipped with an Intel Xeon Gold 5218R CPU (2. 10 GHz). 1) Change in Signal to Noise Ratio: We define the metric SNR as the change in the signal to noise ratio (SNR) before and after artifact removal. We only consider the signal epochs which were labeled as artifacted. The calculation of SNR is defined as  [21] : SNR before = 10 log 10 Var(x 0 ) Var(x (art) -x 0 ) , ( 14 ) SNR after = 10 log 10 Var(x 0 ) Var(x (corr) -x 0 ) , ( 15 ) SNR = SNR after -SNR before , ( 16 ) where Var(•) is the variance estimator, x 0 is the ground truth signal, x (art) is the artifacted signal, and x (corr) is the signal obtained after artifact removal.
5) Execution Time: The execution time (see Table  II ) was calculated using a sample of duration 30 s at 256 Hz taken from the Physiobank dataset  [47]. Each method was repeatedly applied to the same EEG sample, selecting the fastest run out of 10. All methods except SuBAR were implemented in Python and included in the published code. The original Matlab implementation provided by the authors was used for the SuBAR method  [43].
A. Artifact Removal Effectiveness To validate the effectiveness of the WQN method we benchmarked it against alternative artifact removal algorithms which are suitable for single-channel EEG recordings: wavelet thresholding (with both soft and hard thresholding functions), EMD-ICA, EMD-CCA  [21] , and surrogate-based artifact removal (SuBAR)  [43]. We included artifacts of different nature (movement, ocular, muscular) using datasets of semi-simulated and real EEGs (section III-A), where we used a ground truth signal to evaluate the performances of artifact removal algorithms. We quantified the reduction of artifactual components using the normalized mean squared error (NMSE), the gain in SNR (SNR), the change in correlation (R), and the improvement in spectral coherence (I coh ), obtained by comparing the output of the artifact removal algorithms to the ground truth signal (section III-B).
We note that in some cases, an algorithm can show an improvement in terms of SNR and NMSE but at the same time destroy the structure of the signal, losing the information content of the data. This is particularly the case for high-power artifacts. To avoid this effect, we consider the change in correlation (R) and coherence (I coh ) as well as NMSE and SNR. Since a degradation of the signal will coincide with a lower correlation to the ground truth, we consider that a simultaneous improvement in SNR, R, and I coh is a solid indication of reliable artifact removal. In particular, improvement of coherence allows to detect possible spectral distortions introduced by the artifact removal. We found that WQN performed better among the tested methods in terms of SNR and NMSE, producing the highest increase to signal to noise ratio (SNR) and the lowest normalized mean squared error on all datasets.
The benchmark results are shown in Table  I. We then investigated how the performances depend on the initial signal-to-noise level. To test this, we rescaled the amplitude of the artifacts in the Denoise-Net datasets (sec. III-A. 3) to obtain SNRs between -20 dB (large, powerful artifacts) and 5 dB (small artifacts). In Figure  3  we show the SNR for the various initial SNR values on muscular and ocular artifacts. WQN consistently outperformed the other methods in the case of muscular artifacts, showing higher SNR for all initial SNR levels. In this case, SuBAR outperformed soft wavelet thresholding for weak muscular artifacts (Fig. 3A ). For ocular artifacts, EMD-based methods and WQN showed the best performances, with WQN significantly outperforming other methods for low SNRs (< -10 dB).
Since the number and length of artifacts is typically limited, the computational complexity will be dominated by the O(M N) term. In practice, the WQN algorithm can be faster than WT since the DWT has to be computed only on short fragments of the signal around the artifact. In the SuBAR method  [43]  the leading term of computational complexity comes from the generation of Fourier surrogates via Iterative Amplitude Adjusted Fourier Example of artifact removal via WQN (original signal in black, corrected signal in blue). A Motion artifact. B Eye blink artifact. C Muscular artifact (EMG). (The samples were obtained from datasets  [47] ,  [60] ,  [61]. ) Transform (IAAFT)  [45]. Each iteration of the IAAFT algorithm requires the computation of Fourier transform and sorting of the coefficients, with both operations requiring O(N log N) time.
CCA can be efficiently implemented by singular value decomposition with complexity O(M 2 N) and typically outperforms ICA  [21] ,  [59]. We then compared the performances of practical implementations of the algorithms by measuring the CPU time required to analyze a 30-second EEG sample taken from the Physiobank dataset  [47]. WQN and wavelet thresholdings showed similar performances (2 ms and 3 ms respectively) and were superior to EMD-based and SuBAR algorithms (314 ms for EMD-CCA, 419 ms for EMD-ICA, and 31 s for SuBAR). In conclusion, we found that the computational cost of the WQN method is comparable to that of wavelet thresholding and that both are significantly faster than EMD and surrogatebased methods. The computational complexity and the CPU execution time for each algorithm are summarized in Table  II.
ONVALIDATION ON DIFFERENT DATASETS FOR THE PROPOSED WQN METHOD, WAVELET HARD THRESHOLDING (WT-HARD), WAVELET SOFT THRESHOLDING (WT-SOFT), SUBAR, EMD-ICA, AND EMD-CCA METHODS. THE VALUES ARE OBTAINED BY AVERAGING OVER ALL RECORDINGS IN A DATASET. ΔSNR AND NMSE VALUES ARE IN dB. THE BEST PERFORMANCE FOR EACH METRIC IS HIGHLIGHTED IN BLACK.
Radar (SAR) satellites systematically acquire imagery that can be used for volcano monitoring, characterising magmatic systems and potentially forecasting eruptions on a global scale. However, exploiting the large dataset is limited by the need for manual inspection, meaning timely dissemination of information is challenging. Here we automatically process ~ 600,000 images of > 1000 volcanoes acquired by the Sentinel-1 satellite in a 5-year period (2015-2020) and use the dataset to demonstrate the applicability and limitations of machine learning for detecting deformation signals. Of the 16 volcanoes flagged most often, 5 experienced eruptions, 6 showed slow deformation, 2 had non-volcanic deformation and 3 had atmospheric artefacts. The detection threshold for the whole dataset is 5. 9 cm, equivalent to a rate of 1.
2 cm/year over the 5-year study period. We then use the large testing dataset to explore the effects of atmospheric conditions, land cover and signal characteristics on detectability and find that the performance of the machine learning algorithm is primarily limited by the quality of the available data, with poor coherence and slow signals being particularly challenging. The expanding dataset of systematically acquired, processed and flagged images will enable the quantitative analysis of volcanic monitoring signals on an unprecedented scale, but tailored processing will be needed for routine monitoring applications.
In the last decade, there have been thousands of detections per year, most of which are co-eruptive thermal and gas emission signals. In contrast, many deformation signals are pre-eruptive  (Furtney et al. 2018 ), thus offering the potential to inform eruption forecasting and crisis management  (Biggs et al. 2014). Launched in 2014, the European Sentinel-1 constellation offers global coverage of radar images with a repeat cycle of 6 days at best, amounting to > 13 TB per day. The explosion in data represents a remarkable opportunity for global volcano monitoring, but has brought major challenges associated with manual Editorial Responsibility: W. W. Chadwick, Jr. This paper constitutes part of a topical collection: Volcanic processes: tectonics, deformation, geodesy, unrest. inspection of imagery and timely dissemination of information, which can only be addressed with automated methods such as machine learning.
Proof-of-concept studies using convolutional neural networks (CNN) have demonstrated the potential of machine learning algorithms for detecting volcanic deformation in large InSAR datasets  (Anantrasirichai et al. 2018). Following this, many new machine learning algorithms and architectures have been proposed for detecting and locating volcano deformation  (Anantrasirichai et al. 2019a; 2019b; Bountos et al. 2022 Bountos et al. , 2021;; Gaddes et al. 2019; Sun et al. 2020; Valade et al. 2019). However, these have only been tested on fairly small datasets (< 50,000 images) covering a limited range of volcano types, deformation characteristics and environmental conditions. For example, the dataset of  Anantrasirichai et al. (2018)  had two major limitations, despite being the largest available at the time.
(1) Forty-five percent of the ~ 30,000 images were from Europe -where Sentinel-1 acquired images every 6 days -but this limited the range of conditions considered. (2) Only 4 of the ~ 900 volcanoes covered had deformation signals (Etna, Erte Ale, Sierra Negra and Cerro Negro), but this is not representative of the full range of volcano deformation characteristics  (Biggs and Pritchard 2017; Ebmeier et al. 2018 ). Here we focus on the rapid expansion in the amount of available Sentinel-1 data in the last 4 years, from 30,000 images in 2019 to ~ 600,000 now. This new, expanded dataset provides an opportunity to test the existing algorithms on a wider range of deformation styles, atmospheric conditions and land cover, providing a benchmark against which future developments can be tested.
Methods We use a 3-stage approach to analyse the large dataset of satellite imagery available from Sentinel-1 (Fig. 1 ). The first step is the automatic generation of InSAR images using the COMET-LICSAR automated processing system  (Lazecký et al. 2020). The next step is the automatic analysis of the processed images, and we use a deep learning approach to classify each image  (Anantrasirichai et al. 2019b (Anantrasirichai et al. , 2018)). For volcano monitoring, false negatives are far more problematic than false positive, so we use a conservative thresholding approach. Finally, we perform an expert review to identify the true positives and characterise the signal at each volcano making use of any external information available.
Automated processing Interferometric Synthetic Aperture Radar (InSAR) produces maps ('interferograms') of surface displacement in the satellite line of sight (los) by comparing the phase of the backscattered signal in successive SAR images. Here we use the COMET-LICSAR archive of processed Sentinel-1 radar images spanning November 2015-November 2020 (http:// comet. nerc. ac. uk/ COMET-LiCS-portal/). Sentinel-1 data is taken directly from the Centre for Environmental Data Analysis (CEDA) Sentinel Mirror Archive (SMA) and processed using the COMET-LICSAR automated processing system which is based on the GAMMA SAR processing software package and runs on the UK Centre for Environmental Data Analysis infrastructure  JASMIN (Lazecký et al. 2020; Werner et al. 2000). The LiCSAR standard frames are a merge of 13 burst units for each of the 3 Sentinel-1 swaths, covering approximately 250 km by 250 km.
The interferograms are geocoded onto a 0. 001° × 0. 001° grid using elevation data primarily from the Shuttle Radar Topography Mission (SRTM). The system generates differential interferograms connecting each Sentinel-1 acquisition to at least three successive acquisitions in time. The original Sentinel-1 mission consisted of two identical satellites, Sentinel-1A and Sentinel-1B, each of which has a revisit period of 12 days. Sentinel-1A was launched in 2014 and Sentinel-1B was launched in April 2016, but ceased operating in December 2021. In theory, this would generate interferograms of 6-, 12-and 18-day durations when both satellites are acquiring data and 12-, 24-and 36-day interferograms when just one satellite is acquiring data. However, the satellites do not always acquire data on every pass and the CEDA-SMA and LiCSAR archives are not yet complete.
Although the majority of the inteferograms are shorter than 48 days in duration, missing acquisition means that longer duration interferograms are sometimes processed and > 10,000 interferograms are ≥ 120 days in duration (Fig. 2b ). These long duration interferograms are particularly important for detecting slow deformation and assessing the effects of coherence on detectability. We crop the area around each Holocene volcano to a 0. 5° × 0. 5° box centred on the coordinates provided by the Global Volcanism Programme (Global Volcanism Program 2013) generating 592,224 wrapped interferograms of 1084 volcanoes. In this dataset, ~ 10% of the interferograms are located over European volcanoes (compared to 43% in  Anantrasirichai et al. (2018) ) and there is good coverage of Latin American (28%) and Asian (22%) volcanoes, which are key volcanic settings (Fig.
2a, c ). Unfortunately, some notable deformation events prior to or during the time period considered are not covered by the LiCSAR archive (e. g. Ambrym  (Shreve et al. 2019 ), Semisopochnoi (DeGrandpre et al. 2019) , Fogo  (González et al. 2015) ). However, we chose not to artificially bias the dataset by running additional processing at these volcanoes. Although incomplete, the dataset is an order of magnitude larger than that used by previous machine learning studies and allows us to explore a wider range of signal characteristics, volcanic processes, atmospheric conditions and land cover types.
5) on 02-Oct-2019 (Fig. 8e ). Uplift at Svartsengi began in early 2020, which briefly reduced the cumulative deformation and hence the probability, before returning to P > 0. 5 by 19-Apr-2020. Again, this illustrates the challenges associated with using cumulative time series to detect changes in rate. Following the observation period, the unrest led to a dyke intrusion followed by the Fagradalsfjall eruption in March 2021, and can retrospectively be classed as precursory  (Flóvenz et al. 2022; Sigmundsson et al. 2022). Tambora, Indonesia, was the site of world's largest and deadliest historical eruption in 1815  (Self et al. 1984 ), but no deformation has been reported since. The Sentinel-1 dataset is sparse over Tambora and only extends to mid-2018, but 19% of the processed interferograms were flagged (Fig.