arXiv:2610.25697cs.AIOct 2026

Manuscript Offprint

arXiv:2610.25697

CVaR-RMD: CVaR Selection Pressure for Robust Metaheuristic Discovery

Ruodai Cui, Li Niu

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Large language models have recently been used to discover heuristics through iterative program search, offering a promising approach to automated algorithm design. However, candidates selected by average performance may degrade across instance families, random seeds, and problem scales because mean-based objectives can obscure rare but severe failures. We propose CVaR-RMD, a risk-sensitive evolutionary framework that uses an LLM to mutate executable heuristic programs and ranks candidates by empirical conditional value-at-risk over heterogeneous evaluation conditions. Across three combinatorial optimization domains, CVaR-based selection improves upper-tail performance and reduces failure rates while maintaining competitive mean performance. These gains persist on larger unseen instances and independently curated within-domain benchmarks. Code is available here.

1 Introduction

Heuristics and metaheuristics are central to combinatorial, stochastic, black-box, or partially specified optimization problems. Their practical value depends not only on benchmark performance during algorithm discovery but also on whether it persists when evaluation conditions change within the same domain. Such changes include shifts across instance families, problem scales, and random seeds. We call this setting within-domain transfer under benchmark distribution shift: the optimization problem and solution representation remain unchanged, but benchmark conditions differ between discovery and testing. This concern is longstanding in heuristic optimization, where empirical success often depends on interactions among algorithm design, benchmark distributions, and stochastic variation (Talbi, 2009; Hoos and Stützle, 2004; Blum and Roli, 2003).

Automated algorithm design naturally supports studying this challenge because candidates are generated and selected by their observed performance under specified evaluation conditions. However, searching algorithmic choices alone does not ensure within-domain transfer, which depends critically on the evaluation conditions and ranking objective. Hyper-heuristics automate design through search spaces of heuristics or heuristic components, while algorithm configuration and selection evaluate candidate procedures across instance sets to support performance beyond individual discovery instances (Burke et al., 2013; Rice, 1976; Hutter et al., 2011; López-Ibáñez et al., 2016; Ansótegui et al., 2009).

A candidate heuristic may achieve strong average performance yet fail on rare instances, different stochastic seeds, or larger scales. This issue is especially relevant to LLM-generated metaheuristics because generated code may exploit a fixed evaluation protocol, such as a narrow instance generator, few seeds, or a restricted scale range. The outer loop may therefore select heuristics with high expected performance but unstable tails. In evolutionary search, this selection pressure rewards favorable means even when outcome distributions contain severe failures (Bäck, 1996; Eiben and Smith, 2003; Goldberg and Deb, 1991).

Because such failures occur only under adverse subsets of evaluation conditions, mean aggregation may obscure them. A useful selection criterion should therefore emphasize adverse outcomes without allowing a single extreme observation to dominate candidate ranking. CVaR satisfies this requirement by averaging performance over a configurable worst-performing fraction of evaluation outcomes. We therefore study a minimal change to discovery: replacing mean-based fitness with CVaR-based fitness while leaving the outer loop unchanged. Each candidate heuristic is evaluated over conditions spanning instance families, stochastic

∗^{*}Corresponding author.

Figure

Figure 1: Motivation for CVaR-RMD. Mean-based fitness in LLM-driven metaheuristic discovery rewards strong average performance while tolerating severe failures on rare instances or seeds. CVaR shifts selection pressure toward worst-quantile behavior, discouraging heuristics that depend on favorable evaluation conditions.

tic seeds, and scales. Its fitness uses conditional value-at-risk (CVaR), a coherent risk measure estimating expected loss within the worst fraction of outcomes at a chosen quantile level (Artzner et al., 1999; Rockafellar and Uryasev, 2000, 2002; Pflug, 2000). The resulting CVaR-based Robust Metaheuristic Discovery framework (CVaR-RMD) uses the LLM as a mutation generator to propose heuristic code, while estimated CVaR fitness determines candidate acceptance. As Figure 1 shows, mean-based selection tolerates severe tail failures that CVaR-RMD penalizes. Because selected programs become parents and prompt context, CVaR-based ranking affects both final selection and the subsequent trajectory of LLM-driven program discovery.

This formulation shifts selection toward worst-quantile behavior and discourages candidates dependent on favorable evaluation conditions. It follows robust and distributionally robust optimization, where objectives accounting for adverse outcomes and distributional variation replace or supplement expectation-based criteria (Ben-Tal et al., 2009; Beyer and Sendhoff, 2007; Bertsimas et al., 2011; Rahimian and Mehrotra, 2019; Duchi and Namkoong, 2021). It also aligns with optimization under noise and uncertainty, which uses repeated evaluation and robust criteria to reduce the selection of brittle solutions (Jin and Branke, 2005; Branke et al., 2008; Beyer and Sendhoff, 2007). Our empirical analysis tests whether risk-based selection improves heuristic stability and transfer across evaluation conditions without adding architectural components to the LLM-driven discovery pipeline.

The contributions of this work are as follows:

  1. We introduce CVaR-based selection into LLM-guided metaheuristic discovery, using empirical CVaR as the primary fitness criterion to emphasize adverse-quantile behavior across heterogeneous evaluation conditions.

  2. We propose CVaR-RMD, an execution-driven, risk-sensitive framework that integrates CVaR-based candidate ranking, accumulated execution outcomes, and tail-case feedback into an evolutionary program-discovery loop for generating robust executable heuristics.

  3. We conduct controlled, budget-matched experiments across three combinatorial optimization domains and show that CVaR-RMD improves upper-tail performance and reduces ex-ecution failures while maintaining competitive mean performance.