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 and expensive real evaluator returning utility and validity , with budget real evaluations, find:
where is the set of real-evaluation outcomes.
Framework Components
Janus builds on AlphaEvolve's island-based architecture, adding:
- Evaluator population : LLM-generated proxy evaluators
- Real-outcome archive : Bounded, deduplicated, balanced historical data
- Provisional pool : Proxy-scored candidates awaiting real evaluation
- Active portfolio : Selected evaluators for screening candidates
Evaluator-as-Program Representation
Each proxy evaluator is represented as:
where is the program structure generated by an LLM, and 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):
where is normalized regret (top-k contains near-optimal program), is NDCG@k, and 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:
The evaluators with highest credit in region form the portfolio .
Online credit updates:
where weights regional evidence from real-evaluated promotions, and combines validity fraction with normalized mean improvement.
Real-Anchored Promotion
Acquisition score balancing exploitation and exploration:
where is predicted quality, is predicted validity, is portfolio uncertainty, and is embedding-region novelty. Only real-valid outcomes may enter the target population.
Empirical Validation
Experimental Setup
Benchmarks (Table II):
| Domain | Evaluator | Design Goal |
|---|---|---|
| Battery | PyBaMM | Fast charge; cycle life |
| Network | ns-3 AQM | Throughput; delay/loss |
| FDTD Demux | 2D FDTD | Low-crosstalk routing |
| Reactor | Stiff ODE | Yield; thermal safety |
| Perishable IRP | Routing 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):
| Domain | Janus | Alg.-Only | Reduction |
|---|---|---|---|
| PyBaMM | 32 | 82 | 61.0% |
| AQM | 100 | 222 | 55.0% |
| FDTD Demux | 40 | 48 | 16.7% |
| Reactor | 3 | 15 | 80.0% |
| Perishable IRP | 5 | 29 | 82.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
| ID | Change | AQM AUBCΔ | AQM Best@B | FDTD AUBCΔ | FDTD Best@B |
|---|---|---|---|---|---|
| F | Full Janus | 5.5 ± 0.4 | 6.0 ± 0.1 | 316.3 ± 6.9 | 655.7 ± 119.5 |
| S | No evaluator evolution | 4.1 ± 1.0 (↓25.5%) | 5.2 ± 0.7 (↓13.3%) | 300.4 ± 45.0 (↓5.0%) | 429.9 ± 77.4 (↓34.4%) |
| A1 | One evaluator only | 4.3 ± 1.6 (↓21.8%) | 5.1 ± 1.2 (↓15.0%) | 243.9 ± 15.5 (↓22.9%) | 340.7 ± 61.7 (↓48.0%) |
| M0 | Global Spearman objective | 4.8 ± 0.9 (↓12.7%) | 5.8 ± 0.1 (↓3.3%) | 252.0 ± 31.0 (↓20.3%) | 404.7 ± 6.7 (↓38.3%) |
| O0 | No online credit updates | 4.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
-
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.
-
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.
-
Promotion-aligned meta-objective: Objective (3) prioritizes identifying top candidates over minimizing average prediction error—aligning proxy quality with search utility.
-
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
- Meta$^n$: Recursive Self-Improvement through Emergent Depth
Metaⁿ achieves state-of-the-art results by recursively applying a fixed meta-operation to its own outputs, dissolving the stability-depth dilemma and enabling emergent higher-order reasoning that flat self-refinement cannot match.
- Recursive Experiential-Working Memory Evolution for Long-Horizon Agent Harnesses
Recuris improves long-horizon LLM agent performance across 35 of 37 model-benchmark pairs by coupling a verified working state with experiential memory, enabling component-level fault localization and targeted, gated memory evolution without modifying the base model.
- EVOMAL: Self-Poisoning in Self-Evolving Coding Agents
Self-evolving LLM coding agents are vulnerable to self-poisoning, where agents unknowingly author and propagate malicious skills, achieving attack success rates up to 86.7% and forming self-sustaining worms.