Papers
Topics
Authors
Recent
Search
2000 character limit reached

PRESTO: Preimage-Informed Instruction Optimization

Updated 3 July 2026
  • 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 fbf_b denote a deterministic black-box LLM (e.g., GPT-4), and h(,)h(\cdot, \cdot) a task-specific metric such as accuracy or F₁. The goal is to find a textual instruction vΩv \in \Omega that maximizes expected score on a distribution of input-output pairs (x,y)Dval(x, y) \sim D_{val}:

v=argmaxvΩE(x,y)Dval[h(fb(v,x),y)].v^* = \arg\max_{v \in \Omega} \mathbb{E}_{(x, y) \sim D_{val}}[h(f_b(v, x), y)].

Direct optimization over Ω\Omega is intractable due to its combinatorial size. Following recent practice, optimization proceeds over a continuous soft prompt zRNz×dz \in \mathbb{R}^{N_z \times d}, mapped to instructions by a white-box LLM fwf_w:

z=argmaxzZE(x,y)Dval[h(fb(fw(z),x),y)].z^* = \arg\max_{z \in \mathcal{Z}} \mathbb{E}_{(x, y) \sim D_{val}} [h(f_b(f_w(z), x), y)].

A candidate pool Z={zj}j=1NZ = \{z_j\}_{j=1}^N is constructed (via a scrambled Sobol sequence and random projection). Each h(,)h(\cdot, \cdot)0 is mapped through h(,)h(\cdot, \cdot)1 to a set of instructions h(,)h(\cdot, \cdot)2. The mapping h(,)h(\cdot, \cdot)3 is many-to-one: multiple h(,)h(\cdot, \cdot)4 may produce the same h(,)h(\cdot, \cdot)5. The preimage of h(,)h(\cdot, \cdot)6 is defined as:

h(,)h(\cdot, \cdot)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 h(,)h(\cdot, \cdot)8 is an arm with reward

h(,)h(\cdot, \cdot)9

Under a fixed budget vΩv \in \Omega0, only vΩv \in \Omega1 queries to vΩv \in \Omega2 are permitted. The objective is to pick vΩv \in \Omega3 to maximize the best-observed vΩv \in \Omega4. Each vΩv \in \Omega5 is evaluated by querying vΩv \in \Omega6 on vΩv \in \Omega7; due to preimage redundancy, multiple vΩv \in \Omega8's may represent the same vΩv \in \Omega9, but only distinct instructions yield new supervision.

3. Core Components of PRESTO

a. Score Sharing

Once (x,y)Dval(x, y) \sim D_{val}0 is evaluated for any (x,y)Dval(x, y) \sim D_{val}1, its scalar score (x,y)Dval(x, y) \sim D_{val}2 is distributed to all (x,y)Dval(x, y) \sim D_{val}3:

(x,y)Dval(x, y) \sim D_{val}4

This expands the set of labeled pairs from (x,y)Dval(x, y) \sim D_{val}5 true queries to (x,y)Dval(x, y) \sim D_{val}6 soft prompts.

b. Preimage-Based Initialization

To initialize the model, (x,y)Dval(x, y) \sim D_{val}7 preimage groups are selected to cover the embedding space. For each instruction (x,y)Dval(x, y) \sim D_{val}8, (x,y)Dval(x, y) \sim D_{val}9 is constructed, where v=argmaxvΩE(x,y)Dval[h(fb(v,x),y)].v^* = \arg\max_{v \in \Omega} \mathbb{E}_{(x, y) \sim D_{val}}[h(f_b(v, x), y)].0 is the final token embedding from v=argmaxvΩE(x,y)Dval[h(fb(v,x),y)].v^* = \arg\max_{v \in \Omega} \mathbb{E}_{(x, y) \sim D_{val}}[h(f_b(v, x), y)].1. Groups are greedily chosen using the coverage-score:

v=argmaxvΩE(x,y)Dval[h(fb(v,x),y)].v^* = \arg\max_{v \in \Omega} \mathbb{E}_{(x, y) \sim D_{val}}[h(f_b(v, x), y)].2

where v=argmaxvΩE(x,y)Dval[h(fb(v,x),y)].v^* = \arg\max_{v \in \Omega} \mathbb{E}_{(x, y) \sim D_{val}}[h(f_b(v, x), y)].3 promotes large preimages, and v=argmaxvΩE(x,y)Dval[h(fb(v,x),y)].v^* = \arg\max_{v \in \Omega} \mathbb{E}_{(x, y) \sim D_{val}}[h(f_b(v, x), y)].4 leverages squared maximum-mean-discrepancy (MMDv=argmaxvΩE(x,y)Dval[h(fb(v,x),y)].v^* = \arg\max_{v \in \Omega} \mathbb{E}_{(x, y) \sim D_{val}}[h(f_b(v, x), y)].5) for embedding diversity:

