dataesr/scientific-paragraphs-categorization huggingface dataset:
We call it a major class pitfall as the accuracy is stuck at the value of volume fraction of the major class. In the case of NMC, this is reflected by a low variation plateau of accuracy around 80%, which corresponds to the volume fraction of NMC 1 dataset. This is due to the unbalanced quantity of different phases in the training data. And at the beginning of training, inferring the majority phase costs less and minimizes the loss faster. For a deeper understanding of the HPs' influence on the CNN's performance and finding the reasonable interval for each HP for the current CNN, an investigation is conducted below (using the platform SegmentPy, see Supplementary Fig. 5  and Methods ). Figure  3b -e plot the average of validation accuracy in solid lines and the standard deviation in the colored area during the training.
The learning rate is a parameter that controls the momentum of the trainable variables during the backpropagation. A higher learning rate leads to an instability of the local minimum, while a lower one traps the network in a poor local minimum. This HP is delicate to tune. For example, a constant learning rate drives to poor minima and accuracy. In contrast, a periodically decreasing one with a decay ratio of 0. 3 has an optimal convergence (Fig. 3b , decay applied at the end of each epoch. An epoch defines the entire training dataset). Nevertheless, reducing the ratio to 0. 1 starts to reduce variation and limit performance. The batch size is another HP handling the parallelization while updating the weights of the training process. We see in Fig. 3c  that by controlling the total amount of training images, a small batch size with less parallelization can lead to better convergence.
Reveal the influence of biases diluted in ground truth (GT) Segmenting large battery material volumes always involves automatic (e. g. , Otsu, watershed) or semi-automatic (e. g. , the current supervised-learning) methods. In most of the papers, the result of segmentation is used directly for quantitative measurements, although it is justified qualitatively or sometimes the justification is even missing. Unless images of higher resolution of the exact same labeled zone by coupling with the FIB-SEM  37  is available, deploying the CNN for segmenting the XCT images must deal with the uncertainty. Apart from visually judging and inspecting the metrics such as the accuracy, there is no other efficient way of qualifying the segmentation. In applicative cases as shown with our previous examples, the inconsistency among the training, validation, and testing dataset due to the uncertainty causes impasse such that although the prediction is visually satisfying, the accuracy is stuck at about 90%.
Here, the CNN can also be generalized to other parametrized automatic methods. One should bury in mind that one chooses only a subset of the volume to manually generate labels for the training. It will always accompany with some human bias GT ideal þ ε cogjexp;raw ¼ GT manual , where ε cog|exp, raw is the cognitive bias. From our experiences, this bias ε cog|exp,raw with the subscripts mainly depends on experimenter and the   quality of the raw data. And the validation (Fig. 3 )/test (Fig. 5d ) datasets is to compare the CNN trainjWtrained ðV test raw Þ with GT valid=test manual , where the subsets of train, valid, and test do not intersect one another. We see that the ε cogjexp; raw intervenes three times in the process, once in training the CNN with GT train manual and the others in the GT valid=test manual.
8  shows raw tomograms and a line profile perpendicular to an NMC-CBD interface. One can see that the sharp border in Supplementary Fig. 8  corresponds to a slope of 10 voxels in width. In absence of larger samples of expert GTs for NMC 1 dataset, we established an algorithm to simulate perturbated GTs not exceeding the interval of 10 voxels on the interfaces to train different CNNs (detailed in Methods). The algorithm consists of locating all the interfaces and choosing a part of them to push/pull by random units. New predictions from these LRCS-Nets are evaluated by volume fractions, surface area, and another metric the intersection of Union (IoU). The use of the latest is because the overall accuracy does not reflect the balance between classes in multiphase segmentation. The network has no guarantee of converging toward a minimum of good quality.
CBD is the most difficult to segment among these three phases in this dataset and tends to have inconsistencies between experimenters. Potential ways to improve IoUs of thin objects could be to use higher resolution and smaller FoV with interlaced scans or other advanced XCT techniques  4, 40  or reconstruction algorithms  41. The 15 CNNs trained from the perturbated data are used to predict 15 volumes. The volume fractions and interfaces for each of these volumes are plotted in Fig. 6d  & e. The 3D interfaces vary in intervals of 2. 5 ± 0. 3%, 2. 1 ± 0. 3%, 2. 6 ± 0. 2% respectively for NMC-CBD, NMC-pore, and CBD-pore (Fig. 6e ). We see that the accuracy deviations (Fig. 6c ) evaluated on the test data results in <1% of the variance for the 3D predictions (Fig. 6e ). Note that the interface is deliberately expressed as a percentage of voxels instead of nm -1 to avoid ambiguity as there are various extrapolations of tomographic voxels to a surface, such as taking the diagonal triangle or an arbitrary constant value, which will result in different values.
Validation of LRCS-Net via various datasets In the previous sections, the battery data segmentation routine and the influence of the human bias diluted in the datasets have been shown. In this section, we try to generalize our approach on different tomographic datasets of battery materials. A similar dataset from NMC with the same composition but higher loading was used for training a second network using transfer learning. Two other datasets of battery materials with different morphologies will also be shown. For the second dataset of NMC (denoted NMC 2 hereafter), instead of initializing the kernel randomly in the beginning of the training, we recover all the well-trained kernels in the best-trained model (denoted LRCS-Net 1 ) with the NMC 1 dataset (Fig. 5a ). This is called transfer learning (Table  1 ).
The Kernels of the LRCS-Net were saved in four different advancements during the previous training. Different starting learning-rates were applied (in Fig. 4a , a descending order of starting learning-rate from blue: 1e-4, orange: 1e-4 × 0. 3  (N-1)  , to green: 1e-4 × 0. 3 N. N is epoch number, at the end of which saved the state of LRCS-Net 1 N 1). A control experiment is carried out with a random initial state of the network and with NMC 2 dataset. Unlike training from scratch, resumed trainings begin directly above 80% accuracies since the kernels have already been trained. These starting points of transfer learning, from the different depth of resuming point of LRCS-Net 1 N , increase and then stabilize around 83%. A final gain of more than 2% on average was obtained, which is in accordance with the conclusions of Yosinski et al.
Random in accelerating the segmentation of tomographic data as the convergence of the learning curves in transfer learning are steeper than the ones of training from scratch. We have successfully demonstrated that LRCS-Net can achieve reasonably high accuracy by receiving only a single segmentation example image and improve accuracy and convergence speed by transferring already trained kernels. In addition to these two NMC datasets, the IoUs for a pristine binder-free carbon nanotube cathode material for Li-O 2 battery (Fig. 5b ) and another dataset of the same cathode material in the recharged state (Fig. 5c ) are shown. These materials made of low Z elements have weak X-ray attenuation coefficient. Therefore, these two additional datasets are obtained using a different imaging technique, i.
e. , the Zernike Phase Contrast  43. The morphology of these materials and the complications of segmentation differed from the previous Li-ion cathode. Figure  5d  summarizes the incremental IoUs obtained by LRCS-Net comparing them to the threshold for all these X-ray nano-CT datasets. We find that our CNN exceeds the 4% threshold in terms of total accuracy. And the IoUs for all classes are above the threshold, indicating that the improvement in segmentation well balanced for each class. The IoU of the CBD phase is generally the lowest of these three classes because it includes the smallest objects. In Fig. 5b , the pristine cathode contains tightly entangled carbon nanotubes and residual iron particles and other inclusions from the fabrication of nanotube. We have segmented three phases: nanotubes, in which gray-level is closed to the background; impurities, which present a strong contrast to X-ray and inversed by the phase contrast technique resulting in the darkest color; and the void, brighter than the other classes in the background.
The halo artifact surrounding the inclusions is arbitrarily included in the background. In the 3D volume of Fig. 5c , the recharged electrode is segmented differently: undissolved Li 2 O 2 (blue), dissolved domain (dark gray), and background (transparent). The difficulties in segmenting these datasets are as follows. The carbon nanotube in the pristine dataset is extremely thin and almost anchored in the background. The Li 2 O 2 and the void in the recharged dataset have the same gray level but have different textures. Supplementary Fig. 7  shows the synergies between the HPs in LRCS-Net with descending order of scores. Like the NMC 1 dataset, the trend of obtaining better results with small batches and 1e-4 as initial learning rate is again obtained. Compared to the threshold, LRCS-Net improved the IoUs of these datasets.
For the pristine dataset, some background noise is included by the threshold method. The IoUs for iron particles and background are improved by LRCS-Net, while the improvement in CNT segmentation is modest (<0. 02). For the recharged dataset, the threshold failed with the threshold method due to the similar gray level of Li 2 O 2 and the background. In contrast, the LRCS-Net can distinguish these phases and has higher IoUs. The NMCs for the high-capacity applications studied in this work have relatively dense NMC particles. Some cracks can be seen due to the calendaring process. The morphology of the particles is different from the lab-used spherical NMC particles  1, 30, 44. On the other hand, the pristine O 2 -cathode has a fourfold higher porosity (83%) than a traditional SP carbon electrode characterized in our previous study  43  , which can facilitate the diffusion of oxygen and leave more room for lithium peroxide deposition.
The tortuosity of this CNT material calculated by  10  averages 1. 15 in three directions, which is low and closed to 1 that favorizes the oxygen diffusion within the structure. The nontotal dissolution of the peroxide, as shown by Fig. 5c , indicates that the electrochemistry should be further improved, for example, by using different electrolytes. Throughout these four datasets, the current CNN can achieve the presented performance with a small training dataset of a single raw/GT pair image to achieve accurate segmentation.
DISCUSSION Nano-XCT data of battery materials is challenging to segment. The overlapping gray-levels and tomographic artifacts are factors that hamper accurate segmentation with traditional methods. We addressed this problem with a small CNN (LRCS-Net) and presented the workflow of training a CNN from scratch within the framework of the open source SegmentPy software. We demonstrated that portable and computationally inexpensive models (LRCS-Net) can also easily achieve decent accuracy and make fast prediction with small training dataset. This work has been focusing on deploying CNNs for applicative segmentation of multiphase battery materials. At the current state, the HPs tuning is still an unavoidable task in the segmentation routine. Hence, we gave practical examples of HPs tuning and showed their influences on the convergence.
Among the studied HPs, we found that the learning rate and batch size are the most sensitive and therefore need to be carefully adjusted. These findings have been verified on two XCT datasets of Li-ion battery cathode and reproducible in two other Li-O 2 battery datasets using phase contrast technique. Furthermore, we have shown the incremental effect of applying transfer learning for the training in a similar dataset. With a survey approach and a data simulation approach, we have answered several fundamental questions. We have first identified the nature and the region of uncertainty for a NMC dataset by interrogating a group of scientists to segment the same image. The outcome shows it is difficult for people to reach a unanimous consent on voxels near the interface. These areas are also those with ambiguity in the prediction of the network.
We have thus further quantified the impact of such uncertainty by comparing the outputs of CNNs trained with synthetic data. We have given the variances of the surface area and the volume fraction of the NMC 1 dataset. In summary, the current work has not only demonstrated the capability of the CNN but also addressed to a challenging topic of uncertainty in the segmentation for battery CT material, which has been considered as an unquantifiable and often neglected in the field. Finally, we would like to add that, in practice, fine segmentation adjustments can be made afterward, and more tomography slices can be used for composing each dataset. In perspectives, a profound comparison of LRCS-net with the family of U-Net and its derived forms will be carried out  [45] [46] [47]. Other pseudo-3D CNN model uses adjacent slices as 3D input, but 2D convolution kernels as reported in  48, 49  or 3D CNN model, which uses volume as inputs and 3D convolutions by Labonte et al.
31  and an associated uncertainty metric  50  can be further investigated. There are also some emerging automatic techniques  51, 52  searching optimal CNN architecture that could be potentially deployed in our current cases. Future direction might be to train a versatile network with a larger dataset for a specific collection of material. To this end, the reported transfer learning will be a reliable supporting technique. Emerging weak supervised few-shot segmentation methods  53, 54  with a different training fashion is a potential direction in segmenting the materials of similar characteristics with few labeling interventions. Last but not least, more realistic tomographic artifacts such as motion artifacts or ring artifacts can be artificially added to the augmentation to reinforce the network capacity.
Sampling and composition of datasets Although a tomography experiment can generate a few gigabytes of raw tomograms, annotating phases on tomography images to "teach" CNN can be tedious and extremely time-consuming for some datasets. In the case of the NMC dataset in Fig. 1a , an average of one hour should be considered to obtain a good quality ground truth. On the flip side, CNN is well known, data hungry, and typically fueled by thousands, if not millions of images.
ACKNOWLEDGEMENTS This research is supported by the  French Ministry Higher Education, Research and Innovation. The authors are grateful for the participation of the researchers in the workshop of  NanOperando  ( GDR CNRS Nº2015 ) for the ground truth survey ( 2019/11 ,  Energy Hub ,  Amiens, France). A. A. F. acknowledges  Institut Universitaire de France  for the support. The authors are also grateful for the re-lecture by  D. Boursier. This research used resources of the  Advanced Photon Source , a  U. S. Department of Energy (DOE) Office of Science User Facility  operated for the  DOE Office of Science by Argonne National Laboratory  under Contract No. DE-AC02-06CH11357.
Several methods have been used to analyze BCR phylogenies where clonally related B cells derive from a common ancestor  (8). These lineage trees are largely shaped by antigen-driven selection occurring during an immune response. Genetic evolution, such as observed during affinity maturation, is often studied through phylogenetic inference, a well-known methodology that describes the evolution of related DNA or protein sequences in various species. Theoretically, phylogenetic inference methods could reconstruct BCR lineage trees by replacing species with BCR sequences (with different mutations). However, in a phylogenetic tree, the root is usually unknown, the observed sequences are represented usually only in the leaves, and the inner nodes represent the relationships amongst sequences. Conversely, in a BCR lineage tree, the root or the BCR sequence of the naive B cell giving rise to the lineage can be deduced by aligning the IG variable region sequences with sequences stored in a reference database for identifying the germline V, (D) and J genes from which they derive  (9).
Simulated lineage trees In order to create simulated lineage trees, we used the B cell lineage simulator provided by GCtree. The simulator produces a B cell lineage by randomly selecting IGHV, IGHD, and IGHJ germline genes from the IMGT database. Then, nucleotide(s) can be added to or removed from the junction region: IGHV-IGHD and IGHD-IGHJ. Next, it performs a branching process, and point mutations can be included in the descendants. Somatic hypermutations are simulated by a sequence-dependent process, where mutations are preferentially introduced within specific hotand cold-spot motifs  (26). We kept simulator default parameters and generated 92 artificial lineage trees. The sizes of simulated trees ranged from 6 to 99 nodes, the number of observed sequences between 20 and 200, the degree of roots vary from 1 to 42, and depth trees from 2 to 7, see Table  1.
Experimental data We used a public data set from a previously reported experiment  (25) , where 3*01/IGHJ4*02 genes using IMGT/HighV-QUEST  (28). We label this data set as CLL-20. To predict the hypothetical naive sequence or the root of this lineage tree, we considered the germline sequences of the corresponding IGHV and IGHJ genes provided by IMGT/HighV-QUEST. For the junction, we took it from the sequence with the lowest number of mutations on the IGHV gene when compared to the germline determined by IMGT/HighV-Quest. Eventually, we concatenate germline IGHV, the junction sequence, and the IGHJ sequences to obtain the hypothetical naive sequence.
Computational tools used for comparisons There exists a few BCR lineage reconstruction software; some of them are not available for download  (12) , and others are specific for Windows operational system  (33). Among the available methods, we selected two state-of-art tools to compare with ClonalTree: GCtree (  16 ) and GLaMST  (19). GCtree is an optimal solution that uses dnapars  (17)  to find a parsimony forest and then ranks parsimony trees according to genotype abundance information. On the other hand, GLaMST (  19 ) is a time-efficient algorithm that uses MST, it does not consider sequence affluence. The authors have shown a higher performance of these tools in the respective publications, GCTree outperformed IgPhyML  (10) , and GLaMST surpassed IgTree. Thus, we decided to keep only GCTree and GLaMST for the evaluation and comparison.
Biological validation using BCR sequencing data We performed a biological validation on two experimental data sets: TAS-42 and CLL-20 (Section 0. 2. 1). Since ground truth trees are unavailable for these samples, we compared the inferred trees of ClonalTree and GLaMST with the trees inferred by GCtree. We considered trees generated with GCtree as references for the experimental validation since such a tool achieved the best performance on simulated data sets. The TAS-42 is a public data set and was generated by lineage tracing and single-cell germinal center BCR sequencing  (25). TAS-42 contains 66 sequences, used as input for GCtree, GLaMST, and ClonalTree, see details in Section 0. 2. 1. The 2 nd and 3 rd columns of Table  2  show tree distances for ClonalTree and GLaMST when compared to GCtree, respectively.
We did not observe a significant difference between MRCA values presented in Table  2. However, COAR distance values indicated that ClonalTree had better reconstructed entire evolutionary paths; we observed significantly lower COAR values for ClonalTree than GLaMST. Since ClonalTree achieved a lower GED path-based distance, it was expected to present a lower COAR distance. COAR also considers sequence dissimilarities rather than only differences in the paths as GED path-based distance. Both measures confirmed that ClonalTree produces trees that are closer to GCtree ones. The CLL-20 data set was obtained from blood samples of a patient with CLL. We only analyzed the most abundant clone, which contains 3406 sequences and 20 different genotypes. For these sequences, IMGT/HighV-QUEST (28) inferred naive ancestor V(D)J genes using germline genetic references from IMGT (34) database, see Section 0.
2. 1. The 4 th and 5 th columns of Table  2  show tree distances for ClonalTree and GLaMST, respectively. ClonalTree GED tree-based distance was the smallest among experimental data sets, showing that ClonalTree generated a tree with very similar topology to the one generated with GCtree. Likewise, GED path-based distance was smaller for Clon-alTree. GLaMST presented an extremely high GED path-based distance; it added many unobserved nodes, causing several mismatches when comparing tree paths. We also evaluated tree path agreement without considering unobserved nodes. ClonalTree presented only two different paths against 13 of GLaMST. As observed in the data set TAS-42, we noted a slight difference between ClonalTree and GLaMST MRCA values, indicating that both tools reconstructed the most recent ancestral properly.
The three algorithms were compared on a desktop workstation with i7 processor at 3. 40GHz and 32G memory. GCtree took 4. 5 days, GLaMST spent 55 mins, while ClonalTree took less than 15 min to reconstruct a lineage tree for this data set. Note that we used a pre-compiled version of GLaMST that is slower than the source code. GLaMST was coded in Matlab, a proprietary programming language, and only an executable for Windows is available for users that do not possess a Matlab license. Since ClonalTree is coded in python and uses freely available libraries and software, it is ready for the scientific community.
the authors combined multiphoton microscopy and single-cell mRNA sequencing to obtain IGH sequences extracted from germinal B cells of a lineage sorted from the mouse germinal center. The data set, labeled as TAS-42, contains 65 IGHV sequences and 42 genotype abundances; it is available at https://github. com/matsengrp/GCtree/tree/master/example. The ancestor IGHV gene was inferred with Partis (27), and the final data set contains 66 sequences: 65 from the original data set plus one representing the reconstructed germline sequence. The second experimental data set was generated by sampling sequences from the most abundant clone of a CLL monoclonal repertoire. It contains 20 different genotypes originating from a clonal IGHV-IGHD-IGHJ rearrangement, totaling 3406 sequences. These sequences were annotated with IGHV4-34*01/IGHD3-.
Temporal vulnerability of North Sea fishes We first applied our functional vulnerability framework on the past temporal dynamics of North Sea fishes (Fig. 2a ). The North Sea has been subject to intense overfishing throughout the 20 th century but has been managed since the end of the 1970s by the Common Fisheries Policy, with a progressive decrease in catch quotas and improvement in gears' selectivity. We used abundance data from the International Bottom Trawl Survey (IBTS), an annual monitoring campaign designed to monitor fish and invertebrate communities in the North Sea annually since the 1980s (Fig. 2a ) and to assess commercial species stocks. In combination with species abundance, and for each fish taxa, we selected eight traits linked to ecosystem functioning: age at maturity, asymptotic length, fecundity, offspring size, habitat (water column position), trophic level, feeding mode, and spawning type.