CRAFT exposes scalarization collapse and searches the full Pareto front of accuracy vs token cost


Every prompt engineer has faced the same tension. You tune a prompt for accuracy, and it balloons to 2,000 tokens. You compress it, and accuracy tanks. Somewhere in between lives a prompt that hits 94% accuracy in 80 tokens, and another that hits 97% in 400 tokens. Both are correct answers. The question is which one you need, and when.

Existing prompt optimizers pretend this question does not exist. They collapse accuracy and cost into a single weighted sum, pick a trade-off weight before the search begins, and return one prompt. That prompt might be great. It also might be terrible for your actual budget, because the optimizer never explored the other options.

A new paper from MBZUAI and Microsoft, published June 3, 2026, calls this failure mode scalarization collapse and proposes a fix. The system is called CRAFT (Cost-aware Refinement And Front-aware Tuning). Instead of returning one prompt, it returns an entire Pareto front. You pick the trade-off after the search is done, not before.

The paper is arXiv:2606.04661. The code is on GitHub.

The Problem: Two Objectives, One Reward

Prompt optimization has always been a multi-objective problem pretending to be single-objective. The two objectives are task accuracy and prompt token cost. They conflict. More detailed prompts tend to score higher but cost more per inference call. Shorter prompts save tokens but drop accuracy.

The standard approach is to combine them into a scalar reward: score = accuracy - λ * cost, where λ is a weight you pick ahead of time. This is the approach taken by CAPO (Cost-Aware Prompt Optimization) and most multi-objective prompt methods. You set λ = 0.5, run the optimizer, and get back one prompt.

The problem is that λ determines the search before it begins. Set λ high and you get short, low-accuracy prompts. Set λ low and you get long, high-accuracy ones. Set it in the middle and you get... something in the middle. But not necessarily the best middle. And definitely not the full range of options.

CRAFT's authors demonstrate this with a clear example on the BeaverTails benchmark. Three baselines — SCULPT (accuracy-only), LLMLingua (cost-only), and WPRO0.5 (weighted sum with λ = 0.5) — each cluster in a narrow region of the accuracy-cost space. None of them explores the full front. The weighted-sum baseline is particularly deceptive: it looks like it balances both objectives, but it actually collapses into a small cluster around one particular trade-off point.

This is scalarization collapse. The weighted sum fixes the trade-off before search, so the optimizer only finds prompts near that fixed point. Regions of the front that represent better options for different budgets go undiscovered.

Why Scalarization Collapse Happens

The root cause is a mathematical property of multi-objective optimization on non-convex, discrete spaces.

Pareto fronts in discrete spaces are non-convex. This means weighted sums cannot reach all parts of the front. Das and Dennis proved this in 1997: for any fixed weight, there exist Pareto-optimal points that no weighted sum will find. The prompt space compounds this because small text edits can cause large accuracy jumps. The relationship between prompt text, accuracy, and cost is non-convex and non-smooth.

In practice, this means:

  • Weight λ = 0.1: You get long, high-accuracy prompts. The optimizer never explores cheap short prompts that might be good enough.
  • Weight λ = 0.9: You get short, cheap prompts. The optimizer never discovers that adding 50 tokens could boost accuracy by 10 points.
  • Weight λ = 0.5: You get a prompt in the middle. But it might not be on the actual Pareto front at all. It could be dominated by a prompt the optimizer never found.

The fundamental issue is that the trade-off should be a post-search decision, not a pre-search parameter. You should see all the options, then choose. Scalarization forces you to choose before you search.

How CRAFT Works

CRAFT replaces the single-objective search with a Pareto-front search. The algorithm has three components per round: complementary generators, a Pareto-gap acquisition function, and NSGA-II retention.

Complementary Generators: Refiner and Condenser

Each round, two modules propose edits to the current population of prompts:

  • Refiner: An accuracy-oriented prompt optimizer (default: SCULPT) that elaborates, reorders, and clarifies prompt sections to boost task accuracy. It tends to make prompts longer and more detailed.
  • Condenser: A cost-oriented module called DISTILL that shortens prompts by editing their parsed tree structure. DISTILL reuses SCULPT's critic-actor scaffold but targets reduction. The critic flags redundant or verbose substructures, and the actor deletes, merges, or simplifies nodes in the prompt tree.

