PRESTO: Preimage-Informed Instruction Optimization
- PRESTO is a framework that optimizes instructions for black-box LLMs by leveraging preimage structures to amplify data efficiency and maximize task-specific metrics.
- It formulates instruction optimization as a bandit problem, using score sharing and diversity-maximized preimage initialization to improve exploration under a fixed query budget.
- Empirical results demonstrate that PRESTO can achieve a 14× increase in effective labeled data and deliver state-of-the-art performance across multiple instruction and reasoning tasks.
PREimage-informed inSTruction Optimization (PRESTO) is a framework for efficient instruction optimization in prompting black-box LLMs. It leverages the many-to-one mapping from soft prompts to discrete instructions observed in white-box LLMs, introducing preimage-based strategies to substantially amplify data efficiency under a fixed query budget while optimizing task-specific metrics. PRESTO’s core innovation is to treat the preimage structure—sets of distinct soft prompts that decode to the same natural language instruction—not as a hindrance, but as a useful prior enabling score sharing, diversity-maximized initialization, and unsupervised score consistency regularization (Chu et al., 29 Oct 2025).
1. Formal Problem Definition and Preimage Structure
Let denote a deterministic black-box LLM (e.g., GPT-4), and a task-specific metric such as accuracy or F₁. The goal is to find a textual instruction that maximizes expected score on a distribution of input-output pairs :
Direct optimization over is intractable due to its combinatorial size. Following recent practice, optimization proceeds over a continuous soft prompt , mapped to instructions by a white-box LLM :
A candidate pool is constructed (via a scrambled Sobol sequence and random projection). Each 0 is mapped through 1 to a set of instructions 2. The mapping 3 is many-to-one: multiple 4 may produce the same 5. The preimage of 6 is defined as:
7
This “preimage group” structure is central to PRESTO’s design.
2. Black-Box Instruction Optimization as Bandit Problem
Instruction optimization is formulated as a black-box bandit problem, where each 8 is an arm with reward
9
Under a fixed budget 0, only 1 queries to 2 are permitted. The objective is to pick 3 to maximize the best-observed 4. Each 5 is evaluated by querying 6 on 7; due to preimage redundancy, multiple 8's may represent the same 9, but only distinct instructions yield new supervision.
3. Core Components of PRESTO
a. Score Sharing
Once 0 is evaluated for any 1, its scalar score 2 is distributed to all 3:
4
This expands the set of labeled pairs from 5 true queries to 6 soft prompts.
b. Preimage-Based Initialization
To initialize the model, 7 preimage groups are selected to cover the embedding space. For each instruction 8, 9 is constructed, where 0 is the final token embedding from 1. Groups are greedily chosen using the coverage-score:
2
where 3 promotes large preimages, and 4 leverages squared maximum-mean-discrepancy (MMD5) for embedding diversity:
6
c. Score Consistency Regularization
For unseen preimages 7, the regression model 8 is regularized to output identical predictions for all 9:
0
The full predictor loss is:
1
with 2 linearly annealed from 0 to 3 over a warm-up period.
4. PRESTO Optimization Algorithm
PRESTO operates in three main stages:
- Preprocessing: For each candidate 4, compute its embedding 5 and instruction 6, forming all preimage groups.
- Initialization: Greedily select 7 preimage groups maximizing 8. For each, query 9 on a representative 0, then share the obtained score across the group, forming labeled set 1.
- NeuralUCB Optimization: For 2 to 3:
- Train score predictor 4 on 5 with joint loss.
- For each unlabeled 6, estimate 7 and predictive uncertainty 8.
- Select 9.
- Query 0 on 1, share the score with its preimage, and update 2.
Output: Return the best observed instruction 3.
This design allows PRESTO to aggregate supervision over preimages, maximizing the utility of each black-box query.
5. Analysis of Query Efficiency and Data Amplification
With query budget 4, conventional methods yield 5 labeled (soft prompt, score) pairs. PRESTO’s score sharing multiplies the number of labeled prompts by the average preimage size. Empirically, across 30 tasks, PRESTO inflates the labeled set to 62,300, a 714× increase over the budget:
8
This suggests that preimage-based score sharing is critical for unlocking efficient regression and improved uncertainty quantification in UCB-based exploration, without additional 9 queries.
6. Experimental Setup and Baselines
Experiments span 30 instruction-induction tasks (Honovich et al., ACL ’23) and 3 math reasoning benchmarks (GSM8K, AQUA-RAT, SVAMP). Metrics include exact match, F₁, and chain-of-thought (CoT) accuracy. The black-box LLM is GPT-4.1 (37B); the white-box LLM is LLaMA 3.1-8B-Instruct. Comparison baselines are APE, InstructZero, INSTINCT, EvoPrompt, ZOPO, and OPRO. Candidate pool size is 0 soft prompts, constructed by Sobol sampling and random projections, with grid search over intrinsic dimensions and soft-token counts. The query budget is 1 and 2; all experiments use a single NVIDIA A6000 GPU.
7. Empirical Results and Ablation Analysis
PRESTO achieves the following empirical performance:
- Wins 18/30 tasks (compared to ZOPO’s 8, next best) with mean rank 31.97.
- On a 20-task subset, wins 12 tasks (ZOPO: 4), with mean rank 1.90 (vs. 3.05 for ZOPO).
- On CoT benchmarks, PRESTO meets or surpasses hand-crafted and prior soft-prompting approaches on GSM8K, AQUA-RAT, and SVAMP.
- In ablations (20 tasks):
| Configuration | Avg. Accuracy | Avg. Rank |
|---|---|---|
| Vanilla (no preimage modules) | 51.91 | 4.55 |
| +Score Sharing Only | 59.57 | 3.10 |
| +Score Sharing + Score Consistency | 61.77 | 2.65 |
| +Score Sharing + Preimage Init | 61.82 | 2.30 |
| All PRESTO components | 62.91 | 2.20 |
- Score predictor RMSE on a toy task decreases from 40.27 (vanilla) to 50.15 (PRESTO).
- t-SNE visualization shows preimage-based initialization achieves denser and more uniform coverage of the embedding space compared to random or sharing-only initialization.
These results substantiate the complementary gains of score sharing, diversity-maximized preimage initialization, and consistency regularization.
8. Significance and Broader Implications
PRESTO demonstrates that the many-to-one mapping from soft prompts to instructions—previously viewed as a source of inefficiency—can be systematically exploited to amplify effective data, increase sample efficiency, and improve generalization in instruction optimization for black-box LLMs. The preimage structure enables up to 14× effective labeling, state-of-the-art task performance, and scalable optimization via score sharing, informed candidate selection, and unsupervised regularization. These findings provide a foundation for further advances in black-box LLM instruction engineering and suggest that similar preimage-informed priors may benefit other combinatorial black-box optimization domains (Chu et al., 29 Oct 2025).