dataesr/scientific-paragraphs-categorization huggingface dataset:
Repositories The software is managed in a github repository  [31] , and branches and forks are utilized to accommodate parallel development by several groups. Two main branches, master and development, are utilized to store code ready for production and for validation, respectively. For the main branches, all modifications are made through pull requests after passing the automated tests described in Section 8. 3 and require approval by a designated CLAS12 software expert. 3 Currently all DST banks are saved to a file.
Code tests and validation In addition to automatic builds, the software includes both basic unit tests and advanced tests for several packages. These are designed to verify the correctness and reproducibility of the reconstruction output for a specific package or for the overall event, respectively. Unit tests involve, for example, reconstructing a simulated track or particle hit in a specific detector and comparing the result to the truth information. Advanced and extended tests are run on either a Monte Carlo or beam data sample, comparing to the Monte Carlo truth information in the first case or to the results obtained in previous releases in the second case. A portion of the tests are run automatically at build time, using the TravisCI system linked to the github repository. These automatic tests take about 30 min to run and have proven invaluable in overseeing software development.
Artificial intelligence assisted forward tracking Recent progress in the field of machine learning offers a promising alternative to conventional algorithmic tracking methods. While the conventional methods provide algorithms that are well understood and well studied, there are some algorithms in the data reconstruction process that can be substituted with neural networks to reduce data processing times. For CLAS12, tracking is the most time-consuming aspect of experimental data processing. Tracking in the DC takes up to ∼90% of the total data processing time, which includes finding track candidates and iterating through track-forming segments to find the best combinations of segments that can form a track. This time increases with luminosity as the number of noise segments increases and can ultimately lead to processing time degradation.
Improvements to event reconstruction The CLAS12 detector began beam operations for physics in early 2018 after a several month commissioning phase. Since that time the event reconstruction code has continued to improve to meet issues as they have arisen. However, the code and the framework are already performing well enough for advanced physics analysis of the collected data to proceed. A broad survey of reconstruction results using the current CLAS12 software framework and event reconstruction code are presented based on beam data in Ref. [1]. As might be expected, there are still areas where development, testing, and validations are in progress in order to continue improvements. In this section, several areas of ongoing work are highlighted.
Conclusions We have presented the software framework and event reconstruction algorithms that are currently being utilized for the processing of data collected by the CLAS12 experiment in Hall B at Jefferson Lab. The framework was developed to allow processing of CLAS12 data for reconstruction and analysis based on a service-oriented architecture. The specific software applications leverage an extensive set of common libraries for handling I/O, geometry, databases, and magnetic field that are designed to support data monitoring, calibration, reconstruction, and analysis. Full event reconstruction is implemented in the framework as a chain of micro-services that perform reconstruction of the individual CLAS12 subsystems and whose output information is collected by the Event Builder service to form and identify particles.
Acknowledgments We would like to thank the  JLab IT Division and CODA group  for their support. This work was supported in part by the  Chilean Comisión Nacional de Investigación Científica y Tecnológica (CON-ICYT) , the  Italian Istituto Nazionale di Fisica Nucleare , the  French Centre National de la Recherche Scientifique , the  French Commissariat à l'Energie Atomique , the  U. S. Department of Energy, Office of Science, Office of Nuclear Physics  under contract  DE-AC05-06OR23177 , the  National Science Foundation , the  Scottish Universities Physics Alliance (SUPA) ,  United Kingdom , the  United Kingdom's Science and Technology Facilities Council , and the  National Research Foundation of Korea.
Introduction Characterising soil variability, especially over large areas, remains a crucial challenge for fostering the sustainable management of agronomic and environmental issues and helping stakeholders to design regional projects  (Chaney et al. , 2016). At the regional and country level, soil maps are often available at a coarse spatial resolution  (Bui and Moran, 2001)  which limits their ability to depict accurate soil information. For instance, the finest soil maps covering France were extended to include administrative regions at a 1 : 250 000 scale, via a set of polygons, called soil map units (SMUs) with crisp boundaries. The delineation of SMUs is based on soil survey programmes involving pedologists' expertise. In a coarse-scale map, each polygon includes one or several soil type units (STUs), which are not explicitly mapped, but their proportions, environmental conditions and soil characteristics are provided in a detailed database  (Le Bris et al.
Odgers et al. (2014)  have developed a machine-learning algorithm entitled the Disaggregation and Harmonisation of Soil Map Units Through Resampled Classification Trees (DSMART) to predict STUs as a function of the highresolution environmental data supplied over different study areas in Australia. The DSMART algorithm is based on a calibration data set derived from a random selection of a fixed number of sampling points within each soil polygon. Each sampling point is then assigned to one soil type following a weighted random allocation procedure based on the proportions informed by the soil map database. The same procedure was applied by  Chaney et al. (2016)  to spatially disaggregate the soil map of the contiguous United States of America at a 30 m spatial resolution. Because the integration of pedological knowledge has been recognised as an effective way to improve digital soil mapping approaches  (Cook et al.
Study area The Ille-et-Vilaine region covers an area of 6775 km 2 and is located in the eastern part of Brittany, France (48 • N, 2 • W; Fig. 1 ). It is drained by the rivers Ille and Vilaine and their tributaries. Its climate is oceanic, with a mean annual rainfall of 669 mm and mean annual temperature of 11. 3 • (Source: Climate Data EU). Main land uses include arable land, temporary and permanent grasslands, woodlands and urban areas. In the present study, anthropogenic areas were not considered. Elevation ranges between 0 and 20 m in the coastal zone and 20-150 m almost everywhere else, except in the western part of the region where it tills at 256 m. The topography is generally gentle, with maximum slopes not exceeding 16 %. The Ille-et-Vilaine region is part of the Armorican Massif, with complex geology (BRGM, 2009) including intrusive rocks (granite, gneiss and mica schist) in the northern and northwestern zones, sedimentary rocks (sandstone) and metamorphic rocks (Brioverian schist) in the central and southern zones, and superficial deposits (aeolian loam with decreasing thickness from north to south overlaying the bedrock, alluvial and colluvium deposits).
Soil data 2. 2. 1 Regional soil database at 1 : 250 000 scale In Brittany, soils are represented through a regional geographic database called the Référentiel Régional Pédologique (RRP) and available at a 1 : 250 000 scale  (INRA Infosol, 2014 ). This regional database identifies soils within soil map units (SMUs), each containing one to several soil types called soil type units (STUs). STUs are defined as areas with homogeneous soil-forming factors such as morphology, geology and climate. In the study area, 96 SMUs and 171 STUs have been distinguished and represented by a spatial coverage of 479 polygons. The STU nomenclature respects the French soil classification system  (Baize and Girard, 2008). It reflects different information simultaneously like the weathering degree of the soil parent material, the redoximorphic conditions and the soil type, which refers to the identification of diagnostic horizons depicting pedogenetic processes and the soil depth.
2. Soil type unit (STU) assignment to each sampling point following a weighted random allocation method. This step was based on the proportion of each STU informed by the RRP database. 3. Decision tree generation once the full set of sampling points had been spatially intersected with the selected environmental covariates. This geo-referenced data set was then used as a calibration data set to build the decision tree, which allowed the prediction of an STU as a function of environmental covariates. C5. 0 created explicit models which were applied to the covariates rasters to generate a realisation of the STU distribution over the study area at a 50 m resolution. These three steps were repeated 100 times to generate 100 realisations of the potential soil type distribution over the study area at a 50 m resolution.
Original DSMART algorithm and expert rules (method 3) Including soil landscape relationships in the disaggregation process was explored by  Vincent et al. (2018)  in a specific regional pedoclimatic context in Brittany (France). Expert soil landscape relationships were used to assign STUs to sampling points. These relationships were based on expert pedological knowledge, which considers the soil parental material and topography and waterlogging in the STU-allocation procedure. This approach combines two sources of the data set to calibrate the model. The first one was derived from semantic information for each SMU-STU combination. It consists of attributing a barcode to each SMU-STU combination, derived from a concatenation of four features contained in the RRP database (namely soil parent material, SMU identifier, TPI and waterlogging index), and comparing these barcodes to a stack of regional covariates representing the same four features and then assigning each pixel of the study area to a suitable STU.
The semantical validation was also performed by considering either each STU or a group of STUs sorted by experts on the basis of similar pedogenesis factors and similar di-agnostic horizons  (Vincent et al. , 2018; Møller et al. , 2019). From the initial 171 STUs described in the soil database, the sorting procedure led to 78 groups and 11 STUs remained single. In this study, the validation data set with 755 observations was used to assess the accuracy of the digital maps derived from method 1 and method 3, but it was used as an additional calibration data set for method 2. Moreover, to assess the performance of the three DSMART-based approaches, the confusion matrix was used to derive the Kappa index. This Kappa index corresponds to a chance-corrected index of the agreement between observed and predicted soil types  (Cohen, 1960; Elith et al.
Pairwise comparisons of disaggregated soil maps To compare the soil type rasters derived from the three DSMART-based approaches, pairwise comparisons were performed using the V measure method implemented as open source software in an R package called the Spatial Association Between REgionalizations (SABRE;  Rosenberg and Hirschberg, 2007). This is a spatial method developed to compare maps in the form of vector objects, and it was commonly used in computer science to compare (nonspatial) clustering. SOIL, 6, 371-388, 2020 https://doi. org/10. 5194/soil-6-371-2020 We divided the entire study area into two different sets of regions referred to as regionalisation R and Z. The first regionalisation, R, divides the domain into n regions r i (i = 1 to n), and the second regionalisation, Z, divides the domain into m zones z j (j = 1 to m).
Disaggregated soil maps Applying DSMART-based approaches yielded a set of soil maps and associated probability of occurrence rasters. The original DSMART approach allowed for the disaggregation of the 96 SMUs into 108 STUs, while DSMART with the expert rules approach yielded 158 STUs and DSMART with the extra soil observations approach yielded 172 STUs with respect to the first most probable STU map. A total of 171 STUs were identified in the Ille-et-Vilaine region within the RRP database. Unpredicted STUs correspond mainly to rare STUs, with low proportions ranging between 2 % and 10 % within the SMUs containing them. Figure  3  shows the three maps of the first most probable STUs derived from each approach and the original soil map. Overall, the three most probable STU maps captured the main pattern of soil distribution of the coarse soil map.
9 and 0. 43, respectively. Although the most probable soil classes provide plausible maps of the soil distribution, there is a significant prediction uncertainty as depicted by these measures. In regions where disaggregated soil maps showed a low confusion index, particularly in the northwest and on the north coast areas of Ille-et-Vilaine region, high confidence in predictions was suggested. These areas were predominantly deep loamy soils or developed in alluvial and colluvium deposits. Figure  6  compares the cumulative area of the STUs estimated from the three disaggregated maps and those derived from the regional soil database. For each STU, its relative predicted area was estimated by counting the number of pixels where it was predicted. For the regional soil database, each STU area was computed from the total SMU area multiplied by the proportion of the STUs.
This comparison shows that some STUs were overestimated by the disaggregation approaches when comparing them to the soil database. DSMART with the extra soil observations and original approaches showed similar cumulative STU areas under the curve, whereas DSMART with expert rules had a shape similar to the regional soil database. The most abundant STUs in the database (431: Stagnic Fluvisol developed from alluvial and colluvium deposits) were predicted to be the most frequent STUs by DSMART with extra soil observations and DSMART with expert rules, and it was predicted as the second most abundant STUs by the original DSMART algorithm. The 10 most abundant STUs in the soil database cover almost 43 % of the study area. Of these, seven belong to the 10 STUs most predicted by the three disaggregation approaches (Table  2 ).
Legacy soil data Legacy soil data used in this study provide an overall representation of soil over large areas (1 : 250 000 scale). This database was derived from several soil surveys and pedological expert knowledge. SMUs were spatially delineated, SOIL, 6, 371-388, 2020 https://doi. org/10. 5194/soil-6-371-2020 and their spatial organisation, and STUs features, was described according to available soil data and pedological expertise. STUs and their associated landscape characteristics were identified as accurately as possible using legacy soil profiles collected according to a not probabilistic sampling design between 1968 and 2012. Hence, differences in survey methods covering a large area over a long sampling period could lead to errors in the STU definition or to uncertainties in the estimation of their area in a given SMU.
Moreover, soil survey intensity was not uniform within SMUs. Thus, SMU components may be derived from the unequal representation of soil samples across SMUs. Harmonising soil data to reduce the number of STUs is a great challenge by itself. Grouping some STUs regarding their pedological similarities, such as sharing comparable morphological criteria, having similar pedogenic horizons and occurring in analogous environmental conditions, is worth investigating. More importantly, unifying soil data according to more functional aspects, such as soil agricultural potential, also allows for the generation of a relevant regional soil database that is easily handled by soil users to satisfy their needs. Many countries around the world have already harmonised their soil databases, such as Denmark and Australia, where high pedological complexity was captured with a reasonable STU number -not exceeding 23 soil groups in Denmark  (Møller et al.
Improvements and future work Even though this work emphasises the contribution of pedological knowledge to the disaggregation process, other pathways can also be explored to improve the map's accuracy. As recommended by  Mulder et al. (2016) , compensating the temporal changes and differences in laboratory analytics is a good option for improving the quality of legacy soil data. This suggests harmonising the local soil database and regrouping some STUs with similar soil-forming factors through statistical modelling. Moreover, additional environmental covariates with high spatial resolutions should be used to capture the micro-landscape variability  (Lacoste et al. , 2014; Odgers et al. , 2014; Chaney et al. , 2016; Møller et al. , 2019). For example, adding a more detailed digital elevation model allowed the capturing of small terrain features where STUs occurred.
Work overview Our goal is to localize clusters, either EM or hadronic, in the 3D HGCAL data. Due to the complexity of the Object Detection models, a preliminary study with HGCAL 2D images resulting from the projection of the 3D data into 256x256 histograms is carried out. It allowed expertise on the hyperparameters of the Mask RCNN models to be acquired. In the first step, the Mask RCNN model should create clusters and: • predict their localization in the form of bounding boxes, • assess their class (EM or hadronic), and • determine their mask. Then, we can evaluate if this approach is well suited to localize and classify the numerous HGCAL clusters. As will be explained later, it is necessary to build synthetic HGCAL events to perform this analysis. In the near future, it is foreseen to confirm the results on directly simulated events.
First, given an anchor, the RPL predicts if the anchor is of interest or not (two classes: foreground/background). In the same sub-module, the Region Proposal Network (RPN), a bounding box prediction is performed. After these two predictions, anchors are filtered according to their score and the ratio of their intersection area over union area (called IoU -Intersection Over Union) between the considered anchor and Ground Truth (GT) bounding boxes provided by the training dataset (see  [7, 16]  for a more detailed description). Mask-RCNN head: This module receives one by one the feature maps P i interpolated on the ROI bounding boxes given by the RPL. Then three neural networks predict the class, the final bounding box and the mask of the feature maps of the ROI. For our study, we defined two classes: one called EM class, for the dense cluster associated with electromagnetic particle and one called here Pion class, for the showers associated with hadronic particles.
Building the Dataset Just like with standard DNN, we need to build a dataset (the training dataset) to learn and another one (the validation dataset) to test the model with different images/events. The model is fed with 256x256 images which represent the 2D projections of the hit energy deposits (3D coordinates). The GT data (classes, bounding boxes and masks) are used iteratively in the training part to compute the loss and to find the new weights of the five DNN until the loss converges. For the validation part, the model is fed with the 256x256 images of the validation dataset, to find clusters which are classified (EM or hadronic class), localized (bounding boxes) and with predicted masks. The GT data are only used to assess the quality of the model (architecture, model hyperparameters and learned weights), and to check possible overfitting.
In the following, a HGCAL design similar to that of  [1]  is considered and only the hits in the 52 first layers are used (28 from the electromagnetic region and 24 from the hadronic region of the previous version of the HGCAL design -see Fig. 1 ). These 52 layers are used to build standard 256x256 input images for our Mask RCNN 2D-model. In our HGCAL study, one of the major problems with Object Detection training is to build a GT dataset. Even if we can easily generate HGCAL events with simulations, getting all the GT data (particle classes, bounding boxes and masks) of all clusters/showers in an event is hardly feasible. Indeed, the amount of information to preserve in simulations would be prohibitive. To get around this problem, we decided to generate complex synthetic events by overlapping simple ones.
First, we performed simulations of single particles in the HGCAL detector with the following requirements: • the particle track must be unique in the forward or backward detector, • the global particle energy must be greater than a cutoff value (here 20 GeV). With these criteria, a primary dataset is built with the GT information required for the training (class, bounding box and mask). The 3D deposit energy map is projected on two 2D histograms (one on the xz plane and one on the yz plane) to feed the Mask RCNN model with images. The mask of the object is computed by performing a Principal Component Analysis (PCA) used to define a surface enclosing 90 % of the total energy deposit in the detector. The bounding box is calculated from the obtained ellipse. The final training dataset is produced by overlapping different simple events coming from the primary dataset.
Results Two different primary datasets in which particles/objects are randomly drawn to build the two independent datasets (training and validation datasets). The number of particles/objects per event is randomly selected from a range of 12 to 20. Datasets containing 5000 and 50 synthetic events (built as explained in Sect. 2. 4) have been used for the Mask RCNN training and the validation respectively. The model has been trained on 30 epochs with a learning rate of 10 -3 for the 10 first epochs then decreased to 10 -4. As can be seen in Fig. 4 , the model is learning: the loss decreases rapidly then seems to converge smoothly. High fluctuations can be observed in the validation plots, caused most probably by the low value of the validation set (50 events). The Figure  4  shows that the total loss is dominated by L RPN bbox loss, and demonstrates how the RPN is important in the model and attention must be paid to its hyperparameters.
Once the Mask-RCNN model with its hyperparameters is trained, the model is run on the validation dataset (this data was not used to train the model) then the predictions are compared with the GT data to compute statistical metrics of the model quality. This mode is called in ML literature detection or inference or test. One of these criteria computed by the Matterport implementation  [18]  is the precision value with 0. 5 IoU value, meaning that a True Positive (TP) is found when the overlap area between a GT bounding box and a predicted bounding box is greater than 50 % of the union of the two areas. With these considerations, the precision is defined as the ratio: Precision(IoU) = T P(IoU) T P(IoU) + FP(IoU) (4) In our case, the Precision(IoU = 0. 5) = 0. 73 which is a quite good result for these "out of the box" first measurements.