The key insight is that these generators have opposing biases. The refiner pushes toward higher accuracy at higher cost. The condenser pushes toward lower cost at lower accuracy. Together, they propose candidates across the full accuracy-cost spectrum.

DISTILL is structure-aware by design. Unlike token-level compressors such as LLMLingua-2 that drop low-information surface tokens (and can accidentally discard critical instructions), DISTILL edits the semantic tree. It knows the difference between a redundant constraint and an essential one because it operates at the level of prompt sections and rules, not individual tokens.

Pareto-Gap Acquisition: Where to Spend Validation Budgets

Generating candidate prompts is cheap. Validating them on the target LLM is expensive. Each validation requires running the prompt over a set of examples and computing accuracy. CRAFT cannot validate every candidate, so it must decide which ones to evaluate.

This is the acquisition problem. CRAFT solves it with Pareto-gap UCB acquisition.

For each candidate, CRAFT maintains a running mean and standard deviation of per-example accuracy scores. It computes an Upper Confidence Bound (UCB) score: UCB = mean + β * std, where β decreases linearly from near 1.0 in the first round to 0.5 in the final round. This starts optimistic (exploration) and shifts toward exploitation.

Candidates with few observations have high uncertainty, so their UCB scores are inflated. New candidates start with mean = 0 and std = 1, giving them a default exploratory score of β. As observations accumulate, the UCB converges toward the true score.

But UCB alone does not guarantee front coverage. CRAFT adds a second signal: the Pareto gap.

After computing UCB scores and min-max normalizing them with costs, CRAFT identifies the optimistic candidate front — the Pareto front formed by UCB scores rather than true scores. For each candidate not on this front, CRAFT computes the gap: the Manhattan distance to the nearest front point in the dominated quadrant. A candidate already on the front has gap = 0. A candidate just below the front has a small gap. A candidate far from the front has a large gap.

CRAFT validates the B candidates with the smallest gaps first. This ensures validation budget goes to candidates most likely to improve or extend the front, rather than to candidates that are clearly dominated.

Among new candidates that all share the same default UCB score, the gap reduces to a preference for cheaper prompts. This is a sensible prior: given no accuracy information yet, prefer the cheaper option.

NSGA-II Retention: Keeping the Front Spread Out

After validation, CRAFT must decide which k prompts to carry into the next round. A scalar reward would collapse the population. Instead, CRAFT uses NSGA-II (Non-dominated Sorting Genetic Algorithm II), the standard multi-objective evolutionary algorithm.

NSGA-II sorts candidates into layers by dominance. The first layer is the non-dominated set. The second layer is non-dominated after removing the first. And so on. Within each layer, it computes crowding distance to favor candidates that are spread out across the front rather than clustered together.

The selector keeps the top k candidates from these sorted layers, ensuring the population spans diverse accuracy-cost trade-offs. Some prompts are short and cheap. Others are long and accurate. All are on or near the Pareto front.

Why NSGA-II for Prompt Optimization

NSGA-II is not new. Deb et al. introduced it in 2002, and it has been a workhorse in multi-objective optimization for two decades. What CRAFT does that is new is applying it to the specific constraints of prompt optimization.

The key constraints are:

  1. Discrete search space: Prompts are text, not continuous parameters. You cannot gradient-descend through prompt space. NSGA-II works on discrete populations.
  2. Expensive evaluation: Each candidate needs target-LLM validation calls. You cannot evaluate millions of candidates. NSGA-II's population-based approach works well with small populations.
  3. Non-convex front: The accuracy-cost front for discrete prompts has gaps and discontinuities. NSGA-II's crowding distance explicitly maintains diversity across these gaps.
  4. Budget constraints: There is a hard limit on LLM calls per round. CRAFT's Pareto-gap acquisition respects this budget and prioritizes candidates that would most improve the front.

CRAFT does not use NSGA-II for crossover or mutation (those are handled by the refiner and condenser). It uses NSGA-II purely for selection: deciding which candidates survive into the next round.

Experimental Results