v=argmaxvΩE(x,y)Dval[h(fb(v,x),y)].v^* = \arg\max_{v \in \Omega} \mathbb{E}_{(x, y) \sim D_{val}}[h(f_b(v, x), y)].6

c. Score Consistency Regularization

For unseen preimages v=argmaxvΩE(x,y)Dval[h(fb(v,x),y)].v^* = \arg\max_{v \in \Omega} \mathbb{E}_{(x, y) \sim D_{val}}[h(f_b(v, x), y)].7, the regression model v=argmaxvΩE(x,y)Dval[h(fb(v,x),y)].v^* = \arg\max_{v \in \Omega} \mathbb{E}_{(x, y) \sim D_{val}}[h(f_b(v, x), y)].8 is regularized to output identical predictions for all v=argmaxvΩE(x,y)Dval[h(fb(v,x),y)].v^* = \arg\max_{v \in \Omega} \mathbb{E}_{(x, y) \sim D_{val}}[h(f_b(v, x), y)].9:

Ω\Omega0

The full predictor loss is:

Ω\Omega1

with Ω\Omega2 linearly annealed from 0 to Ω\Omega3 over a warm-up period.

4. PRESTO Optimization Algorithm

PRESTO operates in three main stages:

  • Preprocessing: For each candidate Ω\Omega4, compute its embedding Ω\Omega5 and instruction Ω\Omega6, forming all preimage groups.
  • Initialization: Greedily select Ω\Omega7 preimage groups maximizing Ω\Omega8. For each, query Ω\Omega9 on a representative zRNz×dz \in \mathbb{R}^{N_z \times d}0, then share the obtained score across the group, forming labeled set zRNz×dz \in \mathbb{R}^{N_z \times d}1.
  • NeuralUCB Optimization: For zRNz×dz \in \mathbb{R}^{N_z \times d}2 to zRNz×dz \in \mathbb{R}^{N_z \times d}3:

    1. Train score predictor zRNz×dz \in \mathbb{R}^{N_z \times d}4 on zRNz×dz \in \mathbb{R}^{N_z \times d}5 with joint loss.
    2. For each unlabeled zRNz×dz \in \mathbb{R}^{N_z \times d}6, estimate zRNz×dz \in \mathbb{R}^{N_z \times d}7 and predictive uncertainty zRNz×dz \in \mathbb{R}^{N_z \times d}8.
    3. Select zRNz×dz \in \mathbb{R}^{N_z \times d}9.
    4. Query fwf_w0 on fwf_w1, share the score with its preimage, and update fwf_w2.
  • Output: Return the best observed instruction fwf_w3.

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 fwf_w4, conventional methods yield fwf_w5 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 fwf_w62,300, a fwf_w714× increase over the budget:

fwf_w8

This suggests that preimage-based score sharing is critical for unlocking efficient regression and improved uncertainty quantification in UCB-based exploration, without additional fwf_w9 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 z=argmaxzZE(x,y)Dval[h(fb(fw(z),x),y)].z^* = \arg\max_{z \in \mathcal{Z}} \mathbb{E}_{(x, y) \sim D_{val}} [h(f_b(f_w(z), x), y)].0 soft prompts, constructed by Sobol sampling and random projections, with grid search over intrinsic dimensions and soft-token counts. The query budget is z=argmaxzZE(x,y)Dval[h(fb(fw(z),x),y)].z^* = \arg\max_{z \in \mathcal{Z}} \mathbb{E}_{(x, y) \sim D_{val}} [h(f_b(f_w(z), x), y)].1 and z=argmaxzZE(x,y)Dval[h(fb(fw(z),x),y)].z^* = \arg\max_{z \in \mathcal{Z}} \mathbb{E}_{(x, y) \sim D_{val}} [h(f_b(f_w(z), x), y)].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 z=argmaxzZE(x,y)Dval[h(fb(fw(z),x),y)].z^* = \arg\max_{z \in \mathcal{Z}} \mathbb{E}_{(x, y) \sim D_{val}} [h(f_b(f_w(z), x), y)].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 z=argmaxzZE(x,y)Dval[h(fb(fw(z),x),y)].z^* = \arg\max_{z \in \mathcal{Z}} \mathbb{E}_{(x, y) \sim D_{val}} [h(f_b(f_w(z), x), y)].40.27 (vanilla) to z=argmaxzZE(x,y)Dval[h(fb(fw(z),x),y)].z^* = \arg\max_{z \in \mathcal{Z}} \mathbb{E}_{(x, y) \sim D_{val}} [h(f_b(f_w(z), x), y)].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).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to PREimage-informed inSTruction Optimization (PRESTO).