TL;DR
FunL2O introduces an automated framework that uses Large Language Models (LLMs) to design executable feature functions for Learning-to-Optimize (L2O) pipelines. By embedding an LLM in an evolutionary program-search loop, FunL2O generates optimized Python code for data preprocessing that consistently outperforms traditional hand-crafted features across both continuous and discrete optimization tasks.
What Problem Does This Paper Address?
Learning-to-Optimize (L2O) methods use machine learning to accelerate traditional optimization solvers by predicting solutions, warm starts, or branching decisions. However, a major bottleneck in these pipelines is the feature function—the component that translates raw optimization problem data into tensors that neural networks can understand.
Historically, these feature functions have been manually hand-crafted and kept fixed across domains. Designing them is difficult because it isn't just about selecting features; it requires writing executable code that respects complex mathematical invariants, maintains strict dimensional shapes, and avoids information leakage (e.g., accidentally using target solutions during training). FunL2O addresses this gap by automating the discovery of these feature functions, shifting the burden from manual engineering to algorithmic evolution.
Methods
FunL2O utilizes an "L2O-in-the-loop" evolutionary program search inspired by DeepMind's FunSearch. The process operates as follows:
- Specification & Prompting: The framework defines a pipeline-specific Semantic Contract that outlines available data fields, required output formats, and invariants. This contract, along with a vocabulary of optimization concepts, forms the prompt for the LLM.
- Program Generation & Validation: The LLM proposes candidate feature functions written in executable Python code. A validator checks these candidates statically and dynamically (using a small probe instance) to ensure they satisfy the semantic contract. Invalid programs are discarded or sent back for repair.
- Evaluation via Retraining: Valid candidate programs replace the original feature function in the L2O pipeline. Crucially, the underlying L2O model is retrained from scratch using the new feature representation, and its performance is measured using downstream solver metrics (like objective gap or iteration savings).
- Update & Selection: The highest-performing programs are added to a program pool, which serves as the "elite context" to guide the LLM in generating the next generation of features.
Importantly, once the search is complete, the chosen feature function is deployed as standard Python preprocessing code. No LLM is required at deployment time.
Datasets and Tasks
The authors evaluated FunL2O across eight distinct L2O pipelines spanning continuous and discrete optimization problems:
- Linear Programming (LP) Solution Prediction: Evaluated using the
IPM-MPNNarchitecture across five combinatorial problem distributions (Independent Set, Set Cover, Combinatorial Auction, Facility Location, and GNNLP). - Constrained Solution Prediction: Tested on
FSNetandDC3frameworks across nine 1,000-variable quadratic programming (QP), quadratically constrained quadratic programming (QCQP), and second-order cone programming (SOCP) tasks. - Solver-Facing Roles: Applied to
PDHG-Net(PageRank LP warm starts),Smart Initial Basis, andLearning to Pivot(simplex pivot scores). - Mixed-Integer Linear Programming (MILP): Evaluated on
Predict-and-SearchandLearned Backdoorsbranching tasks using Combinatorial Auction (CA), Maximum Independent Set (MIS), and Minimum Vertex Cover (MVC) instances.
Key Insights and Ideas
- Representation is a Powerful Lever: Without changing the neural network architecture, loss functions, training schedules, or the downstream solvers, simply optimizing the input representation yielded massive performance gains.
- Semantic Structure > Dimensionality: To prove the LLM wasn't just winning by making the feature vectors wider, the authors ran "matched-width" controls using random projections. The evolved features significantly beat the random controls, demonstrating that the LLM discovered genuinely useful mathematical relationships (such as normalizing variable costs by column coverage).
- LLM-Agnostic Success: The framework successfully improved performance using four different frontier models: Claude-Opus-4.8, GPT-5.5, Gemini-3.1-Pro, and DeepSeek-Math-V2, showing that the method is robust to the choice of the underlying generator.
Key Results
Across all continuous and discrete tasks, the evolved feature functions consistently outperformed hand-crafted baselines:
- Continuous Optimization: On
IPM-MPNN, FunL2O reduced the median objective gap by up to 49.4% (on Set Cover). For highly complex nonconvex SOCP problems inFSNet, the optimality gap plummeted from 933.85% to 141.28%, while simultaneously boosting feasibility rates from 0.25 to a perfect 1.00. - Solver Efficiency: For
PDHG-Net, iteration savings increased from 42.44% to 51.05%. In simplex pivoting, the geometric mean of the pivot count dropped by 26.2%. - Mixed-Integer Search: In MILP backdoor branching, FunL2O significantly reduced the mean wall time across all domains, cutting Maximum Independent Set (MIS) solver time from 59.1 seconds down to 46.0 seconds.
Limitations and Future Work
The primary limitation of FunL2O is its high offline computational cost. Because evaluating a single candidate feature function requires retraining the entire L2O model from scratch and running downstream solvers, a full search can take dozens of GPU/CPU hours. While this cost is safely amortized in repeated-optimization deployment scenarios, making the search loop more sample-efficient remains an open challenge.
Additionally, the authors utilized a relatively simple evolutionary loop (relying primarily on prompt context rather than complex crossover/mutation operators), suggesting that integrating more sophisticated genetic algorithms could yield even stronger representations in future iterations.
Summary updated