dataesr/scientific-paragraphs-categorization huggingface dataset:
The CINEL code dedicated to generate the thermal neutron scattering files in ENDF-6 format for solid crystalline, free gas materials and liquid water is presented. Compared to the LEAPR module of the NJOY code, CINEL is able to calculate the coherent and incoherent elastic scattering cross sections for any solid crystalline materials. Specific material properties such as anharmonicity and texture can be taken into account in CINEL. The calculation of the thermal scattering laws can be accelerated by using graphics processing unit (GPU), which enables to remove the short collision time approximation for large values of momentum transfer. CINEL is able to generate automatically the grids of dimensionless momentum and energy transfers. The Sampling the Velocity of the Target nucleus (SVT) algorithm capable of determining the scattered neutron distributions is implemented in CINEL.
To overcome the limitations of the LEAPR module, new codes have been developed in the scientific community: NJOY+NCrystal  [14] , FLASSH  [15]  and OCLIMAX  [16, 17]. They are able to calculate the coherent elastic scattering cross sections of any kind of solid crystalline materials. NJOY+NCrystal allows to generate the coherent and incoherent elastic cross sections in the same ENDF file (mixed elastic format  [18] ). FLASSH and OCLIMAX improve the calculations of TSL by introducing the coherent one-phonon correction  [8]  to the incoherent approximation and eliminating the cubic approximation. In this work we present the CINEL code which is dedicated to generate the thermal neutron scattering files in ENDF-6 format for solid crystalline, free gas materials and liquid water. Compared to the LEAPR module of the NJOY code, CINEL is able to compute the coherent elastic scattering cross sections of any crystals.
The generated ENDF files support the mixed elastic format. CINEL is able to generate automatically the α and β grids used for the calculations of S(α, β). Specific properties such as anharmonicity and texture can be taken into account in CINEL. The SCT approximation is removed thanks to the use of graphics processing unit (GPU) acceleration. CINEL is able to use the PDOS obtained by MD or DFT calculations. The main expressions involved in the low-energy neutron scattering formalism are reported in Section 2. The implementation of CINEL is briefly presented in Section 3. CINEL is composed of three modules named Cubic, INELastic and SVT, respectively. Validations of Cubic and INELastic by comparing with other codes and databases are presented in Section 4. The automatic generation of α and β grids, mixed elastic cross section, taking into account the anharmonicity and texture are illustrated with examples.
Implementation of CINEL CINEL is developed in Python by using JupyterLab  [39]. JupyterLab is a new generation of user interface  [40]  which is an open-source tool enabling to mix live code, texts, mathematical equations and interactive graphics. An example of JupyterLab interface is given in Figure  1  for illustration. This interactive development environment facilitates the verification and visualization of calculations. CINEL consists of three modules: Cubic, INELastic and SVT. The data flow presenting the generations of the thermal scattering laws (TSL) in ENDF-6 format by using the Cubic and INELastic modules, and the scattered neutron energy distributions via the SVT module are shown in Figure  2. These modules will be briefly presented in the following.
Numerical validations of the cubic and INELastic modules As presented in the data flow of CINEL in Figure  2 , the Debye-Waller factor Λ(T ) and the coherent elastic scattering cross section σ el coh (E) computed from the Cubic module, and the symmetric TSL (S(α, β)) calculated from the INELastic module are merged into a file in ENDF-6 format. The ENDF files are later processed by using the THERMR module of NJOY to obtain the inelastic scattering cross sections. The numerical validations of the Cubic and INELastic modules of CINEL were performed by comparing the calculated scattering cross sections of solid crystalline materials with the ENDF/B-VIII. 0 database and the NJOY+NCrystal library.
Automatic generation of α and β grids: UO 2 Uranium dioxide (UO 2 ) is the major component of the UOX fuel. In the ENDF/B-VIII. 0 database, UO 2 as ideal fluorite structure with Fm 3m symmetry is illustrated in Figure  5a. The atom positions in the unit cell are presented in Table  3. The PDOS of 238 U in UO 2 and 16 O in UO 2 for the latest ENDF/B-VIII. 0 database are generated by using the ab initio lattice dynamics methods  [48]. The two peaks of the PDOS of 238 U in UO 2 in Figure  6  correspond to the acoustic modes of the uranium atoms. The peak at nearly 10 meV corresponds to the transverse acoustic (TA) mode while the peak at nearly 20 meV corresponds to the longitudinal acoustic (LA) mode. The peaks at nearly 30 meV, 55 meV and 70 meV are dominated by the optical modes of the oxygen atoms.
This new option is supported in CINEL when generating the ENDF files. The mixed elastic cross sections are illustrated with MgD 2 in Figure  9. The comparisons of the CINEL calculated total cross sections of MgH 2 and MgD 2 with the NJOY+NCrystal library are presented in Figure  10. An excellent agreement with the NJOY+NCrystal library is obtained. The total cross sections (elastic and inelastic) are in excellent agreement with the ENDF/B-VIII. 0 database and the NJOY+NCrystal library, which validates the Cubic and the INELastic modules. The symmetric S(α, β) tables generated by using the INELastic module are in excellent agreement with the ENDF/B-VIII. 0 database, as illustrated in Xu's thesis  [52].
Comparison with the Tripoli-4 ® calculations In this part, the algorithm implemented in the SVT module of CINEL (cf. Sect. 3. 2) is validated by comparing the scattered neutron energy distributions of 1 H and 16 O in form of free gas materials with the results The physical model employed in the Tripoli-4 ® sim- ulations is briefly presented. A capillary sample with a radius equal to 5 µm and a height of 10 µm is placed in the center of the simulation model. The dimensions are chosen to minimize the impact of multiple scattering. The incident neutron energy is monoenergetic which is set to be 5 eV for free 1 H and 6. 67 eV for free 16 O. The outgoing neutrons are detected at θ = 10 • , 45 • and 90 •. The Tripoli-4 ® simulations are performed at room tem- perature with T = 294 K for 1 H and T = 298 K for 16 O, respectively.
The incident neutron energy E is set to be 5 eV and 6. 67 eV for 1 H and 16 O in the SVT module, respectively. The velocities of the target nuclei are sampled from a M-B distribution M T (V ) with T = 294 K for 1 H and T = 298 K for 16 O: M T (V ) = 4 √ π B 3 V 2 exp(-B 2 V 2 ), (81) where B = M 2k B T. ( 82 ) The scattered neutron energy distributions obtained by using the SVT module of CINEL and Tripoli-4 ® are com- pared in Figure  14. Overall good agreement is obtained for all the angles, which validates the two-body kinematic equations implemented in the SVT module of CINEL.
Comparison with velocities sampled from MD trajectory files As presented in the data flow of CINEL (Fig. 2 ), the SVT module is able to sample the velocities from the MD calculated trajectory files. In this work, the trajectory files of liquid water generated by using the MD code GROMACS  [55]  are used to validate the velocity sampling. The generation of the trajectory files for liquid water by using GROMACS is described in Scotta's thesis  [56]. The physical model used in the MD simulation consists of in total 512 water molecules within a cubic box with side length 2. 48 nm. We calculated the number volume density of water at 294 K by ρ V = N A M H2O ρ H2O = 33. 5 nm -3 where N A is the Avogadro constant, M H2O and ρ H2O are respectively the molar mass and mass density of water. Then the size of the box is determined by (512/33.
To validate the rejection step implemented in the SVT module, neutron scattering with 1 H in 1 H 2 O and 16 O in U 16 O 2 are investigated in this work. The first step consists of calculating their effective temperatures from the PDOS of the CAB model  [58]  and the PDOS reported in reference  [59] , respectively. The second step is to employ these effective temperatures in the SVT module and use the rejection option for the up-scattering part. The final step Table  4. Simulations performed by using the Monte-Carlo neutron transport code Tripoli-4 ® and the SVT module of CINEL for 1 H in 1 H 2 O and 16 O in UO 2. The effective temperature T eff of 1 H in 1 H 2 O is computed via the PDOS of the CAB model  [58]. T eff of 16 O in UO 2 is obtained via the PDOS of  [59]. Target nucleus E (eV) T (K) T eff (K) Scattering treatments  is to perform Monte-Carlo simulations with the Tripoli-4 ® code by using the S(α, β) tables.
Conclusions and prospectives In this work we present a new code CINEL dedicated to generate the thermal scattering files in ENDF-6 format for solid crystalline, free gas materials and liquid water. The low-energy neutron scattering theory is reviewed by presenting the involved approximations and the equations to calculate the elastic (coherent and incoherent) scattering Though CINEL presents improvements compared to the LEAPR module of the NJOY code, the incoherent approximation adopted in the CINEL code is reported to be inadequate for strongly coherent crystalline materials such as pyrolytic graphite. Therefore, the coherent one-phonon correction will be implemented in the future version of CINEL to improve the incoherent approximation. The cubic approximation used in the current version of CINEL will also be eliminated.
cross section and S(α, β). The implementation of the three modules of CINEL (Cubic, INELastic and SVT) is presented. The Cubic and INELastic modules are validated by comparing the CINEL results with the ENDF/B-VIII. 0 database and the NJOY+NCrystal library. Examples are given to illustrate the automatic generation of α and β grids, mixed elastic format, anharmonicity and texture in CINEL. The SVT module is validated by comparing the scattered neutron distributions with analytical and Monte-Carlo simulations for free target nuclei such as hydrogen and oxygen.
Acknowledgements. The authors would like to express their gratitude to their colleague  P. Tamagno  from the same laboratory for the GPUs used in this work. The authors also wish to express their appreciation to J. I. Marquez Damian  and  K. Ramić  from  European Spallation Source  for many helpful discussions. Tripoli-4 ® is a registered trademark of CEA. The authors would like to thank  Electricité de France (EDF)  for partial financial support.
Tools based on deep learning models have been created in recent years to aid radiologists in the diagnosis of breast cancer from mammograms. However, the datasets used to train these models may suffer from class imbalance, i. e. , there are often fewer malignant samples than benign or healthy cases, which can bias the model towards the healthy class. In this study, we systematically evaluate several popular techniques to deal with this class imbalance, namely, class weighting, oversampling, and under-sampling, as well as a synthetic lesion generation approach to increase the number of malignant samples. These techniques are applied when training on three diverse Full-Field Digital Mammography datasets, and tested on in-distribution and out-of-distribution samples. The experiments show that a greater imbalance is associated with a greater bias towards the majority class, which can be counteracted by any of the standard class imbalance techniques.
These DL models learn to distinguish between benign and malignant cases based on datasets of many retrospective examples. Datasets used to train these models are often highly imbalanced, i. e. , they may contain more benign samples than malignant, as most women who undergo mammography screening do not have breast cancer. This problem of different proportions of each class of interest is called class imbalance, and numerous studies have shown that it can be detrimental to the performance of a classification model  [7, 8]. This imbalance can cause models to be biased towards the majority class, which is of particular concern in mammography screening as this may lead to models being more likely to predict images as benign, potentially resulting in missed cancers. Many techniques have been proposed to tackle the effect of class imbalance, but their impact can vary depending on the complexity of the task and the distribution of the dataset  [7, 8].
In other words, a method that is well suited to optical character recognition, for example, may be unsuitable for cancer classification. This motivates the need for a study of these techniques applied to breast cancer diagnosis using various mammography datasets, to determine if certain techniques are better suited to this task. Moreover, generating synthetic data has shown promise in dealing with this class imbalance problem in mammography in particular  [9] , but to our knowledge this has not been compared with more common, and less complex, methods. The aim of this paper can be summarised in the following Research Questions (RQ): (RQ1) How does an imbalanced training set impact cancer classification performance in mammography? (RQ2) How do common techniques for tackling class imbalance compare for cancer classification in mammography? (RQ3) To what extent can synthetic lesions improve classification performance in the presence of class imbalance? To answer these questions, we conducted experiments on several mammography datasets with different data distributions and levels of class imbalance, including two recently released datasets, Chinese Mammography Database (CMMD)  [10]  and VinDr-Mammo  [11].
The most popular techniques for handling class imbalance were selected from the literature and applied to evaluate their effects on classification performance and generalisability of a standard Convolutional Neural Network (CNN) used for breast cancer classification. Although this study focuses on mammography, many other medical imaging tasks share the same main characteristics, namely, high-resolution images, a clinical context where the trade-off between sensitivity and specificity is important, and often a high level of imbalance between classes. Thus, the results of this study could have wider applicability for medical imaging in general. This paper is structured as follows. Section 2 discusses related work on class imbalance. Section 3 details the models, class imbalance techniques, and experiments carried out in this study, with a description of the datasets used in Section 3.
Related Work 2. 1. Effects of Class Imbalance Study of the class imbalance problem is not new in the literature. As early as 1993, Anand et al. [12]  showed that when training a shallow neural network with backpropagation on an imbalanced dataset, the gradient contribution of the majority class dominates that of the minority class, which leads to slow convergence of the error for the minority class. A significant amount of research has been dedicated to class imbalance in traditional Machine Learning (ML), with a number of workshops and special issues in the early 2000s  [13]. The effect has also been demonstrated more recently for CNNs, both by  Buda et al. [7]  in 2018 in an extensive study on optical character recognition, and by Li et al. [14]  in 2021, who showed that a CNN for brain tumor segmentation overfits more on the majority class with a higher level of imbalance.
Several studies have shown class imbalance to be more detrimental for more complex tasks, from earlier findings on traditional ML algorithms  [8] , and research of multi-layer perceptrons for breast mass classification in 2008  [15] , through to the 2018 study of CNNs by  Buda et al. [7]. In summary, while the class imbalance problem has been well studied over the past twenty years and its impact has been observed for many domains and datasets, the effect of class imbalance can vary considerably depending on the complexity of the task at hand and the characteristics of the dataset. Moreover, a broad study on class imbalance in automated cancer detection in mammography across several datasets has not been carried out. Although Bria et al. [16]  explored similar questions, they used a dataset of patches of 14 × 14 pixels extracted from the INBreast dataset  [17]  to classify micro-calcifications, which reveals little about the effect when processing whole images as the task becomes more complex.
Common Techniques Techniques proposed to deal with the class imbalance problem are often categorised as algorithm-level, data-level, or a combination of the two  [18]. The most widely used algorithm-based techniques involve changes to the loss function, for example, weighting by the inverse of the class proportions such that the contribution from the majority class and minority class are balanced  [18]. This has previously been used for studies in deep learning in mammography  [19, 20] , although Bria et al. found it less effective than over-sampling  [16]. The primary techniques in the data-level group include sampling, where either the minority class is over-sampled or the majority class is under-sampled, creating an artificially balanced dataset. There are some drawbacks, in that under-sampling may remove important, informative examples, and over-sampling may lead to overfitting  [13].
Other studies in automated breast cancer classification  [23, 24]  have used an epoch-wise under-sampling strategy, whereby each epoch sees all of the abnormal examples and an equal number of randomly selected normal examples, but this was not compared to other approaches. The most common methods used to tackle class imbalance in medical imaging studies include the aforementioned over-sampling, under-sampling, and class weighting. However, the effectiveness of these techniques varies depending on the task being performed and the dataset  [7, 18] , and their relative efficacy for classifying whole mammograms remains unclear. Therefore, our study compares the results of applying these common techniques to resolve class imbalance in three heterogeneous datasets of high-resolution mammograms.
Finally, whereas a GAN is confined to the distribution of the dataset at hand, our method of controlling the artificial lesion characteristics allows us to incorporate domain knowledge on the appearance of different lesions, regardless of whether certain lesion types or shapes are represented in the training dataset. Moreover, this method could be used to balance datasets where there is a known shortage of certain types of masses, for example. In summary, the contributions of the current study are as follows: (i) an analysis of the effect of class imbalance on breast cancer classification using high-resolution images from several recent mammography datasets, (ii) a systematic comparison of the most popular methods for dealing with this class imbalance problem, and (iii) a novel use of synthetically generating abnormalities as an alternative to over-sampling the malignant class.
Class Weighting One of the simplest approaches is to apply a higher weight to the minority class during training when calculating the loss. Equation (1) below shows how the weights were calculated. We used global weights, i. e. , using the total numbers of minority and majority samples in the training dataset rather than, for example, calculating the ratio for each mini-batch during training. This decision was based on our small batch size of 8 images relative to the large class imbalance of 19:1 in the VinDR dataset, i. e. , 19 benign images for every malignant case (see Section 3. 3). Thus, calculating class weights for each batch would mean the largest weight any minority sample could possibly receive would be 7, which would not balance the loss contributions of both classes. w minority = # of Majority Samples # of Minority Samples , w majority = 1 (1).
Under-Sampling With this approach, a fixed random sample of the majority class is taken before training so that the number of minority and majority examples are balanced. For datasets with large imbalance between classes, this leads to a dramatic reduction of the training data size, e. g. , a 90% reduction of the training data size for the VinDR dataset, which has a benign to malignant ratio of 19:1. For cases where the class imbalance is less severe, like our two other datasets, under-sampling removes fewer samples and thus less potentially valuable information is lost.
Artifacting The final method, and a contribution of this study, involved inserting synthetic malignant lesions  [33]  into benign images during training to balance the benign and malignant classes. We used this method only for datasets where there are more benign samples than malignant (i. e. , VinDR and HMI, see Section 3. 3), as if a malignant lesion is inserted into a benign image it can be considered malignant, but inserting a benign lesion into a malignant image does not change the class of the image, as the source of malignancy would still be there. Three types of malignant lesions were inserted, namely, masses, calcifications, and architectural distortions, examples of which are shown in Figure  1. The methodology underlying the generation of these synthetic lesions has been described in detail in  [34]  and has previously been employed for lesion segmentation  [33].
25 and 1 mm, formed in convex groups of high intensity pixels. An architectural distortion, which can be defined as a distortion of the breast parenchymal architecture without a definable mass  [37] , is another type of finding which can be associated with malignancy. We considered the case where these manifest in a mammogram as a twisting or compression of the tissue in a localised region. We created artifacts with a local non-linear geometric transformation using the swirl function from the scikit-image  [38]  Python library, which allowed us to approximate such distortion effects. These three types of synthetic lesions were inserted in a randomised fashion during training. Firstly, each training mini-batch of eight images was half-filled with benign samples. Then, two real malignant samples were added, and the remaining two places were filled by randomly selecting two of the benign samples in the batch and inserting 1, 2, or 3 synthetic lesions.
Pre-Processing The images were pre-processed in an automated fashion before being used for training or testing a classification model. The first step was to remove the background noise using the Triangle threshold method  [39]. Next, to detect the breast region, we binarised the cleaned image and we computed connected components with scikit-image  [38]  in Python. The breast was assumed to be the largest connected component, allowing us to remove smaller regions corresponding to labels and markings by setting their pixel values to zero. Images of right breasts were flipped so that all breasts were located at the left side of the images. The height was cropped to the size of the breast, and re-sized to 2048 pixels. The aspect ratio was maintained between the height and width, but the right side of the image was padded with zero-intensity pixels to give a square 2048 × 2048 image.
Evaluation When evaluating predictions on the test set, we assessed the breast-wise predictions, similar to  [42]. For many of the patients in our datasets, there were two images of each breast, one from each of the Craniocaudal (CC) and Medio-lateral Oblique (MLO) views. Signs of malignancy might appear on only one of these views, so we combined the predictions at test-time by taking the average of the model's predicted probability of malignancy for each breast. We evaluated the performance of each trained model on a test set from the same distribution as the training set, as well as on the other out-of-distribution test sets, exploring the generalisation capabilities of each method. We used AUC-ROC as our primary evaluation metric. ROC is a plot of Sensitivity (Se) vs. (1-Specificity (Sp)) (see Equation (  2 )) for many operating points of the model, i.