short communications\(\def\hfill{\hskip 5em}\def\hfil{\hskip 3em}\def\eqno#1{\hfil {#1}}\)

Journal logoJOURNAL OF
SYNCHROTRON
RADIATION
ISSN: 1600-5775

Classification of grazing-incidence small-angle X-ray scattering patterns by convolutional neural network

CROSSMARK_Color_square_no_text.svg

aDepartment of Physics, University of Toyama, Japan, bToyama Prefectural University, Japan, and cDepartment of Materials Science and Engineering, Kyoto University, Japan
*Correspondence e-mail: ikemoto@sci.u-toyama.ac.jp

Edited by U. Jeng, NSRRC, Taiwan (Received 1 January 2020; accepted 26 April 2020; online 20 May 2020)

Grazing-incidence small-angle X-ray scattering (GISAXS) patterns have multiple superimposed contributions from the shape of the nanoscale structure, the coupling between the particles, the partial pair correlation, and the layer geometry. Therefore, it is not easy to identify the model manually from the huge amounts of combinations. The convolutional neural network (CNN), which is one of the artificial neural networks, can find regularities to classify patterns from large amounts of combinations. CNN was applied to classify GISAXS patterns, focusing on the shape of the nanoparticles. The network found regularities from the GISAXS patterns and showed a success rate of about 90% for the classification. This method can efficiently classify a large amount of experimental GISAXS patterns according to a set of model shapes and their combinations.

1. Introduction

Grazing-incidence small-angle X-ray scattering (GISAXS) is a valuable tool for characterizing the nanostructure of materials, particularly at surfaces and interfaces (Hexemer & Müller-Buschbaum, 2015[Hexemer, A. & Müller-Buschbaum, P. (2015). IUCrJ, 2, 106-125.]; Rauscher et al., 1995[Rauscher, M., Salditt, T. & Spohn, H. (1995). Phys. Rev. B, 52, 16855-16863.], 2005[Rauscher, M., Reichert, H., Engemann, S. & Dosch, H. (2005). Phys. Rev. B, 72, 205401.]; Renaud et al., 2003[Renaud, G., Lazzari, R., Revenant, C., Barbier, A., Noblet, M., Ulrich, O., Leroy, F., Jupille, J., Borensztein, Y., Henry, C. R., Deville, J., Scheurer, F., Mane, J., Fruchart, O. & Webster, D. R. (2003). Science, 64, 255.], 2009[Renaud, G., Lazzari, R. & Leroy, F. (2009). Surf. Sci. Rep. 64, 255-380.]). GISAXS analysis requires two processes; the first step is the classification of the model, and the second is fitting the intensity data with least-squares curve fitting. The classification of GISAXS patterns in relation to the shape and morphology of nanodots is the essential point in GISAXS analysis. The models are composed from a combination of the shape of the nanoscale structure, the coupling between the particles, the partial pair correlation, and the layer geometry. It is impossible for researchers by themselves to survey all feasible model results because the number of possible combinations is huge.

Convolutional neural networks (CNN) have been applied in a wide variety of fields, such as image recognition (Hu et al., 2018[Hu, J., Shen, L. & Sun, G. (2018). Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR 2018), 18-22 June 2018, Salt Lake City, UT, USA, pp. 7132-7141.]), computer vision (Kendall & Yarin, 2017[Kendall, A. & Yarin, G. (2017). Adv. Neural Inf. Process. Syst. 30, 5574-5584.]), medical image analysis (Poplin et al., 2018[Poplin, R., Varadarajan, A. V., Blumer, K., Liu, Y., McConnell, M. V., Corrado, G. S., Peng, L. & Webster, D. R. (2018). Nat. Biomed. Eng. 2, 158-164.]), and material inspections (Park et al., 2016[Park, J. K., Kwon, B. K., Park, J. H. & Kang, D. J. (2016). Int. J. Precis. Eng. Manuf.-Green Tech. 3, 303-310.]). They have also been used for the analysis of X-ray experiments, such as GISAXS (Liu et al., 2019[Liu, S., Melton, C. N., Venkatakrishnan, S., Pandolfi, R. J., Freychet, G., Kumar, D., Tang, H., Hexemer, A. & Ushizima, D. M. (2019). MRS Commun. 9, 586-592.]) and X-ray absorption near-edge structure (Timoshenko et al., 2017[Timoshenko, J., Lu, D., Lin, Y. & Frenkel, A. I. (2017). J. Phys. Chem. Lett. 8, 5091-5098.]; Zheng et al., 2018[Zheng, C., Mathew, K., Chen, C., Chen, Y., Tang, H., Dozier, A., Kas, J. J., Vila, F. D., Rehr, J. J., Piper, L. F. J., Persson, K. A. & Ong, S. P. (2018). npj Comput. Mater. 4, 12.]). The open-source TensorFlow machine-learning library (Abadi et al., 2015[Abadi, M., Agarwal, A., Barham, P., Brevdo, E., Chen, Z., Citro, C., Corrado, G., Davis, A., Dean, J., Devin, M., Ghemawat, S., Goodfellow, I., Harp, A., Irving, G., Isard, M., Jia, Y., Jozefowicz, R., Kaiser, L., Kudlur, M., Levenberg, J., Mane, D., Monga, R., Moore, S., Murray, D., Olah, C., Schuster, M., Shlens, J., Steiner, B., Sutskever, I., Talwar, K., Tucker, P., Vanhoucke, V., Vasudevan, V., Viegas, F., Vinyals, O., Warden, P., Wattenberg, M., Wicke, M., Yu, Y. & Zheng, X. (2015). arXiv:1603.04467 [cs. DC].]), which is adaptable to the field of deep learning (Goodfellow et al., 2016[Goodfellow, I., Bengio, Y. & Courville, A. (2016). Deep Learning, pp. 173-174. MIT Press.]), is available for free. In addition, CNN architectures, such as AlexNet (Krizhevsky et al., 2012[Krizhevsky, A., Sutskever, I. & Hinton, G. E. (2012). Proceedings of the 25th Inernational Conference on Neural Information Processing Systems (ICONIP 2018), Part 1, 13-16 December 2018, Siem Reap, Cambodia, pp. 1097-1105.]) and VGG-16 (Simonyan & Zisserman, 2014[Simonyan, K. & Zisserman, A. (2014). arXiv:1409.1556.]), are also free to use.

