Can Large Language Models Learn the Physics of Metamaterials? An Empirical Study with ChatGPT
Darui Lu Yang Deng Jordan M. Malof Willie J. Padilla


[
    Lennart E. Nacke
    April 29, 2024
====================






Large language models (LLMs) such as ChatGPT, Gemini, LlaMa, and Claude are trained on massive quantities of text parsed from the internet and have shown a remarkable ability to respond to complex prompts in a manner often indistinguishable from humans. We present a LLM fine-tuned on up to 40,000 data that can predict electromagnetic spectra over a range of frequencies given a text prompt which only specifies the metasurface geometry. Results are compared to conventional machine learning approaches including feed-forward neural networks, random forest, linear regression, and K-nearest neighbor (KNN). Remarkably, the fine-tuned LLM (FT-LLM) achieves a lower error across all dataset sizes explored compared to all machine learning approaches including a deep neural network. We also demonstrate the LLM’s ability to solve inverse problems by providing the geometry necessary to achieve a desired spectrum. LLMs possess some advantages over humans that may give them benefits for research, including the ability to process enormous amounts of data, finding hidden patterns in data, and operating in higher-dimensional spaces. We propose that fine-tuning LLMs on large datasets specific to a field allows them to grasp the nuances of that domain, making them valuable tools for research and analysis.












§ INTRODUCTION








Deep learning, and particularly deep neural networks (DNNs), have recently emerged as a valuable tool in the field of metamaterials research and have produced many novel results. <cit.> This data-driven approach to metamaterial design has profound capabilities for both forward <cit.> and inverse processes. <cit.> Once trained, DNNs can accelerate the simulation of material systems by orders of magnitude compared to traditional numerical simulations <cit.>, enabling faster prototyping and exploration. Similarly, in inverse design, these models have successfully discovered state-of-the-art solutions that push the boundaries of what is achievable with metamaterials <cit.>.

Despite these advances, the implementation of DNNs still faces several challenges <cit.>. As a data-driven method, DNNs necessitate large datasets for training to achieve high accuracy and generalizability. <cit.> This so-called "data bottleneck" issue is compounded by the question of interpretability—understanding, and explaining model predictions remains a significant hurdle. <cit.> This has led to the pursuit of models that are capable of learning effectively from smaller datasets, leading to the development of techniques such as transfer learning, <cit.> and physics-informed/driven DNNs  <cit.>. 






Foundational models are sophisticated, large-scale DNNs trained on extensive, diverse datasets. <cit.> This training enables them to generalize knowledge across various domains without the need for substantial task-specific data. <cit.> However, the extravagant cost of acquiring large, diverse datasets for training a physics foundational model is prohibitive for academic researchers. <cit.> In this work we hypothesize that with LLMs, such as ChatGPT, we may be able to leverage their broad domain capabilities to reason about physical systems with far less training data than existing DNN-based models. Rather than building a foundational physics model from scratch, we explore the potential of repurposing existing foundational models to address problems in metamaterial design and show proming results. <cit.>

Large language models (LLMs) like generative pre-trained transformers (GPTs) have recently emerged as a foundational model primarily designed to handle natural language processing tasks. <cit.> By harnessing vast amounts of text data, these models learn to predict the next word in a sentence, thus acquiring an ability to construct coherent and contextually relevant text. Their design incorporates a deep understanding of language structure and encapsulates broad knowledge across diverse domains, enabling them to perform reasoning tasks. <cit.> For instance, LLMs can engage in conversations, translate languages, summarize texts, and even generate content that mimics human writing styles. <cit.>

The multifaceted capabilities of LLMs are rooted in their extensive training on diverse datasets. <cit.> First, they integrate a vast range of information from their training sets, making them repositories of wide-reaching knowledge about much the world. This allows them to recall and leverage facts, concepts, and relationships when generating responses. Secondly, LLMs can perform reasoning tasks based on the information they have been trained on, enabling them to handle queries that require logical deductions, problem-solving, or creative generation. This can range from solving mathematical problems to crafting detailed narratives or technical explanations. Lastly, the ability of LLMs to explain their reasoning process adds a layer of interpretability, often allowing users to understand the steps the model took to arrive at a conclusion or response, thus providing insights into the model’s thought process.

In the case of metamaterial design, LLMs such as GPT could revolutionize how physical systems are modeled and understood with minimal training data. <cit.> The diverse, extensive textual training of LLMs encompasses fundamental physics concepts, which are crucial for understanding the dynamics of metamaterials. By internalizing multiple laws of physics and their applications, LLMs can potentially extrapolate and make accurate predictions about new metamaterial scenarios. Such potential could lead to a more efficient process in predicting metamaterial properties and behaviors by leveraging learned physical laws rather than relying solely on extensive empirical data typical of traditional DNN approaches. LLMs could significantly speed up the design and simulation processes in metamaterial engineering.

In light of this, our study aims to initiate the field by examining the feasibility of employing currently available LLMs to tackle a metamaterials challenge. Building on recent findings that suggest LLMs' proficiency in scientific regression and classification tasks <cit.>, we explore their potential in predicting the electromagnetic spectra of metamaterials – a problem expressible in textual terms. This adaptability of LLMs has already been demonstrated in chemistry <cit.>, optics <cit.>, and mechanics<cit.>, signaling their versatility across various scientific fields. 

Our investigation looks explicitly at all-dielectric metasurfaces, comparing the capabilities of LLMs with established machine learning models. To our knowledge, there has yet to be a study of the use of LLMs on regression tasks with high-dimensional outputs, such as those often encountered in metamaterial problems. We find that a fine-tuned LLM (FT-LLM) achieves a lower error metric on all dataset sizes than several machine learning based approaches, including a deep neural network. We also probe the capability of the FT-LLM to generate physically meaningful insights on ADMs and compare results to an out-of-the-box LLM. Through this work, we highlight the potential of LLMs as powerful tools in scientific exploration, potentially broadening the horizons for future innovations and discoveries in metamaterials and beyond.



§ RELATED WORK

In this section, we will focus mainly on previous research work on deep learning in metamaterials and the application of LLM in the science field.




  
Deep Learning for Metamaterial Simulator 
Machine learning approaches offer an effective solution to the above challenges and have gained significant attention over the last decade. Due to their strong generalizability, machine learning and deep learning methods can discover a general mapping from geometry to electromagnetic spectra. There are many options for representation of the metamaterial geometry as input to the DNN, which directly influences the deep learning architecture. Most research efforts in metamaterial employ a one-dimensional (1D) vector to represent metamaterial structures; thus, they apply fully connected deep neural networks (DNNs). <cit.> This approach has been explored in various. <cit.> In other work, a transformer was used to perform forward prediction and achieved superior prediction accuracy compared to standard MLP models. <cit.> On the other hand, some papers conceptualized metamaterials as two-dimensional (2D) arrays, where binary values (0 and 1) represent the different materials, effectively mapping geometry. This mapping aligns well with the convolutional neural network (CNN) architecture, and good results have been shown. <cit.> For example the developed CNN models could make accurate predictions of the dispersion relation for a given structural configuration.  



  
Advancements in Large Language Models for Science With the appearance of GPT3.5<cit.>, LLMs have seen rapid development. Indeed, various models, such as GPT-3.5 <cit.> and LLaMA <cit.>, have shown great capabilities in language understanding and text generation. <cit.> These advancements have extended beyond traditional text-based applications, and LLMs are increasingly being used in various scientific endeavors, such as knowledge extraction <cit.> and automating experimental procedures <cit.>. Recently, LLMs have been shown to posses good capabilities for regression and classification tasks. For example, the so-called language-interfaced fine-tuning for non-language machine learning tasks (LIFT) was shown to transform tabular data into text sentences for fine-tuning of GPT-J without altering the structure and loss of the model. <cit.> Subsequent studies have further explored the utility of LLMs in specific scientific domains. A survey on GPT-3 performance for chemistry tasks was undertaken which demonstrated that LLMs have better data efficiency than a base machine learning model for classification tasks. <cit.>  One study used content learning to predict the compressive strength of concrete, <cit.> while another found that material structures can be encoded as linear text descriptions to fine-tune Llama2 <cit.> However, the application of LLMs for metamaterials research remains underexplored. In addition, previous works have focused on regression problems with relatively small output dimensions and limited data sets. Our study seeks to bridge this gap by examining the performance of LLMs in addressing the multidimensional regression challenges inherent in the simulation of electromagnetic metamaterials. Our objective is to elucidate the potential of LLMs to advance the field of metamaterials.




§ METHODOLOGY







In this study, we employed LIFT <cit.> allowing for the adaptation of LLMs for metamaterial regression tasks without the need for architectural modifications or alterations to the loss function. The workflow of our method is shown in Figure <ref>. It contains three parts: data transformation, fine-tuning, and inference.






  
Data Transformation
 Our first step is to transform the numerical data into a suitable format for input to the LLM. The all-dielectric metamaterial we explore is a unit-cell consisting of four elliptical resonators, and therefore has 14 geometrical parameters of height, periodicity, semi-major axis, semi-minor axis, and rotations angles – see Figure <ref>. These 14 parameters are denoted as: (h, p, r_ma1, r_mi1, r_ma2, r_mi2, r_ma3,r_mi3,r_ma4, r_mi4, θ_1, θ_2, θ_3, θ_4). We employ a gene vector to encode the geometry of the metamaterial. <cit.> This encoding uses a series of numbers to define the geometry, and follows the template: "The All-dielectric metasurface suspend in free space is: <h, p, r_ma1, r_mi1, r_ma2, r_mi2, r_ma3, r_mi3, r_ma4, r_mi4, θ_1, θ_2, θ_3, θ_4> Get the absorptivity". For the output spectrum, we maintain three-decimal point precision, generating completions such as '[0.001, ⋯, 0.678 ]'.

 

  
Model Fine-Tuning and Inference
 The generated sentence data is then used to fine-tune the large language model, here GPT-3.5. Since GPT-3.5 is a black-box model, we use OPENAI's API for fine-tuning. The fine-tuning phase adapts the model to the output structure of our dataset, focusing on generating 50-length vectors to represent absorptivity spectra. During inference, the fine-tuned model outputs a 50-length vector as the absorptivity curve, such as '[0.001, ⋯, 0.864, ...]'. We convert this text list back to a number for comparison with ground truth data. 
 
It's important to note that the output of a LLM may not match the expected output length because LLMs are generative models. For a given geometry g, the prediction spectra s_p produced by LLM would be a vector of length L_a, while the length of the ground truth s_t is L_b. It may happen that a ≠ b. To solve this, we implemented an alignment strategy that compares only the first min(a, b) elements of the predicted and true spectra vectors. Notably, we find that the most common invalid value of a is 51. Also, we may fail to convert LLM's textual output to numerical values. For example, an output such as "0.0.13" that cannot be directly converted to a valid numeric value is identified as an anomaly. In these cases, the output is flagged for regeneration to ensure that the model predictions are in the expected format.
 



§ EXPERIMENTAL DESIGN AND RESOURCES






  
Dataset
Our study harnesses the dataset initially introduced and benchmarked in previous studies<cit.>, chosen for its relevance to the understanding of the capability of LLM in designing metasurfaces. This dataset is open-access, and the structured vector formats of its geometrical inputs and spectral outputs offer an advantageous footing for prompt engineering in LLMs. Such characteristics are helpful for physically meaningful data manipulation and model training, enabling a higher degree of interpretability of feature importance. Below, we delineate the metasurface geometry and spectra in the dataset. 

The all-dielectric metasurface is fashioned from silicon carbide and operates within the 150-500 THz frequency range. This complex structure is defined by a supercell comprising four elliptical resonators, each positioned at the center of a subdivided quadrant within a square supercell. This metasurface's geometric configuration is given as a 14-dimensional vector:[h, p, r_ma1, r_mi1, r_ma2, r_mi2, r_ma3, r_mi3, r_ma4, r_mi4, θ_1, θ_2, θ_3, θ_4]. The periodicity p parameter specifies the side length of the supercell, setting the foundational operating range for the resonator array, with the height h parameter establishing the uniform height of all resonators. The dimensions of each elliptical resonator along the x and y axes are proportionally scaled to the supercell's periodicity through the radius x-axis ratio r_ma,i and radius y-axis ratio r_mi,i for each resonator, respectively. Additionally, the orientation of each elliptical resonator is adjusted through a rotational angle θ_i, measured in radians, about the x-axis. All parameters are integral for defining the electromagnetic response of the metasurface, with units in μ m. Given the challenges associated with processing high-dimensional data by LLMs, the spectrum output was manipulated by first downsampling from 2000 frequency points to 100 frequency points. Then, we only select 50 points from the 150-350THz frequency range, aiming to refine the LLM's predictive accuracy and computational efficiency within the expansive operational bandwidth.



  
Data Handling 

To ensure experimental integrity, we divided the dataset into three distinct, independently sampled sets: training, validation, and test. The training set was randomly selected for each dataset size's training session, whereas the validation and test sets comprising 1,000 samples each were specified prior to the experiments. Optimal model selection was based on validation set performance, with the test set used for final evaluation. This approach guarantees the reliability and reproducibility of our comparison between baseline and large language models for metamaterials research.



  
Scoring Metrics
This section outlines the metrics employed for evaluating the performance of both baseline and LLM models. It is pertinent to acknowledge that the selected baseline models all utilize Mean Squared Error (MSE) as a training criterion, which could inherently bias the evaluation in their favor as opposed to LLMs, which are predominantly trained using a variant of cross-entropy loss. Despite this discrepancy, MSE was selected for the regressive metamaterials problem as it is best-suited for regression tasks training due to its robustness in quantifying the average squared difference between predicted and actual values. In predicting electromagnetic spectra for metamaterials, the MSE is modified to be:


    MSE = 1/n∑_i=1^n1/f∑_j=1^f(S_i,j - Ŝ_i,j)^2,


where n is the number of samples, f is the number of frequency in the spectrum, S_i,j represents the absorptivity value for ith sample at jth frequency point, and Ŝ_i,j denotes the model predicted value. 

For a thorough evaluation of all regression models in the study, we benchmark their performance using two additional regression task metrics: Mean Absolute Error (MAE) and Mean Absolute Relative Error (MARE). Specifically for the metasurface problem, these metrics have been adapted as follows:


    MAE = 1/n∑_i=1^n1/f∑_j=1^f|S_i,j - Ŝ_i,j|,



    MARE = 1/n∑_i=1^n1/f∑_j=1^f|S_i,j - Ŝ_i,j|/|S_i,j|,


Moreover, the relevance of cross-entropy loss, particularly for LLMs, cannot be overlooked. This loss function is defined as:


    Cross Entropy Loss = -∑_c=1^My_o,clog(p_o,c),


where M represents the number of classes, y_o,c is a binary indicator of whether class label c is the correct classification for observation o, and p_o,c is the predicted probability of observation o being in class c.

To ensure a fair and uniform assessment across all models, performance metrics are exclusively reported in terms of MSE, MARE and MAE on the test set. This standardized evaluation criterion facilitates a straightforward comparison across different models applied on the all-dielectric metasurface problem.




  
Baseline Models To benchmark the performance of LLMs, we incorporate four other machine learning algorithms: Feed-forward Neural Networks (NN), Random Forests (RF), K Nearest Neighbors (KNN), and Linear Regression (LR). The selection of the NN was motivated by its published efficacy in various practical applications, particularly within the domain of metamaterials research, where its ability to model complex, nonlinear relationships is highly valued<cit.>. Conversely, RF, KNN, and LR represent classical machine learning algorithms designed to address regression challenges. Given that the design of metamaterials predominantly poses regression problems, these algorithms were deemed especially suitable for benchmarking against the metasurface design challenges alongside LLMs. Our choice of algorithms aims to encompass both the cutting-edge capabilities of neural networks and the robust, well-established methodologies of classical machine learning, ensuring a comprehensive and fair evaluation of LLM applicability and performance in the all-dielectric metasurface design.

Prior to model training, our dataset undergoes preprocessing steps to ensure optimal model performance. The geometry inputs are normalized to a range of [-1,1], promoting convergence in the NN training process. The absorptivity spectra, already within the range of [0,1], require no additional preprocessing. We allow 30 iterations of Bayesian optimization to fine-tune each model's hyperparameters. The selection of optimal hyperparameters is determined based on performance metrics evaluated on the validation set, with the final model performance reported against the test set.



  
Experimental Resources and accessibility For the training and inference of NNs, we utilize NVIDIA GTX 3090 GPUs, employing the PyTorch library to facilitate our computations. The execution of RF, KNN, and LR models is conducted on an Intel® Xeon® Gold 6226 CPU, leveraging their computational efficiency for these specific algorithms. 




§ EXPERIMENTAL RESULTS AND DISCUSSION


In this section, our primary focus is investigating the performance of large-language models and comparing them with other baseline models (Sect. 5.1). We also examine the impact of temperature (Sect. 5.2) and the influence of the prompt template (Sect. 5.3). Additionally, we explore model performance on inverse design (Sect. 5.4) and interpretability (Sect. 5.5).



 §.§ Data Size Influence


We trained our Large Language Model (LLM) and other baseline models using varying sizes of training data and evaluated their performance on a consistent test set comprising 1000 samples. Figure <ref> illustrates the performance of the models in different data size scenarios. We applied the temperature as 0.5 while testing the GPT model. A more detailed discussion of the impact of temperature on performance can be found in Section 5.2




Regarding to MARE, Fig. <ref>(a) shows the superior performance of the GPT in all data scenarios. Particularly in relatively low-data(1000-10,000) environments, GPT outperforms neural network models a lot. With training samples greater than 10000, the performance of the NN is close to the GPT.

However, the analysis based on MSE offers a different perspective. Based on Fig. <ref>(b), we observed that fine-tuned GPT 3.5 performs the poorest among all models in the low-data scenario (≤ 1000 samples). However, as the size of the data set increases, the fine-tuned GPT shows a remarkable improvement in performance, outpacing some baseline models. In particular, for 40,000 training samples, the fine-tuned GPT 3.5 emerges as the top-performing model, with its MSE only slightly inferior to that of neural networks. This improvement underscores the LLM's capacity to identify and apply complex patterns from extensive datasets. Even with 40,000 training samples, the performance of GPT 3.5 has not yet reached convergence. Furthermore, the slope of GPT 3.5 is much higher than that of other models. We anticipate that with more data input, the performance of our GPT model will narrow the gap with neural networks and may even surpass them. 

The observed differences in model performance between the MSE and MARE evaluations can be attributed to the sensitivity to the error types of these metrics. MSE penalizes large deviations in absolute values between predicted and actual values. However, MARE provides a normalized error measure that reflects the accuracy of the model relative to the magnitude of the actual values. This metric focuses on the proportionality of the error. Given that our baseline models are optimized towards minimizing MSE, they inherently focus more on reducing large absolute value errors. However, the GPT model is fine-tuned on a cross-entropy loss, which maintains a consistent performance across all ranges of values.




 §.§ Temperature Influence




Temperature plays a crucial role in LLM output by influencing the level of randomness in the generated results. In the low-temperature setting, the model tends to produce the most probable results based on its training data. Conversely, a high-temperature setting increases the randomness and diversity of the model's output, making it more likely to generate low probable values. Our tests explored the effects of varying temperature settings, specifically [0, 0.25, 0.5, 0.75, 1], on model performance, as shown in Fig.<ref>(a).

Our findings indicate that the impact of temperature is related to the size of the data set. Specifically, for small data sets (≤ 10000), the setting Tmeperature = 0 leads to poor predictions, indicative of an overreliance on training data that may not capture the input-output relationship effectively with limited data. In contrast, as the dataset expands, a low temperature near zero is conducive to minimizing the Mean Squared Error (MSE), as the LM's predictions are increasingly informed by the enriched data. However, the extremely high temperature(1) decreases performance across all data sizes, as the over-randomized output is not expected in the regression tasks. 

Interestingly, as the volume of training data increases, the optimal temperature setting trends to be lower.  The result is shown in Fig.<ref>(b). Although moderate randomness can improve the quality of the output in data-constrained scenarios, on the contrary, it decreases the accuracy of the output in data-rich environments.





 §.§ Prompt Influence


Large language models, trained on extensive datasets, are adept at processing information about a wide array of topics, including electromagnetism. We tested whether providing a more detailed geometric description prompt improves model performance to leverage the knowledge. To this end, we evaluated the impact of prompt designs on the performance of fine-tuned GPT. In addition to the vector representation template, we propose a detailed description prompt template, aimed at enhancing the model's understanding of our task. This approach hypothesizes that a detailed contextual introduction might help the model to grasp the physical implications of the parameters. Examples of these templates are provided in Table <ref>.

We fine-tuned GPT 3.5 using both prompt designs across datasets of varying sizes. The MSE comparison is shown in Figure <ref>. Our findings reveal an intriguing observation: both prompt designs yield nearly indistinguishable performance in all sizes of training samples. This consistency suggests that whether the input data is presented in a concise vector form or in a detailed description does not significantly influence the predictive accuracy of the model. The minimal impact of the feature name on the performance of the model is consistent with the insights from the previous paper<cit.>. 






 §.§ Inverse Design













An important goal of deep learning in metamaterials is to use a model to generate geometry with the desired spectrum, which is called inverse design. Compared to regression, it is a difficult problem, as it is a one-to-many problem<cit.>.  In this approach, we follow the concept of neural-adjoint<cit.>, in which the inverse design is achieved by directly querying the well-trained forward LLM. Table <ref> illustrates the example prompt and outputs. Unfortunately, this strategy did not produce successful results. On the one hand, models trained on datasets exceeding 10,000 samples were prone to producing invalid output. In the majority of instances, despite the imposition of strict constraints on the output format, our model will disregard the instruction and merely provide a list of numbers. In some cases, our model will provide responses that are not only erroneous but also crazy. This may be attributed to the lack of diversity in our training dataset. As all the completions are the list of numbers, this dominance in training data appears to have skewed the model learning process. However, models fine-tuned with small datasets could generate geometries, yet the majority of these are erroneous. Since our model is not trained to design metamaterial, it lacks this ability. 



 §.§ Interpretability

The previous section discussed the fine-tuned GPT as a standard regression model. In this section, we evaluate the fine-tuned GPT's comprehension of electromagnetic metamaterials by asking questions about the impact of altering the geometry features. Table
<ref> presents the questions and answers. Contrary to expectations, the fine-tuned GPT did not demonstrate a significantly better understanding than the original model. This observation suggests that training on geometry-spectra pairs might not give the model a holistic grasp of the physical concepts of our task. Additionally, we observed a stylistic difference: The fine-tuned GPT tends to produce one-paragraph answers, in contrast to the original GPT's piecewise interpretation. The difference in output style could be due to the format of our training data. The completions are a single paragraph, which can significantly affect the output style of the model. 






§ CONCLUSION

In this paper, we fine-tuned LLMs to predict electromagnetic spectra and address design challenges in metamaterials. The experimental results indicate that LLMs, particularly when fine-tuned with extensive training data, can achieve competitive performance in high-dimensional regression tasks. In terms of MARE, the LLM exhibited superior performance. This indicates that LLMs can effectively capture complex relationships between geometry and spectra.

However, we also face some limitations. We tested LLMs' performance in inverse design. The unexpected results show that the performance of LLMs in one-to-many tasks remains inadequate. Additionally, the reliance on extensive training data sets and the high cost of fine-tuning in LLMs limits the practical application, especially in limited data or budget scenarios. 

Future work could focus on improving the geometry representation and fine-tuning adjustments. Inspired by the success of SMILES<cit.> in cheminformatics, which is a technique that uses ASCII to present the structure of the module, developing encoding schemes to represent the geometry of metamaterials in linear text could improve LLM performance. Additionally, the cross-entropy used for LLM fine-tuning may not align well with our regression tasks. Therefore, exploring fine-tuning algorithms specifically designed for regression, or reformulating regression challenges as classification tasks, could enhance the performance of LLMs.




§ ACKNOWLEDGMENTS

D.L. and Y.D. acknowledge the assistance of ChatGPT, developed by OpenAI, for editing and language improvement.


unsrt  
  



§ PROMPTS AND COMPLETIONS EXAMPLES


@p0.3p0.7@
Example Prompts. These prompts are used to convert the tabular data into text sentences. 

Template     Example 

Vector Representation Prompt    The All-dielectric metasurface suspend in free space is: <0.525, 1.0, 0.2, 0.188 0.1, 0.2, 0.125, 0.188 0.162, 0.162, 0.0, 0.785 -0.393, 0.0> Get the absorptivity 

Detailed Description Prompt     Calculate the absorptivity values for an all-dielectric metasurface under the following specifications:
   - Height: 0.525,
   - Periodicity: 1.0,
   - Elliptical resonators' dimensions and rotational angles:
    1. Semi-major axis: 0.2, Semi-minor axis: 0.188, Rotation: 0.0,
     2. Semi-major axis: 0.1, Semi-minor axis: 0.2, Rotation: 0.785,
     3. Semi-major axis: 0.125, Semi-minor axis: 0.188, Rotation: -0.393,
     4. Semi-major axis: 0.162, Semi-minor axis: 0.162, Rotation: 0.0. 

Completion     [0.004 0.005 0.006 0.007 0.008 0.01 0.012 0.015 0.018 0.022 0.028 0.038 0.054 0.101 0.384 0.309 0.358 0.496 0.354 0.198 0.135 0.13 0.152 0.189 0.238 0.297 0.372 0.465 0.534 0.566 0.585 0.597 0.62 0.652 0.587 0.532 0.544 0.595 0.642 0.684 0.632 0.552 0.541 0.55 0.568 0.62 0.65 0.637 0.633 0.664]






§ EVALUATIONS OF MAE WITH VARYING DATASET SIZES






§ MODEL RESPONSES FOR INVERSE DESIGN


@p0.3p0.7@
Examples of model completions for an inverse design problem. This table demonstrates the outputs of a GPT model fine-tuned with different numbers of training samples. The prompts represent an inverse design task for specifying a metamaterial with a desired spectrum. The completion of the model fine-tuned with 1,000 samples yields a physically implausible design, since the axes of resonators are greater than half of the periodicity. In addition, the outputs of the model fine-tuned with 10,000 samples are invalid. 

Training Sample Size     Model Output 


2c
  – Continued from previous page 

Training Sample Size     Model Output 

2rContinued on next page 

Prompt for Metamaterial Design      You are an electromagnetic expert. You can design a metamaterial with a given desired spectrum.
    Your output should fill the [value] in the following:
    an all-dielectric metasurface under the following specifications:
    Height: [value],
    Periodicity: [value], 
   Elliptical resonators' dimensions and rotational angles: 
   1. Semi-major axis: [value], Semi-minor axis: [value], Rotation: [value], 
   2. Semi-major axis: [value], Semi-minor axis: [value], Rotation: [value],
   3. Semi-major axis: [value], Semi-minor axis: [value], Rotation: [value], 
   4. Semi-major axis: [value], Semi-minor axis: [value], Rotation: [value].
    The desired absorptivity values should have a peak [value] (greater than 0.8) in the 40th values. 

1,000 Samples     an all-dielectric metasurface under the following specifications: 
   Height: 500, 
   Periodicity: 800, 
   Elliptical resonators' dimensions and rotational angles: 
   1. Semi-major axis: 300, Semi-minor axis: 150, Rotation: 0, 
   2. Semi-major axis: 200, Semi-minor axis: 100, Rotation: 0, 
   3. Semi-major axis: 150, Semi-minor axis: 75, Rotation: 0, 
   4. Semi-major axis: 150, Semi-minor axis: 75, Rotation: 0. 

10,000 Samples (Output 1)     [0.006 0.008 0.011 0.014 0.017 0.021 0.026 0.032 0.04 0.059 0.12 0.141 0.092 0.1 0.126 0.154 0.197 0.252 0.264 0.233 0.247 0.294 0.354 0.409 0.466 0.499 0.502 0.484 0.484 0.513 0.556 0.647 0.621 0.553 0.519 0.515 0.535 0.563 0.585 0.595 0.587 0.574 0.563 0.551 0.5360.521 0.509 0.5 0.497 0.499]. 

10,000 Samples (Output 2)     Infeasible. No such solution. @@No such design@@. @@No such design@@. @@No such design@@. @@No such design@@. @@No such design@@. @@No such design@@. @@No such design@@.@@No such design@@. @@No such design@@. @@No such design@@. @@No such design@@. @@No such design@@. @@No such design@@. @@No such design@@. @@No such design@@. @@23@@18@@16@ @18@@21@@26@@32@@41@ @52@@63@@65@@67@@69@@74@@79@@84@@86@@88@ @81@@8.2@@78@@73@@74@@75@@81@@78@@68@@62@ @62@@69@@79@@72@@66@@66@@72@@83@@87@@82@@ 


























§ MODEL RESPONSES FOR FEATURE IMPORTANCE

@p0.4p0.6@
Examples of model completions for explaining feature importance. GPT 3.5 turbo refers to the GPT 3.5-1106 without fine-tuning. On the other hand, the fine-tuned version of GPT 3.5 has been trained on a dataset of 10,000 data points, using a detailed description template. 

Prompt     Completion 


 You are a physics expert. What is the influence of changing heights on the absorptivity of an all-dielectric metasurface?    Fine-tuned GPT 3.5: Changing the height of the dielectric metasurface affects the resonant modes and the overall absorption. As the height increases, the resonant modes shift to longer wavelengths, and the absorption at those wavelengths increases. This is because the increased height allows for more interaction between the incident electromagnetic wave and the metasurface, leading to stronger scattering and absorption. At the same time, the absorption at non-resonant wavelengths may decrease as the height increases, due to reduced interaction with the metasurface. However, the overall influence of changing heights on the absorptivity depends on the specific design and parameters of the metasurface. 
     GPT 3.5 Turbo: Changing the height of an all-dielectric metasurface can have a significant influence on its absorptivity. The absorptivity of a metasurface refers to its ability to absorb incident electromagnetic radiation. 

By changing the height of the metasurface, the resonant modes of the structure can be tuned, which in turn affects its absorptivity. For example, changing the height can shift the resonant frequency of the metasurface, leading to changes in the absorption properties at specific frequencies. Additionally, changing the height can also affect the coupling between the metasurface and the incident electromagnetic radiation, which can further influence the overall absorptivity of the structure.

In general, tuning the height of an all-dielectric metasurface can provide a degree of control over its absorptivity, allowing for custom design and optimization for specific applications such as solar cells, sensors, and stealth technology.



 You are a physics expert. What is the influence of changing periodicity on the absorptivity of an all-dielectric metasurface?    Fine-tuned GPT 3.5: Varying the periodicity of an all-dielectric metasurface can significantly influence its absorptivity. As you change the periodicity, the effective refractive index can be altered, leading to different Mie resonances and interference effects. This can result in modified absorption spectra and different dispersion characteristics. In particular, as the periodicity is modified, the coupling between the metasurface and the incident radiation can change, affecting the intensity of the fields around and within the metasurface, consequently influencing the absorption. Additionally, the characteristic Mie resonances in the absorptivity can change with the periodicity due to the modified phase matching conditions, leading to different absorption features. Therefore, it's important to carefully consider the impact of periodicity on the design of all-dielectric metasurfaces in order to achieve the desired optical properties. 
 
 
     GPT 3.5 Turbo: The absorptivity of an all-dielectric metasurface can be influenced by changing the periodicity of the structure in several ways:

1. Bandwidth of absorption: Changing the periodicity can affect the resonance of the metasurface and thereby change the range of wavelengths over which absorption occurs. By adjusting the periodicity, one can tune the absorptivity peak to different wavelengths, allowing for control over the bandwidth of absorption.

2. Absorption efficiency: The efficiency of absorption can also be affected by changing the periodicity. Optimizing the periodicity can enhance the absorption efficiency by matching the resonance condition to the incident light wavelength more closely.

3. Polarization sensitivity: The absorptivity of a metasurface can also be influenced by the polarization of the incident light. Changing the periodicity can lead to different responses for different polarizations, allowing for polarization-selective absorption.

4. Angular dependence: The absorptivity of a metasurface can exhibit angular dependency, meaning that the absorption properties change with the angle of incidence of the light. By tuning the periodicity, one can control the angular dependence of absorption.

Overall, changing the periodicity of an all-dielectric metasurface provides a versatile way to tailor its absorptivity properties for specific applications, allowing for optimization of absorption efficiency, bandwidth, and other characteristics.



 You are a physics expert. What is the influence of changing the angle of the elliptical resonators on the absorptivity of an all-dielectric metasurface?    Fine-tuned GPT 3.5: By changing the angle of elliptical resonators in an all-delder metasurface, you change their orientation w.r.t incident electric field. This, in turn, will change the effective refractive index and the support of different Mie-type electric resonances. This will influence the energy distribution and the total amount of absorbed energy at the different resonant modes, and thus effectively change the absorptivity of the metasurface. You can expect changes in the resonant amplitudes and redshift or blueshift of resonance due to the rotation, all contributing to the alteration of the absorptive properties. It is similar to rotate a polarizer, the absorptive maxima dip and flip depending on the geometry and orientation of the polarization w.r.t the axes of the film. For example, the periodic array of elliptical resonators will have periodicity, orientation, and asymmetry, thus the absorption is dictated by the resonant response which in turn is affected by the orientation effects. The sensitive dependency of the rotation on the response means careful consideration of the material orthorhombic nature will have to be made for precise and accurate characterization. The resulting informatics will tell engineers and researchers how much the geometry must be rotated to extract the best performance or to keep the performance consistent to create an array of the particular geometry with lessening reliance on the variation at the different polarization angles. For different resonant orientations the metasurfaces  whose symmetries will dictate absorption pattern into forward and backward scattering, thus understanding the orientations can aid in possible secondary uses or in reducing backscattering losses or optimizing forward scattering collimating emission. 
     GPT 3.5 Turbo: Changing the angle of elliptical resonators in an all-dielectric metasurface can have a significant impact on the absorptivity of the metasurface. The absorptivity of a metasurface is determined by its ability to efficiently absorb incident electromagnetic energy. This ability is closely related to the resonant behavior of the individual resonators within the metasurface.

Elliptical resonators exhibit different electromagnetic responses compared to circular or rectangular resonators, due to their asymmetric geometry. By changing the angle of the elliptical resonators, you can tune the resonant frequency of the individual resonators within the metasurface. This tuning can lead to enhanced absorption properties at specific frequencies or polarization states.

In general, adjusting the angle of elliptical resonators can affect the overall response of the metasurface by influencing the coupling between adjacent resonators, altering the effective refractive index of the metasurface, and modifying the scattering properties of the structure. These changes can result in a tailored absorptivity spectrum for specific applications such as sensing, energy harvesting, or stealth technology.

Therefore, careful design and optimization of the geometry and orientation of elliptical resonators in an all-dielectric metasurface can provide control over the absorptivity of the metasurface and enable customization of its electromagnetic response for desired functionalities.



 You are a physics expert. What is the influence of changing the radius of the elliptical resonators on the absorptivity of an all-dielectric metasurface?    Fine-tuned GPT 3.5: As the radius of the resonator is changed, the absorptivity of the metasurface varies accordingly. For smaller radii, the absorptivity can increase significantly in the shorter wavelengths due to the presence of electric dipolar resonances. However, at larger radii, the electric dipolar resonance shifts to longer wavelengths and diminishes, while magnetic dipolar resonances arise leading to high absorption in the longer wavelengths. Overall, the absorptivity of the metasurface can be tuned by changing the radius, making it possible to design devices with specific absorption spectra. 
 
     GPT 3.5 Turbo: Changing the radius of elliptical resonators in an all-dielectric metasurface can have a significant impact on the absorptivity of the metasurface. The absorptivity of a metasurface is determined by its ability to effectively absorb incident electromagnetic radiation. 

In the case of elliptical resonators, the resonant behavior is highly dependent on the size and shape of the resonators. By changing the radius of the elliptical resonators, the resonance frequency of the resonators can be tuned. This allows for control over the absorption properties of the metasurface.

Increasing the radius of the elliptical resonators can lead to a redshift in the resonance frequency, resulting in enhanced absorption at longer wavelengths. Conversely, decreasing the radius can lead to a blueshift in the resonance frequency, enhancing absorption at shorter wavelengths. 

Therefore, adjusting the radius of the elliptical resonators in an all-dielectric metasurface can be a powerful way to tailor its absorptivity and optimize its performance for specific applications such as solar energy harvesting, thermal emission control, or sensing.




