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 that 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, find hidden patterns in data, and operate 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.
翻译:大型语言模型(如ChatGPT、Gemini、LlaMa和Claude)通过解析互联网文本进行大规模训练,展现出以近乎人类水准回应复杂指令的卓越能力。我们提出了一种在多达40,000个数据点上微调的大型语言模型,该模型仅需通过指定超表面几何结构的文本提示,即可预测特定频率范围内的电磁频谱。我们将结果与传统机器学习方法(包括前馈神经网络、随机森林、线性回归和K近邻算法)进行了比较。值得注意的是,与包含深度神经网络在内的所有机器学习方法相比,微调后的LLM(FT-LLM)在所有数据集规模上均实现了更低的误差。我们还展示了该LLM解决逆向问题的能力,即通过提供所需频谱对应的几何参数。相较于人类,LLM在某些研究层面具有优势,包括处理海量数据、发现数据中的隐藏模式以及在更高维空间中进行运算的能力。我们提出,在特定领域的大规模数据集上微调LLM,可使其掌握该领域的细微特征,从而成为研究和分析中的有力工具。