CNNs have particular advantages for the classification of images, and are trained with a lot of data. Therefore, they may be excellent for the classification of GISAXS patterns. A CNN system was applied to classify the orientation of nanoparticles in thin films (Liu et al., 2019[Liu, S., Melton, C. N., Venkatakrishnan, S., Pandolfi, R. J., Freychet, G., Kumar, D., Tang, H., Hexemer, A. & Ushizima, D. M. (2019). MRS Commun. 9, 586-592.]). In this paper we describe how the CNN system is also useful to obtain models, such as the shape of the nanoparticles, from GISAXS patterns. The CNN systems meet the demands of the times, when the growth of nanoparticles is observed in real-time by GISAXS (Renaud et al., 2003[Renaud, G., Lazzari, R., Revenant, C., Barbier, A., Noblet, M., Ulrich, O., Leroy, F., Jupille, J., Borensztein, Y., Henry, C. R., Deville, J., Scheurer, F., Mane, J., Fruchart, O. & Webster, D. R. (2003). Science, 64, 255.]) and fully automated high-throughput systems produce huge amount of GISAXS data (Jimenez et al., 2013[Jimenez, J., Schaible, E., Church, M., Yee, C., Macdowell, A., Parkinson, D., Domning, E., Smith, B., Alvarez, S. & Hexemer, A. (2013). APS March Meeting, BASP.2013.MAR.Q1.87.]). We show the efficiency of the CNN for GISAXS analysis.

After training the network with simulated data, we used the trained CNN system to classify real experimental data.

2. Methods and experiment

