Predicting structure zone diagrams for thin film synthesis by generative machine learning

Thin films are ubiquitous in modern technology and highly useful in materials discovery and design. For achieving optimal extrinsic properties, their microstructure needs to be controlled in a multi-parameter space, which usually requires too high a number of experiments to map. Here, we propose to master thin film processing microstructure complexity, and to reduce the cost of microstructure design by joining combinatorial experimentation with generative deep learning models to extract synthesis-composition-microstructure relations. A generative machine learning approach using a conditional generative adversarial network predicts structure zone diagrams. We demonstrate that generative models provide a so far unseen level of quality of generated structure zone diagrams that can be applied for the optimization of chemical composition and processing parameters to achieve a desired microstructure. Controlling the microstructure of thin films is vital for tuning their properties. Here, machine learning is applied to obtain synthesis-composition-microstructure relationships in the form of structure zone diagrams for thin films, enabling microstructure prediction.


Introduction
Thin films are of high importance both in modern technology as they are used as building elements of micro-and nanosystems but also in macroscopic applications where they add functionalities to bulk materials.Furthermore, they play a major role in materials discovery and design 1,2 .Next to composition and phase constitution, the microstructure of thin films is decisive for their properties.
The microstructure depends on synthesis conditions and the material itself.Microstructure is important for extrinsic properties, determines functionality and its optimization leads to significant performance enhancement [3][4][5][6][7] .Successful synthesis, e.g.magnetron sputtering, of thin films needs to master many process parameters (e.g.power supply usage (DC, RF, HPPMS), pressure, bias, gas composition, setup and geometry) which determine plasma conditions and affect film growth 8,9 .
However, the selection of process parameters, especially for the deposition of new materials, is still mostly based on the scientists' expertise and intuition and these parameters are usually optimized empirically.The film growth and the resulting microstructure at a fixed temperature is primarily determined by the relative flux of all particles in the gas phase, e.g.gas ions, metal ions, neutrals, thermalized atoms, arriving at the substrate 10 .Further, film microstructure is strongly dependent on the energy introduced into the growing surface by energetic ion bombardment 11 .The role of particlesurface interactions in altering film growth kinetics accompanied by thermodynamic mechanisms with respect to microstructure is not yet fully understood.
The need to predict microstructures from process parameters has inspired the development of structure zone diagrams (SZD), first introduced by Movchan and Demchishin for evaporated films 12 .
SZD are low-dimensional, abstracted, graphical representations of the occurrence of possible polycrystalline thin-film microstructures (similar structural features) in dependence on processing parameters (e.g.homologous temperature Tdep/Tmelt).The simplicity of SZD, which enables estimation of process-dependent microstructures, is also their main drawback, as the actual process parameter space is much larger than what is covered in a classical SZD.Especially with compositionally complex materials, the quality of predictions from simple SZD is limited.
Refined versions of the initial SZD were introduced for magnetron sputtered films: Homologous temperature and sputter pressure 13 , homologous temperature and ion bombardment 14 , level of contamination 15 , reactive gas to metal flux ratio 16 , extreme shadowing conditions 17 .Classical SZD for sputtering roughly categorize microstructures into four structure zones (I, T, II and III) 13 .More subzones can be identified based on adatom mobility conditions which influences crystalline texture 18 .
Although SZD are useful and popular, they only have a very limited predictive capability since they are based on many generalizations and assumptions, e.g. the pressure is a proxy for the constitution of the incoming particle flux (kinetic energy, ratio of ion-to-growth flux, flux composition).Several revised SZD have in common that they are either strongly abstracted 19 or materials specific 20 .Classical SZD relate processing to microstructure, however only for single elements or binary systems and using system-specific deposition process parameters like gas pressure or substrate bias, which are almost impossible to transfer between deposition systems.In order to identify an ideal microstructure for desired properties, classic SZD are helpful as they give the researchers a hint of likely microstructures, but empirical studies are still required, which require extensive experimental efforts.
To improve the predictive quality of SZDs, multiple input parameters (e.g.incoming particle flux, ion energy, temperature, discharge properties like peak power density and duty cycle, chemical composition, etc.) should be considered conjointly, leading to several challenges, e.g. the visualization of a multidimensional parameter-space.Anders proposed to include plasma parameters and thickness information (deposition, etching) 19 .His SZD keeps three axes, however with two generalized axes (temperature, energy) and the third axis film thickness 19 .However, the generalized axes include unknown factors, i.e. the formula for the calculation of generalized temperature and energy axes.In order to overcome the limitations of SZD, computational methods could be applied.The goal is to achieve a reliable prediction of complex, realistic microstructures based on boundary conditions like composition and relevant process parameters.Microstructures can be predicted by simulations, e.g.kinetic Monte Carlo [21][22][23] or molecular dynamic simulation 24 , which depend on selection of model architectures and boundary conditions and are intractable for high-throughput simulations.The interpretation of the overlap between simulation and experimental results remains to be performed by human assessment.A physical model for an accurate calculation of the microstructure from process parameters needs integrated cross-disciplinary models that cover the plasma discharge at the target, transport of plasma species to the substrate and atomistic processes on the surface and in the volume of the film.Even though progress has been made in different fields (electron 25,26 , particle transport 27 , plasma-surface-interaction 28 , DFT 29 ), a unified model is until today out of reach.
If physical models do not exist or are computationally intractable, instead of applying atomistic calculations, machine learning can provide surrogate models bridging the gap between process parameters and resulting microstructure.Machine learning evolved as a new category for microstructure cluster analysis 30,31 , microstructure recognition [32][33][34] , defect analysis 35 , materials design 36 and materials optimization 37 .Generative models are a class of artificial neural networks that are able to produce new data based on hidden information in training data 38 .The two most popular models are variational autoencoders (VAE) 39 and generative adversarial neural networks (GAN) 40 .
VAEs were applied to predict optical transmission spectra from scanned pictures of oxide materials 41 , for molecular design 42 and for microstructures in materials design [42][43][44] .Noraas et al. proposed to use generative deep learning models for material design to identify processing-structure-property relations and predict microstructures 45 .

