Skip to main content
Enterprise AI Analysis: Learning Electromagnetic Metamaterial Physics With ChatGPT

Enterprise AI Analysis

Learning Metamaterial Physics with ChatGPT: A Deep Dive

This groundbreaking research explores the capabilities of fine-tuned Large Language Models (LLMs), specifically ChatGPT 3.5, in understanding and predicting the complex physics of all-dielectric metamaterials. By converting numerical geometry and spectrum data into text, the LLM demonstrates surprising aptitude, achieving performance comparable to highly optimized Deep Neural Networks for forward prediction tasks, especially with larger datasets.

0.165 Best Mean Absolute Relative Error
0.006 Best Mean Squared Error

Strategic Implications for Enterprise AI

The study reveals LLMs' potential to act as powerful surrogate models in complex scientific domains, capable of processing vast datasets and uncovering hidden patterns. While showing promise in predictive tasks, challenges in interpretability and inverse design highlight areas for further research. This work provides a roadmap for leveraging existing foundational models to accelerate scientific discovery, albeit with significant computational overhead for fine-tuning.

DNN-level FT-LLM Forward Prediction Accuracy
Reduced Training Data for Comparable MARE
$4,000+ Estimated Cost for LLM Experiments
Challenging Current State for Advanced Tasks

Deep Analysis & Enterprise Applications

Select a topic to dive deeper, then explore the specific findings from the research, rebuilt as interactive, enterprise-focused modules.

Enterprise Process Flow

Metamaterial Geometry (Numerical)
Textual Encoding (Prompt)
Fine-tuned LLM (Prediction)
Textual Decoding (Spectrum)
Predicted Absorptivity (Numerical)

The core methodology involves transforming numerical metamaterial geometry data (14 parameters: height, periodicity, semi-major/minor axes, rotational angles for four elliptical resonators) into structured text prompts for the LLM. The corresponding 50-point absorptivity spectra are also converted into text strings with three decimal precision. ChatGPT 3.5 is then fine-tuned using OpenAI's API to predict the spectral text given the geometry text. During inference, the LLM's text output is converted back to numerical form for evaluation against ground truth.

This approach circumvents the LLM's inability to directly process numerical data, reframing the spectral response prediction as a language processing task. The model iteratively adjusts its parameters based on a loss function comparing predicted and ground truth text spectra. A temperature setting of 0.5 is used during inference to balance creativity and consistency in output.

Comparable to DNNs FT-LLM Accuracy on Large Datasets (MARE)
Model MARE (1000 samples) MARE (40000 samples) MSE (1000 samples) MSE (40000 samples)
Linear Regression ~0.65 ~0.25 ~0.04 ~0.015
KNN ~0.6 ~0.2 ~0.03 ~0.01
Random Forest ~0.6 ~0.2 ~0.03 ~0.01
Neural Network (DNN) ~0.4 ~0.15 ~0.02 ~0.005
FT-LLM (ChatGPT 3.5) 0.165 ~0.15 0.00639 ~0.005

The fine-tuned LLM (FT-LLM) demonstrates a remarkable learning efficiency, achieving accuracy comparable to optimized deep neural networks (DNNs) for forward prediction, particularly on larger datasets (1,000 samples and above). In terms of Mean Absolute Relative Error (MARE), the FT-LLM outperforms all traditional machine learning models and achieves similar accuracy to DNNs across various dataset sizes.

However, for Mean Squared Error (MSE), the FT-LLM performs worse than other models in low-data scenarios (<10,000 samples). Its accuracy improves rapidly with larger datasets, eventually surpassing all baseline models except the DNN at 40,000 samples, and even showing a faster improvement rate, suggesting it could surpass the DNN with more data. This metric discrepancy is attributed to MARE's sensitivity to errors in low-value regions versus MSE's uniform performance across spectral magnitudes.