The paper evaluates CRAFT on six benchmarks covering classification and reasoning tasks:

  • BeaverTails: Safety classification
  • ToxiGen: Toxicity detection
  • TweetQA: Question answering
  • MMLU: Massive multitask language understanding
  • GSM8K: Grade-school math
  • BigBench-Hard: Challenging reasoning tasks

The target LLM is Llama-3.1-8B-Instruct. The optimizer LLM (used by SCULPT/DISTILL to propose edits) is GPT-4o.

CRAFT vs Single-Objective Baselines

Three baselines represent the single-objective extremes:

  • SCULPT: Accuracy-only optimization. Produces long, high-accuracy prompts. Clusters at the high-cost end of the front.
  • LLMLingua-2: Cost-only compression. Produces short prompts but sacrifices accuracy. Clusters at the low-accuracy end.
  • WPRO (weighted-sum): Fixed λ scalarization. Clusters in a narrow band determined by λ. Different values of λ produce different narrow bands, but no single value explores the full front.

CRAFT's retained population covers both the high-accuracy and low-cost regions. On BeaverTails, CRAFT finds prompts ranging from ~50 tokens at 82% accuracy to ~500 tokens at 95% accuracy. SCULPT finds only the high-cost end. LLMLingua-2 finds only the low-accuracy end. WPRO0.5 finds a narrow band in the middle.

CRAFT vs Other Multi-Objective Methods

The paper compares against CAPO (the closest prior work on cost-aware prompt optimization). CAPO uses a fixed-weight scalarization, which exhibits scalarization collapse. CRAFT's front consistently dominates CAPO's in hypervolume, meaning it finds prompts that CAPO misses across the entire accuracy-cost range.

The paper also shows that CRAFT's refiner is swappable. Replacing SCULPT with OPRO or EvoPrompt as the accuracy-oriented generator still produces competitive fronts. The Pareto-front structure holds regardless of which generator fills the refiner role.

Transferability

CRAFT transfers across optimizer LLMs. The paper shows experiments where the refiner and condenser use different LLMs (GPT-4o, GPT-4o-mini, Llama-3.1-70B) while the target LLM stays fixed. The Pareto-front structure is consistent across these combinations, though absolute performance varies. This matters because optimizer LLM calls are cheaper than target LLM calls, and you want the flexibility to use a cheaper optimizer.

The Refiner-Condenser Architecture

The complementary generator design is one of CRAFT's most practical contributions.

Token-level compressors like LLMLingua-2 drop low-information tokens. They work at the surface level. When you need to cut a 500-token prompt to 100 tokens, they prune aggressively and can remove task-critical instructions. They are fast but blunt.

DISTILL works differently. It parses the prompt into a hierarchical tree of sections, rules, and examples. The critic identifies which substructures are redundant, verbose, or can be merged. The actor then applies targeted edits: deleting nodes, merging similar constraints, rewriting verbose sections. This is slower but more precise. DISTILL's tree-level edits preserve semantic content while reducing token count.

The refiner (SCULPT) works the same tree but in the opposite direction. It elaborates vague instructions, adds clarifications, reorders sections for better model comprehension, and introduces new constraints that improve accuracy. It tends to increase prompt length.

Together, they push the population in opposite directions along the front. The refiner creates candidates that might be more accurate but cost more. The condenser creates candidates that might be cheaper but sacrifice some accuracy. NSGA-II selection then picks the best spread across both directions.

Pareto-Gap Acquisition in Practice

The Pareto-gap acquisition function is where CRAFT makes its most important decision each round: which candidates to validate?

Consider a round with 20 candidates and a validation budget that covers 10. The naive approach would validate all 20 and keep the best 10. But validation is expensive. Each candidate needs to be run over validation examples on the target LLM.

Instead, CRAFT computes UCB scores for all 20 candidates and identifies the optimistic candidate front. Candidates on or near this front get validated first. Candidates far below the front are deprioritized.

The gap formula captures a specific geometric intuition. For a candidate below and to the right of the front (lower accuracy, higher cost than some front point), the gap measures how far you would need to improve both accuracy and cost to reach that front point. Small gaps mean the candidate is close to the front. Large gaps mean it is far away.

This is efficient because it allocates the scarce validation budget to candidates that matter. A candidate that is clearly dominated by existing validated prompts does not need further evaluation. A candidate near the front might push the front outward, so it deserves the evaluation budget.