Our approach
Many thin films in science and technology have a multinary composition and processing variations lead to an "explosion" of combinations which all would need to be tested to find the best processing condition leading to the optimal microstructure.In order to reduce the cost of microstructure design, we apply machine learning of experimental thin-film SEM-surface images and conditional parameters (chemical composition and process parameters).Two generative models are investigated: a VAE and a conditional GAN (cGAN).The VAE model provides an overview and interpretation of similarities and variations in the dataset by dimensionality reduction and clustering.The generative abilities of the cGAN are applied to conditionally predict microstructures based on conditional parameters.Furthermore, the general ability of deep learning models to generate specialized SZDs based on a limited number of observations is demonstrated.This approach predicts realistic processmicrostructure-relations with a generative model being trained on experimental observations only.
Our approach handles complexity by (I) performing a limited set of experiments, using "processing libraries" to efficiently generate comprehensive training datasets; (II) training deep learning models to handle SEM microstructure images, (III) visualization of the similarities between different synthesis paths and (IV) predictions of microstructures for new parameters from relations found in the training data.We select a material system from the class of transition metal nitrides, which are applied as hard protective coatings, Cr-Al-O-N 46 , for training and evaluation of our models.Cr-Al-O-N and subsystems (e.g.Al-Cr-N, CrN) have been the subject of many studies [47][48][49][50] .Our Cr-Al-O-N dataset, efficiently created from materials and processing libraries, in total containing 123 samples, includes variations of six conditional parameters, covering different combinations of compositional (Al-concentration (Al), O-concentration (O) in Cr1-x-Alx-Oy-N) and process parameters (deposition temperature (Td), average ion energy (EI), degree of ionization (Id) and deposition pressure (Pd)).Id is a design parameter which is related to the ratio of ion flux and the total growth flux of all deposited particles.In order to provide a sufficient quantity of data, 128 patches with size 128 x 128 px 2 were extracted randomly from each SEM image (see methods).All depositions were carried out in one sputter system (ATC 2200, AJA International), therefore the geometrical factors that usually change between different deposition equipment is not present.As thin film microstructure is also thickness dependent, all analyzed samples are in a similar thickness range (800 nm -1300 nm) and exhibit a fully developed microstructure.
To be able to study synthesis-processing-structure relationships, usually a large number of synthesis processes need to be carried out to create a sufficiently large dataset, which is time consuming.To substantially lower the number of necessary synthesis processes, we use combinatorial sputtering of thin-film materials libraries.We introduce the concept of "processing libraries" (PL): These are comparable to materials libraries, but, instead of a composition variation, PL comprise thin films synthesized using a set of different synthesis parameters, at either a constant materials composition, or additionally for different compositions (see methods).The samples in a PL are subject to predetermined variations of the conditional parameters (EI, Id, Td, Pd, Al, O).The film growth develops to a microstructure, which is characterized by geometrically different surface features in terms of size, shape and density.For a comprehensive study of possible microstructures, we exploit the process parameter space for synthesis conditions, where either thermodynamic, kinetic or both processes are dominant and repeat these processes for different chemical compositions.Film microstructures are usually assessed by surface and cross-sectional SEM images.Since high quality cross-sectional images are experimentally expensive and their interpretation is complicated, we focus on topographic surface images, as these are more comparable and describable.Surface morphology in terms of grain size and feature shapes can be used to correlate growth conditions and surface diffusion processes with resulting crystallographic orientation 18 .

