optimize anything: A Unified Framework for LLM-Based Mathematical and Scientific Optimization
Lakshya A Agrawal ⋅ Donghyun Lee ⋅ Shangyin Tan ⋅ Wenjie Ma ⋅ Karim Elmaaroufi ⋅ Rohit Sandadi ⋅ Sanjit Seshia ⋅ Koushik Sen ⋅ Dan Klein ⋅ Ion Stoica ⋅ Joseph E Gonzalez ⋅ Omar Khattab ⋅ Alex Dimakis ⋅ Matei Zaharia
Abstract
LLM-driven optimization for mathematical and scientific discovery is fragmented across specialized systems for prompt optimization, evolutionary code search, and agent-architecture search. We argue this fragmentation is artificial, because the underlying loop is the same in every case, namely improving a text artifact under a scoring function. We present optimize_anything, one declarative system that subsumes these specialties. A single framework raises GPT-4.1-mini on AIME-2025 from $46.7\%$ to $60.0\%$ (beating MIPROv2), discovers a circle-packing algorithm for $n{=}26$ exceeding AlphaEvolve under a matched rerun, evolves a 10-line ARC-AGI agent into a $300{+}$ line architecture lifting Gemini~3 Flash from $32.5\%$ to $89.5\%$, and beats Optuna on $7$ of $10$ hard blackbox problems. Together, we show that text optimization with LLM-based search is a general-purpose problem-solving paradigm, unifying tasks traditionally requiring domain-specific algorithms under a single framework.
Chat is not available.
Successful Page Load