We applied the CNN to classify GISAXS patterns corresponding to the shapes of nanoparticles for two reasons. The first reason is that the GISAXS patterns strongly depend on the shape of the nanoscale structure among the classes of the model (Renaud et al., 2003[Renaud, G., Lazzari, R., Revenant, C., Barbier, A., Noblet, M., Ulrich, O., Leroy, F., Jupille, J., Borensztein, Y., Henry, C. R., Deville, J., Scheurer, F., Mane, J., Fruchart, O. & Webster, D. R. (2003). Science, 64, 255.]; Leroy et al., 2005[Leroy, F., Eymery, J., Buttard, D., Renaud, G. & Lazzari, R. (2005). J. Cryst. Growth, 275, e2195-e2200.]). The second reason is that we give priority to the validation of the CNN against shape analysis of the samples based on image recognition of the GISAXS patterns at the first stage.

We constructed a very simple CNN system using TensorFlow (Abadi et al., 2015[Abadi, M., Agarwal, A., Barham, P., Brevdo, E., Chen, Z., Citro, C., Corrado, G., Davis, A., Dean, J., Devin, M., Ghemawat, S., Goodfellow, I., Harp, A., Irving, G., Isard, M., Jia, Y., Jozefowicz, R., Kaiser, L., Kudlur, M., Levenberg, J., Mane, D., Monga, R., Moore, S., Murray, D., Olah, C., Schuster, M., Shlens, J., Steiner, B., Sutskever, I., Talwar, K., Tucker, P., Vanhoucke, V., Vasudevan, V., Viegas, F., Vinyals, O., Warden, P., Wattenberg, M., Wicke, M., Yu, Y. & Zheng, X. (2015). arXiv:1603.04467 [cs. DC].]). Table 1[link] shows details of the structure. The CNN structure is composed of two convolutions, two max-poolings, and two fully connected layers, which are common components (Goodfellow et al., 2016[Goodfellow, I., Bengio, Y. & Courville, A. (2016). Deep Learning, pp. 173-174. MIT Press.]). Its simplicity makes it convenient to check the CNN analysis process. While the results of the classification are obtained at the output layer, the probabilities against all classes are obtained at Layer 6, the layer just before the output layer, for investigation of misclassifications. In general, if tuning is excessively performed on training data, high performance may not be ensured with test data, which is called overfitting. Therefore, early stopping is applied to avoid the overfitting issue. In this study, early stopping was applied when the loss function value of the test data did not improve three times consecutively.

Table 1
Network structure of the proposed convolutional neural network

Layer Layer name Kernel size No. of filters Strides Output shape Regularization
0 Input 90 × 70 × 1
1 Convolution 4 × 4 32 1 90 × 70 × 32
2 Max-pooling 4 × 4 32 4 23 × 18 × 32
3 Convolution 4 × 4 64 1 23 × 18 × 64
4 Max-pooling 4 × 4 64 4 6 × 5 × 64
5 Dense 512 Dropout(0.2)
6 Dense 8 Dropout(0.2)

For the training data, we calculated GISAXS intensities using the FitGISAXS code (Babonneau, 2010[Babonneau, D. (2010). J. Appl. Cryst. 43, 929-936.]). The GISAXS patterns for training and testing the CNN network were generated from the values of a common logarithm for intensity. The total number of pixels of the image was restricted to 90 × 70 = 6300 due to the required computational time, which still gave sufficient information on the outer shape of the particles.

We simulated the GISAXS patterns of tellurium nanoparticles on a Si substrate [the real part of the refraction index (δ) is 7.6733 × 10−6 for the X-ray wavelength of 1.5 Å] with an incident angle of 0.2°. The models were defined as follows: the layer geometry is the supported islands, the in-plane structure factor is described by the Percus–Yevick approximation, and the size distribution model is the decoupling approximation with moderate volume fraction of 0.2. The shape model for nanoparticles contains eight classes: capsule, spheroid, ellipsoid, truncated spheroid, hemispheroid, prism based on an equilateral triangle (prism3), prism based on a regular hexagon (prism6), and cylinder. For all classes except ellipsoid and truncated spheroid, the parameters were the values of the diameter, aspect ratio in the vertical plane, and size dispersion. For ellipsoid and truncated spheroid, parameters specific to the characteristics of the shapes were added, that is, ratio of vertical diameter to height for the truncated spheroid and aspect ratio in the horizontal plane for the ellipsoid. Every class contained 336 simulated images whose parameters are listed in Fig. 1[link]. Eighty-four randomly selected images and all the residual images were used as test and training data for each class, respectively. The computation time required for the training was about 3 h (Intel Core i7, 2.0 GHz, without a graphical processing unit).