Results and discussion
In order to inspect the dataset, we train a VAE with a regression model that uses the sampling layer (z) of the VAE as an input to predict the conditions (see methods).The model optimizes simultaneously on microstructure images and conditional parameters and achieves a well-structured and dense representation (latent space embedding).The 64-dimensional latent space is further dimensionallyreduced by kernel principle component analysis (kPCA) with a radial basis function (RBF) kernel 51 in order to provide graphical visualization in 2D.If the microstructure, composition and process parameters correlate, the images should cluster in the VAE latent space.
Figure 1 shows the first two components of the kPCA latent space representation of the validation set.
The axes (kPCA 1, kPCA 2) have no actual physical meaning: they are rather a rough expression of how the VAE recognizes images and the conditional parameter space and joins them in a dense layer.Each microstructure image is plotted at its position in the dimensionally reduced latent space embedding of the VAE.The images cluster in regions of similar sizes and shapes.A globular surface morphology is observed at kPCA 1 = -0.1 and kPCA 2 = -0.3.With increasing kPCA 1 and kPCA 2 the feature size decreases.With values of kPCA 1 < 0, mainly facetted grains are observed, while for kPCA 1 > 0 the features become more fine-granular and nanocrystalline.

Process-composition-microstructure relations
This qualitative overview of the microstructures in the dataset is now correlated to chemical composition and process characteristics: Figure 2 shows the microstructure images plotted at their latent space position and the position of each sample in the latent space with their respective colorcoded composition or process parameters.This visualizes the interplay between conditional parameters and their significance on microstructural features.
We now address the effect of each deposition parameter in order to provide a discussion baseline for the trends that are created by the prediction of the cGAN model.Samples with different levels of Ocontamination are separated in latent space and show a clear trend in feature size (Figure 2e).This can be explained, as O-impurities produce defects in the fcc lattice of Cr-Al-N, inhibiting crystal growth 16,52 .
Figure 2c) shows a similar trend for Al 53 .A solid solution for Cr1-x-Alx-N with up to 70 at.% Al is known 49 , whereas between 50 and 70 at.%Al, hcp AlN precipitates 54 .The maximum solubility of Al in fcc CrN depends on process parameters 55 .An increase in Td (Figure 2b) leads to an increase in feature size.
The feature shapes change from fine granular to facetted grains and at high Td to globular grains due to higher diffusion rates 20 .An increase in EI (Figure 2d) leads to a smoother surface as kinetic bombardment flattens facets and in extreme cases a featureless surface is observed.Additionally, surface diffusion is kinetically enhanced by ion bombardment 56 .An increased Id (Figure 2f) leads to a more directed particle flux resulting in oriented facets when the particle flux is inclined to the substrate normal 8 .In our case, the two confocal cathodes are inclined by 27° to the substrate normal to achieve a composition gradient.An increasing Pd (not shown) leads to an increase in gas atoms or molecules per volume and thereby to a decrease in mean free path 57 .Particles experience more collisions during their path from the target surface to the substrate and thereby lose energy.Additionally, Id and the ratio of gas ions to target ions increases, which influences surface kinetics.This illustrates the complex interplay between process parameters, composition and resulting microstructure.Also, it shows the usefulness of dimensionality reduction to gain an overview of complex datasets.The identified trends correlate well with results from literature.

