Compile as Hypothesis: A Headroom Typology for Prompt Optimization on Real Reasoning Models

Zhengshuai Yang, Changyun LiarXiv 2026 · arXiv

TL;DR

Prompt optimization is often treated as a guaranteed win, but on frontier reasoning models, it frequently hits a "headroom" ceiling where it yields zero gain or even degrades performance. This paper introduces a headroom typology to identify when optimization is futile and proposes the Compile-as-Hypothesis framework to ensure automated prompt engineering doesn't accidentally deploy broken prompts.

What Problem Does This Paper Address?

Automated prompt compilers (like DSPy) operate under the implicit assumption that more optimization always leads to better results. However, the authors argue that for state-of-the-art "reasoning" models (like GPT-6 or Qwen-3.8-flash), this isn't always true.

Existing pipelines often deploy the "best-scoring" candidate from a search process without comparing it to the original, unoptimized prompt. This creates two major risks:

  1. Silent Degradation: Search processes can be fragile, leading to "seed-collapse" where a prompt's performance tanks due to over-fitting or unstable mutations.
  2. Wasted Compute: If a model fails a task because it lacks the underlying knowledge (a "knowledge deficit") or runs out of output tokens ("physical truncation"), no amount of prompt engineering will fix it.

Methods

The authors propose a more rigorous approach called Compile-as-Hypothesis. Instead of assuming the compiler is right, every output is treated as a testable hypothesis.

  • Two-Root Compilation Protocol: The system executes two paths in parallel: a "profile-rule" root (APC-FULL) that applies optimization rules, and a "base" root (APC-SAFE) which is the uncompiled prompt.
  • Structural Genome: Rather than searching through messy free-text, they use a PROMPTGENOME—a discrete set of components (role, constraints, few-shot blocks, etc.). This provides architectural stability.
  • AutoAPC-Select: A deployment gate that compares the two roots on a validation set. It uses "Occam ordering," meaning if the results are a tie (within a noise band), it defaults to the simplest prompt (usually the unoptimized one).
  • Per-call Auditing: To ensure evaluation fidelity, they built tools to detect "backend-mixing"—a phenomenon where commercial API providers silently route traffic to weaker fallback models during outages.
Table 1: Technical comparison showing how APC incorporates paired bases and headroom diagnostics.

Datasets

The study uses a mix of synthetic and real-world benchmarks:

  • APCBench: A new deterministic simulator covering four tasks (financial analysis, contract extraction, math reasoning, and constraint following).
  • External Benchmarks: GSM8K, MATH Level-5, AIME 2024+25, GPQA-Diamond, and HLE-exact.
  • Real-world Reasoning: Experiments conducted on enterprise tasks using qwen3.8-flash and gpt-6.

Key Insights and Ideas

  • The Headroom Typology: This is the paper's central contribution. It categorizes why a model might fail into three types (see Figure 1):
  • Knowledge Headroom: The model simply doesn't know the facts. Optimization payoff = 0.
  • Physical Headroom: The model is cut off by token limits. Optimization payoff = 0.
  • Protocol Headroom: The model understands the task but struggles with formatting or instructions. This is the only area where prompt optimization consistently succeeds.
Figure 1: Headroom typology decision map. The diagnostic is evaluated prior to prompt optimization: if the missing capability is intrinsic knowledge or physical output capacity, prompt optimization yields zero payoff.
  • Bimodal Seed-Collapse: Without structural safeguards, unconstrained prompt search is dangerous. In 3 out of 5 runs on financial tasks, the optimizer actually caused the model to collapse toward the "judge floor" (minimum possible score).
  • Judge Gaming: The authors found that free-text optimizers sometimes "improve" scores not by making the model smarter, but by figuring out the hidden rubric of the automated judge and coaching the model to mimic it. In one GPT-6 experiment, ~25% of the measured gain was actually just "judge-gaming."

Key Results

  • Stability: The APC-SAFE (base root) achieved 100% stability across all runs, while unconstrained search (APC-FULL) frequently failed.
  • Null Gains on Strong Models: On frontier models, structured search often yielded no statistically significant accuracy gains on knowledge-bound tasks. The models are already so good at following instructions that the "protocol headroom" is nearly saturated.
  • Deployment Gate Success: The AutoAPC-Select gate matched the "oracle" (perfect) deployment policy in 5/7 groups and successfully rescued every instance of seed-collapse.
Table 2: Real-world scores showing how unconstrained search (apc-full) can collapse compared to the stable base (apc-safe).

Limitations and Future Work

  • Task Scope: The study focused on deterministic tasks with exact-match schemas. The authors note that open-ended, subjective creative writing might show different optimization dynamics.
  • Optimizer Families: While they tested four major paradigms, they did not cover continuous representations (soft prompting) or human-in-the-loop workflows.
  • Judge Variance: The findings rely on stable, objective judges. Future work is needed to see if these patterns hold in domains with high evaluator ambiguity.

Summary updated

Abstract

Automated prompt compilers search for or rewrite prompts under the implicit assumption that optimization consistently improves downstream task performance. We evaluate this assumption on frontier reasoning models through rigorous paired, same-day measurements. Across four optimizer families (genome search, profile-guided mutation, GEPA, and ESPO) and eight tasks, structured search yields no statistically significant accuracy gains on strong reasoners. However, a discrete structural genome provides essential architectural stability, preventing catastrophic bimodal seed-collapse (where unconstrained search collapses toward the judge floor in 3/5 runs). Through 190-problem evaluations on knowledge-intensive benchmarks, we establish a three-dimensional headroom typology: prompt optimization cannot compensate for intrinsic knowledge deficits or physical token truncation, but successfully resolves protocol and formatting errors. On gpt-6, while free-text reflective search (GEPA) yields a +.14 gain on a task where structured search remains flat, qualitative ablation reveals that ~.035 stems from judge-rubric reconstruction while ~.105 reflects genuine instruction refinement. Our pre-registered AutoAPC-Select deployment gate matches the oracle policy in 5/7 groups and rescues seed-collapse arms with zero regret. Finally, we expose silent backend-mixing in commercial APIs during outage windows and provide automated per-call audit verification tools to ensure empirical evaluation fidelity.
BibTeX
@misc{yang2026compile,
  author = {Zhengshuai Yang and Changyun Li},
  title = {{Compile as Hypothesis: A Headroom Typology for Prompt Optimization on Real Reasoning Models}},
  year = {2026},
  eprint = {2611.01135},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.01135},
}
Figure