Accuracy of CNN

The loss function and network accuracy as a function of epoch are shown in Fig. 4. As the epoch number increases, the loss functions using mini-batch decrease and the training and test accuracies increase. From the 80th epoch, the loss function becomes stable, so we decided to run 100 epochs. During training, the training loss is higher than the testing loss (Fig. 4). This is because the regularization mechanism of the dropout layer is turned off at testing time27. We confirmed that the training loss and the testing loss (and the accuracies) became the same if the two dropout layers are removed. The accuracy of the CNN after 100 epochs was evaluated from test images to be approximately 92% (Fig. 4b). Because initial values of layers and the mini-batch were determined randomly, we trained the CNN several times, and confirmed that the corresponding changes in accuracy were negligible.

Figure 4 (a) Loss functions and (b) training and test accuracies as a function of epoch number. Full size image

We also conducted training with a small number of the training images (the number of the test images did not change). In the case of 100 images per class (400 images total), the accuracy of the network was approximately 90%. Approximately 90% accuracy could often be achieved even with 50 images per class, and it decreased to ~86% at 20 training images per class. Thus, the minimum number required for classification of our data set is 50 per class (200 total) in order to achieve ~90% accuracy. Because the images taken by Morphologi have a relatively simple shape (only four classes and the complicated surface texture was not shown), a sufficient number of training images were generated by augmentation (rotating, shifting, and flipping) even though the number of the original images was small. When the training data was not augmented, the accuracy was only ~80%, even with 200 images per class, and overfitting occurred. Thus, in the case of data without augmentation, many more images (perhaps more than one thousand per one class) are needed. We note that the required number of images strongly depends on the structure of the network and the images themselves. If we were to consider the complicated patterns in, for example, scanning electron microscopy (SEM) images, many images would be required, which is beyond the scope of this work.

Mixing ratio of particles

Using the trained network, we calculated the probabilities for each of the four classes for every particle in the data set. Examples of probabilities calculated by the trained CNN are shown in Fig. 5. If these particles were primarily composed of two basal shapes, the probabilities for two classes were relatively high, while only one probability is high for the particles composed of only one basal shape (e.g., Fig. 5g). In the case of Fig. 5h, three shapes are mixed, so the probability of the vesicular class was relatively lower compared with the particles in Fig. 5a and b. However, we note that not every combination of classes was observed in our analyses. The rounded class was found to mainly mix with the blocky class. In addition, the number of particles composed of three basal shapes (e.g., Fig. 5h) was small. The rounded particles selected as training images have a high aspect ratio and circularity, which is in contrast to the elongated and vesicular shapes (Table 3), i.e., the rounded shape is exclusive from vesicular and elongated shape by definition of the classes. Thus, the probability of the rounded shape was not often found in combination with the vesicular and elongated shapes with high probability.

Figure 5 Examples of ash particles with complex shapes and corresponding class probabilities for each of the four basal shapes: B (blocky), V (vesicular), E (elongated) and R (rounded). The probabilities can be interpreted as the mixing ratio of the four basal shapes. Full size image

In this work, the training images were selected from the large-scale structure of the particle, and thus some basal images contain small-scale structure such as concavity. Thus, uncertainty due to the effect of the small-scale structure could not be removed completely in evaluating the mixing ratio. For example, even though some particles have shallow or small concavity (e.g., Fig. 5e,d and j), the vesicular class probability for these particles was low. This is because we defined the vesicular shape to be an irregular outline and concavity that can be recognized as a whole structure rather than part of it (Fig. 2). Thus, the probabilities by our CNN show the mixing ratio of large-scale structure in one particle. If we limit the training images to more ideal shapes (only particles without small-scale structures), accurate evaluation of small vesicular shape may be possible. However, because volcanic ash is not an artificial object, many more samples are required to collect better training images. Moreover, in the case of Fig. 5d, the CNN might recognize that the small concavity is the connection between blocky and elongated shapes rather than vesicular structure, which also reduced the vesicular probability. Another caveat is that we used relatively low-resolution (50 × 50 pixel) images to reduce the computational time. Thus, the CNN might not recognize the small-scale structure of the particles. If high-resolution images are used, although the computational time will increase, the effect of detailed morphology may be evaluated more accurately. These tasks require more images and can be considered in future studies.

Averaged mixing ratio and clustering of samples

As a next step, we selected 18 samples from three areas, Funabara, Nippana, and Myvatn (formed by magmatic, phreatomagmatic, and rootless eruptions, respectively), and performed clustering of the samples based on the mean probabilities of the four basal shapes averaged over every particle in each sample. Moreover, the probability ratio of basal shapes over the three areas p i was also calculated as \({p}_{i}={\sum }_{j}{m}_{ij}{n}_{j}/{\sum }_{j}{n}_{j}\), where m ij and n j are the mean probability of basal shape i (one of four classes) in sample j and the number of particles in the sample, respectively. The summation was carried out for each area (Funabara, Nippana, and Myvatn).

One caveat is that, with Morphologi images, details of the surface texture cannot be observed. However, Morphologi can automatically calculate the pixel intensity for each particle15, which can provide rough information about the particle composition in terms of the transparency under bottom lighting. Transparency can be an effective means of extracting glass fragments and transparent crystals from volcanic ash, which can play an important role in a discussion of the degree of quenching and fragmentation of magma/lava3,31,32. To calculate ash transparency, complex parameterization is not required. Thus, we considered the transparency in addition to the class probabilities.

