Table of Contents
Fetching ...

Large Language Models as Optimization Controllers: Adaptive Continuation for SIMP Topology Optimization

Shaoliang Yang, Jun Wang, Yunsheng Wang

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 $k$-th iteration, the LLM receives a structured observation$-$current compliance, grayness index, stagnation counter, checkerboard measure, volume fraction, and budget consumption$-$and outputs numerical values for the penalization exponent $p$, projection sharpness $β$, filter radius $r_{\min}$, 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 baselines$-$fixed (no-continuation), standard three-field continuation, an expert heuristic, and a schedule-only ablation$-$on three 2-D problems (cantilever, MBB beam, L-bracket) at $120\!\times\!60$ resolution and two 3-D problems (cantilever, MBB beam) at $40\!\times\!20\!\times\!10$ 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: $-5.7\%$ to $-18.1\%$ 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 intervention$-$not the schedule geometry$-$drives the gain. Code and reproduction scripts will be released upon publication.

Large Language Models as Optimization Controllers: Adaptive Continuation for SIMP Topology Optimization

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.

Paper Structure

This paper contains 60 sections, 8 equations, 11 figures, 7 tables.

Figures (11)

  • Figure 1: Overall two-level system pipeline. The inner loop executes the SIMP solver for up to $N$ main-loop iterations; every $k$th iteration the LLM agent observes the structured solver state and emits updated solver parameters. The outer meta-optimization loop reflects on completed-run summaries and patches the agent's own hyperparameters for the next run. A standardized $40$-iteration sharpening tail, applied from the best valid intermediate snapshot, is shared identically across all four continuation controllers, ensuring that all compliance differences at run termination are attributable exclusively to main-loop behaviour.
  • Figure 2: Three-field SIMP formulation. Raw design variables $\rho \in [0,1]$ pass through a linear density filter of radius $r_{\min}$ to produce a smoothed field $\bar{\rho}$, which is then mapped by the Heaviside projection (sharpness $\beta$, threshold $\eta = 0.5$) to the physical density $\tilde{\rho}$ entering stiffness assembly. The five LLM-controlled parameters ($p$, $\beta$, $r_{\min}$, $\delta$, restart flag) output by the Direct Numeric Control interface are listed in the lower panel with their admissible ranges.
  • Figure 3: LLM agent decision loop at iteration $147$ ($49\%$ of budget consumed). Left --- state observation: the solver's current state is serialised into thirteen scalar quantities. The compliance$C$ measures global structural flexibility (lower is stiffer and better); best_compliance$C^*$ is the lowest valid compliance seen so far. The grayness$\mathcal{G} \in [0,1]$ quantifies intermediate-density material: $\mathcal{G} = 0$ is a fully binary (solid/void) design; $\mathcal{G} > 0.20$ indicates substantial unresolved material that would degrade manufacturability. The grayness_slope approximates whether $\mathcal{G}$ is actively falling (topology consolidating) or stagnant (penalization insufficient); a value near zero signals that the current $(p, \beta)$ combination is no longer driving binarization. The stagnation_counter counts consecutive iterations without improvement in $C^*$; high values prompt the agent to increase penalization. The checkerboard index detects non-physical alternating-density patterns that indicate numerical instability. Centre --- reasoning: the model identifies the current budget phase (Stage 2, penalization), notes that the grayness gate is active ($\mathcal{G} = 0.224 > 0.20$), and decides to raise $p$ while holding $\beta$ to avoid premature binarization. Physically, increasing $p$ steepens the stiffness--density curve $E(\tilde{\rho}) = E_{\min} + \tilde{\rho}^p(E_0 - E_{\min})$, penalising intermediate densities more heavily and encouraging material to commit toward solid ($\tilde{\rho}=1$) or void ($\tilde{\rho}=0$) without yet forcing binary projection via $\beta$. In contrast, raising the Heaviside sharpness $\beta$ in Eq. \ref{['eq:heaviside']} compresses the smooth projection toward a step function, forcing all filtered densities $\bar{\rho}$ near the threshold $\eta$ to snap to $0$ or $1$ simultaneously --- a much more aggressive binarization that, if applied while $\mathcal{G}$ is still high, freezes the partially-formed topology into a poor local minimum from which the gradient-based OC update cannot escape. This is why the agent holds $\beta = 4.0$ (well below the gate cap of $8.0$) and raises $p$ instead: penalization steers material gradually, while premature $\beta$ escalation locks it irreversibly. Reducing $r_{\min}$ tightens the density-filter length scale, permitting finer structural features to form; reducing $\delta$ limits the per-iteration density change, stabilising the optimality-criteria update as the topology matures. Right --- safety rails: the JSON output is clamped to physically valid ranges ($p \in [1,5]$, $\beta \in [1,64]$, $r_{\min} \in [1.1, 4.0]$, $\delta \in [0.03, 0.40]$); the grayness gate hard-caps $\beta \leq 8$ while $\mathcal{G} > 0.20$; $r_{\min}$ is enforced monotonically non-increasing; and restarts are permitted only when a valid best snapshot exists.
  • Figure 4: Meta-optimization outer loop. After each completed comparison run, the meta-optimizer reads the performance summary and submits a second Gemini call that reflects on the relative performance of all five controllers. The model proposes bounded $\Delta$-updates to the primary agent's own constants — the grayness-gate threshold, API call frequency, and fallback $\beta$-doubling period (\ref{['tab:meta']}) — which are bounds-checked and written back to the agent configuration via automated patching. The outer loop repeats for $n_{\text{iters}}$ iterations, converging on agent hyperparameters that generalise across problem geometries.
  • Figure 5: Final compliance distributions ($n=5$ runs) for all five controllers. Each panel plots the mean (filled circle) and $\pm3\sigma$ interval (horizontal bars). The LLM agent achieves the lowest mean on every problem with narrow spread, confirming that gains are reproducible across random seeds. The schedule-only controller underperforms the fixed no-continuation baseline on cantilever ($+0.43\%$) and MBB beam ($+1.09\%$), demonstrating that rigid phase-structure adherence without state observation is actively harmful.
  • ...and 6 more figures