Janus: An Algorithm–Evaluator Co-Evolution Framework for LLM-Driven Discovery

Summary (Overview)

  • Core contribution: Janus is a novel framework that uses LLMs to co-evolve both target programs AND executable proxy evaluators under limited real-evaluation budgets, extending LLM-driven program discovery to scientific domains where evaluation is expensive.
  • Key innovation: Unlike prior work (e.g., AlphaEvolve, FunSearch) that assumes a fixed external evaluator, Janus treats the proxy evaluator itself as an evolvable program generated by LLMs, calibrated with real labels.
  • Performance: Across five scientific domains (PyBaMM battery charging, AQM network control, FDTD Demux photonics, Reactor control, Perishable IRP), Janus achieves higher area under the best-so-far improvement curve (AUBCΔ) and terminal performance than baselines, reaching 99% of baseline improvement with 59.1% fewer real evaluations on average.
  • Evaluator evolution gains: Evolved evaluators show substantial ranking accuracy improvements (NDCG@3 gains of 0.282–0.694 across domains) compared to seed evaluators.
  • Ablation validation: All four key components (evaluator evolution, portfolio selection, promotion-aligned objective, online credit updates) contribute complementary benefits.

Introduction and Theoretical Foundation

Problem Context

LLM-driven program discovery systems (FunSearch, AlphaEvolve) embed LLMs in iterative loops where the model proposes programs and an evaluator measures quality. These systems excel when evaluation is cheap and fast (e.g., matrix multiplication verification takes ~0.7 ms). However, many scientific tasks require:

  • High-fidelity simulations (e.g., ns-3 network simulations taking 11–27 hours)
  • Physical experiments (e.g., battery cycling taking ~4 days)
  • Expensive computational solves (e.g., 3D FDTD taking ~10 hours)

This creates a mismatch: abundant candidate generation but scarce real-world feedback.

Key Motivating Insights

Insight 1: Fixed proxies fail under distribution shift. A proxy trained near the wild-type sequence guides search; as candidates drift from training distribution, proxy scores rise to ~5.6 while measured fluorescence falls to ~2.9 (Figure 3), demonstrating search-induced exploitation of frozen proxies.

Insight 2: Conventional surrogates struggle with scarce, biased labels. Standard surrogates (GP, random forest, MLP) start from predefined model classes and estimate parameters only from labeled samples. They must discover physical regime transitions from data alone—difficult with small, search-biased archives.

Insight 3: LLMs can inject domain structure. By prompting an LLM with problem descriptions, it can propose executable proxy functions with plausible physical mechanisms (features, equations, conditional branches). Real labels then select and calibrate these structures.

Demonstration: In TCP NewReno incast prediction, an LLM-generated proxy achieves 0.500 knee-location error versus 2.125 for the best conventional baseline (GP, RF, MLP, quadratic-ridge, RBF-SVR), using only 12 labeled simulations (Figure 4).

Methodology

Problem Statement

Given program space X\mathcal{X} and expensive real evaluator freal(x)f_{\text{real}}(x) returning utility y(x)Ry(x) \in \mathbb{R} and validity v(x){0,1}v(x) \in \{0,1\}, with budget BB real evaluations, find:

xBargmax(x,y,v)HB:v=1yx_B^{\star} \in \arg \max_{(x, y, v) \in \mathcal{H}_B: v = 1} y

where HB\mathcal{H}_B is the set of real-evaluation outcomes.

Framework Components

Janus builds on AlphaEvolve's island-based architecture, adding:

  • Evaluator population PevalP_{\text{eval}}: LLM-generated proxy evaluators
  • Real-outcome archive A\mathcal{A}: Bounded, deduplicated, balanced historical data
  • Provisional pool Ci\mathcal{C}_i: Proxy-scored candidates awaiting real evaluation
  • Active portfolio Π\Pi: Selected evaluators for screening candidates

Evaluator-as-Program Representation

Each proxy evaluator is represented as:

e=(gϕ,θϕ(A))e = (g_{\phi}, \theta_{\phi}(\mathcal{A}))

where gϕg_{\phi} is the program structure generated by an LLM, and θϕ(A)\theta_{\phi}(\mathcal{A}) contains fitted parameters calibrated using the real-outcome archive. This separation allows adaptation without regenerating code.

Evaluator Selection and Adaptation

Meta-objective (promotion-aligned, not just accuracy):

Fmeta(e)=λR(1Rk(e))+λNNk(e)+λρρ(e)F_{\text{meta}}(e) = \lambda_R(1 - R_k(e)) + \lambda_N N_k(e) + \lambda_\rho \rho(e)

where Rk(e)R_k(e) is normalized regret (top-k contains near-optimal program), Nk(e)N_k(e) is NDCG@k, and ρ(e)\rho(e) is global ranking correlation. The first two terms dominate because they directly measure quality of candidates sent to real evaluation.

Region-conditioned portfolios: Candidates are assigned to regions by code-embedding cosine distance:

r(x)=argminrdcos(z(x),μr)r(x) = \arg \min_r d_{\cos}(z(x), \mu_r)

The KK evaluators with highest credit in region r(x)r(x) form the portfolio Πi(x)\Pi_i(x).

Online credit updates:

Fe,r=(1αe,r)Fmeta(e)+αe,rge,rF_{e,r} = (1 - \alpha_{e,r}) F_{\text{meta}}(e) + \alpha_{e,r} g_{e,r}

