Phononic crystals are artificially structured materials that can possess special vibrational properties that enable advanced manipulations of sound and heat transport. These special properties originate from the formation of a bandgap that prevents the excitation of entire frequency ranges in the phononic band diagram. Unfortunately, identifying phononic crystals with useful bandgaps is a problematic process because not all phononic crystals have bandgaps. Predicting if a phononic crystal structure has a bandgap, and if so, the gap's center frequency and width is a computationally expensive process. Herein, we explore machine learning as a rapid screening tool for expedited discovery of phononic bandgap presence, center frequency, and width. We test three different machine learning algorithms (logistic/linear regression, artificial neural network, and random forests) and show that random forests performs the best. For example, we show that a random phononic crystal selection has only a 17% probability of having a bandgap, whereas after incorporating rapid screening with the random forests model, this probability increases to 89%. When predicting the bandgap center frequency and width, this model achieves coefficient of determinations of 0.66 and 0.85, respectively. If the model has *a priori* knowledge that a bandgap exists, the coefficients of determination for center and width improve to 0.97 and 0.85, respectively. We show that most of the model's performance gains are achieved for training datasets as small as ∼5000 samples. Training the model with just 500 samples led to reduced performance but still yielded algorithms with predictive values.

## INTRODUCTION

Phononic crystals are artificially synthesized materials with periodic variations in acoustic properties.^{1–3} This periodicity can lead to advantageous vibrational properties that can be used to manipulate the transport of sound and heat. The vibrational properties of a phononic crystal are best described by its phononic band diagram (also known as the phonon dispersion relationship). The phononic band diagram relates a given phonon wave vector to its corresponding frequencies and is analogous to electronic and photonic band diagrams. Within a given phononic band diagram, there can be entire phonon frequency ranges that are forbidden from excitation. These frequency ranges are known as “phononic bandgaps” and are described by their bandgap center frequency and bandgap width. These phononic bandgaps can be used to create novel phononic devices such as phonon waveguides, cavities, filters, sensors, switches, and rectifiers.^{4–9} For a more in-depth discussion on phononic crystals and their applications, we refer the reader to some review articles and books.^{10–12}

Figure 1(a) illustrates a two-dimensional phononic crystal that consists of periodic cylinders in a square lattice that is embedded within a host material. Figure 1(b) shows the phononic crystal's unit cell, and Fig. 1(c) illustrates the key symmetry points in reciprocal space. The full band diagram of a two-dimensional phononic crystal is a three-dimensional surface. For ease of visualization, the band diagram is often illustrated as a two-dimensional plot that is graphed along the key directions in reciprocal space [i.e., line connecting Γ–M–X–Γ in Fig. 1(c)]. Figure 1(d) shows the band diagram for a phononic crystal that has a bandgap. The presence of such a bandgap along with the bandgap's center frequency and width are among the primary characteristics of what makes a phononic crystal useful for the creation of phononic devices. Not all phononic crystals have a bandgap and Fig. 1(e) illustrates an example of a phononic band diagram that does not have a bandgap.

For a given phononic crystal structure, it is not possible to know *a priori* what the bandgap center frequency or bandgap width will be. In fact, many phononic crystal structures do not yield a phononic bandgap at all. For example, only 17% of the 14 112 phononic crystals investigated in this paper yielded bandgaps. Calculating the phononic band diagram is the typical way to determine if there is a bandgap, and if so, what are the corresponding bandgap center frequency and width. Unfortunately, calculating the phononic band diagram is a computationally expensive process that depends on many parameters. These parameters include the phononic crystal's dimensionality, unit cell symmetry, number of materials, and material characteristics (i.e., shape, size, density, elastic modulus, and Poisson's ratio). Calculating the phononic band diagram begins with the elastic wave equation for a locally isotropic medium,