[Figure 1]
Figure 1
Parameters for nanoparticle shapes. Dx, Dy: diameters in the horizontal plane; Dz: diameter in the vertical plane; H: height; FWHM: full width at half-maximum of Dy. The distribution function of Dy is log-normal.

Experimental GISAXS patterns were also evaluated by CNN trained by the simulated data. The GISAXS patterns were obtained experimentally for tellurium nanoparticles (n-Te) made by the deposition of Te on Si(100) substrates. GISAXS experiments were performed under vacuum with the small-angle scattering setup of the BL6A and 10C beamlines of the Photon Factory in the High Energy Accelerator Research Organization (KEK), Tsukuba, Japan. The incident angle was 0.2°, the X-ray wavelength was 1.5 Å, and the distance between the sample and the detector was about 2 m, which was calibrated using the diffraction ring of silver docosanoate. The detectors were Pilatus 1M or 2M.

3. Results and discussion

We trained and tested the CNN on the simulated GISAXS patterns. Figure 2[link] shows the success rate as a function of learning. The success rates for training and test data reach up to about 90%. There are some options for improving the success rate, such as Bayesian optimization to select more optimal hyperparameters, increasing the resolution of the GISAXS patterns, and increasing the amount of training data.

[Figure 2]
Figure 2
Transition of success rate during training.