where αe,r=ne,r/(ne,r+κ)\alpha_{e,r} = n_{e,r}/(n_{e,r} + \kappa) weights regional evidence from ne,rn_{e,r} real-evaluated promotions, and ge,rg_{e,r} combines validity fraction with normalized mean improvement.

Real-Anchored Promotion

Acquisition score balancing exploitation and exploration:

α(x)=wqpˉv(x)sˉ(x)+wupˉv(x)σˉ(x)+wnη(x)\alpha(x) = w_q \bar{p}_v(x) \bar{s}(x) + w_u \bar{p}_v(x) \bar{\sigma}(x) + w_n \eta(x)

where sˉ(x)\bar{s}(x) is predicted quality, pˉv(x)\bar{p}_v(x) is predicted validity, σˉ(x)\bar{\sigma}(x) is portfolio uncertainty, and η(x)\eta(x) is embedding-region novelty. Only real-valid outcomes may enter the target population.

Empirical Validation

Experimental Setup

Benchmarks (Table II):

DomainEvaluatorDesign Goal
BatteryPyBaMMFast charge; cycle life
Networkns-3 AQMThroughput; delay/loss
FDTD Demux2D FDTDLow-crosstalk routing
ReactorStiff ODEYield; thermal safety
Perishable IRPRouting sim.Low shortage/waste

Baselines: Alg.-Only (matched AlphaEvolve-style), Direct-LLM (LAEA-style), Embed-GP (Gaussian process on code embeddings), plus human-designed references (CLO, D-RED, CMT, OCP, order-up-to).

Main Results

Budget efficiency: Janus achieves larger AUBCΔ in all five domains (gaps of 1.6–45.1 percentage points) and higher terminal improvement than Alg.-Only.

Sample efficiency (calls to reach 99% of Alg.-Only's terminal improvement):

DomainJanusAlg.-OnlyReduction
PyBaMM328261.0%
AQM10022255.0%
FDTD Demux404816.7%
Reactor31580.0%
Perishable IRP52982.8%

Mean reduction: 59.1%

Alternative baselines: Embed-GP underperforms Alg.-Only in 4/5 domains; Direct-LLM achieves lower AUBCΔ in all domains while consuming 8.1× more LLM tokens per real evaluation.

Evaluator Evolution Gains

Ranking accuracy (NDCG@3) improvements from evaluator evolution:

  • PyBaMM: 0.688 → 0.970 (+0.282)
  • AQM: 0.000 → 0.694 (+0.694)
  • FDTD Demux: 0.612 → 0.923 (+0.311)

Evolved PyBaMM evaluator adds peak temperature, SEI growth, voltage headroom, and high-SOC duration features—better reflecting real evaluator constraints.

Ablation Study

IDChangeAQM AUBCΔAQM Best@BFDTD AUBCΔFDTD Best@B
FFull Janus5.5 ± 0.46.0 ± 0.1316.3 ± 6.9655.7 ± 119.5
SNo evaluator evolution4.1 ± 1.0 (↓25.5%)5.2 ± 0.7 (↓13.3%)300.4 ± 45.0 (↓5.0%)429.9 ± 77.4 (↓34.4%)
A1One evaluator only4.3 ± 1.6 (↓21.8%)5.1 ± 1.2 (↓15.0%)243.9 ± 15.5 (↓22.9%)340.7 ± 61.7 (↓48.0%)
M0Global Spearman objective4.8 ± 0.9 (↓12.7%)5.8 ± 0.1 (↓3.3%)252.0 ± 31.0 (↓20.3%)404.7 ± 6.7 (↓38.3%)
O0No online credit updates4.4 ± 0.2 (↓20.0%)4.9 ± 0.1 (↓18.3%)245.1 ± 21.6 (↓22.5%)382.5 ± 101.5 (↓41.7%)

All ablations reduce both metrics in both domains, confirming complementary contributions from each component.

Theoretical and Practical Implications

Significance

  1. Extends LLM discovery to expensive domains: Janus bridges the gap between cheap-verification tasks (AlphaEvolve) and expensive scientific evaluation by making proxies part of the evolved system.

  2. LLM as structure generator, not just predictor: Rather than using LLMs to directly predict outcomes (LAEA) or select predefined surrogates (CoE-SAEA, LLM-SAEA), Janus uses LLMs to generate executable proxy programs with physically plausible structures.

  3. Promotion-aligned meta-objective: Objective (3) prioritizes identifying top candidates over minimizing average prediction error—aligning proxy quality with search utility.

  4. Real-anchored safety: Proxy predictions only allocate evaluation budget; real-valid outcomes remain the sole source of population updates, preventing proxy error contamination.

Limitations and Future Directions

  • LLM backbone sensitivity: Performance varies with the LLM used (Appendix D), though Janus consistently improves over baselines across tested backbones.
  • Objective changes: Zero-shot reuse works for modest objective changes (NDCG@3 of 0.959 on reweighted FDTD Demux), but larger changes may require regeneration.
  • Scalability: The framework requires maintaining archives, portfolios, and online credit systems—costs that grow with problem complexity.

Conclusion

Janus introduces a principled approach to co-evolving target programs and executable proxy evaluators under limited real-evaluation budgets. By leveraging LLM domain knowledge to generate proxy structures, calibrating them with real labels, adapting region-conditioned portfolios online, and anchoring all population updates to real validation, Janus achieves substantial budget savings (59.1% fewer evaluations on average) while maintaining or improving final performance across five diverse scientific domains. This work extends evaluator-guided LLM discovery from tasks with cheap, scalable feedback to scientific domains where trustworthy evaluation is scarce and expensive.

Related papers