AAAI 2027

Calibrate What You SHIPPost‑Selection Risk Control for Verifier‑Guided Text‑to‑Image Generation

Xuanhua Yin*, Shunqi Mao, Wei Guo, Chuanzhi Xu, Weidong Cai

School of Computer Science, The University of Sydney  ·  *Corresponding author

Two prompts where search over more candidates releases a selector-preferred image that violates the prompt: a clock to the left of three glass pigs, and a stone mushroom behind an elephant.
More search can release a worse image. With N = 16 the selector prefers candidates that violate the prompt, so a threshold that is safe for single candidates is not safe for the released output.

Best-of-N, rejection and sequential search all select before they release. A threshold calibrated on individual images does not control the risk of the image the search ships. SHIP replays the complete deployed policy on held-out prompts and calibrates the release threshold on its actual outputs.

0.310 → 0.162
Released risk at N = 16 under a 0.30 budget, pooled-candidate threshold vs. SHIP
0 / 200
Splits whose held-out risk crossed the budget under the fixed-grid certificate
−34%
Generations of sequential SHIP vs. best-of-16 at matched calibration risk
0.380 → 0.280
Human-judged any-failure rate of released images

Abstract

Verifier-guided text-to-image systems increasingly use test-time search to select, refine, or stop among multiple candidates, yet release thresholds are often calibrated on individual images. This creates a candidate-to-policy calibration mismatch: search changes both which prompts receive an output and which candidate is released, so candidate-level risk control need not imply control of released-output risk. We formalize this estimand shift through prompt reweighting and within-prompt selection, and introduce SHIP, Selection-aware Held-out calibration of Inference Policies. SHIP runs or replays the complete deployed policy on held-out prompts, evaluates the image it actually releases using an independent target judge, and selects the most permissive threshold whose risk upper bound satisfies a prescribed budget. For replayable policies with a prespecified threshold grid, simultaneous confidence control provides finite-sample validity. Experiments across fixed, sequential, and adaptive T2I inference procedures show that policy-level calibration recovers lower-risk operating points while exposing policy-dependent tradeoffs among risk, coverage, and compute. On GenEval2 with FLUX at N = 16, a pooled-candidate threshold yields released risk 0.310, whereas SHIP reduces it to 0.162. Across 200 cached-stream splits, the fixed-grid certificate has no target crossing. Reliable inference-time scaling therefore requires calibrating the output distribution induced by the complete deployed policy.

Search changes what you calibrate

A release threshold τ gates images on an online selector risk s. Calibration on single candidates controls one random variable. Deployment exposes another.

Candidate calibration controls
Rimg(τ) = 𝔼[ ℓ(Y, p) | s(Y, p) ≤ τ ]

The loss of one candidate that passes the gate, averaged over all scored images.

The deployed policy releases
Rπ(τ) = 𝔼[ ℓ(πτ(p, ω), p) | Aτ(p, ω) = 1 ]

The loss of the image the complete search releases, among prompts that receive one.

Conditioning on the prompt shows why they differ (Proposition 1). Search changes the prompt weights from the candidate pass rate to the policy acceptance rate, and it changes the released loss from an average passing candidate to the selected one. At N = 16 the first effect dominates: a hard prompt rarely passes once, but it often passes at least once in sixteen tries.

Candidate risk

0.211

What the pooled threshold controls

Prompt weights

+0.108

95% CI [0.083, 0.133]

Within prompt

−0.009

95% CI [−0.035, 0.017]

Released risk

0.310

Above the 0.30 budget

Move the threshold

Sequential release on 400 held-out GenEval2 prompts with FLUX.1-dev and up to 16 candidates. Both marked thresholds were fitted on 400 separate calibration prompts. Drag on the chart or use the slider.

  • Candidate risk
  • Released risk, sequential policy
  • Budget α = 0.30
Coverage: share of prompts that receive an image
Data table
–
Candidate risk: mean loss of all passing candidates
–
Released risk: mean loss of released images
–
Coverage, with – generations per prompt