where *t* is the time, *i* and *l* are the Cartesian coordinate indices, and $ui,ul,xi,andxl$ are the Cartesian components of a displacement vector, $u(r)$, and a position vector,$r$, respectively. The symbols $\lambda (r),\mu (r),and\rho (r)$ represent spatially varying material properties corresponding to the first Lamé coefficient, second Lamé coefficient, and density, respectively. The Lamé coefficient mechanical property set can be transformed into the commonly used mechanical property set of elastic modulus, *E*, and Poisson's ratio, *ν*, via the following relations:

Since a phononic crystal has a periodic structure, Bloch's theorem tells us that the eigensolutions of the wave equation are modulated sinusoids of the form

where ** K** is a phonon wave vector,

*u*(

_{K}**) is a function with the same periodicity as the phononic crystal, and**

*r**j*is the imaginary unit. Each phonon wave vector is an eigenvector, and the corresponding frequencies are the eigenvalues. The phononic band diagram is a graph of these eigenvectors and eigenvalues (Fig. 1).

Phononic band diagrams have historically been calculated using a variety of computational methods. In 1992, Sigalas and Economou^{13} used the plane wave expansion method to calculate the phononic band diagram for periodic spherical inclusions inside a homogenous material. In 2000, Tanaka *et al.*^{14} used the finite-difference time-domain method to calculate the phononic band diagram for two-dimensional phononic crystals. One drawback of the plane wave expansion and finite-difference time-domain methods are that they are computationally expensive. Recognizing the need for faster algorithms, researchers have recently utilized reduced-order models to more quickly compute phononic band diagrams.^{15–17} Recently, commercial finite element method software packages (e.g., COMSOL) have also been used for phonon bandgap modeling of complicated structures with inclusion materials of various sizes and shapes.^{18} Although rigorous calculations like these are the best way to accurately determine the band diagram for a given phononic crystal structure, these approaches are computationally expensive and time-consuming. Furthermore, there are an infinite number of structural possibilities for phononic crystals and exploring a broad range of parameters can be impractical. In addition, the inverse process of designing a phononic crystal to yield a desired bandgap center frequency and width is an even more challenging task.

In order to facilitate phononic crystal design, researchers have relied on simplified cases such as one-dimensional crystals^{19–21} or by considering only longitudinal waves for two-dimensional phononic crystals.^{22,23} Both of these simplified approaches result in an easily solved equation with a derivative that can be used to optimize the bandgap characteristics. Researchers have also used two-dimensional phononic crystal design approaches that incorporate both longitudinal and transverse modes and are thus more accurate.^{24–27} These studies combine band diagram calculations with an iterative process that steers the algorithm toward a phononic crystal with the desired properties. Another phononic crystal design approach is topology optimization, which simplifies the design process by focusing only on the unit cell shape and not the component materials themselves.^{20,22,24–26,28–30} Using this approach, researchers successfully created phononic crystals with very wide bandgaps.^{29,30} However, one drawback that all of the works in this paragraph have is that they still rely upon rigorous calculations of the phononic band diagram and are hence computationally expensive and time-consuming.^{28,31} Consequently, computationally inexpensive methods, even if less accurate, would benefit the field by speeding up the phononic crystal search process. The task of rigorously calculating the band diagram could then be reserved for only the most promising phononic crystal structures.

In this work, we propose to use machine learning as a fundamentally different and potentially efficient approach to determining the bandgap characteristics of a given phononic crystal structure. During machine learning, computer systems build their own mathematical models to perform a specific task such as classification, prediction, and/or decision-making. No explicit instructions are given to the computer system as it creates the mathematical model. The computer system instead creates the model using algorithms, statistical analysis, and training data. In recent years, machine learning has been employed in several areas, including advanced object detection and classification,^{32–34} natural language processing,^{35–37} optimization in strategy games,^{38–41} cancer detection,^{42,43} optical device design,^{44,45} metamaterial structure optimization,^{46} and thermoelectric materials.^{47} During the past year, researchers have started using machine learning for phononics by applying artificial neural network-based approaches to design one- and two-dimensional phononic crystals.^{48,49}

