dataesr/scientific-paragraphs-categorization huggingface dataset:
Therefore, we chose to use a different metric for evaluating the quality of transformed images: we evaluate whether the semantic transformation is successful by querying OSCAR  (Li et al. , 2020b) , a state-of-the-art image/text matching algorithm. OSCAR computes the probability P O (I, T ) that a caption T accurately described an image I, based on the concatenation of the text tokens in T and the object tags and features detected by faster R-CNN on image I (we provide the triplet to OSCAR in the form of a caption written in natural language). Note that this OSCAR-based evaluation method does not involve image annotations in the retrieval database and thus could potentially be applied to a much larger database of non-annotated images, which we leave for future work.
Construction Similarly to  (Vo et al. , 2019a) , we create a list of images annotated with (subject, relationship, object) triplets, and perform the retrieval step inside the same list of images to ensure that transformation queries always have a valid solution in the dataset. We start from annotations from the Visual Genome dataset  (Krishna et al. , 2017). Each image in the dataset contains a list of such triplets with subject and object bounding boxes, which we use to crop square regions of images that minimally contain the subject and object in the image. We then filter this list and compute possible transformations: Subject/Relation filtering. Only keep triplets for which the subject is a human or animal, and the relation is a non-positional relationship in Visual Genome. The full lists are shown in Figure  2.
Object filtering. Only keep objects O for which there exists at least two triplets (S, R, O) and (S , R , O) with R = R. This ensures that the selected objects have at least two different types of interaction in images. Then, only keep the 10 most frequent objects for a single (subject, relation) pair. This gives a list of 645 distinct triplets. Building transformation queries. For each image I with associated triplet (S, R, O), add in the list of transformation queries (I, O → O ) if there is a triplet (S, R, O ) in the database. Do the same for S and R. This ensures that transformation queries consists of pairs of objects that can have the same (subject, relation) pair, and symmetrically for subjects and relations. Writing captions for OSCAR. For each of the 645 triplets, we manually wrote a caption in natural language, e.
g. (man, sitting on, chair) → A man sitting on a chair. We now have a database of images and transformation queries, but we have noticed some noise in the annotation procedure: an image can have a triplet annotation which does not well describe the main action in it, because the cropping procedure included an object that is more important than the extracted triplet. Also, transformation queries sometimes consisted in synonyms. We solve this problem using OSCAR to filter transformation queries: Given an image I with query triplet t 1 and target triplet t 2 , we keep the corresponding transformation if P O (I, t 1 ) > 0. 9 and P O (I, t 2 ) < 0. 1. This ensures that not modifying the image is not a valid solution to the problem. The distribution of images being quite skewed (see Figure  2 ), the transformation queries also have a bias towards the more frequent subjects, relations and objects.
We alleviate this problem by using reweighting in the scoring metric (see below). In summary, our SIMAT dataset (for Semantic IMage Transformation) consists of: • 5 989 images, each annotated with a subjectrelation-object triplet. • 17 996 transformation queries on those images, with queries asking to change the subject, the relation, or the object. • A list of 645 distinct subject-relation-object triplets with corresponding captions, each triplet having at least 2 corresponding images. To allow hyperparameter selection, we make a 50-50 dev/set split on the list of images, and split the transformation queries accordingly.
Evaluation Metric Let (I i , w 1 → w 2 , T i ) be a sample in our dataset where w 1 → w 2 is the transformation query and T i is the caption associated to the target triplet of this sample. For this sample, we consider that a retrieved image J i corresponds to a successful transformation if OSCAR outputs a probability P O (J i , T i ) > 0. 5. The final score is simply a weighted accuracy over all dataset samples: S = (I i ,T i ,µ i )∈S µ i 1 P O (J i ,T i )>0. 5 (1) where the coefficients µ i are the contributions of each sample to the total score. We adopt an inverse square root reweighting to downsample the most frequent transformations.
Text delta vectors for semantic transformations Semantic properties in sentences can be modified by word replacement: in the sentence "A man walking on the beach", the semantic property subject gender can be changed by replacing the word man with the word woman. In a latent space, where direct word replacement is not possible, we can apply semantic transformations by doing arithmetic operations. By encoding sentences as the sum of their word embeddings, applying a transformation w 1 → w 2 on a sentence embedding E(s) amounts to adding the vector E(w 2 ) -E(w 1 ), which we call a delta vector. In principle, the textual form of the transformed sentence can be found by retrieving the sentence embedding closest to E(s) + E(w 2 ) -E(w 1 ) in a database. However, there is some ambiguity in the process since bag of words representations do not take into account the order of words.
That is why we consider more complex non-linear sentence embeddings which have been shown to display similar properties as above  (Logeswaran and Lee, 2018) , in addition to better reflecting the meaning of sentences  (Artetxe and Schwenk, 2019). We study four sentence embeddings: CLIP, obtained by a contrastive loss on a large set of im- age/text pairs; FastText, obtained with a weighted sum of FastText word embeddings  (Bojanowski et al. , 2017) ; LaBSE, which are trained by matching parallel sentences in different languages with a contrastive loss  (Feng et al. , 2020) ; and the LASER embeddings (Artetxe and Schwenk, 2019) which are trained with a multilingual translation task.
From text delta vectors to images Semantic transformations, seen as delta vectors as defined above, can be added to image embeddings in multimodal spaces. We transform images with text delta vectors in the following manner (Fig 1 ): given an image encoder E img and a text encoder E txt that embed both modalities into a shared latent space, we retrieve in the SIMAT database the image that has the highest cosine similarity with the latent vector x = E img (I) + λ • (E txt (w 2 ) -E txt (w 1 )) (2) The scaling factor λ is a hyper-parameter that can be adjusted to increase the strength of the transformation. The natural choice is λ = 1 but it has been noted that a higher value can help to better enforce the transformation  (Jia et al. , 2021). The image embeddings are quite sparse due to the relatively small size of the image database, so we found it helpful to enforce the rule that the retrieved image should be different from the input image.
Finetuning multimodal embeddings We consider multiple choices for the image and text encoders: Our default setup is to use the CLIP embeddings for both modalities (63M parameters for the text encoder, 87M for the image encoder), and we experiment with using two ImageNet-pretrained ResNets (RestNet50 and ResNet152, respectively 23M and 63M parameters) as image encoders, and FastText, LASER and LaBSE as text encoders. We can evaluate the vanilla CLIP embeddings without retraining; however, other encoding choices are not directly compatible and we have to fine-tune the encoders to be able to encode image and text into a shared latent space. We use a very simple finetuning scheme on COCO  (Lin et al. , 2014)  where we train linear adaptation heads after the frozen encoders (Fig  3 ) for 30 epochs with a learning rate of 1e-3 and a batch size of 4096.
Zero-shot CLIP We first study the performance of the vanilla CLIP embeddings for transferring text transformations to images with delta vectors. To put our results in perspective, we also evaluate the following baselines: Text to Image: We directly provide the target captions to the CLIP text encoder and retrieve the image closest to that embedding. This is the standard image retrieval task, which is easier because the target subject-relation-object features are given as input. Hence it can be considered as an upper bound of our SIMAT score. Image to Text to Image: We first find among the SIMAT captions which one is closest to the query image. We then add the text delta vector corresponding to the transformation query and retrieve the closest image in the SIMAT database.
Sentence-based delta vectors In our default method for using text-based delta vectors, we used single words as input to the text encoder. This is particularly well suited for the FastText embeddings which are based on word embeddings, but not so much for the LASER and LaBSE sentence encoders which are built to encode sentences and not single words. This could explain the performance gap between FastText and LASER/LaBSE. To test this hypothesis, we changed our definition of delta vectors so that it is computed by encoding sentences rather than single words. We define the sentence average delta vector of transformation w 1 → w 2 as the average of delta vectors E(s 2 ) -E(s 1 ) where s 1 and s 2 go over all pairs of SIMAT captions such that s 2 is the result of the text transformation w 1 → w 2 applied to s 1.
Validation on SIC112 In this final section, we use the SIC112 dataset  (Vo et al. , 2019a)  to validate our delta vectorbased transformation method. As explained in Section 3. 1, the metric used is the accuracy of transformation success based on the original annotation of the retrieved image. They report a baseline accuracy of 26. 6. We highlight the most important results in Table  4 , where we use the same accuracy score and the same Image retrieval upper bound method as a point of comparison. The zero-shot CLIP method reaches a lower score than the baseline with λ = 1 but a higher score with λ = 3, which is in accordance with our results on SIMAT. Fine-tuning with τ = 0. 1 dramatically improves the SIC112 score (although not shown here, the scores for τ = 0. 01 are lower). We also observe that using FastText embeddings yields even higher scores, although the Image retrieval Upper bound is much lower than that of the CLIP-only model.
Conclusion and Future work We introduce SIMAT, a novel dataset to study the task of text-driven image transformation. It is much larger in size and variety of transformations then existing approaches like SIC112. We emphasize the necessity of a novel evaluation metric and present a principled evaluation criterion to assess how well algorithms can transfer text-defined transformations to images. We use SIMAT to evaluate multimodal embeddings trained with an image-text alignment objective, without any transformation example. Transformations are computed at inference time using delta vectors, for which we present a detailed study. For future work, we would like to extend the tasks to richer semantic transformations: we expect that for transformations like young→old or dirty→clean, higher-level semantic knowledge embedded in language models will be critical to do meaningful transformations.
Combining different process models, which are typically solved in specialized software environments, can cause significant challenges regarding the compatibility of the modeling paradigm or the accumulation of computation times. In the following, we provide some concrete examples of mechanistic and data-driven models' achievements (described broadly in Table  2 ). We do not intend to be exhaustive here, as the computational modeling of LIB manufacturing has already been reviewed recently. [8, 9, 24] Instead, we want to provide practical details of how some of the recently reported approaches are implemented and which types of experimental parameters they require. For this purpose, we pick mostly examples of ongoing projects in Europe: ARTISTIC (funded by the European Research Council), DEFACTO (funded by the Horizon 2020 program), and Sim4Pro (funded by the German Federal Ministry of Education and Research).
The latter allows deriving optimization loops to inverse designing LIB manufacturing, i. e. , predicting the manufacturing parameters to adopt to maximize/minimize multiple properties of LIB electrodes. The ARTISTIC project has recently delivered an online calculator that can be used from any Internet Browser. Thanks to a user-friendly graphical interface, users can launch slurry, drying, and calendering simulations, with more functionalities to be added soon. [28] The users can also explore the databases produced in the project and download the 3Dresolved electrode mesostructures and corresponding properties (e. g. , electrode slurry density value, electrode porosity value) for their own research. The ARTISTIC project has also demonstrated the chemistry neutrality of the adopted computational approach, which can deal with electrode manufacturing based on both commercial and in-house-elaborated AMs for LIBs and Sodium-Ion Batteries (SIBs), respectively.
Slurry and coating modeling In the ARTISTIC project, the electrode slurry is simulated in 3D using the CGMD approach by using the software LIGGGHTS. [30] lassical Newton equations are numerically solved using the LAMMPS software in this approach. These equations describe the relationship between the interaction forces (or force fields -FFs-) between the particles in the slurry and their acceleration. The numerical integration of these equations allows calculating the speed and the position evolution of the particles. The interaction forces have been modeled using Lennard-Jones and Granular-Hertzian FFs. These FFs allow capturing the impact of the distance between the particles and their effective radius on the interaction forces magnitude. Two types of particles are considered: the AM and carbon-binder domain (CBD) particles, which are coarse grain carbon additives, binder, and solvent.
Furthermore, ML is also used to predict the viscosity calculation result from the first numerical steps of a non-equilibrium MD simulation: This allows for performing the fitting process in a faster way as each CGMD model has a different set of FFs parameters values, and it is used in optimization algorithms that do not need to run until the end. [31] 32] ML has also been applied in the ARTISTIC project for the prediction of the impact of slurry formulation, solid content, and viscosity (determined by the coater comma-gap and coating speed) on the loading and porosity of the fabricated electrodes (the drying rate kept constant). [33] For this purpose, an experimental data set (ca. 80 experimental conditions, each of them repeated five times) was collected in order to predefine several classes (low, medium, high) based on experimental knowledge from loading and porosity values.
The resulting dataset was divided into a training and testing dataset, whose main goal was to train a supervised classification model (Support Vector Machine) to fit those classes as a function of input variables (formulation, solid content, viscosity). The resulting trained model allowed to assess interdependencies between the levels of electrode properties and the manufacturing parameters through a straightforward graphical representation, with a trustable accuracy (above 80 %) from an experimental point of view. The ML approach was compared with different supervised algorithms, such as Decision Tree and Deep Neural Network. The latter analogy enabled to analyze the evolution of predictive capabilities regarding the type of algorithm applied for the training/testing, allowing to see which approach was the most meaningful for assessing the trends between electrode properties and its manufacturing parameters.
Carvalho and coworkers have developed a series of 2D models to study slot coating. The first one allowed them to predict the parameter ranges needed to obtain a defect-free coated layer,  [37]  a second one explored the lower limits for layer thickness,  [37]  and a third one extended this model to mildly viscoelastic fluids,  [38]  all relevant to the electrode slurries. In general, a post-treatment on electrode properties enables to go beyond common analysis with manual tunings by automatically assessing the labeling of experimental datasets for better manufacturing knowledge. The ARTISTIC project demonstrated the approach by defining heterogeneous electrodes from a batch of experimental measurements from NMC-622 coated electrodes after varying the most critical fabrication parameters from the slurry and coating steps.
This involves an evaluation of new electrode characteristics without any prior manual labeling, whose main goal is to identify the most relevant properties for heterogeneous electrode definition. This step was done according to a dimensionality reduction of the dataset and a segmentation approach to identify groups of electrodes with similarities in terms of prior and newly defined electrode characteristics. The combination with statistical inference concluded the effect of the associated manufacturing parameters on such heterogeneity, thus giving new perspectives for designing better batteries. In our study case, we took advantage of thickness and mass loading measurements to evaluate different types of heterogeneous electrodes. [39] Similar to this approach, Drakopoulos et al. [40]  presented a limited dataset including 27 different formulations, manufacturing protocols, and performance properties.
The fragmentation of carbon black, so the size reduction of agglomerates down to aggregates, is being investigated via the coupling of CFD (coded in the software OpenFoam) with DEM (coded in the software LIGGGHTS) within the project DEFACTO. Each agglomerate consists of several aggregates which are generated randomly, but with defined strength, a number of primary particles, and fractal dimension and are joined together via inter-particular forces, namely van der Waals forces. These forces are stronger within the aggregates than for the bindings to each other. Then, the effect of size and fractal dimension of single agglomerates within a Representative Volume Element (RVE) with periodic boundaries on the orientation within the shear flow and the resulting shear forces can be described. The shear behavior and the strength of the inter-particular forces determine the breakage of agglomerates so that the number and size of fragments over time and the forces acting on the particulate structures are determined.
However, as these studies are costly and mostly limited to very few single agglomerates, they are mainly used to investigate the relation between local shear stress and breakage behavior. Thus, the distributions of shear rate, shear stress, or other dispersionrelevant parameters in the mixing device are determined using CFD simulations. The CFD models (coded in the software OpenFoam) without coupling do not explicitly solve the breakage of CB agglomerates. Still, they consider the shear field in the mixer (e. g. , dissolver, planetary mixer, or twin-screw extruder) of the fluid to extract the relevant parameters of stress. Characteristic values are the intensity and number of stresses calculated from the distributions of shear stress and shear rate by using Rumpf's model,  [41]  and compared to the particular strength agglomerates to estimate their breakage.
However, those data can be combined with experimental measurements, paving the way to more realworld behaviors of the electrode properties to characterize better electrodes. In that sense, the calculations of electrode mesostructured properties can be assessed as a function of inputs properties, directly coming from experimental measurements. This enables to merging of synthetic and experimental datasets that are reliable enough to train a surrogate model based on well-known ML approaches. Instead of obtaining statistical conclusions which are still meaningful for qualitative purposes, the setting up of ML models reflects mathematical functions that can be tested for figuring out many other manufacturing parameter combinations. One of the ARTISTIC projects reported a study case where ML was used to predict tortuosity factors for solid and liquid phases and the percentage of contacts between different components of the electrodes.
An important limitation of this method is its high computational cost, requiring several days of calculation in a computing cluster for a typical electrode structure. This severely limits its capability to screen a large number of architectures for optimization purposes. Several options exist to address this issue. One alternative is to simply assume a total filling of the pores with electrolyte. A second one is to assume the total filling of every pore except those not connected to any other pore. Lastly, it is possible to take advantage of the large dataset that each of these simulations generates to feed data-driven models to predict saturation curves and the density of the fluid in each pore. This latter approach has been shown to be feasible in the framework of the ARTISTIC project. [53] For this, LBM simulations can be carried out for different infiltration conditions on experimental structures.
These are obtained from microtomography data corresponding to an NMC 94 % -CBD 6 % electrode, which yields precise information on the shape and location of the AM particles. The CBD location can be resolved using an inhouse stochastic algorithm. [47] The resulting data, composed of the density for the electrolyte and the air phases at each lattice point as a function of time, can be processed to obtain a complete saturation curve for each pore. In turn, these data can be further reduced by selecting the saturation values corresponding to representative times throughout the simulation. The resulting reduced dataset is appropriate for training a machine-learning model based on the multi-layers perceptron approach. This yields a data-driven model capable of predicting the overall saturation curves for each pore, from which a global saturation curve can be generated.
* While the original data corresponds to microtomography, it can be indistinctively applied to structures obtained from CGMD simulations. Another model approach is applying CFD by using the commercially available software ANSYS. The approach detailed by Hagemeister et al. [56]  shows two separate models for the dosing and wetting of the cell due to the different time and size scales. The mass flow is observed for the dosing simulation as the electrolyte surrounds the cell stack. The effect of pressure and temperature is studied to optimize each dosing step. The dosing will continue to gain importance as cell formats increase while the void volume in the cell decreases. Additionally, the simulations have been verified using experimental visualization from neutron radiography and show good agreement.
Dynamic systems modeling is used to characterize the temporal behavior of, for example, the electric power demand or the material flow. Integrating the different simulation modeling paradigms in software such as Analogic or Plant Simulation allows a dynamic description of the material and energy flow in battery cell factories. Similarly, Schönemann et al. proposed a multi-scale simulation approach that combines multiple factory levels in a modular platform. [66] The core element is the process chain module, which defines other factory elements, such as the production machines, processes, product flow, workers, or technical building services. Individual model approaches can characterize each factory element. The heterogeneous models are synchronized efficiently via middleware and thus enable an elaborate description of the energy demand of a battery cell factory.