Skip to main content
Back

APF Turns a Tiny Open-Source LLM Into an Engineering Math Translator

A new framework fine-tunes small LLMs to turn vague engineering requirements into executable optimization code, without needing costly simulator feedback in the training loop.

Pro

Paper, Full Access
  • APF fine-tunes small open-source LLMs to convert natural language design requirements into executable optimization code.
  • Key idea: skip expensive simulator feedback by using LLM-judged rankings over pre-computed test instances as the quality signal.
  • Fine-tuned LLAMA3.1-8B hit 0.7976 alignment, up from 0.2248 base, beating GPT-4o, DeepSeek-V3, and Claude-Sonnet-4.5.
  • Listwise ranking cut evaluation cost from $0.47 to $0.02 per set versus pairwise comparison.
  • Validated on three-layer filtering patch antenna design; only APF met all five frequency-band requirements end-to-end.
  • No public code release yet; cross-domain generalization to aerodynamics and structural design remains untested.

Turning a sentence like "maximize passband efficiency while suppressing out-of-band noise" into actual math that an optimizer can chew on is one of those unglamorous bottlenecks that eats weeks of engineering time. Researchers from Xidian University, Victoria University of Wellington, and Westlake University have released APF (Automated Problem Formulation), a framework that fine-tunes open-source LLMs to do this translation automatically, and does it without needing an expensive physics simulator in the training loop.

The bottleneck nobody wants to touch

High-cost simulation-driven design shows up in antenna work, aerospace, microelectronics, and robotics, and the workflow is always the same: an engineer describes what they want in fuzzy natural language, someone hand-translates that into an objective function plus constraints, and only then can an optimizer run against a slow full-wave simulator. The manual step is the choke point.

Prior LLM approaches have taken two routes. Prompt-based systems like Chain-of-Experts and OptiMUS lean on prompt engineering with frontier models. Fine-tuning approaches like ORLM and LLMOPT train smaller models on task-specific data, but they rely on solver feedback to filter training examples, which is impractical when a single simulation is prohibitively expensive. That is the wall APF is trying to knock down.

Comparison of manual, prompt-based, and fine-tuned LLM workflows for requirement formulation

Skipping the solver with a ranking trick