To further explore the potential for machine learning in phononic crystal property discovery, we test the use of three different machine learning algorithms (linear/logistic regression, artificial neural network, and random forests) and report their corresponding performances. We test these algorithms in three different ways. We first test these algorithms with respect to “classification,” which corresponds to a simple binary yes/no output as to whether or not a bandgap exists for a given phononic crystal structure. Next, we test these algorithms with respect to “prediction,” which yields a quantitative output for the bandgap center frequency and bandgap width. Finally, we test the prediction capabilities of these algorithms for a hypothetical special case. This special case corresponds to the situation where it is known *a priori* that a bandgap exists but that the bandgap center frequency and width are unknown. We find that out of the investigated machine learning algorithms, the random forest model performs the best. For classification, this model achieves an accuracy, precision, and recall of 0.94, 0.89, and 0.77, respectively. When predicting bandgap center frequency and width, the random forests model achieves coefficients of determinations of 0.66 and 0.85, respectively. If the machine learning model has *a priori* knowledge that a bandgap exists, these center and width coefficients of determination improve to 0.97 and 0.85, respectively. These results demonstrate the potential for machine learning algorithms as rapid screening tools for expedited discovery of phononic crystal properties.

## METHODOLOGY

We studied the machine learning potential for phononic crystal discovery by applying three different algorithms: linear/logistic regression, artificial neural network, and random forests. Linear/logistic regressions are suitable for linear systems, whereas artificial neural networks and random forests are more suitable for nonlinear systems. We used the scikit-learn package to conduct the linear/logistic regression and random forests models. TensorFlow was used to conduct the artificial neural network model. Within the machine learning community, inputs are often referred to as “features” and outputs are often referred to as “labels.” These terms of input or feature and output or label will be used interchangeable throughout this paper.

Detailed descriptions of linear/logistic regression, artificial neural network, and random forest machine learning approaches can be found in Refs. 37, 41, 50, and 51. In brief, linear/logistic regression approaches perform a least-squares fit on the data to yield a simple, linear, and easily interpretable equation that describes the machine learning predictions.^{50} The output for logistic regression is a binary value (e.g., yes or no), and hence we use this analysis for our classification tests. The output for linear regression is a continuously variable value, and hence we use this analysis for our prediction tests. Artificial neural networks attempt to mimic the neural network in biological brains. In this approach, layers of connected nodes (or “artificial neurons”) process incoming data and then feed their output to subsequent layers of artificial neurons. As the artificial neural network is trained, the network weighting at each node evolves and changes to minimize error.^{37,41} The random forests method uses a collection of decision trees to determine the final output. In this method, each decision tree operates on a subset of data inputs and generates a corresponding output vote. The final output corresponds to the output that received the most votes among the ensemble of decision trees.^{51}