Watch the policy release

Each row is one held-out prompt with its 16 FLUX.1-dev candidates in generation order. The sequential policy releases the first candidate whose selector risk s is at most τ and never generates the rest.

Released Judge: satisfies the prompt Judge: violates the prompt Rejected by the gate Never generated

Selector risk s comes from Qwen2.5-VL. The held-out Qwen3-VL judge marks an image as satisfying the prompt when its Soft-TIFA loss is below 0.5. The judge never sees the gate.

Method

One exchangeable unit is one prompt together with its complete policy rollout. SHIP replays the rollout offline at every candidate threshold and deploys the same rule online.

SHIP overview. Offline, the selector and held-out target score a candidate stream, SHIP replays the sequential first-pass policy on held-out prompts across thresholds and keeps the largest safe threshold. Online, sequential stopping releases the first candidate whose selector risk is at most tau star, or abstains.
Overview of SHIP. a Offline, the selector and a held-out target judge score a candidate stream; SHIP replays the deployed sequential policy on held-out prompts across prespecified thresholds and keeps the largest threshold whose released-output risk bound meets the budget. b Online, sequential stopping releases the first candidate that clears the calibrated gate, or abstains when the budget is exhausted.
1

Atomic verification

Each prompt becomes yes/no questions about objects, counts, attributes, positions and actions. The selector risk is one minus the geometric mean of Qwen2.5-VL answer probabilities. An independent Qwen3-VL judge gives the loss used offline.

2

Policy replay

On calibration prompts, run the exact release rule at every threshold and record the loss of what it releases. The unit is the prompt, so dependent candidates of one prompt never count as separate observations.

3

Sequential stopping

Online, generate in order and release the first candidate whose selector risk is at most τ*. Easy prompts stop early. Hard prompts use the full budget and abstain.

τ* = max { τ ∈ 𝒯 : R̂π(τ) + [ log(1/δ′) / 2nτ ]1/2 ≤ α } R̂π(τ) is the mean loss of the images released on calibration prompts and nτ counts those prompts. With a grid 𝒯 fixed in advance and δ′ = δ / |𝒯|, the selected threshold satisfies P[Rπ(τ*) ≤ α] ≥ 1 − δ (Proposition 2).

The calibration unit decides the released risk

GenEval2 with FLUX.1-dev, 400 calibration and 400 test prompts, α = 0.30, δ = 0.10. Bands show 95% prompt-bootstrap intervals.

Sequential first-pass release

Released risk vs. candidate budget N

  • Pooled candidates
  • One per prompt
  • SHIP

Best-of-N with rejection

Released risk vs. candidate budget N

  • Pooled candidates
  • One per prompt
  • SHIP
Data table

Pooling misses the shift

The pooled threshold's released risk grows from 0.234 to 0.310 as N grows from 4 to 16. SHIP stays between 0.147 and 0.168.

The unit matters

One candidate per prompt removes pseudo-replication and gives 0.196 at N = 16. Only full policy replay targets the released output.

Stopping saves compute

At matched calibration risk, sequential SHIP uses 34% fewer generations and 28% fewer verifier calls than best-of-16.

Adaptive search policies

The same calibration wraps adaptive FLUX search: Flash-BoN tournaments, RAISE refinement and history-dependent prompt rewriting.

Search policyCal. UCBCoverageReleased risk [95% CI]Gen.VLM callsSec.
Pooled-candidate threshold, within-prompt dependence ignored
Sequential first-pass0.4200.5730.310 [0.267, 0.355]9.1075.366.7
Flash-BoN tournament0.4720.5980.361 [0.317, 0.405]4.52133.845.2
RAISE refinement0.3550.6880.244 [0.207, 0.281]18.60146.8142.3
History-dependent rewriting0.4390.5350.328 [0.282, 0.374]5.4046.049.4
Threshold calibrated on the complete deployed policy
Sequential SHIP0.2990.4380.162 [0.125, 0.203]10.6887.678.2
Flash-BoN + SHIP0.2980.4620.167 [0.130, 0.204]4.52133.845.2
RAISE + SHIP0.2970.6120.208 [0.172, 0.244]18.60146.8142.3
Rewriting + SHIP0.2990.4010.176 [0.134, 0.218]5.4046.049.4

