dataesr/scientific-paragraphs-categorization huggingface dataset:
JINST 18 P04034 in turn can be organized in one-dimensional, two-dimensional, or three-dimensional grids. Blocks in the same grid contain the same number of threads, can run independently, and can be executed in any order, while threads in the same block can co-operate through shared memory. CUDA kernels typically store the result of the computation in a pre-allocated array passed to the kernel function. The CUDA programming model requires a careful design of the algorithm: the shape and size of the array where the result is stored must be known in advance and the threads must avoid race conditions during execution, thus the result of the algorithm must not depend on the order of execution of the threads. The software described in this document contains several CUDA kernel functions, separated into two logical categories: one for the charge simulation, described in section 3, and one for the light simulation, described in section 4.
The functions simulate the detector response, including: (1) the recombination of the electrons with the argon ions, (2) the drifting of the electrons towards the anode, (3) the induction of electronic signals on the pixel pads and optical detectors, and (4) the electronics response of the charge and light readout systems. The simulation of the passage of the initial particles through matter is performed using edep-sim  [17] , a wrapper around G 4  [18] , which is independent from the larnd-sim package described here. The output consists of a set of short particle track segments, in the order of few millimeters, which describe the energy deposition trail of each particle. The length of the segments depends on the derivative of the stopping power 𝑑𝐸/𝑑𝑥: the portion of a particle trail where the 𝑑𝐸/𝑑𝑥 changes abruptly will be divided in finer segments than the portion where the 𝑑𝐸/𝑑𝑥 is mostly constant.
This array is used as input for our module. In order to minimize the memory transfer between the host and the device (in our case the GPU), we allocate the NumPy array directly on the device memory using CuPy  [19] , a GPU array backend that implements a subset of the NumPy interface. The output of the larnd-sim simulation is then saved in a HDF5 file  [20]. The entire simulation workflow is shown in figure  1.
The implementation of the calculation of the recombination factors R Birks or R Box on the GPU is trivial: the 𝑖-th thread of the 𝐾 recomb (𝑆 𝑖 , R) CUDA kernel takes as input the 𝑖-th row of the NumPy array containing the segments 𝑆 and applies the recombination formula, so eq. (3. 1) or eq. (3. 2). The result is stored in an appropriate column of the NumPy array. Currently, the simulation treats the recombination factor as a fixed number: although this is an approximation, the level of fluctuations associated with it is significantly lower than the expected intrinsic noise of the detector, which was measured with the prototype described in section 6. Even if this operation is computationally inexpensive, it's instructive to take a look at the performance comparison between a sequential, interpreted Python for loop, a loop compiled on the CPU using Numba, and the GPU implementation using a CUDA kernel.
In the region very close to the anode, the electric field and the weighting field are calculated numerically. The geometry of a small volume, including a central pixel with a pitch of 4. 4 mm and its 8 nearest neighbor pixels, is modeled using CAD software and converted into a 3-dimensional mesh using the Gmsh package  [27]. The fields are then calculated using the successive over-relaxation method as implemented in the Elmer FEM  [28]  software package. The electric and weighting fields share the same geometry, but differ in the boundary conditions imposed on the problem. In the electric field calculation, the pixels are grounded, with the backing plane at a small offset voltage, and the field on the cathode-facing side of the volume is set to the nominal field of 500 V/cm. In the calculation of the weighting field, all electrodes other than the central pixel are grounded, the central pixel is set to unit voltage, and the voltage on the remaining conductors is set to zero.
Profiling The larnd-sim code has been profiled using the NVIDIA Nsight ™ Systems and the NVIDIA Nsight ™ Compute tools v2021. 3. 0 with an input dataset of 250 simulated cosmic rays. The analysis shows that the algorithm is well optimized for GPUs. The charge simulation is responsible for around 70% of the processing time. Of this 70%, 97. 5% of the time is used by the induced current CUDA kernel described in section 3. 3. 2. This kernel, in turn, spends 99. 9% of the processing time for computing operations. The time spent for memory transfers, including also the initial time to allocate the dataset on the GPU memory, can be considered negligible. A Roofline  [39]  analysis performed on the induced current CUDA kernel proves that the algorithm is compute-bound, so the time needed to complete its task is determined principally by the computing speed.
JINST 18 P04034 6 Simulation of a cosmic-ray sample and data comparison A single-phase LArTPC called the ArgonCube Module-0 Demonstrator was operated in spring 2021 at the University of Bern as a prototype for the ND-LAr. The detector is divided into two functionally identical TPC drift regions, sharing a central high-voltage cathode that provides the drift electric field. Each anode is equipped with an array of 2 × 4 LArPix tiles of size 31. 038 cm 2 × 31. 038 cm 2. A total of 4900 pixel pads of size 0. 4434 cm 2 × 0. 4434 cm 2 are etched on the side of each tile facing the active volume. Each tile is instrumented by 100 ASICs placed on the opposite side of the board. The LArTPC drift length is 30. 27 cm. A dataset of cosmic-ray events was acquired with an applied electric field of 0. 50 kV/cm.
The detector performances are analyzed in detail in ref. [40]. Here we will compare the cosmic-ray data acquired with this experimental setup to a sample generated by the larnd-sim software. As a first step a dataset of cosmic rays is produced using the CORSIKA cosmic-ray generator v7. 7410  [41] , using FLUKA 2011 for the low-energy hadronic interaction  [42]. Then, the passage of the cosmic rays through the Module-0 geometry is simulated using edep-sim, a C++ wrapper around G 4. The output of edep-sim is passed to larnd-sim, which produces a HDF5 sample in the same format of the Module-0 data. Both the simulation and the data samples are passed to a reconstruction script, which takes as input an array of three-dimensional hits, one for each ADC count. The 𝑥𝑦 coordinates are given by the position of the pixel center on the tile, and the 𝑧 coordinate is given by the corresponding clock tick, using the inverse formula of eq.
(3. 3). The hits are clustered together using the DBSCAN algorithm  [43]. Hits grouped in the same cluster are fed to a principal component analysis (PCA), which returns three-dimensional segments that we define as reconstructed tracks. Figure  13  shows an example of a simulated cosmic ray crossing the cathode plane after the reconstruction stage, with the reconstructed track and the corresponding hits. To improve the system self-trigger stability, 7. 8% of the pixels in Module-0 were disabled due to an understood grounding issue, mostly near the tiles edges. The same pixels were also disabled in the simulation. Thus, reconstructed tracks may show artificial gaps due to the presence of disabled channels. Also, cathode-piercing tracks can be reconstructed as separated tracks, due to the non-null cathode thickness.
JINST 18 P04034 7 Conclusions We show that it is possible to implement the simulation of a pixelated LArTPC using highlyparallelized GPU algorithms. The algorithms are written in Python and they are compiled on the GPU using the Numba just-in-time compiler. The software provides an end-to-end microphysical simulation for light readout and pixelated charge readout. Table  1  shows a summary of the speed-up achieved by the GPU implementation for various steps of the simulation. In general, trivial algorithms (such as the calculation of the recombination factor) require a large amount of input data before the GPU implementation starts being faster. This is expected, since there are launch and execution overheads associated with CUDA kernels. For more complex algorithms, such as the simulation of the charge readout, the GPU generally starts being may orders of magnitude faster than the CPU with only a few tens of simulated pixels in the detector.
Highly-parallelized simulation algorithms such as the one described in this document could be adapted to speed up the simulation of the DUNE Far Detector as well, which will have O (10 6 ) readout channels  [45]. We have also performed the comparison of a simulated sample of cosmic rays with the data acquired by a prototype LArTPC equipped with a large-scale pixelated readout system, called the ArgonCube Module-0 Demonstrator. Charge distributions in data and simulation are in general good agreement. The Module-0 LArTPC was moved from Bern to Fermilab in October 2021, where it will be tested on the NuMI neutrino beamline with three other identical modules, currently under construction  [40] , forming the ND-LAr 2x2 prototype. The production of a dataset of accurately simulated neutrino interactions will be of fundamental importance for the analysis of this measurement.
larnd-sim will also be used to simulate the detector response of the full ND-LAr detector and has been included -21 -into the DUNE Offline Computing Conceptual Design Report  [46]. The DUNE collaboration is already using larnd-sim on the NERSC Perlmutter supercomputer, which shares a similar GPU node architecture with Cori, to perform ND-LAr 2x2 prototype simulations. A workflow chaining together edep-sim, larnd-sim and a machine learning-based reconstruction stage is currently under development. The choice of a high-level and largely supported programming language such as Python can enable the implementation of a fully differentiable simulator in the near future, by exploiting libraries commonly used in the machine learning and artificial intelligence fields (TensorFlow  [47] , JAX  [48] ).
Acknowledgments This document was prepared by the DUNE collaboration using the resources of the  Fermi National Accelerator Laboratory (Fermilab) , a  U. S. Department of Energy, Office of Science, HEP User Facility. Fermilab  is managed by  Fermi Research Alliance, LLC (FRA) , acting under Contract No. DE-AC02-07CH11359. This work was supported by  CNPq ,  FAPERJ ,  FAPEG  and  FAPESP ,  Brazil ;  CFI ,  IPP  and  NSERC, Canada ;  CERN ;  MŠMT ,  Czech Republic ;  ERDF ,  H2020-EU  and  MSCA ,  European Union ;  CNRS/IN2P3 and CEA, France ;  INFN, Italy ;  FCT, Portugal ;  NRF ,  South Korea ;  CAM ,  Fundación "La Caixa" ,  Junta de Andalucía-FEDER ,  MICINN , and  Xunta de Galicia, Spain ;  SERI  and  SNSF, Switzerland ;  TÜBİTAK, Turkey ;  The Royal Society  and  UKRI/STFC, United Kingdom ;  DOE  and  NSF ,  United States of America.
FORMAL MODELING AND VERIFICATION Model checking is a method developed in the eighties  (Clarke et al. , 1986)  for automatic verification of software models. It helps identify software design problems before implementation. In our case, we use model-checking not to verify a software tool, but to model the functioning of a brain structure and to explore all its possible behaviors. Hence probabilistic models are well adapted. Among the existing probabilistic model checkers, we chose PRISM  (Kwiatkowska et al. , 2011)  which is well established in the literature, and compatible with many other tools (parameter synthesis tools or other model checkers). PRISM is a tool for formal modeling and analysis of systems with random or probabilistic behavior. It supports several types of probabilistic models, discrete as well as continuous.
MODEL AND VALIDATION The first task was to provide a formal model of the main interactions between the different basal ganglia nuclei. We developed a PRISM model to artificially mimic the behavior of human inhibitory control through a probabilistic model based on discretetime Markov chains. Second, we automatically tested probabilistic temporal properties of this model thanks to model-checking to explore potential sources of pathological behavior in the inhibitory control circuit. The complete code of the model and supplementary materials can be found at https://gitlab. com/ThibLY/ inhibctrlformmodel. git.
For this we defined 2 different formulas (see PRISM code in figure  4 ): one takes into account both the SNpc and the cortex inputs and the second one only takes inputs from the cortex. Since  (Cheng et al. , 2010)  showed that the death of dopaminergic neurons reaches 70% in the later phases of Parkinson's disease, we considered that a pathological brain has a 30% probability to follow the first formula and a 70% probability to follow the second. In a healthy brain, dopaminergic neurons are functional so the brain model will always follow the first formula.
Healthy Inhibitory Control Model The implementation in PRISM of a healthy inhibitory control contains six modules: Entry (partial representation of cortex and SNpc), STr, GPe, STN, SNpr (representing the Gpi/SNpr complex considered as a single functional structure), and Th. These modules have an associated formula for their global membrane potential and constants for their connection weights, except Entry that generates input spikes following a Poisson law. Their connections follow the architecture of the basal ganglia shown in figure  2. However, we add two modules. First, the Delay module is a simplified neuron box that sends the same amount of spikes that it receives but at the next instant. This supplementary module is necessary as our model is a discrete system. It allows the SNpr to receive signals from GPe and STN simultaneously, by delaying signals from STN to make them reach SNpr at the same instant as the ones from GPe.
LA-ICPMS We used an Agilent 7500s quadrupole ICP-MS equipped with a New Wave UP213 laser ablation system (LA-ICPMS) at the Department of Earth and Environmental Sciences of the Chung Cheng University, Taiwan, for zircon U-Pb dating. The analysis process for the LA-ICPMS followed  Chiu et al. (2009). A secondary zircon standard GJ-1 was used to check the accuracy of the unknowns. (Jackson et al. , 2004). Data deduction and common Pb correction were conducted with GLITTER 4. 4. 2 (GEMOC) software and ComPbCorr, as proposed by  Andersen (2002) , respectively. Calculation of weighted mean U-Pb ages, probability density curves, as well as the plotting of concordia plots were carried out using Isoplot v. 3. 0  (Ludwig, 2008). The detailed analytical method of the LA-ICPMS lab at Chung-Cheng University can be found in  Knittel et al.
| Experiment This approach was implemented in a program written in C++ that includes a GUI to set the input variables and visualize the generated solutions. To accelerate the computations, all the processes can run in parallel thanks to an implementation using  OpenMP (n. d. ). The program was run on an Intel Xeon W-2135 CPU @ 3. 70 GHz × 12 with 32 GB RAM. A collection of 30 fields from the real world were chosen to evaluate the proposed approach. These fields range in area from 1. 83 to 13. 20 ha. Twenty fields have a simple shape for which no field decomposition was required, while 10 fields have a complex shape for which at least two different dividing lines were provided to try different field decompositions. To extract the data of these fields, the annotation tool of Géoportail (n. d.
FsolidM  (Mavridou and Laszka, 2018 ) is a framework for designing secure ethereum smart contracts. This tool provides a formal FSM-SC model, a graphical editor for creating FSM and automati-cally generates a solidity code in the form of a transition system  (Mavridou and Laszka, 2018). Also, there are four plugins, once a plugin is selected, the tool generates a predefined code and adds it into the final generated code. The locking plugin and transition counter plugin prevent the reentrancy and unpredictable state vulnerability through predefined modifiers for locking smart contract and adds a transition counter in all functions respectively. VeriSolid  (Mavridou et al. , 2019)  is an open-source framework that is built on top of WebGME  (Maróti et al. , 2014)  and FSolidM  (Mavridou and Laszka, 2018).
VeriSolid is a framework for developing smart contracts adopting the correct-by-design approach. First, from a transition system or solidity code, the tool generates a model called augmented transition from the transition system defined in  Mavridou and Laszka (2018). Second, VeriSolid writes automatically the generated transition system in BIP model  (Basu et al. , 2011; Basu et al. , 2006)  and triggers the BIP-to NuSMV tool  (Saab, 2015)  in order to get the smv code. Then, users formalize the properties in temporal logics CTL  (Emerson, 1990). Finally, a nuXmv model checker  (Cavada et al. , 2014)  is used to verify if the smv code meets the CTL properties. When all properties are satisfied, an equivalent solidity code is generated. Also, there is an extension of VeriSolid  (Nelaturu et al.
AGðEFðstate ¼ delegatecallÞÞ Authentication through ''tx. origin" When using the ''tx. origin" for authorization, an attacker can pass the authorization check through the sender address of the transaction that is stored in ''tx. origin". For that, the ''msg. sender" should always be used instead of ''tx. origin". (a) Solidity code example: (b) Finite state machine FSM-tx. origin (see Fig. 6 ): (c) CTL formulae: At least, there is one path, if there is a state= ifconditionjrequirecondition, then the next state: tx:origin ! ''tx. origin for authorization". tx. origin CTL formula: EGðstate ¼ if =requirecondition ! EXðstateðtx:origin ¼ ¼ adressÞÞ Unprotected ''selfdestruct" In case of the contract is no longer valid or emergency cases, solidity supports a ''SELFDESTRUCT" instruction that allows contract to destroy itself and sending the Ether to predefined accounts.
For attackers, they just need to reach into a func-tion that containing a ''selfdestruct" instruction to kill a contract. (a) Solidity code example: (b) Finite state machine FSM-Unprotected selfdestruct Fig. 7 ): (c) CTL formulae: In all paths, if the selfdestruct function is used under a smart contract function with visibility = public ! bug. Selfdestruct CTL formula: AGðstate ¼ public ! EFðstate ¼ SelfdestructÞÞ  In all paths, if there is state = fallback() or receive(), then the two next state = external and payable respectively, and. 9 = state= sending ether callðÞ=transferðÞ=sendðÞ ! bug. Ether lock CTL formulae: AGðstate ¼ fallbackjreceive ! EGðstate ¼ external ! EXðstate ¼ payableÞÞÞ &AG (EF! (state = sending_ether_call/send/transfer)) Unexpected Ether balance The use of the conditional statements to check the strict equality of a balance ''this.
balance" can make the contracts vulnerable and may force a contract to send ether using  some instruction such as ''selfdestruct". The approach detects comparison expressions that contain ''this. balance". (a) Solidity code example: (b) Finite state machine FSM-Unexpected Ether balance (see Fig. 11 ): (c) CTL formulae: At least, there is one path, if there is state = (condition), then the next state= (this. balacne == value) ! bug. Unexpected Ether balance CTL formula: EGðstate ¼ if jrequirejassertcondition ! EXðstate ¼ this:balanceÞÞ.
Implementation and validation We use a Ubuntu Linux machine with 4*i5(Â64 bit) CPU and 32 GB of memory. As model checker, we use the nuXmv version 2. 0. 0  (Cavada et al. , 2014). We have validated our approach with various examples of solidity codes. Some of these are taken from Ether. scan. Additionally, the CTL formulae have been validated with typical examples containing vulnerabilities like DAO contract (the famous contract that the reentrancy was appeared for the first time) and examples of functions considered vulnerable and cited in different sources  (Swc registry, 2020; Manning, 2018; ConsenSys, 2021; Zipfel, 2019)  that are concerned with collecting and classifying vulnerabilities and attacks in smart contracts. All examples and verification tests are available at GitHub 3.
This article presents the development and calibration of a numerical model simulating the response of a novel rockfall protection structure subjected to localised dynamic loading. This structure is made of piledup concrete blocks interconnected via metallic components whose dynamics response under projectile impact is examined via real-scale experiments. The corresponding numerical model is developed in a python based open source software Siconos which implements the Non-Smooth Contact Dynamics (NSCD) method. The geometrical features and mechanical properties are incorporated in the model via specific developments pertinent to the modelling requirements in Siconos. Some parameters peculiar to the numerical model are calibrated against the spatial-temporal measurements from two full-scale impact experiments.
Given the above, we developed an NSCD-based model of the structure, using the Siconos software  [14]. Siconos is an open-source scientific software primarily targeted at modelling and simulating non-smooth dynamical systems in C++ and in Python, including mechanical systems, switched electrical circuits, sliding mode control systems, and biology. The NSCD method guarantees that Signorini's condition at the velocity level is satisfied without introducing contact stiffnesses and that the coulomb friction, especially in the sticking mode is satisfied without resorting to viscous friction. This peculiarity of NSCD is enforced with the use of a specific implicit scheme (Moreau-Jean scheme) and yields a robust numerical method, which consistently models the threshold phenomena (friction, contact) and the dissipation properties of the model in discrete time, in particular impact dissipation and energy properties  [15].
For this, an existing experimental database  [10]  is used as a reference and some identified model parameters are calibrated using the Bayesian interface statistical learning method. A common requirement of any stochastic method is a large number of model computations which are impractical to implement due to a large computation cost. This gap is bridged by the use of a meta-model, representative of the actual model having a negligible computational cost and possessing high accuracy and reliability. Such meta-models have been used by many researchers, e. g. , for dam engineering problems  [17, 18]  and for nuclear containment structures  [19]. In the present work, the NSCD-based model is first described in detail, including specific developments to cope with the particular features of this structure type.
These impacts in particular induced wall sliding at its base, tilting, change in conformation as well as concrete block damage. The structure impact response with time is described based on measurements of displacement and acceleration along two vertical lines, as presented in Figure  2. They are termed 'impact' and 'distant' axis which are representative of the impact point and 3. 5m to its left respectively. The experimental data used in this study concerned the displacement of concrete blocks at the T op and Base in the impact axis and points C and D in the distant distant axis. Besides, the data from two points A and B in the impact axis is also available which is used for the cross-reference purpose only. The displacement governs the structure sliding and tilting, both leading to structure failure if in excess.