Prediction of microstructures from conditional parameters
The decoder part of the VAE could be applied to generate images from the latent representation, but the quality is unsatisfactory due to known limitations of VAEs 58 .In contrast, GAN models are known to be able to produce photorealistic images 59 .To predict microstructures from the six conditional parameters, we train a cGAN model 60 .In order to categorize the level of prediction, we need to define what the model can learn from the experimental dataset.A reconstruction of a microstructure from the training set provides the baseline.Figure 3 compares experimental images to their predicted counterparts.The cGAN generates these microstructure images using two inputs only: conditional parameters and a latent sub-space with random noise.It should be noted that the cGAN is not trained to generate an exact copy of the original image.The generated images generally show a good reproduction of the experimental images in terms of feature size and shape.Even contrast variations on facets are reproduced.Figure 3 g) shows an exception, where locally, smaller features are generated on top of otherwise large smooth grain surfaces.This relates to the problem that the image patches only show small fractions of these large grains and the microstructure of 800°C deposited samples strongly differs from all other images.In rows b), c) and f) the generated images are nearly indistinguishable from their experimental counterparts.The facet shapes in row a) are not as sharp as in the experimental images and the facets in row d) show more curvature compared to the original images.However, the reproduced features can still be identified as facetted and the feature sizes match well.The generated images in row e) appear blurred and the feature size is smaller than the experimental image.A low contrast in the experimental images of these smooth dense microstructures might affect the training of the model.

14
To validate the cGAN prediction quality, microstructures from experimental test samples which were not included in the training set are predicted.Cr1-xAlxN samples grown at 500°C from the training set were deposited at < 10 eV (0 V substrate bias) and >100 eV (-100 V substrate bias) for different Alconcentrations.As an example, the cGAN predicts images for different Al at 40 eV (Figure 5).This requires an interpolation of EI.At 0 V bias, the faceted microstructure changes to a fine-grained microstructure with increasing Al.The same trend is observed at -100 V bias but the facets of Cr-rich samples are smoother and denser.With increasing Al, the microstructure becomes featureless.The prediction matches both trends.In direct comparison to the experimental counterparts, the facets of Cr-rich samples are less pronounced.Al-rich samples are almost indistinguishable from the test set images.These results show that the cGAN produces excellent results for interpolations within the data set.Finally, a SZD is generated by the cGAN.The advantage of this generative SZD (gSZD) is that it can be produced as required.In a 2D representation, two parameters can be varied while the remaining four parameters are selected constant.Figure 6 shows a gSZD for a variation of Al and Td at constant values for the remaining parameters.Al and Td are varied randomly between 0 to 70 at.%and 20 -800°C, respectively.The predicted image patches are plotted at positions according to their input conditions.Hence, patches overlay and appear as a continuous diagram.A clear variation of the microstructure in dependence of Td and Al is observed.The structure changes with increasing Al from facetted to a smoother, fine-grained structure.At Td > 350°C, Cr-rich samples exhibit a denser microstructure with smoother grains.Regions are highlighted in the diagram where structure changes were identified.The remaining parameters (O, Id, EI) vary in the experimental data, while they are kept constant in the gSZD.
A variation of Al and Td was experimentally realized at 10 at.% O while samples with a variation of EI were deposited at 500°C and contain 0 at.%O. Thus, the model combines (I) the structural refinement with increasing Al and (II) the trend that this refinement is inhibited with increasing Td.In other words, a higher Td is necessary at high Al to obtain a similar feature size and shape as compared to Cr-rich compositions without O and Al.For the gSZD these can be interpreted in the following way.In general, an increase in Al leads to a refinement of the microstructure due to changes in adatom surface mobility conditions 61 .This trend is most significant at low temperatures, since surface kinetics surpass thermodynamic processes.With increasing temperature, the faceted structure extends to higher Al.
An increase in feature size with Td is observed.The observed trends change to a finer structure when O is increased stepwise and facets are smoothed out by a stepwise increase of EI (gSZD not shown).