Using Morphologi, we evaluated the mean (I m ) and standard deviation (I SD ) of the intensity of one particle (see the Supplementary Information for details), and thus there are 2 parameters per particle image. We averaged I m and I SD over one sample, and considered the averaged value, the standard deviation, and the median as the transparency of each sample. Thus, each sample has 4 parameters (averaged probabilities) for shape and 6 parameters for transparency. Cluster analyses were conducted using these 10 parameters. We performed hierarchical clustering (Ward’s method33) in R34 based on the Euclidean distances between each pair of samples.

Table 4 shows the mean probabilities of basal shapes and transparency values for each sample. The averaged probability over each area (three different eruption types) p i is shown in Fig. 6. In every sample, the most dominant shape was blocky. In particular, particles of Funabara (FN) consist of more than 50% blocky shape on average (Fig. 6). The probabilities of the vesicular and elongated shapes were high (more than 30% and 10%, respectively) for the lower layers of Nippana (NP15113001–NP15113003). The MY13091305 particles also had a high probability for the elongated shape. On the other hand, the probability for the rounded shape is small for the Nippana samples (Fig. 6). In addition to vesicularity and elongation of particles, transparency is also high for the Nippana samples (there are many transparent particles in the Nippana samples) compared with the samples of Funabara (FN) and Myvatn (MY) (Table 4) because most of the particles in the Nippana samples are glass fragments (see the Supplementary Information).

Table 4 Mean probabilities for four basal shapes, and average, standard deviation (SD) and median of I m and I SD over each sample. Full size table

Figure 6 Mean shape probabilities over three areas (three eruption types). (B) blocky, (V) vesicular, (E) elongated and (R) rounded. Full size image

The reason why the blocky shape is dominant is that blocky particles are common in shape. As shown above, blocky particles are general products in brittle fragmentation of magma, which is typical for magmatic eruption. The probability of more than 50% for the blocky shape for the Funabara samples can be explained in this way. Furthermore, the dominance of the blocky shape in the Nippana and Myvatn samples can be explained as follows: blocky, equant shapes are the most frequently found in hydrovolcanic (magma-water interactions) ash23. The high probability of the vesicular shape in the lower layers of Nippana (NP15113001–NP15113003) is consistent with general understanding for basaltic phreatomagmatic products: fragmentation due to thermal shock and expansion of gas by the contact of vesiculating basaltic magma and external water produces vesicular glassy ash particles23. The high ratio for the elongated shape in the lower layers of Nippana (NP15113001–NP15113003) and MY13091305 indicates the existence of fluidal shape particles (e.g., Supplementary Fig. S6), which is caused by the elongation of low-viscosity magma during eruption. The effect of elongated crystals can be excluded because the samples in this work were formed in a short duration, in which case it is difficult to vary the phenocryst component and proportions. The dominance of rounded particles in the Myvatn samples may correspond to the existence of “mossy grain”, which was described for Icelandic rootless tephra11. Mossy morphology is formed by hydrodynamic fragmentation of deformable lava if the effects of viscosity are more dominant than the effects of surface tension11. In the case of MY13091402, the high ratio of the rounded shape is consistent with the existence of hollow spherules (see Supplementary Fig. S8 and the Supplementary Information for details). For FN15101206, FN15101208, and NP16102407, the reason for the high rounded shape probability may be surface tension11,26.

The clustering of samples is shown in Fig. 7. The clusters are consistent with the differences between the three regions (differences in eruption type). In the dendrogram, first, most Nippana samples were distinguished from the others, then the Funabara and Myvatn samples were separated. The clusters are also consistent with the stratigraphy: NP15113001–NP15113003 (lower parts of Nippana tuff ring), and NP15113004–NP15113006 (upper parts of Nippana tuff ring). This is also the case for the Funabara samples, although FN15113007 does not follow.

Figure 7 Dendrogram of samples using averaged probabilities and transparencies. Sample IDs shown with red, blue, and green indicate Funabara (magmatic eruption origin), Nippana (phreatomagmatic eruption origin) and Myvatn (rootless eruption origin), respectively. Full size image

NP16102407, MY13091305, and MY13091402 were not classified consistently with their eruption type. However, this can be explained by the differences in the stratigraphic positions and geospatial distributions of the sampling. MY13091305 was collected from the lower part of a rootless cone (Fig. 1), and contains information about the early stage of lava-water interaction, which is considered to possibly be as energetic as a phreatomagmatic explosion35. MY13091402 was collected in Hagi, where the lava flowed down approximately 45 km from the fissure vent (Fig. 1). Therefore, this sample may be different from other samples of rootless eruptions due to different conditions, such as lava temperature and availability of water during the explosions. NP16102407 was separated from other phreatomagmatic samples (Fig. 1). It is known that, at the time of the formation, a magmatic eruption took place concurrently at an extremely close range (less than 300 m)21. Thus, NP16102407 might be a mixture of ash particles generated by phreatomagmatic and magmatic eruptions, and is therefore considered to be distinct from other phreatomagmatic samples.