Using Large Language Models for Parametric Shape Optimization
Xinxin Zhang, Zhuoqun Xu, Guangpu Zhu, Chien Ming Jonathan Tay, Yongdong Cui, Boo Cheong Khoo, Lailai Zhu
TL;DR
This work addresses parametric shape optimization by replacing traditional optimization operators with a large language model that guides an evolutionary-search process. The LLM-PSO framework evolves a population of designs via a Gaussian search, using a curated record buffer and few-shot prompts to obtain a mean design $ar{oldsymbol{x}}_{ ext{LLM}}$ for the next generation, with all inputs appropriately discretized to integers and a deterministic output. Across two fluid-dynamics problems—the 2D airfoil in laminar flow at $ ext{Re}=100$ and a 3D axisymmetric body in Stokes flow—the approach identifies shapes that agree with benchmark solutions and often converges faster than GA or RL baselines, though higher DOFs pose challenges. The results suggest that LLMs can function as autonomous decision-makers in engineering design, opening pathways for higher-DOF optimization, LLM fine-tuning, and hybrid strategies that combine generative AI with established optimization methods.
Abstract
Recent advanced large language models (LLMs) have showcased their emergent capability of in-context learning, facilitating intelligent decision-making through natural language prompts without retraining. This new machine learning paradigm has shown promise in various fields, including general control and optimization problems. Inspired by these advancements, we explore the potential of LLMs for a specific and essential engineering task: parametric shape optimization (PSO). We develop an optimization framework, LLM-PSO, that leverages an LLM to determine the optimal shape of parameterized engineering designs in the spirit of evolutionary strategies. Utilizing the ``Claude 3.5 Sonnet'' LLM, we evaluate LLM-PSO on two benchmark flow optimization problems, specifically aiming to identify drag-minimizing profiles for 1) a two-dimensional airfoil in laminar flow, and 2) a three-dimensional axisymmetric body in Stokes flow. In both cases, LLM-PSO successfully identifies optimal shapes in agreement with benchmark solutions. Besides, it generally converges faster than other classical optimization algorithms. Our preliminary exploration may inspire further investigations into harnessing LLMs for shape optimization and engineering design more broadly.