Red marks a calibration bound or a held-out risk above the 0.30 budget. Pooled rows are descriptive, not certificates. Generations, VLM calls and seconds are per prompt.

No single policy wins every cost

SHIP operating points matched to best-of-16 on the calibration split; marker area shows VLM calls

Data table
Threshold rule, N = 16Mean cov.Mean riskCrossings
Pointwise Hoeffding0.4740.2262 / 200
Fixed-grid SHIP0.3910.1480 / 200

200 random 400/400 splits of the cached streams. The fixed grid has 201 thresholds with Bonferroni allocation and is the only rule with the guarantee of Proposition 2.

Human auditCoverageAtomic lossAny failure
Pooled candidates0.5730.1120.380
Sequential SHIP0.4380.0760.280

Human labels of the released images corroborate the machine-evaluated result. They are not a human-risk certificate.

Beyond one judge, one prompt set and one model

The candidate-to-policy gap comes from selection, not from a particular verifier or benchmark.

Prompt set, τ = 0.322CoverageReleased risk
GenEval2 test0.2070.128
GenAI-Bench0.6330.294
T2I-CompBench0.6190.144
DSG-1k0.4430.173
DPG-Bench0.5760.224

A single-candidate FLUX threshold fitted once on GenEval2 and applied unchanged. Under a larger shift, 100 deployment-side calibration prompts restore control: on GenAI-Bench with SD3 Medium the released risk falls from 0.303 to 0.139.

A different judge family

Replacing the Qwen3-VL target with InternVL3 keeps the selector correlation high (Spearman 0.897 vs. 0.922) and preserves the ordering of accept/reject, best-of-4 and sequential SHIP.

Three backbones

Sequential SHIP keeps held-out risk below the budget on FLUX.1-dev, Stable Diffusion 3 Medium and SDXL. Attainable coverage follows backbone quality.

A lower bound on the gap

When some prompts always fail, best-of-N released risk tends to the hard-prompt share while candidate risk stays at α. The gap can approach 1 − α (Proposition 3).

Released risk at a candidate-calibrated threshold

Controlled study; candidate-level risk is exactly 0.30 at every N

  • Best-of-N
  • Sequential
  • Best-of-N, policy-calibrated

Released risk approaches the hard-prompt rate

Deterministic losses, N = 256, candidate-level risk held at 0.30

  • Best-of-N released risk
  • Hard-prompt rate ρ

Code

Generation, scoring, calibration and every experiment are in the GitHub repository, together with the selector and judge scores of all generated candidates. Every calibration result reruns on a CPU:

git clone https://github.com/xuanhuayin/SHIP.git
cd SHIP
pip install -r requirements.txt
bash scripts/reproduce_paper.sh   # about 4 min
from ship import (calibrate_policy, load_candidates,
                  load_split, replay, split_banks)

table = load_candidates("data/scores/geneval2_flux_dev.csv.gz")
split = load_split("data/geneval2_prompts.jsonl")
cal, test = split_banks(table, split, n=16)

tau = calibrate_policy(cal, "sequential", 0.30, 0.10).tau
print(replay(test, "sequential", tau).summary())
# coverage 0.438, released risk 0.162

Citation

@inproceedings{yin2027ship,
  title     = {Calibrate What You {SHIP}: Post-Selection Risk Control for Verifier-Guided Text-to-Image Generation},
  author    = {Yin, Xuanhua and Mao, Shunqi and Guo, Wei and Xu, Chuanzhi and Cai, Weidong},
  booktitle = {Proceedings of the AAAI Conference on Artificial Intelligence},
  year      = {2027}
}