Table 2[link] shows the confusion matrix for the CNN, which shows the performance of a classifier by comparing the actual and predicted classes. All classifications except ellipsoid and spheroid were sufficiently accurate. About one-third of the spheroids were classified as ellipsoid. Conversely, a quarter of the ellipsoids were classified as spheroids. The confusion is understandable, and the classification is technically not wrong, considering the relationship between ellipsoids and spheroids. The set of ellipsoids contains spheroids; spheroids are ellipsoids whose aspect ratio in the horizontal plane is unity. The probability of every class can be checked at Layer 6. In the misclassified cases, the probabilities of the actual classes are the `second-place' values. This means that the prediction values containing the first and second alternatives are nearly perfect. The CNN is very useful for screening the model of the particles' shape if we consider the secondary results.

Table 2
Normalized confusion matrix for the CNN

  Actual class
Predicted class Capsule Spheroid Ellipsoid Truncated spheroid Hemispheroid Prism Prism6 Cylinder
Capsule 100 0 0 0 0 0 0 0
Spheroid 0 65.5 28.6 0 0 0 0 0
Ellipsoid 0 34.5 71.4 0 0 0 0 0
Truncated spheroid 0 0 0 100 0 0 0 0
Hemispheroid 0 0 0 0 100 0 0 0
Prism 0 0 0 0 0 100 0 0
Prism6 0 0 0 0 0 0 98.8 2.4
Cylinder 0 0 0 0 0 0 1.2 97.6
Sum 100 100 100 100 100 100 100 100

To compare the performance of the CNN with other methods, the similarity of images was calculated as an index. The image similarity can represent similar images numerically, and is widely used in the field of image processing including image search. It is considered that the similarity simulates the ability of the human eye in a simple way. Using the same test data set for the CNN, a confusion matrix was also created for the method using the index of similar images. Table 3[link] shows a confusion matrix for the index of similarity of images. Here, the class having the highest similarity is determined as the classification result. From the results of Tables 2[link] and 3[link], the average success rates by CNN and the image similarity method were 91.7% and 59.8%, respectively. Therefore, the advantage of the CNN is clear.

Table 3
Normalized confusion matrix for the similarity

  Actual class
Predicted class Capsule Spheroid Ellipsoid Truncated spheroid Hemispheroid Prism Prism6 Cylinder
Capsule 86.9 7.1 4.8 8.3 0 0 0 1.2
Spheroid 9.5 38.1 28.6 7.1 3.6 0 0 0
Ellipsoid 2.4 35.7 61.9 4.8 1.2 0 1.2 1.2
Truncated spheroid 0 8.3 0 45.2 17.9 1.2 7.1 1.2
Hemispheroid 0 8.3 3.6 21.4 70.2 6.0 4.8 8.3
Prism 0 0 0 2.4 3.6 50.0 15.5 9.5
Prism6 0 0 0 1.2 1.2 11.9 51.2 3.6
Cylinder 1.2 2.4 1.2 9.5 2.4 31.0 20.2 75.0
Sum 100 100 100 100 100 100 100 100

We studied the verification of the potential of the CNN system for the classification of the experimental data. We selected 37 GISAXS images from our experiments, and each image has more than two peaks in the pattern. The system classified 30 of 37 images as a truncated spheroid, 5 as a ellipsoid, and 2 as a hemispheroid, as shown in Fig. 3[link].

[Figure 3]
Figure 3
Actual experimental GISAXS pattern for Te nanoparticles (average thickness 2.7 nm), which was classified as the truncated spheroid. The probability of the top two classes at Layer 6 was 95% to truncated spheroid and 2% to ellipsoid. The components of the scattering vector are defined as follows. qy = [({{2\pi}/{\lambda}})\cos\alpha_{\rm{f}}\sin\delta], qz = [({{2\pi}/{\lambda}})(\sin\alpha_{\rm{i}}+\sin\alpha_{\rm{f}})], where λ is the X-ray wavelength, αi is the incident angle onto the sample's surface, αf and δ are the exit angles perpendicular and parallel to the surface, respectively. The total number of pixels of the GISAXS images was reduced to 90 × 70 = 6300, which was matched with the training data. The intensity of the images was converted to a logarithmic scale, and the magnitude was expressed in the gradation of 256 steps shown in the gray scale.

It is reasonable to assume that all n-Te shapes are the same. Therefore, the classification of the experimental data by CNN may be valuable for the analysis of GISAXS. Further analysis should be required to study the influence of the angle of incidence, volume fraction, in-plane orientation, etc. on the successful classification of the nanoparticle shape.

4. Conclusion

We constructed a simple CNN structure to classify GISAXS patterns. The network was trained and tested with simulated GISAXS patterns. The proposed CNN obtains about a 90% success rate on the test data. Regarding the second candidate class, the CNN has a sufficient classification success rate to be the preliminary selection model for least-squares fitting during GISAXS analysis. It is also useful for classifying real experimental GISAXS patterns.

Acknowledgements

The authors thank Mr T. Watanabe, A. Minamimura, and I. Abe for their assistance at various stages. The synchrotron radiation experiments were performed at the Photon Factory in KEK under Proposal Nos. 2013G182, 2015G146, 2017G618, and 2018G074.

Funding information

Funding for this research was provided by: JSPS KAKENHI JP26400312; JSPS KAKENHI JP17K04980.

References

First citationAbadi, M., Agarwal, A., Barham, P., Brevdo, E., Chen, Z., Citro, C., Corrado, G., Davis, A., Dean, J., Devin, M., Ghemawat, S., Goodfellow, I., Harp, A., Irving, G., Isard, M., Jia, Y., Jozefowicz, R., Kaiser, L., Kudlur, M., Levenberg, J., Mane, D., Monga, R., Moore, S., Murray, D., Olah, C., Schuster, M., Shlens, J., Steiner, B., Sutskever, I., Talwar, K., Tucker, P., Vanhoucke, V., Vasudevan, V., Viegas, F., Vinyals, O., Warden, P., Wattenberg, M., Wicke, M., Yu, Y. & Zheng, X. (2015). arXiv:1603.04467 [cs. DC].  Google Scholar
First citationBabonneau, D. (2010). J. Appl. Cryst. 43, 929–936.  Web of Science CrossRef CAS IUCr Journals Google Scholar
First citationGoodfellow, I., Bengio, Y. & Courville, A. (2016). Deep Learning, pp. 173–174. MIT Press.  Google Scholar
First citationHexemer, A. & Müller-Buschbaum, P. (2015). IUCrJ, 2, 106–125.  Web of Science CrossRef CAS PubMed IUCr Journals Google Scholar
First citationHu, J., Shen, L. & Sun, G. (2018). Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR 2018), 18–22 June 2018, Salt Lake City, UT, USA, pp. 7132–7141.  Google Scholar
First citationJimenez, J., Schaible, E., Church, M., Yee, C., Macdowell, A., Parkinson, D., Domning, E., Smith, B., Alvarez, S. & Hexemer, A. (2013). APS March Meeting, BASP.2013.MAR.Q1.87.  Google Scholar
First citationKendall, A. & Yarin, G. (2017). Adv. Neural Inf. Process. Syst. 30, 5574–5584.  Google Scholar
First citationKrizhevsky, A., Sutskever, I. & Hinton, G. E. (2012). Proceedings of the 25th Inernational Conference on Neural Information Processing Systems (ICONIP 2018), Part 1, 13–16 December 2018, Siem Reap, Cambodia, pp. 1097–1105.  Google Scholar
First citationLeroy, F., Eymery, J., Buttard, D., Renaud, G. & Lazzari, R. (2005). J. Cryst. Growth, 275, e2195–e2200.  Web of Science CrossRef CAS Google Scholar
First citationLiu, S., Melton, C. N., Venkatakrishnan, S., Pandolfi, R. J., Freychet, G., Kumar, D., Tang, H., Hexemer, A. & Ushizima, D. M. (2019). MRS Commun. 9, 586–592.  Web of Science CrossRef CAS Google Scholar
First citationPark, J. K., Kwon, B. K., Park, J. H. & Kang, D. J. (2016). Int. J. Precis. Eng. Manuf.-Green Tech. 3, 303–310.  Web of Science CrossRef Google Scholar
First citationPoplin, R., Varadarajan, A. V., Blumer, K., Liu, Y., McConnell, M. V., Corrado, G. S., Peng, L. & Webster, D. R. (2018). Nat. Biomed. Eng. 2, 158–164.  Web of Science CrossRef PubMed Google Scholar
First citationRauscher, M., Reichert, H., Engemann, S. & Dosch, H. (2005). Phys. Rev. B, 72, 205401.  Web of Science CrossRef Google Scholar
First citationRauscher, M., Salditt, T. & Spohn, H. (1995). Phys. Rev. B, 52, 16855–16863.  CrossRef CAS Web of Science Google Scholar
First citationRenaud, G., Lazzari, R. & Leroy, F. (2009). Surf. Sci. Rep. 64, 255–380.  Web of Science CrossRef CAS Google Scholar
First citationRenaud, G., Lazzari, R., Revenant, C., Barbier, A., Noblet, M., Ulrich, O., Leroy, F., Jupille, J., Borensztein, Y., Henry, C. R., Deville, J., Scheurer, F., Mane, J., Fruchart, O. & Webster, D. R. (2003). Science, 64, 255.  Google Scholar
First citationSimonyan, K. & Zisserman, A. (2014). arXiv:1409.1556.  Google Scholar
First citationTimoshenko, J., Lu, D., Lin, Y. & Frenkel, A. I. (2017). J. Phys. Chem. Lett. 8, 5091–5098.  Web of Science CrossRef PubMed Google Scholar
First citationZheng, C., Mathew, K., Chen, C., Chen, Y., Tang, H., Dozier, A., Kas, J. J., Vila, F. D., Rehr, J. J., Piper, L. F. J., Persson, K. A. & Ong, S. P. (2018). npj Comput. Mater. 4, 12.  Web of Science CrossRef Google Scholar

© International Union of Crystallography. Prior permission is not required to reproduce short quotations, tables and figures from this article, provided the original authors and source are cited. For more information, click here.

Journal logoJOURNAL OF
SYNCHROTRON
RADIATION
ISSN: 1600-5775
Follow J. Synchrotron Rad.
Sign up for e-alerts
Follow J. Synchrotron Rad. on Twitter
Follow us on facebook
Sign up for RSS feeds