The influence of prompt templates on predictive accuracy was found to be minimal, with both concise vector and detailed descriptions yielding similar results. Temperature settings during inference showed that lower temperatures generally yield better MSE for larger training datasets, ensuring more consistent and probable outputs.

Challenges in Inverse Design with FT-LLM

While the FT-LLM excels at forward prediction, its performance in inverse design – determining geometry from a desired spectrum – was found to be ineffective. Models trained on datasets exceeding 10,000 samples were prone to generating invalid or nonsensical outputs, often disregarding specified output constraints. Even with small datasets (1,000 samples), the designs produced were physically implausible. This contrasts sharply with traditional inverse design methods which achieved superior results.

This limitation points to the complex 'one-to-many' nature of inverse design, where multiple geometries can yield similar spectra, a challenge LLMs currently struggle to resolve with the given training data.

Poor FT-LLM Inverse Design Accuracy

Despite its impressive predictive capabilities, the FT-LLM did not demonstrate significantly better interpretability than the original, unmodified ChatGPT 3.5 model. When asked to explain the physical principles behind metamaterial responses to geometric changes, both fine-tuned and un-trained LLMs provided similar, general responses. The fine-tuning on geometry-spectra pairs did not provide the model with a deeper, actionable understanding of underlying physical relationships.

A stylistic difference was observed, with the FT-LLM generating responses in single paragraphs, likely influenced by the numerical list format of its training data. This suggests that while LLMs can generate text, their 'understanding' of physics from purely numerical input via textual encoding is limited without more diverse, contextual training data (e.g., research papers or textbooks related to physics explanations).

Model Training Time (s) Memory (MB)
Linear Regression 0.79 16.3
Random Forest 0.73 13.9
K-Nearest Neighbors 0.89 13.8
Feed-forward Neural Networks 67.2 1083
FT-LLM (ChatGPT 3.5) 2753 NA (OpenAI cloud)
~$4,000 Total Estimated Cost for LLM Experiments (OpenAI API)

Fine-tuning ChatGPT 3.5 for this research incurred substantial computational costs, estimated at over $4,000 for all experiments conducted via the OpenAI API. This high cost is a significant barrier for academic researchers and highlights the resource-intensive nature of working with large language models, even for task-specific fine-tuning.

The prompt template's influence on prediction accuracy was minimal, indicating that the LLM's ability to process numerical data, once encoded, is robust regardless of whether the input is a concise vector or a detailed description. However, temperature settings are crucial for larger datasets: lower temperatures (e.g., 0.5) tend to minimize MSE by reducing output variability and selecting more probable predictions, which is important for precise scientific applications.

Calculate Your Potential AI Impact

Estimate the efficiency gains and cost savings for your enterprise by implementing similar AI methodologies.

Estimated Annual Savings $0
Annual Hours Reclaimed 0

Your AI Implementation Roadmap

Our phased approach ensures a smooth and effective integration of AI into your enterprise workflows.

Phase 01: Discovery & Strategy

Comprehensive analysis of current operations, identification of AI opportunities, and development of a tailored strategy aligned with your business objectives.

Phase 02: Data Preparation & Model Training

Collection, cleaning, and structuring of relevant data, followed by fine-tuning or training of specialized AI models, similar to the FT-LLM in this study.

Phase 03: Integration & Deployment

Seamless integration of AI solutions into existing systems, ensuring operational efficiency and minimal disruption. Includes rigorous testing.

Phase 04: Monitoring & Optimization

Continuous monitoring of AI model performance, iterative improvements, and scaling of solutions to maximize long-term impact and ROI.

Ready to Transform Your Enterprise with AI?

Leverage the power of advanced AI to gain competitive advantage. Book a free consultation with our experts to discuss your specific needs and how AI can drive innovation in your organization.

Ready to Get Started?

Book Your Free Consultation.

Let's Discuss Your AI Strategy!

Lets Discuss Your Needs


AI Consultation Booking