Definition of conditions for thin films with optimized microstructures
Finally, by combination of domain knowledge and the new gSZD, we are able to design a compositionprocess-window to create films for a desired application.For an example application of hard protective coatings for polymer injection molding or extrusion tools 62 , the tribological performance needs to be optimized, requiring films with a dense, smooth microstructure.Physical boundaries are provided by the maximum values of Al and Td.Td is limited by the temper diagram of cold work steel AISI 420 (X42Cr13, 1.2083).To avoid tempering of the substrate, the maximum Td should be lower than 450°C.
Al is limited by the formation of hcp AlN above 50 at.%Al, which would lead to a reduction in hardness 63 .To achieve a smooth and dense film, Al should be as high as possible, according to the gSZD.
Additionally, Td should be as high as possible in order to reduce grain boundary porosity.With an 17 included uncertainty, the new composition-process-window ("window of opportunity") is provided by the green region in Fehler!Verweisquelle konnte nicht gefunden werden..

Conclusion
We applied combinatorial synthesis methods to create materials and process libraries of the Cr-Al-O-N system in order to observe the influence of composition and process parameters on the resulting microstructural properties.Our training set of samples from the Cr-Al-O-N system covers variations in the directions of previous SZD (Td, Pd, Id, EI, O) and an additional compositional variation of Al.A generative neural network was trained on SEM surface images to predict microstructures based on the input of composition and process parameters.The model reproduces the observed trends in the dataset.Furthermore, we were able to validate the predictive capabilities on test data, which requires an interpolation of conditional parameters.A transfer of trends from sampled regions to un-sampled regions was demonstrated in a new generative SZD.The gSZD shows the expected microstructure of thin films for a variation of Al concentration and deposition temperature, which will be useful for the optimization of TM-Al-N (TM = transition metal) thin films.A so far unseen level of predictive quality in the scope of SZD is observed which will lead to an acceleration in the development and optimization of thin films with a desired microstructure.Until now, the assessment of new, predicted microstructures needs to be performed by the scientist.A system of metrics for the evaluation of microstructures would be helpful for future works in this field.Nevertheless, the results give reason to believe that future generative models will be applied in the microstructure optimization process, which is a key challenge in functional thin film materials.decrease in target peak power density which leads to a decrease in Id and a small decrease (up to 3 eV) in EI.The O-concentration in several of the discussed samples are contaminations from residual gas outgassing from the deposition equipment, which is especially present at elevated temperatures (> 600°C).

Thin film characterization
The chemical composition (Al/Cr) is determined by EDX (Inca X-act, Oxford Instruments).The Oconcentration is determined by XPS (Kratos Axis Nova) for a subset of the samples.All films are stoichiometric in terms by the definition of (Al+Cr)/(O+N) = 1.The stoichiometry is validated for additional samples that are deposited under similar process conditions (not shown) by RBS measurements, within a 5 at.% error.SEM images are taken in a Jeol 7200F using the secondary electron detector at 50,000x magnification at an image size of 1280 x 960 pixels.The SEM images are histogram-equalized using contrast limited adaptive histogram equalization (CLAHE) 68 .