For the purposes of providing training data for the machine learning algorithms, we used COMSOL to calculate the band diagram of 14 112 phononic crystal structures. The most basic description of a phononic crystal is its number of components, overall dimensionality, and unit cell symmetry. For the purposes of simplicity and efficiency in creating the training data, we focus on two-dimensional phononic crystals with square symmetry that consist of two components (i.e., cylindrical inclusions embedded in a host matrix). This type of phononic crystal is schematically illustrated in Fig. 1(a). To further reduce the design space of possible phononic crystal structures, we fix the unit cell length to 10 nm, the host Poisson's ratio to be 0.33, and inclusion Poisson's ratio to be 0.33 (our prior work shows that Poisson's ratio has a minimal effect on bandgap formation).^{52} We then calculated the phononic band diagrams for varying structures within this parameter space. We varied host and inclusion elastic moduli values throughout a range representative of polymer to diamond (1, 3, 10, 30, 100, 300, and 1000 GPa). We also varied host and inclusion density values throughout a range representative of wood to heavy metals such as tantalum (500, 1000, 2000, 4000, 8000, 16 000 kg/m^{3}). Finally, we varied the diameter of the cylindrical inclusions to be 2, 3, 4, 5, 6, 7, 8, and 9 nm (i.e., diameter-to-lattice constant ratios of 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, and 0.9). Collectively, these calculations yield a total of 14 112 pieces of sample data (phononic band diagrams) that we refer to as our raw data.

Each of these 14 112 pieces of sample data include five feature values (host elastic modulus, *E _{host}*, inclusion elastic modulus,

*E*, host density,

_{inclusion}*ρ*, inclusion density,

_{host}*ρ*, and cylinder diameter-to-lattice constant ratio,

_{inclusion}*d/a*). We then created three label values for each band diagram. The first label is either 0 (bandgap does not exist) or 1 (bandgap exists), and this is the output for the classification analysis. The other two labels represent the bandgap center frequency and bandgap width. These labels were created for each of the 14 112 phononic band diagram by using a scripted search algorithm that identified whether or not a bandgap exists and what are the corresponding bandgap center frequency and bandgap width. When no bandgap exists, the search algorithm returned values of 0 for both bandgap center frequency and bandgap width. We limited the search algorithm to bandgaps that existed within the first eight phonon branches and to those that are 5 GHz or wider. We chose this minimum bandgap width of 5 GHz because the median bandgap center frequency was 178 GHz and so bandgaps narrower than 5 GHz are of little use.

In order to evaluate the performance of each machine learning algorithm, we split the 14 212 pieces of sample data into “training” and “test” sets. The training dataset is used to train the algorithm so that it can create a mathematical model that relates the data features to the data labels. The test dataset is unseen by the algorithm during the training process and then is used after training to evaluate the model's performance. During our training and test process, we normalized all features and labels to yield values less than 1. This normalization process helps the machine learning algorithms converge more easily. In the case of artificial neural networks, normalization also helps prevent the formation of large gradients that can inhibit convergence. To more clearly illustrate the machine learning results, these normalized values are converted back into absolute values when presenting results throughout this paper.

To account for bias in the random sampling of the training and test datasets, we used a *k*-fold cross-validation scheme. In this scheme, the data are partitioned into *k* bags, where *k *− 1 bags are used for training and 1 bag is used for testing the model performance. This process is repeated *k* times for different combinations of training and test data. The mean, standard deviation, and the coefficient of determination (*R*^{2}) are then calculated to describe model accuracy.^{53} For our *k*-fold cross-validation scheme, we used a value of *k *= 10 (we note this *k* is not to be confused with **K**, which we use to represent wave vector). This means that we trained our models using 90% of our sample data and tested them using 10% of the sample data. We then repeated this process a total of ten times, wherein each repetition a different random subset of our sample data was used for the training and test datasets.

We also use precision and recall to gauge the performance of the machine learning classification tests. These metrics are important for situations in which the raw data are highly imbalanced, and this is the case in this paper. Of the 14 112 calculated band diagrams in this work, 17% had bandgaps (i.e., 2373 band diagrams) and 83% did not have bandgaps. In this situation, a machine learning model that always predicts no bandgap would technically be 83% accurate but does not have any real predictive power. Precision and recall are performance metrics that are less affected by this imbalance. Precision gauges what fraction of the selected items is relevant. High precision means that the algorithm selects many more relevant results than irrelevant results. With respect to this paper, precision tells us that out of all the phononic crystals predicted to have a bandgap, what fraction actually do have a bandgap {i.e., precision = [true positive/(true positive + false positive)]}. Recall gauges what fraction of the actual relevant items was selected. High recall means that most of the relevant results are successfully selected. With respect to this paper, recall tells us that out of all the phononic crystals that actually have a bandgap, what fraction was correctly identified {i.e., recall = [true positive/(true positive + false negative)]}.

## RESULTS

Figure 2 illustrates the distribution characteristics of the raw data (i.e., 14 112 phononic band diagrams calculated by COMSOL). These distributions provide useful context that can help assess machine learning algorithm performance. More specifically, it shows how each of the five features effect the probability of forming a bandgap in a given phononic crystal structure. For example, Fig. 2(d) illustrates the effect of inclusion density on the likelihood of phononic bandgap appearance. This figure separates the 14 112 pieces of raw data into their corresponding bins for each inclusion density value. Inspecting this figure, it is clear that a large majority of the phononic crystal structures do not possess a bandgap (yellow portion of columns). It is also apparent that increasing the inclusion material density increases the likelihood of bandgap formation.

A common rule of thumb for predicting whether a bandgap exists in phononic crystals is that the inclusion material should be dense and stiff.^{54–56} This rule is captured within Fig. 2 as it can be seen that larger inclusion elastic moduli and larger inclusion density [Figs. 2(b) and 2(d), respectively] yield a higher probability for bandgap formation. Figure 2(e) illustrates the effect of the inclusion diameter-to-lattice constant ratio, which is effectively inclusion volume fraction. This data distributions show that large inclusion volume fractions are favorable for bandgap formation; however, this effect is not as pronounced as the effect of inclusion density.^{54–56}

## CLASSIFICATION RESULTS

We first examine the ability of the machine learning algorithms to make a binary yes/no prediction as to whether or not a phononic crystal structure possesses a bandgap. Table I summarizes the results for these classification tests and shows that the random forests model yielded the best results.

Performance metric . | Logistic regression . | Artificial neural network . | Random forests . |
---|---|---|---|

Accuracy | 0.84 ± 0.01 | 0.87 ± 0.06 | 0.94 ± 0.01 |

Precision | 0.57 ± 0.04 | 0.65 ± 0.06 | 0.89 ± 0.02 |

Recall | 0.16 ± 0.02 | 0.33 ± 0.04 | 0.77 ± 0.02 |

Performance metric . | Logistic regression . | Artificial neural network . | Random forests . |
---|---|---|---|

Accuracy | 0.84 ± 0.01 | 0.87 ± 0.06 | 0.94 ± 0.01 |

Precision | 0.57 ± 0.04 | 0.65 ± 0.06 | 0.89 ± 0.02 |

Recall | 0.16 ± 0.02 | 0.33 ± 0.04 | 0.77 ± 0.02 |

The logistic regression model had an accuracy, precision, and recall of 0.84, 0.57, and 0.16, respectively. Although this accuracy appears high, such an interpretation would be misleading due to the characteristics of the raw data (i.e., 83% of the raw data did not have bandgaps and so accuracies near this value are not necessarily highly predictive). While these performance metrics are not great, they do successfully demonstrate some predictive value. For example, the precision is 0.57, and this means that a positive identification by the logistic regression model has a 0.57 chance of actually having a bandgap. In contrast, a random selection out of the 14 k samples has only a 0.17 chance of having a bandgap. Consequently, using the logistic regression model as a rapid screening tool can significantly improve the chances of finding a phononic crystal with a bandgap by a factor of 0.57/0.17 ≈ 3.4.

It is not surprising that the logistic regression model yielded an overall poor performance because this model works best for linear systems. The output of the logistic regression model is a simple linear equation and a corresponding decision function (see in supplementary material). In reality, predicting whether a phononic bandgap exists is a complex problem that cannot be adequately captured with linear equations. If a simple linear equation could make these predictions accurately, then identifying phononic bandgaps would likely have been a research problem that was solved long ago.

The performance of the artificial neural network was superior to logistic regression for all three performance metrics. The artificial neural network had an accuracy, precision, and recall of 0.87, 0.65, and 0.33, respectively. This improvement is not surprising since artificial neural networks are better at approaching nonlinear problems. The precision value of 0.65 means that using this model as a rapid screening tool can improve the chances of finding a phononic crystal with a bandgap by a factor of 3.8 relative to a random selection. The artificial neural network's recall value of 0.33 is approximately double that of the logistic regression model. This means that the artificial neural network correctly identified approximately one third of the phononic crystal structures that actually have bandgaps.

The random forests model yielded the best performance of all the algorithms. It had an accuracy, precision, and recall of 0.94, 0.89, and 0.77, respectively. These metrics indicate a high degree of confidence for the random forest model's ability to identify phononic crystals with bandgaps. As mentioned earlier, 83% of the phononic crystal samples do not have bandgaps and so accuracies near this value are not necessarily highly predictive (which is the case for the logistic regression and artificial neural network models). In contrast, the accuracy of the random forests model is significantly higher at a value of 94%. Furthermore, the precision value of 0.89 means that nearly 9 out of 10 selected phononic crystals actually have a bandgap. Consequently, using the random forests model as a rapid screening tool represents a huge improvement over a random phononic crystal selection by a factor of 5.2. The recall of 0.77 means that the random forests correctly identified approximately three quarters of the phononic crystals that actually have bandgaps.

Although the results of the random forests model are encouraging, it is important to acknowledge the limitations of the machine learning approach. One limitation is that machine learning requires a large amount of training data and generating this training data requires calculations of the actual phononic band diagrams (which is in some sense what this machine learning approach is trying to avoid). In this study, we used finite element software to calculate the band diagrams for 14 112 two-dimensional phononic crystals. A reasonable question to ask is how performance would be affected by reduced quantities of training data.

Figure 3 illustrates the trade-off between training dataset size and performance of the random forest model. This figure displays accuracy, precision, and recall as the training dataset is varied from 500 to 11 000 samples. As the training dataset size is increased, the model performance increases in an asymptotic-like matter. Most of the performance gains are achieved by the time the training data set reaches 5000 samples. However, even for a small training dataset of 500 samples, the precision is already approximately 0.70. Remarkably, this precision value of 0.70 obtained with 500 samples is already better than the results of the logistic regression and artificial neural network models that were trained with the entire dataset (Table I). This once again reinforces the superiority of the random forest model for addressing this problem. The uncertainty bars in Fig. 3 represent ±1 standard deviation on the performance metrics for our tenfold cross-validation scheme (i.e., the standard deviation of ten different training and test sets). It can be seen that these uncertainty bars decrease as the training dataset is increased, which means that the performance consistency of the random forests model also increases with training dataset size.

Based on these classification results, we conclude that machine learning algorithms are a powerful tool that can augment phononic crystal property discovery. We also acknowledge that machine learning is by no means a complete replacement for rigorous band diagram calculations. The first and most obvious reason for this is that machine learning relies on these calculations to provide training data. Furthermore, even if a training set already exists, rigorous band diagram calculations will still be needed to confirm the predictions of machining learning algorithms. For example, while the precision of the random forests model is a high 89%, this is still less than 100%. Consequently, we cannot be fully confident that an identified phononic crystal will in fact have a phononic bandgap. The precision of a rigorous band diagram calculation is effectively 100% and this should be done to confirm machine learning predictions. However, the value of the machine learning prediction is that it greatly expedites the speed at which phononic crystal properties can be determined. Our sample set size of 14 112 calculated phononic band diagrams is incredibly small in comparison to the infinite number of possible phononic crystal structures. Once a training dataset is established, a machine learning model can be used as a rapid screening tool to greatly increase the probability of finding a phononic crystal with a bandgap.

Finally, we note that our total data set size of 14 112 samples is not particularly large when compared to other machine learning studies. One main reason that we are able to get good results with this relatively small dataset size is that our study only focused on a simplified subset of the phononic crystal parameter space. Every sample in this study consisted of just two materials arranged in two-dimensional square lattice of cylinders embedded in a host material. A more generalized parameter space would allow for greater flexibility such as more than two materials, arbitrary shapes other than cylinders, and different unit cell symmetries. This larger parameter space would likely require a much larger dataset size to obtain the performance benchmarks achieved in this paper. It is also worth noting that the performance of most traditional machine learning algorithms (e.g., regression and random forests) scales differently with dataset size than artificial neural networks. The performance of traditional machine learning algorithms tend to plateau at a certain threshold dataset size, however the performance of artificial neural networks can continue to improve as the dataset size is increased beyond that threshold.^{57} So while our random forests algorithm performed better than our artificial neural network algorithm at a dataset size of 14 112 samples, it is possible that artificial neural network algorithms could consistently outperform random forests at much larger dataset sizes.

## PREDICTION RESULTS

We next examine the ability of the machine learning algorithms to quantitatively predict the bandgap center frequency and bandgap width of a given phononic crystal structure. During this test, phononic crystals that do not have a bandgap were labeled as having center frequencies of 0 and widths of 0. Each machine learning model was tested using a tenfold cross-validation scheme.

Figure 4 illustrates the prediction results by graphing the predicted bandgap center frequencies and widths vs the actual bandgap center frequencies and widths. Perfect predictions would fall directly along the diagonal red line shown in each figure. The performance of these tests is captured via their coefficient of determination (*R*^{2}) values. Of the three different algorithms, the random forest model yielded the best results. The coefficient of determination values exhibited some variation across each of the ten implementations, and this variation is reflected via the uncertainties listed in each figure.

The bandgap center frequency and width predictions progressively improve for the linear regression, artificial neural network, and random forests models, respectively. The linear regression model did the worst with *R*^{2} values of 0.11 and 0.12 for the center frequency and width, respectively. As in the case of classification, this poor performance likely results from the fact that determining band diagram characteristics is a complex nonlinear problem. Artificial neural networks are better at addressing these types of problems, and this is reflected via improved *R*^{2} values of 0.61 and 0.62 for the center and width, respectively. The random forest model performed the best and had *R*^{2} values of 0.66 and 0.85 for the bandgap center and width, respectively.

For all three models, the predicted center frequency and width exhibit a bias toward values that are smaller than the actual center frequency and width. This bias can be seen in Fig. 3 via the fact that the majority of the data points fall below the red line representing perfect prediction. This underprediction bias is caused by the fact that the vast majority of the phononic crystal structures do not have bandgaps (i.e., 83%). As mentioned earlier, during training, the phononic crystal structures without bandgaps were labeled with bandgap center and width values of 0 GHz. Having 83% of their training data labeled with values of 0 GHz caused the algorithms to become biased toward smaller values. This underprediction bias could likely be solved by separating the prediction problem into two separate steps, and we explore this possibility later in this paper (see the section titled “Prediction Results with *A Priori* Knowledge of Bandgap Presence”).

Figure 5 illustrates the trade-off between training dataset size and performance of the random forest model during prediction of the bandgap center frequency and width. Figure 5 shows that most of the performance gains are achieved by the time the training dataset reaches approximately 4000 samples. For a small training dataset of 500 samples, the coefficient of determinations is approximately half of the value for the fully trained samples. Hence, even these small training set sizes can provide some predictive value.

## PREDICTION RESULTS WITH *A PRIORI* KNOWLEDGE OF BANDGAP PRESENCE

Determining the bandgap center frequency and width of a phononic crystal is a two-step process. The first step is to ask, “Does a bandgap exist?” The answer to this first step is a binary yes or no value and was addressed in our classification tests. If the answer to this first step is “no,” then proceeding to the second step is actually pointless. The second step is to ask, “If there is a bandgap, then what is the center frequency and width?” The answer to this second step is a positive and continuously variable number and was addressed in our prediction tests. However, the prediction tests in the prior section were forced to address both of these questions simultaneously, and this resulted in an underprediction bias for bandgap center and width. This underprediction bias arose because approximately 83% of the training dataset was populated with phononic crystals that had a center frequency and width of “0” (i.e.*,* no bandgap). In a sense, the training and test data were polluted with a large quantity of irrelevant data.

In this section, we examine if and how prediction results would improve if the machine learning algorithms were trained and tested with only phononic crystals that actually have bandgaps (i.e., *a priori* knowledge that the phononic crystal has a bandgap). In practice, this type of situation is unlikely to occur during phononic crystal property discovery. This is because users would not know if the phononic structures they are entering into the machine learning algorithm actually have bandgaps. Nonetheless, this line of inquiry is worth exploring as an academic exercise. To examine this scenario, we trained and tested the machine learning algorithms using only the 2373 phononic crystal structures that had bandgaps (as opposed to all 14 112 phononic crystal structures). As in our earlier tests, we used a tenfold cross-validation scheme during model implementation, which means we tested each model ten times with random variations on the test and training dataset.

Figure 6 shows the prediction results for the machine learning algorithms that were trained and tested using only phononic crystals with bandgaps. Most notable in this figure is that the underprediction bias observed in Fig. 4 is no longer observed in Fig. 6. The data in Fig. 6 are much more symmetric around the perfect prediction line (i.e., diagonal red line). This supports our earlier explanation that the underprediction bias in Fig. 4 originates from the abundance of phononic crystals with no bandgap in the training and test datasets.

Another notable result in Fig. 6 is that the *R*^{2} values for the center frequency are significantly improved relative to the Fig. 4. The *R*^{2} values for the artificial neural network and random forests are 0.90 and 0.97, which indicate a high degree of confidence in these center frequency predictions. It is worth acknowledging that the *R*^{2} values for the bandgap width do not appear to have improved between Figs. 4 and 6. The fact that we achieved substantial improvements in center frequency prediction and no observable improvement in width is not entirely surprising. The effect of phononic crystal structure on center frequency is more well understood than that of bandgap width.^{13,54–56,58} It is well known that stiffer and lighter materials lead to increased center frequency and it should be easy for machine learning algorithms to learn this trend. In contrast, the bandgap width is much less predictable because it depends on the relative curvature of all the phonon branches within the band structure.

Finally, it is worth noting and reinforcing that the generally improved results of Fig. 6 were achieved with less training data than that of Fig. 4. The studies in Fig. 4 used all 14 112 calculated phononic band diagrams, whereas the studies in Fig. 6 used only 2373 band diagrams. Achieving better predictions with less data is clearly desirable, and this points to the importance of training data quality. The training data for the studies in Fig. 6 were not contaminated with phononic crystals that lacked a bandgap. Hence, these model implementations were able to learn both better and faster. We still expect there to be a trade-off between training dataset size and performance of the model, and this is shown in Fig. 7. This figure shows that high quality predictions of bandgap center with *R*^{2}* *> 0.9 can be achieved with just 600 training samples. Even if only 100 training samples are used, the *R*^{2} for bandgap center is approximately 0.7, which is equivalent to the accuracy obtained when using all 14 112 phononic band diagrams for training and testing (Fig. 4). The slope of the *R*^{2} curve for bandgap width in Fig. 7 is steeper than that in Fig. 5 and demonstrates that the algorithm learns quicker when all the of the phononic crystal structures have bandgaps.

## CONCLUSION

This paper demonstrates the potential for machine learning models as rapid screening tools for the expedited discovery of phononic crystal properties. We investigated three different machine learning algorithms (logistic/linear regression, artificial neural network, and random forests) and found that random forests yielded the best performance metrics. For classification, this model achieves an accuracy, precision, and recall of 0.94, 0.89, and 0.77, respectively. When predicting bandgap center frequency and width, this model achieves *R*^{2} values of 0.66 and 0.85, respectively. If the model has *a priori* knowledge that a bandgap exists, these *R*^{2} values improve to 0.97 and 0.85, respectively. These accuracy metrics demonstrate a high degree of confidence and demonstrate the utility of machine learning for phononic crystal property discovery.

Future promising directions include more in-depth explorations of the phononic crystal parameter space such as more complex topologies, different unit cell symmetries, greater than two constituent materials, etc*.* In addition, machine learning performance could be potentially improved via feature engineering. For example, rather than directly using material properties as features, non-dimensional groupings could be utilized [e.g., *E _{host}*/

*E*,

_{inclusion}*ρ*/

_{host}*ρ*, $(E/p)host/(E/p)inclusion$, etc.]. Finally, exploring the performance of various machine learning algorithms for inverse problems (i.e., inputting bandgap characteristics and outputting a particular design) would also be a worthwhile endeavor.

_{inclusion}## SUPPLEMENTARY MATERIAL

See the supplementary material for the text describing normalization of the features and labels, programming specifics, algorithm training process and checks on overfitting, output equations for logistic and linear regression, and COMSOL simulation details.

## ACKNOWLEDGMENTS

This work was supported by the National Science Foundation CAREER Program through Award No. DMR-1654337.

## DATA AVAILABILITY

The data that support the findings of this study are available from the corresponding author upon reasonable request.