Large Language Models as Optimization Controllers: Adaptive Continuation for SIMP Topology Optimization
Organizations: Department of Mechanical Engineering, Santa Clara University, Santa Clara, CA 95053, USA
Abstract
We present a framework in which a large language model (LLM) acts as an online adaptive controller for SIMP topology optimization, replacing conventional fixed-schedule continuation with real-time, state-conditioned parameter decisions. At every -th iteration, the LLM receives a structured observationcurrent compliance, grayness index, stagnation counter, checkerboard measure, volume fraction, and budget consumptionand outputs numerical values for the penalization exponent , projection sharpness , filter radius , and move limit via a Direct Numeric Control interface. A hard grayness gate prevents premature binarization, and a meta-optimization loop uses a second LLM pass to tune the agent's call frequency and gate threshold across runs. We benchmark the agent against four baselinesfixed (no-continuation), standard three-field continuation, an expert heuristic, and a schedule-only ablationon three 2-D problems (cantilever, MBB beam, L-bracket) at resolution and two 3-D problems (cantilever, MBB beam) at resolution, all run for 300 iterations. A standardized 40-iteration sharpening tail is applied from the best valid snapshot so that compliance differences reflect only the exploration phase. The LLM agent achieves the lowest final compliance on every benchmark: to relative to the fixed baseline, with all solutions fully binary. The schedule-only ablation underperforms the fixed baseline on two of three problems, confirming that the LLM's real-time interventionnot the schedule geometrydrives the gain. Code and reproduction scripts will be released upon publication.
Figures & tables
| Stage | Budget | / | ||
|---|---|---|---|---|
| 1. Exploration | – | – | / | |
| 2. Penalization | – | – | – | / |
| 3. Sharpening | – | – | / | |
| 4. Converge | – | / | ||
| Tail (fixed) | iters | / |
| Parameter | Symbol | Range | Role |
|---|---|---|---|
| Penalization exp. | SIMP void penalty | ||
| Heaviside sharp. | Binarization | ||
| Filter radius | Length scale ( ) | ||
| OC move limit | Density step | ||
| Restart flag | — | Reload snapshot | |
| Hard gate: while (not overridable) | |||
| Constant | Role | Lower | Upper | Default |
|---|---|---|---|---|
| GRAYNESS_GATE | -cap threshold | |||
| CALL_EVERY | API call period | |||
| PENAL_RAMP | Fallback ramp length | |||
| BETA_DOUBLE | Fallback period | |||
| PHASE.penal | Min iters in Stage 2 | |||
| PHASE.sharp | Min iters in Stage 3 |
| Problem | Preset | Mesh | Primary? | ||
|---|---|---|---|---|---|
| Cantilever | Fast | 100 | 0.40 | ||
| Long | 300 | 0.40 | |||
| Hard | 300 | 0.40 | |||
| MBB beam | Long | 300 | 0.40 | ||
| L-bracket | Long | 300 | 0.40 | ||
| Cantilever (3-D) | — | 300 | 0.40 |
| Problem | Controller | vs. Fixed | Time (s) | Best iter | ||
|---|---|---|---|---|---|---|
| Cantilever | Fixed | — | 384.9 | 300.0 | ||
| Three-field cont. | 337.4 | 83.0 | ||||
| Expert heuristic | 348.1 | 82.4 | ||||
| Schedule only | 289.0 | 267.6 | ||||
| LLM agent | 445.2 | 167.6 | ||||
| MBB beam | Fixed | — | 425.3 | 300.0 |
| Iter. | Gate | LLM rationale (verbatim) | ||||
|---|---|---|---|---|---|---|
| Stage 1 - Exploration (budget 0–8%) | ||||||
| 5 | 1.2 | 1.0 | 1.50 | 0.20 | — | “Stage 1 exploration, slowly increasing penal.” |
| 15 | 1.6 | 1.0 | 1.50 | 0.20 | — | “Increasing penal slightly to encourage feature definition.” |
| 20 | 1.9 | 1.0 | 1.50 | 0.20 | — | “Increasing penal to encourage structural definition.” |
| Stage 2 - Penalization (budget 8–50%): patient ramp, held low | ||||||
| 25 | 2.2 | 1.0 | 1.50 | 0.20 | — | “Entering Stage 2: increasing penalty to drive grayness reduction.” |
| Problem | Controller | vs. Fixed | Time (s) | Best iter | ||
|---|---|---|---|---|---|---|
| Cantilever | Fixed | — | 1044 | 255 | ||
| Three-field cont. | 994 | 75 | ||||
| Expert heuristic | 933 | 94 | ||||
| Schedule only | 746 | 68 | ||||
| LLM agent | 1198 | 157 | ||||
| MBB beam | Fixed | — | 1014 | — |
| Problem | Controller | vs. Fixed | ||
|---|---|---|---|---|
| Cantilever | Fixed | — | ||
| Tail only | ||||
| Three-field cont. | ||||
| Expert heuristic | ||||
| Schedule only | ||||
| LLM agent |
Topology Optimization
Topology optimization finds material layouts that meet performance and manufacturing constraints across engineering systems.
See all 33 papers