Plasma properties
EI was calculated from retarding field energy analyzer measurements of a previous study 67 that were carried out at five measurement positions along the 100 mm substrate area in three reactive codeposition processes of Al and Cr at 100, 200 and 400 Hz sputter frequency at 0.5 Pa.If a substrate bias was applied, an additional ion energy was added to the total ion energy (e.g.EI + 40 eV bias).To estimate Id, the ratio of total ion flux and growth flux was calculated.Unknown values for conditions that were not measured are estimated by extrapolation.The ion to growth flux ratios are normalized over the data set.These values provide only a rough estimation that covers the known trends from literature and our own investigations.It should be noted that we consider Id a physics-informed descriptor, rather than a physical property.layer with 512 neurons which is reshaped to match the shape of the last convolutional layer.The layer is passed to 5 building blocks which comprise a 2D convolutional layer followed by batch normalization, Leaky ReLU activation, dropout and an upsampling layer.The filter sizes of the convolutional layers are 128, 128, 128, 64, 32.An additional convolutional layer with filter size 1 provides the output of the

cGAN
The generative adversarial network consists of two parts: a generator and a discriminator.The generator network has two inputs, a 16-dimensional latent space (intrinsic parameters) and six conditional physical parameters (extrinsic).The latent space input layer is followed by a dense layer with 32768 neurons and Leaky ReLU activation function and then reshaped into a 16x16 layer with 128 channels.The conditional input layer is followed by 256 dense layers with linear activation function and reshaped into a 16 x 16 matrix with one channel.Two reshaped 16x16 matrices are combined together and followed by two convolutional-transpose layers with Leaky ReLU activation functions, with an upscaling factor of 2 and 128 filters for each layer.The last layer is convolutional with hyperbolic tangent activation and 64 x 64 x 1 shaped of output.The discriminator network also has two inputs, the six conditional physical parameters and a 64 x 64 x 1 input image.As in the generator network the conditional input layer is converted into a 64 x 64 x 1 matrix with one dense layer and concatenated with the input image.This is followed by two convolutional layers with 128 channels and a downscaling factor of 2, which results in a 16 x 16 x 128 matrix.A flattening layer is followed by a dropout layer with a dropout factor = 0.4 and a dense output layer with sigmoid activation function.
The same conditional extrinsic physical parameters were fed into both the generator and the discriminator.The discriminator model has a binary cross-entropy loss function and an Adam optimizer with a learning rate equal to 0.0002, and beta_1 equal to 0.5.The loss function for the generator is approximated by the negative discriminator, in a spirit of adversarial network training.The training procedure consists of consecutive training of the discriminator on small batches of real and fake images with corresponding conditional physical parameters and generator training on randomly generated points from latent space and realistic extrinsic parameters.

Figure 1 :
Figure 1: Latent space representation of all microstructures from the validation set.Patches created

Figure 2 :
Figure 2: Correlation of the microstructures in the dataset with chemical composition and cconditional

Figure 3 :
Figure 3: Comparison of randomly-selected experimental SEM surface microstructure images and

Figure 4 :
Figure 4: Predicted microstructures from cGAN (blue frame) and comparison with experimental results

Figure 5 :
Figure 5: Synopsis of experimental and predicted images.Green boxes contain experimental images

Figure 6 :
Figure 6: gSZD generated by the cGAN model for a variation of Al und Td.The remaining process decoder.A regression model takes the output of the sampling layer z as an input and outputs the conditional parameters.The regression model has 4 dense layers with dimensions 20, 20, 20, 6 and ReLU activation, an input layer with 64 dimensions and an output layer with 6 dimensions and linear activation function.The VAE and the regression model are simultaneously trained using the Adadelta optimizer.The VAE loss is provided by the sum of the Kullback-Leibler divergence and the image reconstruction binary cross entropy.The loss of the regression model is calculated by the mean squared error.The losses of VAE and regression model are weighted 1:10000 in order to provide a well-structured latent space.