The β parameter controls the exploration-exploitation trade-off. Early rounds use high β, giving untested candidates optimistic scores. This encourages exploration. Late rounds use lower β, relying more on accumulated observations. This encourages exploitation.

Practical Implications

For prompt engineers

CRAFT changes the workflow. Instead of running a prompt optimizer and getting one prompt back, you run CRAFT and get a front of prompts. You then choose based on your deployment constraints:

  • Low-latency API: Pick the short prompt that still meets your accuracy floor.
  • High-stakes classification: Pick the long prompt with the highest accuracy.
  • A/B testing: Deploy multiple prompts from the front and measure real-world performance.

This is a fundamentally different mental model. You are not optimizing for one point. You are mapping the terrain.

For system designers

Token cost is real money. At inference scale, every token in a system prompt is multiplied by millions of calls. A prompt that is 200 tokens longer and 1% more accurate might cost more than it earns. Or it might be worth it for a safety-critical application.

CRAFT lets you make that decision with data. You see the actual front. You see what 200 extra tokens buys you in accuracy. You see whether a 50-token prompt is accurate enough for your use case.

For the field

The scalarization collapse problem is not unique to prompt optimization. Any multi-objective optimization that uses a weighted sum on a discrete, non-convex space will suffer from it. The CRAFT framework — complementary generators, Pareto-gap acquisition, NSGA-II retention — is a general pattern that could apply to other domains where evaluation is expensive and the objective space is non-convex.

The paper also makes a methodological point: when you evaluate a prompt optimizer, look at the full Pareto front, not a single point. A method that finds a 97%-accuracy prompt might look better than one that finds a 93%-accuracy prompt, but if the 93%-accuracy prompt costs 10x fewer tokens, it might be the better choice for most deployments.

Limitations and Open Questions

CRAFT has real costs:

  • Computational overhead: Running both a refiner and condenser each round doubles generator calls. Pareto-gap acquisition adds computation over a simple greedy selection. NSGA-II sorting adds more.
  • Target LLM calls are the bottleneck: The paper validates on Llama-3.1-8B-Instruct. Larger models would make validation more expensive, though CRAFT's budgeted approach helps.
  • Binary objectives only: CRAFT handles two objectives. Extending to three or more (e.g., accuracy, cost, fairness) would require moving beyond NSGA-II to algorithms that handle many-objective optimization, where crowding distance becomes less effective.
  • Tree-structured prompts: DISTILL assumes prompts can be parsed into a tree. Free-form prompts without clear section structure might not benefit as much from structure-aware compression.

The Bigger Picture

CRAFT sits at the intersection of two trends in AI engineering.

The first is the growing recognition that inference cost matters. As LLMs are deployed at scale, the cost of running prompts millions of times is a first-class engineering concern. Prompt optimization that ignores cost is optimizing for a world that does not exist.

The second is the shift from single-objective to multi-objective thinking. In the early days of prompt engineering, you wanted the highest accuracy and that was it. Now, with production deployments at scale, the question is: what accuracy can I afford? And: what does each percentage point of accuracy cost me?

CRAFT's answer is clear: do not decide the trade-off before you search. Map the full front. Then choose.

The scalarization collapse it identifies is real, well-documented in optimization theory, and practically significant. Weighted sums are convenient. They reduce a multi-objective problem to a single-objective one that existing optimizers can handle. But convenience comes at a cost: you miss parts of the front that might be exactly what you need.

CRAFT shows that the cost of convenience is high. On six benchmarks, weighted-sum and single-objective baselines each concentrate in narrow regions. The Pareto front contains viable options that none of them find. The accuracy-cost trade-off is a post-search choice, not a pre-search weight.

That is the core insight. Everything else — the complementary generators, the Pareto-gap acquisition, the NSGA-II retention — is engineering in service of making that insight practical.


Paper: CRAFT: Cost-aware Refinement And Front-aware Tuning of Prompts. Shanu Kumar, Shubhanshu Khandelwal, Akhila Yesantarao Venkata, Parag Agrawal, Yova Kementchedjhieva, Manish Gupta. MBZUAI and Microsoft. arXiv:2606.04661, June 3, 2026.

Code: github.com/Sshanu/CRAFT