Manuscript Offprint
arXiv:2611.09701Where Should Learning Live? Regret Analysis for Text, Parameter, and Joint Adaptation
ABSTRACT
Language-model systems can select prompts and parameter adapters repeatedly during deployment, using feedback to guide later choices. Earlier choices may change the context or environment inherited by later configurations. We study selection among preconstructed candidates and compare cumulative loss with the best fixed prompt–parameter pair used from the beginning. This excess loss separates into three terms: selection regret within the available family, the gap from restricting that family, and the benefit or harm of the actual deployment history. Selection is evaluated using the history each candidate would have produced if used throughout, which separates candidate quality from the effects of switching. When loss functions are fixed independently of selector randomness, past choices affect loss for only a bounded number of rounds, and every candidate's own-history loss is revealed, limiting switches yields sublinear expected regret within the selected family. We also quantify the costs and additional assumptions of independent probing and deployment-only feedback. Controlled experiments show that fewer switches can either lower or raise deployed loss, depending on whether inherited histories are harmful or helpful. With Qwen3.5-9B on Spider, text-only selection has lower within-family regret than joint selection, yet produces more failures because its candidate family excludes stronger configurations.
1 INTRODUCTION
Language-model agents edit code, execute tests, and use tool feedback (Yang et al., 2024b), while recent benchmarks study learning across sequences of related tasks (Asawa et al., 2026). Consider a coding agent that handles successive tasks in a persistent workspace. Before each task, a selector chooses an instruction prompt and a model checkpoint or adapter. The agent edits code, runs tools, and receives feedback such as whether its changes pass the task's tests. Feedback guides the next configuration choice, while the edited code and tool history remain in the workspace. The next configuration therefore inherits the consequences of earlier choices. How should we compare text-only, parameter-only, and joint adaptation in such a system?
Each opportunity to select and execute a configuration is a deployment round, indexed by . For example, a round can be one coding task, one question in Spider (Yu et al., 2018), or one dialogue turn in SParC (Yu et al., 2019). We consider a sequence of rounds, which can share state and need not be independent. The selector uses earlier feedback to choose a configuration, executes it, incurs a loss, and uses the available feedback to update future selection probabilities. Minimizing cumulative loss over these repeated choices gives an online learning problem (Cesa-Bianchi & Lugosi, 2006). Recent methods construct configurations through reflective prompt optimization (Agrawal et al., 2026), joint prompt–parameter optimization (Bo et al., 2026), and alternating harness–weight optimization (Kim et al., 2026). In our setting, candidates are constructed before evaluation. During evaluation, online learning updates their selection probabilities without constructing new prompts or adapters.
A configuration pairs reusable text, such as prompts, demonstrations, and retrieval contents, with deployable parameters, such as checkpoints or adapters (Brown et al., 2020; Lewis et al., 2020; Hu
*Co-corresponding authors.
et al., 2022). Text-only selection keeps the base parameters, parameter-only selection keeps the base text, and joint selection can change both. Figure 1 illustrates these configuration families. The workspace, generated history, and tool sessions constitute operational state, which evolves even under a fixed configuration. Retaining feedback across trials can influence later behavior without changing model parameters (Shinn et al., 2023).
Our comparator is the best available joint configuration used for all rounds from the common initial condition, with its own resulting history. This own-history comparison follows the policy-regret perspective (Arora et al., 2012). For example, a coding agent that switches to configuration after using can encounter different code from an agent that used throughout.
This comparison raises three separate questions. (i) How well does the selector choose among its available candidates, when each is evaluated on the history it would have produced if used throughout? (ii) How much better is the best joint candidate than the best candidate in the selected family? (iii) Does the actual sequence of choices create a more or less favorable history than those fixed-configuration evaluations? We call the corresponding terms diagonal selection regret, family restriction, and the signed state effect. Their sum is exactly the deployed excess loss. Diagonal refers to repeating a single configuration throughout the history, and signed emphasizes that inherited state can reduce as well as increase loss.

Figure 1: Text-only and parameter-only families within the joint family.
Our strongest feedback model evaluates every candidate on its own fixed-configuration history. Ordinary deployment feedback need not supply those counterfactual losses. We also study independent probes of individual candidates and updates based only on deployed outcomes. For state-dependent guarantees, we require bounded influence: choices sufficiently far in the past no longer affect current loss, including through hidden state. These assumptions connect our analysis to online learning with memory (Anava et al., 2015). We also compare joint sampling and coordinatewise conditional selection: they agree for additive losses under a product prior, but interactions can separate their regret even when both eventually select the optimum. The online-learning methods are established (Geulen et al., 2010; Avner et al., 2012; Cheng et al., 2023). Our analysis connects their guarantees to adaptation comparators, information requirements, and signed state effects.
Controlled studies show that reducing switches helps when mixed histories are harmful and hurts when they are beneficial, even with the same per-round selection probabilities. With Qwen3.5-9B (Qwen Team, 2026) on Spider, text-only selection incurs less within-family regret than joint selection but more deployed loss because its candidates are weaker. On recursive SParC, earlier generated queries in Structured Query Language (SQL) supply the inherited state. Lazy exponential weights (EW) substantially reduces switching with only a small change in estimated expected loss.
Our main contributions are summarized as follows.
-
Loss accounting. We separate selection, family restriction, and state effects relative to a common fixed joint comparator; see Section 2.
-
Selection and state guarantees. We connect selection bounds to configuration families and bound expected excess loss for a selector that limits switches under exogenous losses, bounded influence, and full counterfactual feedback; see Sections 3–4.
-
Weaker feedback. We quantify the costs and additional assumptions of approximate evaluation, sparse probes, and deployment-only feedback; see Section 5.
-
Empirical comparisons. Controlled studies and SQL evaluations show how candidate availability and inherited state change the interpretation of selection regret and switching; see Section 6.
One Deployment Round. At round , the selector chooses using the feedback available from earlier rounds. The executor applies to task input in operational state , producing outputs and tool actions, incurring a normalized loss , and advancing the state to . Loss can indicate task failure, while state can retain generated code or dialogue history. The permitted feedback updates future selection probabilities, while execution changes the operational state. Incurring a loss does not imply observing every candidate's loss. The formal executor and state transition are provided in Appendix A.1.
Fixed-Configuration Histories and Feedback. Fix a common initial condition and an exogenous random tape, independent of selector randomness, determining losses for histories . For the deployed history, . Each alternative history reruns the state and any deployment-responsive tasks. The diagonal loss of a fixed configuration is
This is its round- loss if it had been used from the beginning. After switching from to , for example, the round-two deployed loss is , whereas the diagonal loss of the current choice is . Full diagonal feedback reveals every after round , sparse feedback probes individual candidates independently of deployment, and deployment-only feedback reveals the realized loss . The accounting identity requires no observation of counterfactual losses, while the learning guarantees state their feedback assumptions separately.
Comparator and Loss Accounting. Let be the cumulative loss of using throughout. The best fixed value within family is . Our common comparator has value : hindsight selects one joint candidate for the entire horizon, with its own induced history. Write for the learner's cumulative deployed loss and for its choices evaluated on their respective fixed-configuration histories. The latter sum need not describe one deployment trajectory. Adding and subtracting it and the best within-family value gives the decomposition.
Proposition 1 (Selection, restriction, and state accounting). For every trajectory with ,
Only family restriction is necessarily nonnegative; the identity also holds in expectation.
Selection compares choices within the available family, restriction charges its gap to the joint family, and state accounts for the actual history's benefit or harm. Stateless systems have zero state effect. For fixed diagonal tables, identical action marginals give equal expected diagonal loss, while different deployment histories can help or hurt. Appendix A.1.2 details sampling residuals and comparator averaging. The proofs appear in Appendix B.
3 SELECTION AND FAMILY RESTRICTION
Selection and Prior Complexity. For stateless full-information selection, exponential weights with a positive prior on and learning rate uses the following distribution:
Sample , then observe every . The following theorem also covers standard-Borel configuration spaces with prior fixed before evaluation and measurable losses fixed before the current draw and fully revealed afterward. Here . Write and , and let denote the Kullback–Leibler (KL) divergence. The comparator holds one draw from fixed throughout, with .
Theorem 1 (Prior-complexity regret). For every and fixed with , prior-initialized exponential weights satisfies the following:
For , gives the following:
Setting and , the best finite candidate has . Thus,
Uniform priors give a selection-regret bound of , but restriction can remain linear.
Appendix A.2.2 separates text and parameter prior complexity, treats continuous comparators by localization, and discusses computational limits.
Restriction and Mode Selection. To extend the finite-candidate comparison to all admissible configurations, let . Define , , and . These nonnegative gaps distinguish comparator approximation, mode restriction, and access to joint configurations.
Proposition 2 (Selection–approximation–restriction decomposition). For any learner and comparator on , , the regret satisfies the following:
EW on with prior bounds by whenever this KL is finite.
A mixture prior also permits online mode selection, charging the comparator mode an additional prior cost; see Corollary 5. Candidate construction remains separate: Appendix A.2.5 distinguishes localization from discovery without claiming convergence of prompt search or adapter training.
Joint and Coordinatewise Selection. Fix finite Cartesian candidates , a positive product prior, and exogenous stateless losses . Both selectors observe every loss and start from . For deterministic , let . Joint sampling draws from , while one coordinate sweep, for , uses fresh draws:
Only the final pair is deployed. Write , for expected regret against the same best fixed candidate. In this comparison, restriction and state effects vanish.
Proposition 3 (Equivalence under additive losses). If , one sweep has law for every deterministic schedule, so .
Proposition 4 (Separation under a fixed learning rate). On with uniform prior, let , where , , , and , . For fixed and every ,
Corollary 1 (Separation despite eventual optimal selection). For the same construction with , use for . Then and , although both selectors deploy on every sufficiently late round almost surely.
These results concern the specified conditional sampler. More sweeps or global refreshes can change its behavior. Appendix A.2.4 provides refined constants, and Section 6 examines these settings.
4 STATE EFFECTS AND POLICY REGRET
Policy regret groups selection and state in (2): , where the comparator draws once from and deploys it from the common initial condition (Arora et al., 2012). Point regret takes . Evaluating comparators on the learner's realized state instead gives external regret.
Proposition 5 (Zero external regret and linear policy regret). A deterministic two-configuration persistent-state system admits a trajectory with zero realized-state external regret and policy regret against a fixed configuration.
Proposition 6 (Linear policy regret). For every optimizer whose first action uses only common pre-round history and private coins, and every , some deterministic two-configuration environment gives expected policy regret at least , when its index and transition kernel are unknown before that action.
Assumption 1 (Component-specific bounded influence). For integers , measurable functions , fixed before learner randomization, give loss . Older coordinates have no influence, including through hidden state, while interactions within the windows are unrestricted.
Put , truncating horizons at . The diagonal repeats each coordinate throughout its window. Influence measures persistence after replacement.
Assumption 2 (Diagonal counterfactual evaluation oracle). After round , every own-trajectory loss , is revealed.
Lazy Exponential Weights. Apply the EW update from Section 3 to , starting with and . After round , retain with probability and otherwise refresh from (Geulen et al., 2010; Kalai & Vempala, 2005). Refreshes preserve and occur at most times in expectation. Each refresh contaminates at most rounds. This requires own-trajectory evaluation.
Proposition 7 (Matched marginals isolate state effects). For fixed exogenous losses, family, prior, and learning rate, independent and lazy draws with the same diagonal feedback and EW marginals have equal expected diagonal losses. Hence,
Thus fewer switches can help or hurt. The identity also holds conditional on shared exogenous approximate feedback.
Theorem 2 (Lazy policy regret under bounded influence). Under Assumptions 1–2, for every and with finite ,
For , comparator-dependent tuning gives the following:
For , draw once from without refreshing; regret is zero.
The term controls state, while the remaining terms control selection. These established low-switch methods (Geulen et al., 2010; Anava et al., 2015; Zhang et al., 2022) connect prior complexity to influence. Uniform priors give for every point comparator.
Proposition 8 (Mode-restricted lazy influence rates). Under Assumptions 1–2, run lazy EW with priors and , supported on and , respectively. For fixed comparators and , let and be finite. For every , text-only and parameter-only selection satisfy
Freezing one coordinate removes its switching contribution: the state charge depends on the influence horizon of the coordinate being changed. For positive complexity, comparator-tuned rates are and . For the best fixed candidate within each finite family, add family restriction to compare with the joint optimum. Different upper bounds alone do not establish which mode performs better. Appendix A.3.2 gives localization and coupling details, while Appendix A.3.3 treats whole-policy selection across reset episodes. Proofs are in Appendix B.3.
5 FEEDBACK REQUIREMENTS AND EXTENSIONS
Counterfactual feedback evaluates each candidate on the history it would have produced if used throughout. Deployment feedback reports only the loss actually incurred. We now quantify what changes as feedback becomes less informative. Fix a finite family of candidates with positive prior , and a comparator distribution fixed independently of learner and probe randomness. Write and as in Section 4.
Approximate Full Counterfactual Feedback. Theorem 2 assumes exact diagonal losses. An exogenous full estimate sequence in with uniform round- error adds at most to its bound. Conditionally unbiased estimates in the same range preserve the expected bound; refer to Appendix A.4.1. The entire evaluator must be independent of deployment randomness. Even a common estimation offset can alter retention and state effects while leaving EW marginals unchanged.
Sparse Independent Probes. Under the bounded-influence condition in Assumption 1, an autonomous evaluator can instead probe one candidate after each round. Its outcome must have conditional mean given the exogenous response tree, earlier evaluation history, and . Conditional on that tree, the entire evaluator is independent of deployment randomness, consumes no deployed actions or outcomes, and is unchanged by deployment interventions. Probing also leaves the tree unchanged; see Assumption 3. Initialize and , and update EW using . Retain with probability and otherwise refresh from using independent deployment randomness.
Theorem 3 (Sparse-diagonal policy regret). Under Assumption 3, with probe law , every fixed and satisfy the following:
For , gives
For , drawing once from gives zero expected regret.
One probe per round reduces counterfactual evaluations to probes, replacing the full-feedback selection term by while preserving the state term. Simulation or cloning costs remain, and independence from only the current deployment draw is insufficient. Appendix A.4.5 gives the formal process and refined bounds.
Deployment-Only Feedback. Without a counterfactual evaluator, hold each chosen configuration for a block of rounds, where is an integer. There are complete blocks and remaining rounds. Block starts at after the realized prefix . We write explicitly for the external random tape introduced in Section 2.
Definition 1 (Block counterfactual). The average loss from repeating a after the actual prefix, re-running environmental responses, is
where denotes repetitions of .
Starting from , deploy a fresh private draw throughout block and update EW using , where is the observed block-average loss. Retain the last configuration for the remaining rounds. The signed causal reaction compares repeating a comparator after the learner's prefixes with using it from the beginning, over the complete blocks:
It includes changes in tasks, user responses, and operational state.
Theorem 4 (Oracle-free causal policy-regret inequality). For causal responses driven by an external tape independent of private learner coins, the block algorithm satisfies, for every fixed and ,
No oracle for , , or is required.

(a) Fixed rate
(b) Slow schedule
Joint Coordinatewise Fixed Slow schedule

(a) Common offset
(b) Ref.-opposing bias
Expected selection Signed state effect Deployed excess
Figure 2: Exact expected regret for joint and coordinatewise selection with fixed and slow learning rates.
Figure 3: Approximate-minus-exact loss components on fixed-advantage tables: (a) ; (b) lazy EW.
The first two terms bound selection from observed block losses, while accounts for the different histories and covers the unfinished block. This retains the causal discrepancy in policy-regret mini-batching (Arora et al., 2012), and uncontrolled reaction can remain linear. If the complete causal system has influence horizon , including task selection and evaluation, then : only the first rounds of each later block can remember its prefix. Optimizing and yields for fixed positive and sufficiently large ; see Corollary 12. Use for , and a single prior draw for . Forgetting in a cache alone does not establish this complete-system condition.
For random response trees, independence and unbiasedness must hold conditionally to compare with the tree's best fixed candidate. Query-adaptive autonomous evaluation supports fixed or best expected-loss comparators, not comparators selected using probe noise. Appendix A.4 provides supporting lemmas and extensions.
6 EMPIRICAL ANALYSIS
Experimental Setup. Controlled studies isolate selection, family restriction, and signed state effects on deployed loss. SQL experiments use Qwen3.5-9B (Qwen Team, 2026) on Spider (Yu et al., 2018) and SParC (Yu et al., 2019). Excess loss is measured relative to each table's or benchmark's best fixed joint configuration unless a paired contrast is specified. Summaries and error bars use means one standard error (SE). Refer to Appendices C and C.1 for detailed designs, numerical results, and uncertainty.
Joint and Coordinatewise Selection. Joint EW and text-then-parameter sweeps share the uniform prior, preceding loss rows, and rate schedule on the additive and barrier tables of Section 3. Family restriction, state effects, and the best fixed loss are zero, so cumulative loss equals regret. The additive control gives equal regret, whereas one coordinatewise sweep incurs substantially more regret on the barrier under both schedules, as in Figure 2. Under the slow schedule, high final-round optimal-selection probability coexists with this accumulated gap. Extra sweeps reduce the gap at additional computation cost without new feedback; see Figure 8 and Appendix C.2 for details.
Selection and Signed State Effects. Fixed-advantage, changing-quality, and no-signal diagonal tables use , where indicates mixed configurations in the relevant coordinate histories. Negative, zero, and positive give beneficial, neutral, and harmful state effects. State and approximate-feedback figures use ; see Appendix C.3 for details. Independent and lazy EW have identical expected diagonal losses, as presented in Figure 9, but lazy EW has lower deployed loss under harmful state and higher loss under beneficial state; see Figure 4. Fewer switches can therefore help or hurt. Without a selection signal, draw-once has zero excess while both EW selectors incur harmful state costs, as shown in Figure 10.
Feedback Accuracy, Switching, and Evaluation Cost. We perturb diagonal feedback at , fixing the true table, prior, rate, and learner random inputs. A common offset preserves selection distributions but changes ordinary lazy EW's switching and state costs, while the trajectories of independent EW and centered lazy EW remain unchanged. A reference-opposing bias changes both selection and state, as shown in Figure 3; refer to Appendix C.4 for experimental details and additional results. Increasing the Bernoulli sampling budget reduces feedback error without monotone deployed-loss improvement in the displayed conditions; see Figure 12.

(a) No selection signal

(b) Fixed advantage

(c) Changing relative quality
Deployed excess Signed state effect Expected selection
Figure 4: Independent-minus-lazy loss contrasts at , with . Reversing the mechanism reverses the selector ordering while expected diagonal selection remains unchanged.

(a)

(b)
Full diagonal
Deployment only, b=1
Deployment only, b=4
Deployment only, b=16
One diagonal probe
Deployment only, b=2
Deployment only, b=8
Draw once

Expected excess failures over the best fixed joint candidate

Expected excess failures over the best fixed joint candidate
(a) Full candidate families (b) Equal count
Figure 6: Spider full-diagonal EW excess failures relative to each seed's joint optimum. Panel (a) shows selection regret and family restriction, with family sizes in parentheses. Panel (b) shows all base-anchored K = 4 subsets, averaged within each seed.
Restricted Feedback on Controlled Losses. On the four-candidate joint family, we compare full-diagonal and one-probe lazy EW, deployment-only EW with blocks , and draw-once. All use uniform priors and regime-specific rates, so both information and learning rate vary; refer to Appendix C.5. At and , increasing b from 1 to 16 lowers excess under harmful state but raises it under beneficial state, as shown in Figure 5. These results illustrate how blocks sacrifice updates and suppress both kinds of state effects. Negative excess means a changing history beats every fixed configuration under this synthetic law.
Selection and Family Restriction on Spider. Spider compares text, parameter, union, and joint families with 6, 4, 9, and 24 configurations against each seed's best fixed joint candidate. Full-diagonal EW uses a fixed question order and a uniform prior. Independent and lazy expectations coincide because state is absent; refer to Appendices C.6 and C.7 for details. Text EW has lower selection regret than joint EW, but its larger family restriction produces higher expected deployed loss, as shown in Figure 6(a). Joint EW also has lower mean loss than parameter EW. Averaging all base-anchored subsets gives similar parameter and joint excess losses, as presented in Figure 6(b). The full-pool ordering therefore need not survive equal candidate counts. Demonstrations also show stronger mean improvement beyond additive prompt-adapter effects than verification, as presented in Figure 7(a); refer to Appendix C.7 for details.
State Effects on SParC. SParC isolates history effects under matched configuration marginals. Recursive history retains earlier generated SQL, while cleared history removes it, retaining the schema and raw utterances. Dialogue resets bound influence by four rounds. Both couplings share diagonal losses and an influence-dependent rate, which is retained in the cleared control. Mixed-history outcomes measure state effects without updating selection; see Appendix C.8. Independent EW has lower estimated recursive-history loss despite identical expected diagonal loss, as shown in Figure 7(b). Lazy EW substantially reduces switching with only a small change in estimated expected loss; see Table 7. Fewer mixed histories remove both beneficial and harmful effects. These data do not establish that fewer switches worsen performance. Clearing eliminates state effects and equalizes expected deployed losses but changes the diagonal table and comparator, so cross-condition totals cannot identify state effects.

(a) Spider interactions
(b) SParC state
(c) Spider feedback
(d) SParC feedback
Figure 7: Diagnostics with prompt-adapter interactions at adapter learning rate and SParC state effects, followed by restricted-feedback excess failures. Negative interactions indicate improvement beyond additive effects. Full and Probe denote full-diagonal and one-probe lazy EW, b the deployment block length, and Once draw-once.
Restricted Feedback on Precomputed SQL Losses. We apply the controlled feedback regimes to precomputed Spider and cleared-SParC loss matrices, keeping outcomes, order, prior, and joint comparator fixed. We use zero-influence learning rates; see Appendix C.9. Full feedback has the lowest mean excess on both tasks, whereas one-probe feedback queries fewer diagonal entries but incurs more excess, as presented in Figures 7(c) and 7(d). One-probe and deployment-only b = 1 means are close; refer to Appendix C.9. The longest blocks reduce switches but raise mean excess relative to b = 1 on both tasks; see Table 8.
7 RELATED WORK
Parameter Adaptation and Model Editing. Weight adaptation includes full tuning, adapters, low-rank updates (Houlsby et al., 2019; Hu et al., 2022), continuous prompt/prefix tuning (Li & Liang, 2021; Lester et al., 2021), and targeted editing (Meng et al., 2022). Updates can cause interference and forgetting (Kirkpatrick et al., 2017), with low-rank and full tuning differing even at similar performance (Shuttleworth et al., 2025). Comparisons with in-context learning report task-dependent accuracy, generalization, and cost tradeoffs (Liu et al., 2022; Mosbach et al., 2023; Ghosh et al., 2026; Razumovskaia et al., 2025), while theory characterizes when prompting can match weight tuning (Genewein et al., 2025). Joint construction includes BetterTogether (Soylu et al., 2024), MetaTuner (Bo et al., 2026), fast-slow updates (Tiwari et al., 2026), and WHALE's alternation of online rejection-sampling tuning with Meta-Harness search (Kim et al., 2026). Our conditional sampler studies selection within a fixed family, with candidate construction.
Expert Advice, Mixture Priors, and Limited Switching. Hedge and external regret compare fixed experts (Hannan, 1957; Foster & Vohra, 1999; Littlestone & Warmuth, 1994; Freund & Schapire, 1997; Cesa-Bianchi & Lugosi, 2006), and KL change-of-measure extends the analysis to measurable priors. Bandit, tracking, and sleeping/growing-expert models change feedback, comparators, or availability (Auer et al., 2002; Bubeck & Cesa-Bianchi, 2012; Herbster & Warmuth, 1998; Cortes et al., 2019; Mourtada & Maillard, 2017). Lazy and limited-switch methods control regret and action changes (Kalai & Vempala, 2005; Geulen et al., 2010; Altschuler & Talwar, 2018). Switching costs admit full-information and adversarial-bandit rates; bounded-memory adversaries can force under ordinary full information (Cesa-Bianchi et al., 2013; Dekel et al., 2014). Zhang et al. (2022) combine prior divergence and movement penalties in comparator-adaptive finite-expert bounds. Under exogenous losses, coupling converts marginal movement into expected switches.
Appendix E provides additional related work.
8 CONCLUSION
We decomposed deployed loss over the best fixed joint configuration into selection, family restriction, and signed state effects. Low regret within a candidate family, eventual optimal selection, and infrequent switching can each occur alongside higher cumulative loss. Under the stated influence and feedback assumptions, EW with infrequent switching bounds selection regret and state effects, while weaker feedback introduces additional costs and requires further assumptions. Our controlled and SQL experiments illustrate how these distinctions arise within the evaluated candidate families.
AI USE STATEMENT
We used GPT-5.6 Sol (OpenAI, 2026a) and GPT-6 Astra (OpenAI, 2026b) as our primary generative AI models. We used these models to refine research ideas, derive mathematical proofs, implement experiments, and draft and polish the manuscript. The human authors take responsibility for the final content of this work, including all claims, proofs, experimental results, code, and text produced with AI assistance.
ETHICS STATEMENT
We do not identify direct ethical concerns arising from the theoretical analysis and benchmark experiments presented in this work. However, methods for adapting language-model systems could be used in applications with harmful consequences. We acknowledge this potential and emphasize the importance of responsible use and appropriate safeguards.
ACKNOWLEDGMENTS
This work used the resources provided by the University of Pittsburgh Center for Research Computing and Data, which are supported by National Institutes of Health (NIH) award S10OD028483 and National Science Foundation (NSF) award OAC-2117681. In addition, it used resources through CIS251382 from the Advanced Cyberinfrastructure Coordination Ecosystem: Services & Support (ACCESS) program, supported by NSF awards OAC-2138259, OAC-2138286, OAC-2138307, OAC-2137603, and OAC-2138296. Jungaek Kim acknowledges support from the start-up grant of the University of Arkansas and Emmanuel-Vasileios Vlatakis-Gkaragkounis acknowledges support from the start-up grant of the University of Wisconsin–Madison.
REFERENCES
L. A. Agrawal, S. Tan, D. Soylu, N. Ziems, R. Khare, K. Opsahl-Ong, A. Singhvi, H. Shandilya, M. J. Ryan, M. Jiang, C. Potts, K. Sen, A. G. Dimakis, I. Stoica, D. Klein, M. Zaharia, and O. Khattab. GEPA: Reflective prompt evolution can outperform reinforcement learning. In Proceedings of the International Conference on Learning Representations (ICLR), 2026.
V. Akinwande, Y. Jiang, D. Sam, and J. Z. Kolter. Understanding prompt engineering may not require rethinking generalization. In Proceedings of the International Conference on Learning Representations (ICLR), 2024.
J. Altschuler and K. Talwar. Online learning over a finite action set with limited switching. In Proceedings of the Conference on Learning Theory (COLT), 2018.
O. Anava, E. Hazan, and S. Mannor. Online learning for adversaries with memory: Price of past mistakes. In Advances in Neural Information Processing Systems (NeurIPS), 2015.
R. Arora, O. Dekel, and A. Tewari. Online bandit learning against an adaptive adversary: From regret to policy regret. In Proceedings of the International Conference on Machine Learning (ICML), 2012.
P. Asawa, C. M. Glaze, G. Orlanski, R. Ramakrishnan, B. Xu, A. Biswal, V. S. Chen, F. Sala, M. Zaharia, and J. E. Gonzalez. Continual learning bench: Evaluating frontier AI systems in real-world stateful environments, 2026. arXiv preprint arXiv:2606.05661.
P. Auer, N. Cesa-Bianchi, Y. Freund, and R. E. Schapire. The nonstochastic multiarmed bandit problem. SIAM Journal on Computing, 32(1):48–77, 2002.
O. Avner, S. Mannor, and O. Shamir. Decoupling exploration and exploitation in multi-armed bandits. In Proceedings of the International Conference on Machine Learning (ICML), 2012.
X. Bo, R. Li, Z. Sun, Q. Dai, Z. Zhang, Z. Tian, X. Chen, and Z. Dong. Prompt and parameter co-optimization for large language models. In Proceedings of the International Conference on Learning Representations (ICLR), 2026.
T. B. Brown, B. Mann, N. Ryder, M. Subbiah, J. Kaplan, P. Dhariwal, A. Neelakantan, P. Shyam, G. Sastry, A. Askell, S. Agarwal, A. Herbert-Voss, G. Krueger, T. Henighan, R. Child, A. Ramesh, D. M. Ziegler, J. Wu, C. Winter, C. Hesse, M. Chen, E. Sigler, M. Litwin, S. Gray, B. Chess, J. Clark, C. Berner, S. McCandlish, A. Radford, I. Sutskever, and D. Amodei. Language models are few-shot learners. In Advances in Neural Information Processing Systems (NeurIPS), 2020.
S. Bubeck and N. Cesa-Bianchi. Regret analysis of stochastic and nonstochastic multi-armed bandit problems. Foundations and Trends in Machine Learning, 5(1):1–122, 2012.
N. Cesa-Bianchi and G. Lugosi. Prediction, Learning, and Games. Cambridge University Press, 2006.
N. Cesa-Bianchi, O. Dekel, and O. Shamir. Online learning with switching costs and other adaptive adversaries. In Advances in Neural Information Processing Systems (NeurIPS), 2013.
D. Cheng, X. Zhou, and B. Ji. Understanding the role of feedback in online learning with switching costs. In Proceedings of the International Conference on Machine Learning (ICML), 2023.
C. Cortes, G. DeSalvo, C. Gentile, M. Mohri, and S. Yang. Online learning with sleeping experts and feedback graphs. In Proceedings of the International Conference on Machine Learning (ICML), 2019.
D. P. de Farias and N. Megiddo. Combining expert advice in reactive environments. Journal of the ACM, 53(5):762–799, 2006.
O. Dekel, J. Ding, T. Koren, and Y. Peres. Bandits with switching costs: regret. In Proceedings of the Annual ACM Symposium on Theory of Computing (STOC), 2014.
M. Deng, J. Wang, C.-P. Hsieh, Y. Wang, H. Guo, T. Shu, M. Song, E. Xing, and Z. Hu. RLPrompt: Optimizing discrete text prompts with reinforcement learning. In Proceedings of the Conference on Empirical Methods in Natural Language Processing (EMNLP), 2022.
M. Dudík, J. Langford, and L. Li. Doubly robust policy evaluation and learning. In Proceedings of the International Conference on Machine Learning (ICML), 2011.
E. Even-Dar, S. M. Kakade, and Y. Mansour. Online Markov decision processes. Mathematics of Operations Research, 34(3):726–736, 2009.
J. Fang, X. Deng, H. Xu, Z. Jiang, Y. Tang, Z. Xu, S. Deng, Y. Yao, M. Wang, S. Qiao, H. Chen, and N. Zhang. LightMem: Lightweight and efficient memory-augmented generation. In Proceedings of the International Conference on Learning Representations (ICLR), 2026.
U. Feige, T. Koren, and M. Tennenholtz. Chasing ghosts: Competing with stateful policies. SIAM Journal on Computing, 46(1):190–223, 2017.
C. Fernando, D. S. Banarse, H. Michalewski, S. Osindero, and T. Rocktäschel. Promptbreeder: Self-referential self-improvement via prompt evolution. In Proceedings of the International Conference on Machine Learning (ICML), 2024.
D. P. Foster and R. V. Vohra. Regret in the on-line decision problem. Games and Economic Behavior, 29(1–2):7–35, 1999.
Y. Freund and R. E. Schapire. A decision-theoretic generalization of on-line learning and an application to boosting. Journal of Computer and System Sciences, 55(1):119–139, 1997.
T. Genewein, K. Li, J. Grau-Moya, A. Ruoss, L. Orseau, and M. Hutter. Understanding prompt tuning and in-context learning via meta-learning. In Advances in Neural Information Processing Systems (NeurIPS), 2025.
S. Geulen, B. Vöcking, and M. Winkler. Regret minimization for online buffering problems using the weighted majority algorithm. In Proceedings of the Conference on Learning Theory (COLT), 2010.
B. Ghosh, S. Das, T. Speicher, Q. Wu, M. A. Khan, D. Garg, K. P. Gummadi, and E. Terzi. Fine-tuning vs. in-context learning in large language models: A formal language learning perspective. In Proceedings of the Annual Meeting of the Association for Computational Linguistics (ACL), 2026.
P. D. Grünwald. The Minimum Description Length Principle. MIT Press, 2007.
Q. Guo, R. Wang, J. Guo, B. Li, K. Song, X. Tan, G. Liu, J. Bian, and Y. Yang. Connecting large language models with evolutionary algorithms yields powerful prompt optimizers. In Proceedings of the International Conference on Learning Representations (ICLR), 2024.
J. Hannan. Approximation to Bayes risk in repeated play. In M. Dresher, A. W. Tucker, and P. Wolfe (eds.), Contributions to the Theory of Games, Volume III, pp. 97–139. Princeton University Press, Princeton, NJ, 1957.
M. Herbster and M. K. Warmuth. Tracking the best expert. Machine Learning, 32:151–178, 1998.
W. Hoeffding. Probability inequalities for sums of bounded random variables. Journal of the American Statistical Association, 58(301):13–30, 1963.
N. Houlsby, A. Giurgiu, S. Jastrzebski, B. Morrone, Q. De Laroussilhe, A. Gesmundo, M. Attariyan, and S. Gelly. Parameter-efficient transfer learning for NLP. In Proceedings of the International Conference on Machine Learning (ICML), 2019.
E. J. Hu, Y. Shen, P. Wallis, Z. Allen-Zhu, Y. Li, S. Wang, L. Wang, and W. Chen. LoRA: Low-rank adaptation of large language models. In Proceedings of the International Conference on Learning Representations (ICLR), 2022.
N. Jiang and L. Li. Doubly robust off-policy value evaluation for reinforcement learning. In Proceedings of the International Conference on Machine Learning (ICML), 2016.
A. Kalai and S. Vempala. Efficient algorithms for online decision problems. Journal of Computer and System Sciences, 71(3):291–307, 2005.
O. Khattab, A. Singhvi, P. Maheshwari, Z. Zhang, K. Santhanam, S. Vardhamanan, S. Haq, A. Sharma, T. T. Joshi, H. Moazam, H. Miller, M. Zaharia, and C. Potts. DSPy: Compiling declarative language model calls into self-improving pipelines. In Proceedings of the International Conference on Learning Representations (ICLR), 2024.
H. Kim, Y. Lee, G. Lee, C. Finn, and K. Lee. WHALE: A simple recipe for joint harness-weight optimization, 2026. arXiv preprint arXiv:2609.00196.
J. Kirkpatrick, R. Pascanu, N. Rabinowitz, J. Veness, G. Desjardins, A. A. Rusu, K. Milan, J. Quan, T. Ramalho, A. Grabska-Barwinska, D. Hassabis, C. Clopath, D. Kumaran, and R. Hadsell. Overcoming catastrophic forgetting in neural networks. Proceedings of the National Academy of Sciences, 114(13):3521–3526, 2017.
Y. Lee, J. Boen, and C. Finn. Feedback descent: Open-ended text optimization via pairwise comparison. In ICLR Workshop on AI with Recursive Self-Improvement, 2026a.
Y. Lee, R. S. Nair, Q. Zhang, K. Lee, O. Khattab, and C. Finn. Meta-Harness: End-to-end optimization of model harnesses. In Proceedings of the Conference on Language Modeling (COLM), 2026b.
B. Lester, R. Al-Rfou, and N. Constant. The power of scale for parameter-efficient prompt tuning. In Proceedings of the Conference on Empirical Methods in Natural Language Processing (EMNLP), 2021.
P. Lewis, E. Perez, A. Piktus, F. Petroni, V. Karpukhin, N. Goyal, H. Küttler, M. Lewis, W. t. Yih, T. Rocktäschel, S. Riedel, and D. Kiela. Retrieval-augmented generation for knowledge-intensive NLP tasks. In Advances in Neural Information Processing Systems (NeurIPS), 2020.
X. L. Li and P. Liang. Prefix-Tuning: Optimizing continuous prompts for generation. In Proceedings of the Annual Meeting of the Association for Computational Linguistics and the International Joint Conference on Natural Language Processing (ACL-IJCNLP), 2021.
N. Littlestone and M. K. Warmuth. The weighted majority algorithm. Information and Computation, 108(2):212–261, 1994.
H. Liu, D. Tam, M. Muqeeth, J. Mohta, T. Huang, M. Bansal, and C. A. Raffel. Few-shot parameter-efficient fine-tuning is better and cheaper than in-context learning. In Advances in Neural Information Processing Systems (NeurIPS), 2022.
D. A. McAllester. PAC-Bayesian model averaging. In Proceedings of the Conference on Learning Theory (COLT), 1999.
K. Meng, D. Bau, A. Andonian, and Y. Belinkov. Locating and editing factual associations in GPT. In Advances in Neural Information Processing Systems (NeurIPS), 2022.
S. Min, X. Lyu, A. Holtzman, M. Artetxe, M. Lewis, H. Hajishirzi, and L. Zettlemoyer. Rethinking the role of demonstrations: What makes in-context learning work? In Proceedings of the Conference on Empirical Methods in Natural Language Processing (EMNLP), 2022.
M. Mosbach, T. Pimentel, S. Ravfogel, D. Klakow, and Y. Elazar. Few-shot fine-tuning vs. in-context learning: A fair comparison and evaluation. In Findings of the Association for Computational Linguistics: ACL, 2023.
J. Mourtada and O.-A. Maillard. Efficient tracking of a growing number of experts. In Proceedings of the International Conference on Algorithmic Learning Theory (ALT), 2017.
G. Neu, A. Antos, A. György, and C. Szepesvári. Online Markov decision processes under bandit feedback. In Advances in Neural Information Processing Systems (NeurIPS), 2010.
OpenAI. GPT-5.6: Frontier intelligence that scales with your ambition. https://openai.com/index/gpt-5-6/, 2026a. Accessed September 25, 2026.
OpenAI. GPT-6 Astra: A new generation of intelligence. https://openai.com/index/gpt-6-astra/, 2026b. Accessed September 25, 2026.
K. Opsahl-Ong, M. J. Ryan, J. Purtell, D. Broman, C. Potts, M. Zaharia, and O. Khattab. Optimizing instructions and demonstrations for multi-stage language model programs. In Proceedings of the Conference on Empirical Methods in Natural Language Processing (EMNLP), 2024.
F. Orabona and D. Pál. Coin betting and parameter-free online learning. In Advances in Neural Information Processing Systems (NeurIPS), 2016.
C. Packer, S. Wooders, K. Lin, V. Fang, S. G. Patil, I. Stoica, and J. E. Gonzalez. MemGPT: Towards LLMs as operating systems, 2023. arXiv preprint arXiv:2310.08560.
R. Pryzant, D. Iter, J. Li, Y. Lee, C. Zhu, and M. Zeng. Automatic prompt optimization with “gradient descent” and beam search. In Proceedings of the Conference on Empirical Methods in Natural Language Processing (EMNLP), 2023.
Qwen Team. Qwen3.5-9B model card. https://huggingface.co/Qwen/Qwen3.5-9B, 2026. Accessed August 30, 2026.
E. Razumovskaia, I. Vulić, and A. Korhonen. Analyzing and adapting large language models for few-shot multilingual NLU: Are we there yet? Transactions of the Association for Computational Linguistics, 13:1096–1120, 2025.
O. Rubin, J. Herzig, and J. Berant. Learning to retrieve prompts for in-context learning. In Proceedings of the Conference of the North American Chapter of the Association for Computational Linguistics (NAACL), 2022.
T. Schick, J. Dwivedi-Yu, R. Dessì, R. Raileanu, M. Lomeli, E. Hambro, L. Zettlemoyer, N. Cancedda, and T. Scialom. Toolformer: Language models can teach themselves to use tools. In Advances in Neural Information Processing Systems (NeurIPS), 2023.
T. Shin, Y. Razeghi, R. L. Logan IV, E. Wallace, and S. Singh. AutoPrompt: Eliciting knowledge from language models with automatically generated prompts. In Proceedings of the Conference on Empirical Methods in Natural Language Processing (EMNLP), 2020.
N. Shinn, F. Cassano, A. Gopinath, K. Narasimhan, and S. Yao. Reflexion: Language agents with verbal reinforcement learning. In Advances in Neural Information Processing Systems (NeurIPS), 2023.
R. Shuttleworth, J. Andreas, A. Torralba, and P. Sharma. LoRA vs full fine-tuning: An illusion of equivalence. In Advances in Neural Information Processing Systems (NeurIPS), 2025.
D. Soylu, C. Potts, and O. Khattab. Fine-tuning and prompt optimization: Two great steps that work better together. In Proceedings of the Conference on Empirical Methods in Natural Language Processing (EMNLP), 2024.
R. Tiwari, K. Sareen, L. A. Agrawal, J. E. Gonzalez, M. Zaharia, K. Keutzer, I. S. Dhillon, R. Agarwal, and D. Khatri. Learning, fast and slow: Towards LLMs that adapt continually, 2026. arXiv preprint arXiv:2605.12484.
D. Wu, H. Wang, W. Yu, Y. Zhang, K.-W. Chang, and D. Yu. LongMemEval: Benchmarking chat assistants on long-term interactive memory. In Proceedings of the International Conference on Learning Representations (ICLR), 2025.
W. Xu, Z. Liang, K. Mei, H. Gao, J. Tan, and Y. Zhang. A-Mem: Agentic memory for LLM agents. In Advances in Neural Information Processing Systems (NeurIPS), 2025.
C. Yang, X. Wang, Y. Lu, H. Liu, Q. V. Le, D. Zhou, and X. Chen. Large language models as optimizers. In Proceedings of the International Conference on Learning Representations (ICLR), 2024a.
J. Yang, C. E. Jimenez, A. Wettig, K. Lieret, S. Yao, K. Narasimhan, and O. Press. SWE-agent: Agent-computer interfaces enable automated software engineering. In Advances in Neural Information Processing Systems (NeurIPS), 2024b.
S. Yao, J. Zhao, D. Yu, N. Du, I. Shafran, K. Narasimhan, and Y. Cao. ReAct: Synergizing reasoning and acting in language models. In Proceedings of the International Conference on Learning Representations (ICLR), 2023.
T. Yu, R. Zhang, K. Yang, M. Yasunaga, D. Wang, Z. Li, J. Ma, I. Li, Q. Yao, S. Roman, Z. Zhang, and D. Radev. Spider: A large-scale human-labeled dataset for complex and cross-domain semantic parsing and text-to-SQL task. In Proceedings of the Conference on Empirical Methods in Natural Language Processing (EMNLP), 2018.
T. Yu, R. Zhang, M. Yasunaga, Y. C. Tan, X. V. Lin, S. Li, H. Er, I. Li, B. Pang, T. Chen, E. Ji, S. Dixit, D. Proctor, S. Shim, J. Kraft, V. Zhang, C. Xiong, R. Socher, and D. Radev. SParC: Cross-domain semantic parsing in context. In Proceedings of the Annual Meeting of the Association for Computational Linguistics (ACL), 2019.
M. Yükseköntül, F. Bianchi, J. Boen, S. Liu, P. Lu, Z. Huang, C. Guestrin, and J. Zou. Optimizing generative AI by backpropagating language model feedback. Nature, 639:609–616, 2025.
L. Zhang, T. Ergen, L. Logeswaran, M. Lee, and D. Jurgens. SPRIG: Improving large language model performance by system prompt optimization. In Proceedings of the International Conference on Learning Representations (ICLR), 2026.
Z. Zhang, A. Cutkosky, and I. Ch. Paschalidis. Optimal comparator adaptive online learning with switching cost. In Advances in Neural Information Processing Systems (NeurIPS), 2022.
R. Zhong, T. Yu, and D. Klein. Semantic evaluation for text-to-SQL with distilled test suites. In Proceedings of the Conference on Empirical Methods in Natural Language Processing (EMNLP), 2020.
Y. Zhou, A. I. Muresanu, Z. Han, K. Paster, S. Pitis, H. Chan, and J. Ba. Large language models are human-level prompt engineers. In Proceedings of the International Conference on Learning Representations (ICLR), 2023.
A SUPPLEMENTARY THEORY
This appendix supplies the detailed setup, exact constants, supporting statements, and extensions for Sections 2–5. Proofs of the main and supplementary results appear in Appendix B.
A.1 CONFIGURATIONS, COMPARATORS, AND LOSS DECOMPOSITION
This section describes the configuration spaces, admissible families, and execution traces used to define the loss decomposition in (2).
A.1.1 ADMISSIBLE CONFIGURATIONS AND EXECUTION
Let denote the base model. The admissible configuration families depend on how updates are produced and deployed.
Definition 2 (Adaptation protocol and admissible families). An adaptation protocol declares the base model, executor and interfaces, available data, resource budgets, and permitted text-and parameter-update procedures. It induces standard Borel spaces and of admissible text and parameter configurations, together with a measurable compatibility family of deployed pairs containing the base pair. Cross-mode simulation is admissible only if permits and charges its interfaces, storage, and computation.
Fix and suppress its subscript. We specify evaluator and feedback assumptions separately. Standard-Borel spaces accommodate finite, countable, and usual continuous configurations. The text configuration , with base object , comprises reusable objects with canonical token serializations: prompts, retained memory, demonstrations, retrieval contents, and harness instructions. Literal serializations are countable, while continuous relaxations require a -declared quantizer or serializer for deployment evaluation.
A parameter configuration specifies model parameters , including learned auxiliary tensors, with . It may be continuous or atomic, including checkpoints, adapters, patches, and learned prompt/prefix tensors. In particular, dense tensors belong to . The measurable executor exec combines , task input, and possibly persistent operational state : environment state, tool sessions, caches, and runtime objects not selected as reusable configuration.
For a current configuration , define the admissible one-coordinate update sets:
These updates hold the other coordinate at its current value, whereas joint updates select from . The comparison families in Section 2 instead fix coordinates at the base pair . For non-Cartesian compatibility families, priors must be supported on . The prior-based results remain valid, but product KL identities need not hold. Joint configurations may change both base coordinates regardless of installation order.
Given task input at round , execution produces a trace, loss, and next state:
Here records outputs and intermediate actions, and governs state transitions. The normalized loss may combine quality and per-use resources. Appendix D treats installation and path-dependent transition costs separately.
A.1.2 FIXED COMPARATORS AND LOSS DECOMPOSITION
We use the candidate families, causal losses, and cumulative comparator values defined in Section 2. Exogenous tasks are shared across counterfactual histories, while deployment-responsive tasks, users, and environments are rerun under each history. The accounting identity (2) conditions on this response tree. We refine its restriction and averaging conventions below. For text-only or parameter-only selection, restriction can be further split at the union family into and . Neither difference alone measures a nonadditive text–parameter interaction.
For fixed diagonal tables and action marginals , . Substituting this expectation into a realized trajectory's decomposition requires the sampling residual:
Experiments retain this residual and distinguish averaged hindsight optima from expected-loss optima: generally, .
A.1.3 FEASIBILITY AND CONFIGURATION REACHABILITY
Feasibility asks whether a requested operational effect is attainable, separately from its loss.
Definition 3 (Protocol-relative update reachability). Fix an operating condition . For configuration , let be the law of the execution trace and next state obtained by executing with from and applying . From current configuration , the reachable sets are
A target effect is feasible for a mode when its law belongs to that mode's reachable set, while a task-specific discrepancy defines approximate feasibility.
Two updates have the same effect at when their trace/state laws agree, while approximate feasibility uses a declared discrepancy tolerance. Neither reachable set need contain the other, and both depend on and potentially . Finite search failure does not prove nonreachability, and budget-violating effects are inadmissible. For multi-round targets, replace by the declared policy's rollout law.
These definitions imply neither disjoint neural effects nor persistence determined by artifact type.
A.2 SELECTION AND FAMILY RESTRICTION
We bound stateless full-information selection in (2), then distinguish restriction, coordinatewise selection, and candidate discovery.
A.2.1 FINITE CANDIDATE SELECTION
Section 3 states the finite-family update (3) and selection-plus-restriction bound (6). The proof is in Appendix B.2. With a uniform prior over candidates, choosing bounds selection regret by without knowing the best candidate. Restriction can remain linear, although expanding a family can reduce it while increasing selection complexity, independently of the mode label. A singleton family incurs no diagonal selection regret.
A.2.2 MEASURABLE PRIORS AND COMPARATOR COMPLEXITY
To include continuous parameters, let be a standard-Borel space, not necessarily a product, with prior fixed before the losses. Deployment of has measurable expected loss
This evaluator averages model, tool, and harness randomness in (24), whereas Section 2 fixes exogenous randomness. The bounds apply to either table under its comparator averaging convention.
Loss may depend on earlier history but is fixed before . The learner incurs and observes all of . Given pre-draw information , its conditional mean loss is
Averaging over the learner's draw defines conditional pseudo-regret, and an outer expectation gives expected pseudo-regret.
Definition 4 (Point and distributional external regret). For a fixed reference configuration , define
For a fixed probability measure on , define
The comparator holds one draw from fixed throughout the sequence, with . Overall point regret is
The infimum need not be attained.
Definition 4 excludes action-dependent state trajectories. For probability measures , define
when , and otherwise. Here denotes absolute continuity and the relative density. For , KL measures prior-relative comparator complexity.
Exponential weights initialized by uses the normalizer:
and sampling measure with density
Here and . This update is measurable-space Hedge (Littlestone & Warmuth, 1994; Freund & Schapire, 1997; Cesa-Bianchi & Lugosi, 2006).
Theorem 1 gives the arbitrary-rate and optimized bounds. The proofs of the selection results below appear in Appendix B.2.
Corollary 2 (Product-prior complexity decomposition). For , , and finite-KL with marginals ,
Here measures comparator dependence, not loss interaction.
(37)
For a product comparator , . A frozen language model can induce the text prior, while the parameter prior may encode rank, precision, sparsity, or provenance.
Corollary 3 (Prior-atom description-length regret). Under the product prior , for positive-mass atoms , put and . Then , optimized to when the complexity is positive.
For an autoregressive language-model prior with almost-sure termination or bounded serialization length, is a text description length. Zero-mass points have infinite pointwise KL, so they require a nearby positive-mass comparator and a regularity condition.
Corollary 4 (Local point regret on continuous spaces). Let , , and let be metrics with measurable balls. Suppose every loss satisfies
for nonnegative uniform over rounds. Fix and radii whose balls and have positive respective prior mass. Set . For every ,
Shrinking the balls reduces localization loss but may increase complexity. For positive local complexity, optimizing gives
For mixed spaces, replace one ball by an atom. The bound is sublinear if and . Without regularity, however, the distributional theorem does not control zero-mass points.
Learning-Rate and Computational Interpretation. The arbitrary- result holds simultaneously over finite-KL comparators, whereas optimized rates are comparator-tuned. Grids, doubling, or parameter-free methods remove the need for advance knowledge at an additional regret cost (Orabona & Pál, 2016), although preserving low-refresh guarantees is nontrivial. The guarantee is statistical and does not require Gibbs normalization, sampling, or candidate proposal to be computationally efficient.
A.2.3 MODE RESTRICTION AND THE VALUE OF JOINT CONFIGURATIONS
The all-admissible family values and gaps in Proposition 2 depend on , the evaluator, and , independently of hard-target feasibility; see Definition 3. Joint access need not measure interaction: on with base has a positive joint-effect gap but zero factorial interaction. These gaps also differ from finite-candidate restriction in the Spider comparison and per-use target discrepancy ; see Appendix D for the latter.
For mode-restricted selection under the Cartesian specialization, use slice priors:
These priors avoid conditioning on a possibly zero-mass product slice. Proposition 2 gives the exact selection–approximation–restriction identity and its EW bound. Appendix A.2.5 further splits comparator approximation into localization and discovery.
Corollary 5 (Mixture-prior mode selection). Let be nonempty, with priors supported on and positive weights summing to one. Extend each mode prior by zero to the union and define
EW with this mixture prior satisfies, for fixed finite-KL ,
For , add the proposition's approximation and restriction gaps to compare with the joint optimum.
Overlapping modes contribute additively to the mixture. Choosing preserves (37).
To keep mode identity observable, use the tagged lift:
with projected loss . EW samples and deploys a, retaining mode identity where families overlap. The lifted comparator has exact KL
Without tags, overlap can reduce KL, so this certificate need not identify a posterior mode cost.
Equal weights charge at most for two modes or with the joint mode, while approximation or restriction can remain . Full-information integration neither proposes candidates nor certifies feasibility or deployment cost. Bandit variants additionally introduce action-set dependence (Auer et al., 2002; Bubeck & Cesa-Bianchi, 2012).
A.2.4 JOINT AND COORDINATEWISE SELECTION
Use the finite Cartesian family, product prior, exogenous loss table, full feedback, and common initialization of Section 3. For a positive deterministic learning-rate schedule , define the common target distribution:
The constant choice recovers (3), whereas a varying rescales the entire cumulative loss. A sweep preserves when initialized from it, but the preceding configuration need not have that law.
Additivity and a product prior factorize the EW target; see Proposition 3. Bounded multiplicative losses generally do not factorize it, but nonadditivity alone need not separate regret.
Exact Constants for the Fixed-Rate Separation. For the barrier loss f of Proposition 4, the exact constants are as follows. For every fixed and every , the selectors above satisfy
The linear lower bound is not uniform as vanishes. A slower schedule separates regret even when both selectors eventually reach the optimum.
Exact Constants for the Convergent Separation. Under Corollary 1, the value of does not affect uniform initialization. For and ,
These separations concern the specified conditional sampler, not arbitrary alternating optimization. More sweeps, global refreshes, or deliberate transitions through higher-loss configurations can change its behavior. Exact joint sampling may also be costly, and these results establish no computational advantage. The controlled selection study in Section 6 tests interaction, sweep count, and learning rate by exact probability propagation.
A.2.5 CANDIDATE PROPOSAL, DISCOVERY, AND SELECTION
Candidate construction uses scores, traces, gradients, or critiques (Zhou et al., 2023; Deng et al., 2022; Pryzant et al., 2023; Yang et al., 2024a; Guo et al., 2024; Fernando et al., 2024; Yüksekgönil et al., 2025; Lee et al., 2026a;b). We separate discovery from selection on a fixed family. Changing families instead require tracking, sleeping-expert, or growing-expert guarantees (Herbster & Warmuth, 1998; Cortes et al., 2019; Mourtada & Maillard, 2017).
Let and denote empirical losses on the declared training and validation data. A bilevel joint proposal fits, for each proposed harness z,
then chooses
Outer validation search may be discrete and inner fitting gradient-based, but these approximate minimizations do not establish finite-budget convergence. Alternating procedures use (21)–(22): BetterTogether alternates prompt optimization and fine-tuning (Soylu et al., 2024), while WHALE alternates model updates and executable-harness search (Kim et al., 2026). They motivate, but differ from, the fixed-family conditional sampler in Section 3. Our guarantees apply after the family and prior are fixed.
For nonempty measurable , , define
where is supported on . Discovery charges the candidate family's gap to the all-admissible optimum , while localization charges 's gap to the best candidate in the family. Substituting
A family prior controls only selection. Localization vanishes for a point mass on the best atomic candidate, while discovery remains relative to the proposals and budget. Non-Cartesian families require a joint prior and KL.
A.3 STATE EFFECTS AND POLICY REGRET
Bounded influence and full diagonal feedback control the state term in (2), and resets permit whole-episode policy selection. Section 5 weakens the feedback assumptions.
A.3.1 PERSISTENT STATE AND POLICY REGRET
Section 4 defines policy regret using each fixed comparator's own trajectory. Propositions 5 and 6 show why evaluating all configurations on the learner's state can conceal irreversible damage and why unrestricted persistent state precludes sublinear guarantees. The constructions and proofs are in Appendix B.3. Relabeling gives the parameter-only obstruction when that mode admits the same transitions, although actual text and parameter updates need not be symmetric.
A.3.2 POLICY REGRET UNDER BOUNDED INFLUENCE
Bound each coordinate's influence while allowing interactions within its history window (Arora et al., 2012; Anava et al., 2015). Fix a prior on or a measurable compatibility subset supporting every refresh.
The functions in Assumption 1 have domains
Windows include the current coordinate, so zero horizon excludes carryover. Bundles use their largest horizon. For , write for its coordinate horizon, truncated at without changing the windows.
For , define the diagonal loss:
This specializes (1). Assumption 2 requires valid simulation or cloning of each constant history. Ordinary full information on the learner's realized history does not reveal these losses.
Lazy Exponential Weights. Apply exponential weights (36) to the diagonal oracle, coupling draws by measurable Shrinking Dartboard to control state (Geulen et al., 2010; Kalai & Vempala, 2005). For , set in (36) to define the target marginal , and draw . After deploying and observing , update
For , retain with probability and otherwise refresh from , with indicator . Refreshes may redraw , so the number of switches is at most . Under , is the mean retention probability. At , draw once from and never refresh.
Lemma 1 (Lazy exponential-weights coupling). The lazy algorithm has marginals . For ,
To control the signed state effect isolated by Proposition 7, count departures from constant histories.
Lemma 2 (Contamination accounting). Under Assumption 1, for any realized sequence , put
The charge uses the larger horizon for simultaneous changes. Let count rounds with a nonconstant coordinate history. Pathwise,
Overlap can make the summed charges loose. For the lazy algorithm,
Theorem 2 combines these selection and contamination bounds, with the exact learning rate in (12).
For mixture prior (43), with each supported on its slice and , replace by
which is exact on the tagged lift and may exceed untagged KL. Whole-pair refreshes still charge , even when comparator complexity concentrates on one mode.
Corollary 6 (Lazy local point policy regret). Under Theorem 2, suppose and the diagonal losses satisfy the Lipschitz condition of Corollary 4. For its metrics, positive-mass balls, and local complexity, every gives
For positive local complexity, optimizing gives
At zero local complexity, one conditioned-prior draw leaves only localization loss, whereas a product-prior atom needs no localization.
Proposition 8 in Section 4 gives the mode-restricted bounds for the supported slice priors (41)–(42). Zero KL permits a fixed prior draw, atoms give description lengths, and balls add localization. Proofs are in Appendix B.3.
A.3.3 EPISODIC OPTIMIZATION WITH RESETS
Consider K episodes of H rounds, each in a fresh sandbox with common resets
A policy maps within-episode history to through admissible updates, whose modes may differ in effect; see Definition 3. Fix a standard-Borel policy family with prior .
For expected evaluation loss , define episode loss
The expectation includes execution, transitions, and policy randomness from the common reset. Assume measurable are fixed before learner randomization, with exogenous tasks.
Given pre-selection history , including completed-episode feedback, define
This expectation also averages over policy selection, as in (30). For a fixed policy or comparator probability measure on , define
The comparator holds one policy draw across episodes, while allowing within-episode configuration changes. Thus (74) extends the own-trajectory comparison to policies.
Specializing (36) to , sample the episode- policy from
Execute it for the episode, then reveal for every policy, including unexecuted ones.
Theorem 5 (Episodic policy prior-complexity regret). Under the preceding reset, exogeneity, measurability, and full-feedback assumptions, for every and fixed with finite , episode-level EW satisfies
For , gives .
The proof is in Appendix B.3. Predictably reactive episode losses instead yield realized-sequence external pseudo-regret.
As in Corollary 3, atoms give description length . For measurable metric balls and episode losses uniformly -Lipschitz in policy distance, conditioning on the radius- ball gives complexity and localization loss , as in Corollary 4.
Restricted policy families may still incur the gaps in Section 3.
A.4 FEEDBACK REQUIREMENTS AND EXTENSIONS
The feedback interface determines control of selection and state in (2). Full diagonal feedback evaluates each candidate's own trajectory, sparse probing reduces evaluations, and deployment-only learning requires control of causal reaction. Appendix A.4.10 specifies when the guarantees retain the fixed joint-family comparator. These guarantees neither construct candidates nor rank unrestricted families.
Sections 4–5 present the main guarantees for full counterfactual feedback, sparse probes, and deployment-only feedback. Here counts candidates, not episodes as in Appendix A.3.3. We use and for comparator complexity and the maximum influence horizon, respectively. The comparator-tuned rates concern expectations, while the exact bounds cover zero complexity, zero influence, and finite-horizon boundaries.
Exponential weights and importance weighting (Auer et al., 2002), low-switch couplings (Geulen et al., 2010; Anava et al., 2015), and policy-regret mini-batching (Arora et al., 2012) supply the algorithmic ingredients. Decoupled exploration and deployment (Avner et al., 2012) and limited-observation Shrinking Dartboard (Cheng et al., 2023) provide further precedents.
A.4.1 ACCURACY OF FULL DIAGONAL EVALUATION
These results relax Assumption 2 conditional on an exogenous response tree. For random trees, the relevant independence, mean, or error assumptions must hold conditionally. Unconditional unbiasedness does not justify a tree-dependent hindsight comparator; see Appendix A.4.10.
Corollary 7 (Approximate diagonal evaluation). Under Assumption 1, let the entire estimate sequence be independent of all learner randomness, with and almost surely for fixed . Lazy EW using these estimates satisfies, for every and with finite ,
Independence from only the current draw is insufficient. Off-policy estimates require additional coverage, variance, and validity assumptions (Dudík et al., 2011; Jiang & Li, 2016). Proofs of the feedback results are in Appendix B.4.
Corollary 8 (Finite-family sampling cost for diagonal estimation). Let be supported on a -candidate family , restricting the learner and comparators to it. Fix . Estimate each by the mean of independent samples with mean , using a sampling mechanism exogenous to all learner randomness. Define
With probability at least , all estimates satisfy simultaneously. Under the remaining assumptions of Corollary 7, policy regret averaged over estimation and learner randomness satisfies
The estimator uses oracle samples.
Uniform accuracy is guaranteed by , and the envelope can be capped at one. Oracle costs must include simulation or cloning, while logged language-model counterfactuals need separate unbiasedness justification. With fixed samples per pair, the envelope need not vanish, so this certificate alone does not imply sublinear regret.
Corollary 9 (Fresh unbiased diagonal feedback). Fix a finite compatible -candidate family with positive prior . Under Assumption 1, let the entire estimate sequence be independent of all learner randomness, with and
For lazy EW using these estimates, every and fixed satisfy, averaging over estimation and learner randomness,
Fresh independent oracle samples satisfy Corollary 9 at . Larger improves uniform accuracy but is unnecessary for this coarse bound. Biased or trajectory-dependent estimates do not inherit it. The error bridge compares true and estimated learner and comparator losses for the same policy, not learners trained on different feedback. An offset preserves EW marginals but multiplies retention (63) by , changing state effects; see the feedback accuracy study in Section 6.
A.4.2 CAUSAL RESPONSES AND COMPARATOR CONVENTIONS
Fix a nonempty finite compatible family , and prior . Neither a Cartesian family nor a factorized prior is required.
Definition 5 (Causal response and expected policy regret). Let be an external random tape independent of the learner's private randomization, and let be the measurable causal response functions from Section 2. Realized loss is . For a constant history , write , making the tape explicit in (1). Policy regret is as defined in Section 4, averaging over and learner randomness, with fixed independently of learner observations and randomization.
Each intervention reruns task selection, user responses, and environment state through . This defines counterfactuals but supplies no evaluation oracle. The environment may observe actions and outcomes, not future private coins. For observed announcements or messages, their rules and intervention-dependent values must also be specified.
A deterministic tree's best fixed candidate is admissible. Random environments distinguish best expected loss from realized hindsight:
Conditioning on an exogenous tree can justify hindsight comparison; see Appendix A.4.10. Conditioning on noisy probes, however, cannot justify a probe-dependent comparator in an unbiasedness argument.
A.4.3 PREDICTABILITY DOES NOT JUSTIFY CONDITIONAL LAZY MARGINALS
Predictability and the bounded influence specified in Assumption 1 do not supply conditional lazy marginals: a retained action can correlate with losses chosen from its past despite matching unconditional marginals.
Proposition 9 (Two-round counterexample). A predictable second-round loss vector can satisfy under lazy sampling, even when has unconditional marginal .
For , both diagonal losses are . The counterexample invalidates substituting current-action losses on the realized prefix, not Theorem 2's diagonal oracle.
Proposition 10 (External regret versus few switches). Let and for , and let
Every learner satisfies
Constant-trajectory comparators lose T - 1, excluding a policy-regret lower bound but motivating fresh block draws under reactive feedback; see Appendix A.4.7.
A.4.4 EXPONENTIAL WEIGHTS WITH NONNEGATIVE ESTIMATES
Importance-weighted estimates may exceed one, invalidating the bounded-feedback term . A standard second-order potential argument instead controls selection by their second moments (Auer et al., 2002; Cheng et al., 2023).
Lemma 3 (Prior-EW with nonnegative estimates). Let be finite, let , and define
For every distribution Q on C, pathwise,
The sequence may be adaptively generated.
Actual-loss bounds additionally require regime-specific sampling identities, unbiasedness, and comparator validity.
A.4.5 SPARSE INDEPENDENT DIAGONAL PROBES
Let denote deployment, the probe, its outcome, and the lazy refresh indicator.
Assumption 3 (Independent probes of an exogenous diagonal table). Conditional on an exogenous response tree U, the following requirements hold. Assumption 1 holds. An autonomous evaluator uses randomness independent of all deployment coins and consumes no deployed actions or outcomes. Its pre-probe sigma-field includes U and earlier probes, and may include evaluation context hidden from the learner. The selector uses only previous estimates, and positive is -measurable. Drawing , the evaluator returns with
Probing leaves the response tree unchanged, and deployment intervention leaves the entire evaluation process unchanged.
Independent simulation noise on an exogenous table qualifies, whereas deployment-reactive evaluation does not. Proposition 11 permits probe-driven adaptation with narrower comparators.
Under Assumption 3, initialize the selector with and . At round , execute , obtain the independent probe , and form
Update
For , retain with probability and otherwise draw afresh from . Draws use the independent deployment tape and return no deployment-loss feedback. A refresh need not switch configurations.
Lemma 4 (Probe mean and second moment). Under Assumption 3,
where
In particular, gives .
Lemma 5 (Conditional lazy marginals and refreshes). Under Assumption 3, conditional on the full auxiliary tape and the fixed response tree, has law . Moreover,
Conditioning requires the entire autonomous process, not current-coin independence; see Proposition 9.
Refined Bound for Arbitrary Probe Distributions. Theorem 3 in Section 5 specializes a more detailed inequality. Under Assumption 3, for , every fixed and satisfy
An infinite expected second moment makes this bound vacuous. For , all moments are finite, and (16)–(17) follow. Text-only and parameter-only families use and , and non-Cartesian families use their supported joint prior. Tuning is comparator-dependent, but uniform priors give for every point comparator.
Cloning, replay, constant-history initialization, and simulation costs remain. Finite influence supplies no simulator, and the expected bound guarantees neither low variance nor high-probability performance.
Proposition 11 (Autonomous query-adaptive evaluation). The sparse-probe bounds hold for fixed if the auxiliary process chooses response functions from earlier probes and , independently of deployment coins and without consuming deployed actions or outcomes. The current diagonal vector and must be -measurable and satisfy (90). Conditional on the complete auxiliary process, responses must have diagonal and the stated coordinate influence bounds. Deployment intervention must leave that entire process unchanged.
This allows probe-driven curricula, not deployment reactions or realized query-dependent comparators. The best expected-loss candidate is fixed before probes and remains admissible under (85). The budget and bias extensions below inherit this fixed- restriction for query-adaptive trees.
A.4.6 PROBE BUDGETS AND BIASED EVALUATION
Corollary 10 (Multiple probes per round). Hold the current evaluator context and fixed while drawing conditionally independent probes with . If is the average of their importance-weighted vectors, then
Consequently in (16) can be replaced by , while the expected refresh bound is unchanged.
Sampling is with replacement, whereas querying every candidate once has a different estimator law.
Corollary 11 (Expected query budget). Use an independent Bernoulli gate with probability and, when it opens, one probe drawn from . Set the estimate to zero when the gate is closed. The resulting estimator,
is unbiased, with weighted second moment at most . Writing for the expected number of probes, the optimized bound for positive is
A hard cap makes later inclusion probabilities zero, invalidating Corollary 11's argument. Fixed-budget designs therefore need separate analysis (Cheng et al., 2023).
Simulator bias separates the true selection target from the mean driving retention.
Proposition 12 (Biased-probe bound). Retain probe autonomy, but suppose
where is predictable, , and is the actual weighted second moment of the estimator. Then
In particular, for ,
Replacing by in the refresh term requires an additional : even when , positive simulator means can trigger refreshes.
A.4.7 DEPLOYMENT-ONLY FEEDBACK AND CAUSAL REACTION
Under Definition 5, the learner observes only actual deployment losses. Use the block notation and counterfactual losses of Definition 1 in Section 5. Conditional on and the past, precedes the draw and includes within-block reactions, but only its executed coordinate is observed.
Block Exponential Weights. Initialize . For each block , deploy a fresh private draw for rounds, observe , and set
Retain the last configuration for the remaining rounds, giving at most switches. Block draws are fresh, not lazy. Exact probabilities stay positive, but numerical underflow remedies involving clipping or exploration require corresponding bias or exploration terms.
Fresh draws justify sampling identities against adaptive prefixes.
Lemma 6 (Bandit selection on block losses). For every fixed and ,
Adding the causal reaction (19) and the remainder charge to Lemma 6 gives Theorem 4 in Section 5.
A.4.8 CONDITIONS CONTROLLING CAUSAL REACTION
Assumption 4 (Total component-specific finite influence). For every fixed U, the complete causal response depends only on the coordinate windows in Assumption 1, including all task-selection and evaluator rules, from a common initial condition.
Forgetting in a cache is insufficient if task selection remembers the first action indefinitely, because that dependence belongs in .
Lemma 7 (Prefix charge under finite influence). Under Assumption 4, with ,
Corollary 12 (Deployment-only bounded-influence rate). Under Assumption 4, for every ,
For , choosing gives
(110)
For fixed positive and sufficiently large , integer , truncated to , gives
For m = 0, use b = 1, and for , draw once from .
Use (109) when parameters grow with . The zero-influence rate is , and a singleton family has zero regret. For zero KL, fresh block resampling need not have zero regret, unlike a single prior draw. Text-only, parameter-only, and joint or cross-mode blocks use , and , respectively.
Equation (109) already includes prefix effects through , so another contamination term would double-count. The established rate (Arora et al., 2012) cannot universally be improved to under deployment-only feedback (Dekel et al., 2014). Appendix B.4 gives the reduction to bandits with switching costs. This leaves optimal m and prior dependence in (111) open. Sparse probes provide stronger information.
To separate initial warm-up from persistent reaction, fix an integer and define
with an empty sum if . Without assuming total finite influence,
Sublinear regret requires and appropriate , neither of which the definition supplies.
A suffix-sensitivity bound can control reaction without exact forgetting.
Proposition 13 (A suffix-sensitivity envelope). Suppose deterministic numbers satisfy, for every admissible prefix of length , every , and every relevant ,
With , the block algorithm satisfies
If , one may replace by .
The envelope must hold for all protocol prefixes, not merely observed paths. Contractive state with Lipschitz losses supplies one such envelope.
Assumption 5 (Contractive environment state). An environment state lies in a metric space of diameter at most , with
The loss depends on , coordinate windows of lengths , and exogenous randomness. For identical windows and randomness, it is G-Lipschitz in . Learner and comparator share the initial state, maps, and admissible external noise tape.
Corollary 13 (Contractive reaction without a counterfactual oracle). Under Assumption 5, let and
Then (115) holds, with . For fixed positive , the corresponding tuned order is .
For , set : initial state mismatch can affect loss before contraction. For , use , not the cube-root formula.
For example, on a bounded convex set models a deployment-dependent task mixture with Lipschitz expected loss. Its discrete sampled-task losses, however, need not be pathwise Lipschitz. Summable reaction replaces finite influence, relating to online control under mixing (Even-Dar et al., 2009), although Markov mixing alone does not imply pathwise contraction.
A.4.9 IDENTIFICATION FROM LOGGED DEPLOYMENT DATA
An ordinary one-step importance-weighted outcome,
intervenes only on the current action, so it need not estimate own-trajectory loss (1). For after , choosing loses one, whereas . Sequential evaluation requires sequential intervention (Jiang & Li, 2016).
Lemma 8 (Window importance sampling in a sufficient model). Consider a fixed deterministic response table with total joint influence horizon (for coordinate influence horizons, is sufficient), , and a behavior policy with known positive propensities . Let the logged outcome equal the realized loss, or be conditionally unbiased for it given the full history through the current action. Put
Let denote the logged history before the window. Then
Uniform logging gives a second-moment bound for this estimator, not a minimax lower bound. Stochastic systems also require consistency, sequential ignorability, and window identification of the full own trajectory. Overlapping windows need not be unbiased conditional on preceding estimates, and lazy logging violates Assumption 3. These issues require independent episodes, valid sample splitting, or delayed/blockwise analysis. Without intervention support, neither models nor doubly robust estimation alone identify diagonal values.
A.4.10 TRANSFERRING BOUNDS TO THE FIXED JOINT COMPARATOR
For a deterministic response tree, let minimize the fixed-candidate loss from Section 2 over , attaining . Adding family restriction to its policy regret gives
This groups selection and state in (2). Distributional comparators additionally incur their approximation gap to the mode optimum. The identity does not certify candidate discovery or reachability.
Conditioning on the exogenous tree fixes its best candidate before probing, making it admissible in Theorem 3 under Assumption 3. Theorem 4 likewise permits fixed conditional on U, and arbitrary- bounds average conditional complexity and reaction over U. Unobserved realized complexity may prevent implementable tuning, but uniform priors give for every point comparator without requiring knowledge of its identity.
Proposition 11 permits fixed Q or a best expected-loss candidate, not a query-dependent comparator correlated with probe noise. Conditioning on the full transcript establishes deployment marginals, not conditional unbiasedness of realized estimates, and the optima in (85) remain distinct. Sparse probing therefore needs a valid counterfactual evaluator, and sublinear deployment-only regret needs controlled reaction (19). Implementation must also account for numerical stabilization and evaluation costs.
B PROOFS
This appendix proves the results stated in the main text and Appendix A. The proofs follow the same topic order: configurations and loss decomposition, selection and family restriction, state effects, and feedback requirements. The final subsection proves the cost result in Appendix D.
B.1 CONFIGURATIONS, COMPARATORS, AND LOSS DECOMPOSITION
Proof of Proposition 1. Add and subtract and . Family inclusion implies . A changing selection can outperform every fixed candidate, and a mixed history can improve or worsen its diagonal loss. Thus, neither remaining term has a fixed sign.
B.2 SELECTION AND FAMILY RESTRICTION
Proof of (6). Apply Theorem 1 on with , prior , and . Its KL term is , and its regret is . Statelessness makes the state term in (2) zero, so adding family restriction gives (6).
Proof of Theorem 1. Hoeffding's lemma (Hoeffding, 1963) and telescoping give
For , Jensen's inequality gives
Combining the bounds gives (4). Optimizing this bound for positive KL gives (5). If , then , and the extension has zero distributional pseudo-regret.
Proof of Corollary 2. Apply Radon–Nikodym factorization and the KL chain rule through .
Proof of Corollary 3. Apply Theorem 1 to . For this comparator, (37) makes its KL the sum of the negative log atom masses. Zero complexity means the prior is concentrated on the reference.
Proof of Corollary 4. Use , whose KL is . Equation (38) adds at most per round. Applying Theorem 1 and optimizing then gives the stated bound.
Proof of Proposition 2. Add and subtract the family values and the -average cumulative loss defined in Section 3. The definitions of , , and identify the resulting gaps, and Theorem 1 bounds the selection term on .
Proof of Corollary 5. Since as measures, and integration gives
Apply Theorem 1 and (7).
Proof of Proposition 3. The cumulative loss and product prior yield the following factorization of (48):
The first conditional draw therefore has law independently of the preceding w, and the second has law independently of the new z. The resulting joint law is , including the common initialization at t = 1. Stateless losses then give equal expected cumulative loss.
Proof of Proposition 4. The best fixed configuration is , with zero loss. For , the joint normalizer includes its unit unnormalized weight, giving
The uniform initialization has expected loss . Summing the geometric series proves the first bound, with its final inequality following from .
The coordinatewise selector starts at with probability . Conditional on remaining there, each coordinate draw at round retains zero with probability . The event of starting at and retaining zero at every subsequent coordinate draw therefore has probability:
(131)
Here gives the first inequality. Loss equals on all rounds of and is nonnegative otherwise, proving (50).
Proof of Corollary 1. Writing , the three suboptimal unnormalized joint weights are and two copies of . Bound the normalizer below by one and sum the resulting expected losses, using for . These weights also bound the probabilities of nonoptimal joint draws by a summable sequence, so the first Borel–Cantelli lemma gives eventual optimal selection.
For the coordinatewise selector, the event from the proof of Proposition 4 satisfies the following:
(132)
Multiply by and sum over to obtain (52).
To establish eventual optimal selection, put . From any starting pair, the next complete sweep ends at with conditional probability at least
The product of the corresponding avoidance bounds over any infinite tail is zero, so is visited infinitely often almost surely. A sweep starting at departs from it with probability at most . These departure probabilities are summable, so Borel–Cantelli gives only finitely many departures. Infinitely many visits and finitely many departures imply that the coordinatewise selector eventually remains at .
B.3 STATE EFFECTS AND POLICY REGRET
Proof of Proposition 5. Take text configurations with initial, good, and bad states, zero round-one loss, and
The good and bad states are absorbing, with losses for given by
(136) independent of . Choosing loses , as does either fixed action on that bad-state path, giving external regret:
The constant counterfactual enters the good state and loses zero, so
This completes the proof.
Proof of Proposition 6. Fix an optimizer Alg and text-only environments , sharing their initial state and pre-round history. Their indistinguishability makes common to both. Reuse the absorbing states and losses from the proof of Proposition 5, with first transition
By (136), the matching fixed action loses zero, and the optimizer's regrets are
Since ,
The hard environment is chosen after fixing the optimizer but before realizing its random seed. Revealing after the irreversible transition cannot help.
Proof of Lemma 1. For measurable , the conditional transition kernel is
Integrating against gives , proving the marginals by induction. Use , and , then sum.
Proof of Proposition 7. Both actions have law by Lemma 1, hence expected diagonal loss . The restriction terms also agree, so subtracting (2) in expectation proves the identity.
Proof of Lemma 2. A coordinate switch at can contaminate only , at most rounds. Simultaneous intervals share a start, so their union has length at most the larger horizon. Deployed and diagonal losses coincide outside these intervals and differ by at most one inside, proving (67) by the triangle inequality and a union bound. Without a refresh, , so gives (68).
Proof of Theorem 2. Lemma 1 and Theorem 1 applied to (61) give
Adding the signed state term as in (2), then applying (67), (68), and (65), gives the sharper chain
(145)
Optimizing gives (12) and (13) for . At , equality in KL gives , and a fixed prior draw incurs , matching the comparator in expectation.
Proof of Corollary 6. The conditioned prior in the proof of Corollary 4 has KL and diagonal loss at most above by Lipschitzness. Apply Theorem 2 and optimize.
Proof of Proposition 8. Constant parameter history contributes no contamination in Lemma 2, so Theorem 2 applies on with prior and horizon . The parameter-only proof is symmetric.
Proof of Theorem 5. Apply Theorem 1 on to losses with learning rate , which gives the weights in (78). Multiplying its regret bound by proves (79), and optimizing over gives the stated rate.
B.4 FEEDBACK REQUIREMENTS AND EXTENSIONS
Proof of Corollary 7. Apply Lemma 1 and Theorem 1 with the fixed estimates as losses. Bounded estimates give an expected refresh count at most , so Lemma 2 bounds the expected absolute state term by . For every ,
Sum and apply the KL bound to .
Proof of Corollary 8. Hoeffding's inequality bounds each failure probability by , so a union bound over pairs gives . For any estimate table in the success event, apply Corollary 7 with . Otherwise, true policy regret is at most , since both cumulative losses lie in . Taking expectations gives (82).
Proof of Corollary 9. For a fixed exogenous estimate table, Lemma 1 and Theorem 1 apply to . Since depends only on , conditional unbiasedness gives
Taking expectations of the estimated-loss bound controls true diagonal selection by . Bounded estimates give at most expected refreshes, allowing Lemma 2 to bound the state term.
Proof of Proposition 9. Take , , and . Lazy sampling retains surely, while . After observing , but before round two, let
Then , whereas . Conditional on the realized past, the actual law is , not .
Proof of Proposition 10. The learner's loss is . Since , the smaller fixed-action cumulative loss on this realized sequence is at most . Subtract and take expectations.
Proof of Lemma 3. Let . For , . Therefore
Here , so using is valid. The Jensen lower bound (127) applies with replacing because that step does not require losses bounded by one. Sum the upper bound, use , combine with the lower bound, and divide by .
Proof of Lemma 4. For the mean, the probability cancels the denominator in (91). For the second moment it cancels only one of its two squared factors. Sum with weights and use .
Proof of Lemma 5. Conditioning fixes all estimates and leaves deployment coins independent. The kernel in (143), with replacing , therefore preserves by the calculation in the proof of Lemma 1. That calculation needs only nonnegative finite losses, which keep retention probabilities in . Induction gives the marginals, and
(150)
Average using Lemma 4: although estimates can exceed one, their conditional means lie in .
Proof of Theorem 3. Apply Lemma 3 to . Since and fixed are measurable before the probe, conditional unbiasedness gives the following:
Lemma 5 gives , identifying expected true diagonal selection regret.
On this response tree, Lemma 2 gives, with ,
Add this state charge once and apply (96). Finally use , , and optimize .
Proof of Proposition 11. Conditioning on the autonomous auxiliary process fixes all estimates without conditioning on deployment coins, so Lemma 5 and the pathwise contamination bound still apply. For the selection term, condition only on before each probe. Both and fixed are measurable there, which justifies the unbiasedness step in the proof of Theorem 3. The second-moment and refresh calculations are unchanged.
Proof of Corollary 10. For a single probe vector , conditional independence gives
(153)
The nonnegative unbiased average satisfies Theorem 3 with this second moment.
Proof of Corollary 11. Condition on the pre-gate context. Multiplying the inclusion probability by the estimator cancels the denominator, whereas one factor remains for its square. Thus the mean is and the moment is at most K/p. Apply Theorem 3 and optimize.
Proof of Proposition 12. The second-order argument bounds selection relative to . The difference from true diagonal selection is
The lazy refresh calculation gives , not the same expression with . Add the state charge and use .
Proof of Lemma 6. Condition on and the learner's history before the fresh block draw. Then are fixed, and . Hence
Apply Lemma 3, use , and average over the past and .
Proof of Theorem 4. Actual loss on complete blocks is exactly . Adding and subtracting gives
Apply Lemma 6. The difference on the remaining rounds is at most , since both losses lie in .
Proof of Lemma 7. The first block's common empty prefix gives zero discrepancy. In later blocks, repetitions make both coordinate windows constant, equating the losses in (19). At most earlier differences remain, each bounded by one. Summing their absolute values and averaging over and randomness gives the bound.
Proof of Corollary 12. Combine Theorem 4 with Lemma 7, optimize the first two terms, and use and .
Deployment-only lower bound. The memory-one subclass
contains adversarial bandits with switching cost, up to a fixed scaling. The lower bound of Dekel et al. (2014) therefore gives a obstruction for fixed action count, without establishing optimal m or prior dependence in (111).
Proof of (113). The first block has the same empty prefix under deployment and the comparator, so its reaction is zero. In the remaining blocks, split the first rounds from the remainder in (19). Bound each early absolute discrepancy by one and the remainder by (112), then apply Theorem 4.
Proof of Proposition 13. The first block still has identical prefixes. In every other block, sum the bounds in (19), then apply Theorem 4.
Proof of Corollary 13. After common actions, contraction reduces any initial distance at most to . For , coordinate windows agree, bounding loss discrepancy by . For the remaining rounds , use the bound of one. Apply Proposition 13 and sum the geometric tail, using that each summand is also at most one, to obtain (119). Optimize as in (110) with replacing .
Proof of Lemma 8. The product of propensity ratios implements the intervention fixing every action in the window to . On that intervention, total finite memory identifies current loss with independently of the earlier prefix. Sequential conditioning gives the mean identity and . Since and ,
Take the same conditional expectation.
B.5 ADAPTATION COSTS AND AMORTIZATION
Proof of Proposition 14. Subtract (173) from (174) and divide by the per-use difference, which is positive by (175). The same comparison immediately gives the nonpositive-threshold case.
C EXPERIMENTAL DETAILS AND NUMERICAL RESULTS
This appendix provides the experimental specifications and numerical results supporting Section 6. Summaries and error bars use means ± one SE.
C.1 REPLICATION AND UNCERTAINTY CALCULATIONS
For independent replication means with average , we calculate
Paired contrasts are formed within each replication before this calculation. The persistent-state and approximate-feedback studies have ten independent environment tables per loss family, with 64 paired learner repetitions per table and condition. Their uncertainty includes variation across tables after averaging learner repetitions. The joint-versus-coordinatewise study propagates distributions exactly and has no sampling uncertainty.
The controlled restricted-feedback study uses four fixed environments and 64 selector repetitions per environment and condition. SQL restricted-feedback replay uses 256 selector repetitions in each of three training banks, with independent selector streams across banks. For equally weighted fixed environments or banks, let be the sample variance across selector repetitions in stratum . The conditional Monte Carlo standard error (MCSE) of the selector mean combines their independent mean variances as
Dispersion between the fixed environments or banks is not added to this conditional variance.
SQL training-seed summaries use the three separately trained candidate banks as replications on the same fixed benchmark. They assume independent training randomization conditional on the shared construction data, benchmark, and base candidates. The SEs themselves, however, are imprecisely estimated from only three replications. Matched candidate subsets are averaged within a seed before calculating uncertainty because overlapping subsets are not additional replications. For Spider, the six base-model prompt configurations share fixed outcomes across seeds. Interaction SEs do not quantify uncertainty in selected family minima or variation over new databases. Full-diagonal Spider expectations and full-feedback and draw-once replay expectations are exact within each bank, but may vary between training banks.
The original SParC deployment study shares selector randomness across training banks. For selector repetition , we first average the bank-specific quantity over the three banks,
then compute the SE over the 16 paired repetition averages. Coupling differences are taken within each paired repetition before averaging. This preserves cross-bank dependence rather than treating the banks as independent selector runs. Training-seed uncertainty conditions on the benchmark, while conditional MCSEs additionally condition on the evaluated banks or environments. These SE summaries do not provide confidence levels or significance tests.
C.2 JOINT AND COORDINATEWISE SELECTION
The coordinate-selection study uses the common family , a uniform product prior, and exact full-information feedback. The additive control has losses in configuration order . The barrier condition has losses , corresponding to and in Proposition 4. Both tables are constant across rounds and share the base loss and optimal configuration, but their intermediate losses differ. Exact joint EW and the coordinatewise sampler share the prior, loss table, and learning-rate schedule. Both selectors initialize uniformly, and the coordinatewise sampler deploys only after a complete text-then-parameter sweep. The best fixed comparator has zero loss, so expected cumulative loss equals regret. Family restriction and state effects are also zero.

(a) Interaction strength

(b) Sweep count
Joint Coordinatewise Fixed Slow schedule Barrier onset
Figure 8: Sensitivity of exact expected regret to interaction strength and coordinatewise sweep count at T = 100,000, with a shared logarithmic scale. The dotted line in Panel (a) marks the onset of a strict coordinatewise local minimum.
For the four-state sweep kernel and coordinatewise distribution , we compute
where is the number of sweeps before deployment and every sweep in round uses the same target . Joint loss is computed directly from in (48), and both targets use only preceding loss rows. Expectations are evaluated exactly in floating-point arithmetic, without selector Monte Carlo error. Conditional probabilities are normalized within each coordinate slice, avoiding division by globally underflowed target probabilities. Independent tests enumerate short conditional-draw trajectories and check additive equivalence, target stationarity, and the stated bounds. The 21 distinct conditions propagate 1,522,200 rounds in total. Across all conditions, probability normalization and agreement of the two methods' regrets on additive losses held within floating-point tolerance.
The primary comparisons run through using either fixed or the slow schedule of Corollary 1 with the known synthetic barrier . The additive control gives equal expected regret under both schedules. For the barrier loss with fixed , joint regret is 0.504 at , whereas one-sweep coordinatewise regret is 8,454.705; see Figure 2. Under the slow schedule, joint regret is 0.460, while coordinatewise regret grows from 35.264 at to 111.154 at . Over those same horizons, the coordinatewise probability of selecting rises from 99.56% to 99.86%. The finite-horizon curves illustrate the separations. The almost-sure eventual fixation and regret lower bounds, however, follow from Section 3, rather than from these curves.
The interaction sweep fixes , , and one sweep per deployment. We retain and and set
The table is additive at and has a strict barrier at only for . At , coordinatewise regret is 0.443 and 0.541 for and 0.5, but rises to 2,112.357 for . The tested nonadditive tables therefore do not all exhibit a large regret gap; see Figure 8, Panel (a). We also compare sweeps under the fixed and slow schedules; see Figure 8, Panel (b). All intermediate draws remain undeployed, and extra sweeps receive no new feedback. At the same horizon, four and sixteen sweeps reduce fixed-rate coordinatewise regret to 1,581.021 and 112.628, respectively. Under the slow schedule, the corresponding regrets fall to 0.582 and 0.462, close to the joint value 0.460. These finite-horizon reductions do not imply that a fixed number of sweeps eliminates the fixed-rate trapping mechanism. Additional checks use fixed rates and the horizon-tuned rate at , restarting each horizon-tuned run from the common prior. The fixed-rate coordinatewise regrets at are 906.794, 2,854.616, and 8,454.705, respectively. With the horizon-tuned rate, joint and coordinatewise regrets are instead 131.838 and 132.180, a gap of 0.342. However, the fixed-rate linear separation cannot be transferred uniformly to this horizon-dependent schedule. These comparisons use the same number of deployment rounds but do not equalize sampling computation. Their scope is selection among four fixed configurations, rather than prompt search, parameter training, or arbitrary alternating optimization.
C.3 SELECTION AND SIGNED STATE EFFECTS
The persistent-state study uses configurations . Ten independent environment seeds each generate a master table of length 4,096 for each of three loss-table families, supplying prefixes at . The first has identical diagonal losses across configurations. The second has fixed means in configuration order , with bounded exogenous variation and a learning signal that does not shrink with the horizon. The third changes the favored configuration over fixed 128-round phases. All tables and schedules precede learner randomization.
Let indicate whether any relevant coordinate window contains different values, so that it is zero when both histories are constant. A zero-memory coordinate contains only its current value and cannot trigger . The deployed loss follows the synthetic loss law in Section 6, with . Interior diagonal losses keep . Negative, zero, and positive make mixed histories beneficial, neutral, and harmful, respectively. This synthetic mechanism makes no claim about switching actual prompts or adapters.
The joint configuration family is evaluated across all loss-table families, horizons, , and state coefficients. A restriction panel evaluates text-only and parameter-only families on the fixed-advantage and changing-quality tables at under both positive-memory conditions. Every panel compares independent and lazy EW with draw-once, which retains one initial sample, and with best fixed configurations. Both EW selectors use the uniform prior and the rate from (12),
This uses the family size, declared horizon, and influence bound, without the best candidate's identity.
Across the three loss-table families, each environment seed has 315 algorithm conditions and 64 learner tapes (sequences of random inputs) per condition, totaling 201,600 trajectories over ten seeds. Shared tapes pair algorithm contrasts, which are averaged over tapes before forming the ten independent table means per loss-table family. Each trajectory records excess deployed loss over the common joint comparator, expected diagonal selection regret, family restriction, signed state effect, and the sampling residual in (26).
Draw-once removes learning and switches, while zero memory removes state effects. When there is no selection signal, the coupling alone determines differences. These controls test the accounting interpretation, while theorem-inequality checks verify implementation.
All trajectories satisfied the sampled decomposition to floating-point tolerance (maximum residual ), and matched EW selectors had exactly equal computed expected diagonal selection. At , , and , both had expected diagonal selection regret 144.797 on the fixed-advantage tables. Their mean state effects were 445.631 and 4.038, respectively, and sampled excess deployed losses were and . The sampling residual in (26) reconciles empirical totals with exact expected diagonal selection. Figure 9 illustrates the decomposition on fixed-advantage tables at .
Reversing the state coefficient reversed the selector ordering: on fixed-advantage tables at and , the paired independent-minus-lazy excess-loss contrast was for for , and for .
Relative to the common fixed joint-family optimum, mean text-only and parameter-only family restrictions on fixed-advantage tables at were 82.039 and 102.701. Under independent selection with harmful state effects, changing influence from to changed text-versus-parameter mean excess loss from 292.850 versus 127.504 to 112.627 versus 312.816. Candidate losses and expected diagonal selection were unchanged: these conditional reversals reflect the assigned influence mechanism, not intrinsic memory lengths of text or parameter artifacts.

Figure 9: Decomposition of cumulative excess loss on fixed-advantage tables at and . Black marks show observed totals, including the diagonal sampling residual.

(a) No selection signal

(b) Fixed advantage

(c) Changing relative quality
Figure 10: Horizon dependence and the draw-once control under harmful state with .
Learning was not uniformly beneficial: without a selection signal in the same harmful-state condition at , draw-once had zero excess loss, versus 767.456 for independent EW and 7.470 for lazy EW; see Figure 10. For changing quality, lazy EW's and draw-once's differed by less than the SE of the lazy estimate. These mechanisms establish no unconditional advantage for learning, a coupling, or an adaptation mode.
C.4 FEEDBACK ACCURACY, SWITCHING, AND EVALUATION COST
The approximate-feedback study reuses the fixed-advantage and changing-quality tables from Section C.3, with , , all three state coefficients, and the same four-configuration joint family.
The eight feedback arms comprise exact losses, a common additive offset of 0.1, two reference-opposing biases of magnitude 0.04 and 0.08, and Monte Carlo estimates with samples per candidate-round. The biases raise the best fixed reference's loss and lower its alternatives. These synthetic errors are fixed from the true table before learning and make no assumptions about operational estimators. The offset arm remains in without clipping. Each estimate averages independent Bernoulli samples of mean , independently of learner tapes. We charge samples per table and compare each table's maximum candidate-round error with Corollary 8's envelope. The Hoeffding envelope uses separately for each feedback table and is capped at one. This envelope bounds within-table accuracy separately from empirical error bars and is not a simultaneous confidence statement over the experimental grid.
Each arm uses independent EW, lazy EW, and a centered lazy control with the same prior and rate (167). The centered control diagnoses state effects by applying retention to , preserving EW marginals while removing sensitivity to action-independent offsets. Across both loss-table families, the grid has 576 algorithm conditions per environment seed and 64 paired learner tapes per condition, totaling 368,640 trajectories over ten seeds.

(a) Common offset

(b) Reference-opposing bias

Figure 11: Approximate-minus-exact loss components on changing-quality tables under a common offset in Panel (a) and reference-opposing bias for lazy EW in Panel (b). The offset panel fixes , and the panels use different vertical scales.

(a) Fixed advantage

(b) Changing quality

(c) Fixed advantage
(d) Changing quality
Independent EW Lazy EW Centered lazy EW Exact feedback Maximum error 95% envelope
Figure 12: Feedback accuracy and excess deployed loss as the sampling budget grows. Dotted lines mark exact feedback, and the gray curve is the capped Hoeffding envelope. The loss panels use different vertical scales.
Approximate-minus-exact contrasts separate changes in true diagonal selection and signed state, while the shared configuration family fixes restriction. Same-policy comparisons under true and estimated losses check the bridge in Corollary 7, which does not bound contrasts between differently trained learners. Fresh Monte Carlo estimates satisfy Corollary 9 even at n = 1: budget affects accuracy and observed performance, but its coarse expected-regret guarantee holds at every budget. As in Section C.3, contrasts are paired at the table level. The plotted offset and budget comparisons use , , and . The plotted reference-opposing bias comparison retains this horizon and influence pair, uses lazy EW with bias 0.08, and varies over the three state coefficients.
All trajectories passed the decomposition and same-policy bridge checks to floating-point tolerance (maximum accounting residual ). The common offset preserved EW marginals and the trajectories of independent EW and centered lazy EW under shared tapes, but changed ordinary lazy EW's switches and state effects. At , , and , ordinary lazy EW's mean state effect increased by 0.779 for fixed advantage and 1.458 for changing quality. The total-loss contrasts were and ; see Figure 3, Panel (a), and Figure 11, Panel (a). Their means are small relative to table-level variability, despite changed deployed behavior under identical selection distributions.
With reference-opposing bias 0.08 in the displayed fixed-advantage condition, expected true diagonal selection increased by 208.607 and mean harmful state cost by 2.690. For changing quality, selection increased by 7.738 while the state term decreased by 0.707, giving an observed total-loss increase of ; see Figure 11, Panel (b).
Table 1: Monte Carlo feedback for lazy EW on fixed-advantage tables at , , and . Max. error is the table mean of the maximum candidate-round error, and observations count represented Bernoulli samples.
| Samples | Observations/table | Max. error | Excess loss SE |
|---|---|---|---|
| 1 | 16,384 | 0.660 | 147.835 4.906 |
| 16 | 262,144 | 0.479 | 150.527 1.305 |
| 64 | 1,048,576 | 0.252 | 149.555 2.290 |
| 256 | 4,194,304 | 0.132 | 148.311 1.913 |
At , increasing Bernoulli samples per candidate-round from 1 to 256 improved uniform accuracy without a monotone deployed-loss gain in the displayed conditions; see Table 1 and Figure 12. This is consistent with Corollary 9's common coarse guarantee, without showing that additional samples never help.
For comparison, exact feedback gave excess loss . The reported sample counts represent Bernoulli observations rather than measured language-model calls.
A binomial draw divided by exactly implements the Bernoulli sample average. The study represents 138,035,200 observations, charging each feedback table once despite reuse across learner and state conditions. This known synthetic law tests estimation, without measuring external-simulator runtime or establishing off-policy identification from logged language-model interactions.
C.5 RESTRICTED FEEDBACK ON CONTROLLED LOSSES
We compare the algorithms in Section 5 on the same four-configuration synthetic loss law. The design crosses three diagonal-table families, horizons , equal coordinate influence windows , and state coefficients . Four independent environment seeds generate length-1,024 master tables, whose prefixes supply both horizons. For each condition, we use 64 selector repetitions per environment. Every selector uses the full joint family and the uniform prior, so restriction is zero relative to the best fixed configuration in that environment. The zero-state control separates learning from history effects because changing at fixed influence leaves the diagonal table and prescribed learning rates unchanged.
Full diagonal EW observes all current diagonal losses after deployment. Sparse diagonal EW, called one-probe lazy EW in the main text, observes one independently and uniformly sampled candidate, using the unbiased importance-weighted vector in (91). Neither learner updates from its deployed loss, and probe randomness is independent of deployment randomness. Both use the lazy coupling, while independent deployment with the same diagonal updates provides a coupling control. Deployment-only EW receives only the actual loss of its selected configuration, holds that configuration for blocks of length , and updates from the importance-weighted complete-block average in (105). An incomplete tail retains the last complete-block action without another draw or update. Draw-once retains a uniform initial configuration throughout and supplies an exact expected-loss baseline without learning feedback.
Writing , the rates are
Comparisons therefore evaluate each feedback regime with its prescribed rate, without holding learning rate fixed while changing information. The control also reveals how the conservative influence-dependent rates change learning when state itself is neutral.
Table 2: Controlled fixed-advantage excess loss at and , using 64 selector repetitions in each of four fixed environments. Draw-once expectations are exact for each table.
| Feedback and Selection | |||
|---|---|---|---|
| Full diagonal, lazy | |||
| One probe, lazy | |||
| Deployment only, | |||
| Deployment only, | |||
| Draw once |
The evaluation layer records true diagonal losses for accounting, without revealing them to learners that lack diagonal feedback. For full and sparse diagonal algorithms, estimated expected deployed loss adds a sampled signed state effect to , integrating the diagonal term over deployment randomness conditional on autonomous probes. Deployment-only estimates average actual trajectory losses because their update histories depend on deployment. Conditional selector MCSEs follow Appendix C.1 and exclude uncertainty over new environments. This experiment evaluates information access and causal synthetic state. Its measurements do not cover model-generation cost or reactive user behavior.
The fixed-advantage condition exposes the tradeoff between learning and state suppression. With harmful state, deployment-only blocks of length 16 reduce excess relative to , but remain above full-diagonal and sparse lazy EW; see Table 2. The block comparison decomposes into selection plus state as versus : less harmful state offsets worse diagonal selection. The ordering reverses under beneficial state, where batching removes the advantage of changing histories over fixed configurations.
Figure 5 adds the intermediate block lengths and influence sweep, using different vertical ranges for harmful and beneficial state.
The independent-coupling diagnostics isolate state at fixed diagonal marginals. At , , and , sparse independent and sparse lazy EW have the same diagonal loss, but signed state effects 197.545 and 4.409, giving excess losses 260.527 and 67.392. With no diagonal signal, selection regret is zero and excess is entirely a state effect. Under changing quality at the same harmful-state setting, draw-once excess 8.680 is below full lazy 14.303 and sparse lazy 12.904. Even with , the conservative rates can change the ranking: fixed-advantage excess loss at and is 71.190 for full diagonal EW and 52.050 for deployment-only . Thus the theoretical guarantees do not imply a universal finite-horizon empirical ranking across these loss laws.
C.6 CANDIDATE CONSTRUCTION AND SQL EVALUATION
The SQL experiments use Qwen3.5-9B (Qwen Team, 2026) on Spider (Yu et al., 2018) and SParC (Yu et al., 2019). Construction, evaluation, and replay protocols are fixed before comparison. Selection constructs no new prompts or adapters. Spider and SParC were jointly partitioned by database, keeping identical schemas together: their official development databases formed the final evaluation set, twenty training-side databases supplied development, and 120 remained for construction. Construction contained 5,876 Spider questions and 7,592 SParC turns, while development contained 1,124 Spider questions and 1,433 SParC turns. Neither construction nor development used final evaluation databases, although checkpoint pretraining exposure to these public benchmarks is unknown. Development scored execution on each original database, whereas final evaluation used released test suites (Zhong et al., 2020), covering the final evaluation databases but not the training databases. These metrics differ: an accidentally correct result on one database can fail elsewhere in its suite.
The six text candidates used different instructions. Candidate used direct SQL instructions, while used verification of schema references, joins, filters, aggregation, ordering, and limits. Candidate used two construction-only SQL demonstrations, used explicit reference resolution and schema linking, and used decomposition into SQL clauses. Finally, combined demonstrations with
Table 3: Spider candidate test-suite accuracy (%). Columns identify the base model and adapter learning rates.
| Prompt | Base | |||
|---|---|---|---|---|
| Direct | 66.05 | |||
| Verification | 65.28 | |||
| Demonstrations | 63.73 | |||
| Schema linking | 65.09 | |||
| Clause planning | 65.86 | |||
| Demonstrations + verification | 64.31 |
verification. Each was paired with the base weights or one of three low-rank adaptation (LoRA) adapters (Hu et al., 2022) trained at learning rates , and . We repeated this construction for seeds 20260910, 20260911, and 20260912, giving nine trained adapters and a separate joint family per seed. The three recipes are candidate choices within a replication, while the training seeds are replications that all share the six base-model prompt configurations. Each adapter used rank 16, scaling 32, query and value projections, one epoch, microbatch size one, and eight-example gradient accumulation. AdamW used , , zero weight decay, unit gradient clipping, and fixed unshuffled examples. Completion-only supervision trained 2,228,224 parameters on 11,752 construction examples, equally split between Spider and SParC and assigned cyclically to . The other three prompt templates served as evaluation candidates. SParC construction prompts included earlier gold SQL from that dialogue, whereas evaluation excluded target SQL and future utterances. The SParC study reuses each seed's complete candidate family.
Generation used pinned model/tokenizer revisions, bfloat16 weights, greedy decoding without thinking, and limits of 8,192 prompt and 2,048 completion tokens. The local executor required uncapped predictions to match reference results on every test-suite database, preserving SQL literals, DISTINCT, duplicate rows, and outer-query ordering. Column-permutation comparison followed the pinned test-suite evaluator, but the executor was not the unmodified leaderboard script. Invalid predictions, 30-second query timeouts, results exceeding 100,000 rows, and completion caps received unit loss, while reference or infrastructure failures stopped evaluation. Whitespace-split comparison operators were normalized outside strings, identifiers, and comments, and SQLite decoding followed upstream malformed-UTF-8 handling. All final evaluation references passed an audit before model evaluation.
C.7 SELECTION AND FAMILY RESTRICTION ON SPIDER
Within each training replication, the text family contains all six prompts with base weights, and the parameter family contains the direct prompt with base weights or any of that seed's three adapters. Their union has nine configurations, and the joint family contains all 24 combinations. All selectors in that replication share the best fixed joint-family comparator on the final evaluation questions, with restriction defined in Section 2. These finite-family comparisons concern unequal candidate availability and do not isolate unrestricted adaptation modes.
We evaluated the full question–configuration matrix, then replayed selectors in frozen question order using only preceding rows. EW used a uniform prior within its family and for family size and . Reported loss is the exact expectation , without selector Monte Carlo error. These full-diagonal expectations are also the lazy EW deployment losses: lazy and independent coupling share the same marginals, and Spider has no state effect. Baselines were uniform selection, uniform draw-once, follow-the-leader with uniform tie breaking, and a development-selected candidate held fixed through final evaluation. Uniform and draw-once have equal expected loss here. The SQL feedback replay separately restricts access to this matrix.
The best fixed joint candidates averaged failures across training seeds, whereas the text-family minimum was the shared fixed value 351; see Table 3. Text EW had mean selection regret , compared with joint EW's , but its mean restriction was failures. Averaging within-seed accounting gives text selection plus restriction , versus for the joint family; see Figure 6, Panel (a). Joint EW also
Table 4: Spider expected cumulative failures by family and selector. Uniform also gives the draw-once expectation.
| Family | EW | Follow-the-leader | Uniform | Development-fixed |
|---|---|---|---|---|
| Text | ||||
| Parameter | ||||
| Union | ||||
| Joint |
Table 5: Spider excess failures after averaging all base-anchored subsets of each size within each seed, relative to the full joint-family comparator.
| K | Text | Parameter | Union | Joint |
|---|---|---|---|---|
| 2 | ||||
| 3 | ||||
| 4 |
had lower mean expected loss than parameter and union EW, with a paired joint-minus-parameter contrast of failures. Its SE is substantial relative to the mean difference, so the observed ordering should not be treated as a general advantage.
EW was not the lowest-loss rule on these orders: development-fixed and follow-the-leader had lower mean loss in every family; see Table 4.
To control candidate count, we also evaluated every subset of size containing within each family. Each subset used the same uniform-prior EW rate for its size and the same full joint-family comparator for its seed. We summarize the complete subset distribution without choosing a subset using final evaluation performance. At , there are 10 text, one parameter, 56 union, and 1,771 joint subsets per seed. Overlapping subsets are not independent replications.
Parameter subsets have lower average excess loss than joint subsets at every tested size; see Table 5. At , the paired parameter-minus-joint contrast is , with magnitude comparable to its SE; see Figure 6(b).
Candidate complementarity is a separate question from family size. Relative to direct prompt and base weights , define the interaction
Negative values mean that joint use improves loss beyond additive effects. Table 6 shows larger negative mean interactions for demonstration prompts than for verification alone. Demonstrations with base weights nevertheless have lower accuracy than direct prompting.
Each interaction is paired within a training bank before averaging across the three seeds. Fourteen of the 15 mean interactions are negative, with clause planning () at the smallest training rate as the exception. This descriptive pattern does not supply a multiple-comparison significance claim. For the middle-rate comparison, see Figure 7(a). The three Spider matrices each contain 24,816 logical candidate-question evaluations, with 34 completion-cap outcomes receiving unit loss across the three banks. These logical counts include shared base configurations and do not measure a selector's physical deployment cost.
C.8 STATE EFFECTS ON SPARC
SParC (Yu et al., 2019) tests history effects under equal per-round configuration distributions. We evaluated 1,203 turns in 422 complete dialogues on the same 20 final evaluation databases, using the complete 24-configuration family for each of the three training seeds. Each seed and history condition uses its own best fixed comparator, evaluated on SParC trajectories rather than Spider questions. Both conditions retained the schema and all raw user utterances through the current turn,
Table 6: Spider prompt–adapter failure interactions in percentage points. Negative values indicate improvement beyond additive effects.
| Prompt | |||
|---|---|---|---|
| Verification | |||
| Demonstrations | |||
| Schema linking | |||
| Clause planning | |||
| Demonstrations + verification |
Table 7: Recursive SParC accounting over 1,203 turns. Both couplings share exact selection regret, and restriction is zero.
| Coupling | Selection Regret | State Effect | Deployed Loss |
|---|---|---|---|
| Independent | 26.108 | ||
| Lazy | 26.108 |
excluding gold SQL and future utterances. Recursive history additionally retained earlier generated SQL, allowing switches to alter inherited context, whereas cleared history removed it.
History reset at dialogue boundaries while EW statistics continued. The longest dialogue had five turns, bounding all recursive influence by four rounds without assuming that deleting an old answer removes its indirect effects. The prompt policy would drop the oldest generated answers at the token limit, but no history was dropped. Model, decoding, token limits, test-suite scoring, and failure rules follow Appendix C.6. Before final model evaluation, we added a missing table alias to one invalid released reference. The frozen protocol recorded this correction, and no final evaluation records were excluded.
Each candidate’s complete constant-configuration trajectory started every dialogue with empty generated history and supplied in (1). Independent and lazy EW used preceding rows, the uniform prior, and (12) with :
The cleared control retained this rate. Mixed-history losses measured deployment effects without updating EW, preserving matched diagonal marginals. This full diagonal oracle requires own-history losses unavailable from deployment alone. The restricted-feedback replay instead uses only the cleared condition, with its own zero-influence rate.
To estimate signed state effects, we generated independent and lazy sequences in sixteen paired repetitions on the frozen dialogues. Summing each selected turn’s mixed-history minus own-trajectory loss and averaging over repetitions estimates signed state effects. Adding this mean to exact expected diagonal loss estimates expected deployment loss without sampled-diagonal noise. For the deployed-loss contrast, paired state sums provide a direct estimate by Proposition 7. Bank averaging and paired conditional MCSEs follow Appendix C.1, conditioning on the banks, benchmark, and model responses.
Under recursive history, the best fixed own-trajectory loss averaged 465.667 across the three banks, and the exact expected diagonal loss averaged 491.774; see Table 7. The paired lazy-minus-independent difference was failures, or percentage points; see Figure 7(b). Here 1.626 is the MCSE of the paired mean, conditional on the evaluated banks, benchmark, and model responses. The estimated difference is about 1.5 MCSEs, providing limited evidence for an expected-loss advantage of independent over lazy EW. The exact expected loss of uniform draw-once averaged 500.500 failures across the banks, compared with estimated losses of 489.795 for independent EW and 492.170 for lazy EW. This draw-once expectation is computed directly over the possible initial configurations on the evaluated banks.
Conditional on the evaluated banks, exact expected switches averaged 1,144.669 under independent coupling and 11.718 under lazy coupling. Within-dialogue expectations averaged 743.637 and
Table 8: SQL restricted-feedback excess failures above each bank's best fixed joint candidate, with separate conditional MCSEs. SParC uses cleared history and the zero-influence rate.
| Feedback and Selection | Spider | Cleared SParC | ||
|---|---|---|---|---|
| Mean ± SE | MCSE | Mean ± SE | MCSE | |
| Full diagonal, lazy | 15.358 ± 1.893 | 0.000 | 17.674 ± 0.443 | 0.000 |
| One probe, lazy | 24.165 ± 4.312 | 0.130 | 34.304 ± 1.979 | 0.241 |
| Deployment only, b = 1 | 24.340 ± 4.536 | 0.300 | 34.182 ± 2.254 | 0.336 |
| Deployment only, b = 2 | 25.232 ± 4.541 | 0.327 | 36.094 ± 2.696 | 0.342 |
| Deployment only, b = 4 | 25.431 ± 4.694 | 0.366 | 38.145 ± 2.836 | 0.368 |
| Deployment only, b = 8 | 25.382 ± 3.865 | 0.379 | 38.908 ± 2.494 | 0.388 |
| Deployment only, b = 16 | 25.461 ± 4.276 | 0.378 | 38.772 ± 3.037 | 0.415 |
| Draw once | 26.639 ± 4.549 | 0.000 | 40.514 ± 2.932 | 0.000 |
7.637, respectively. Switches at reset boundaries, by contrast, carry no SQL forward. Both couplings produced helpful and harmful changed-history turns. Harmful-minus-helpful counts recover the signed effects for binary loss. Thus fewer mixed histories remove beneficial and harmful effects together, so the large switch reduction does not imply lower deployment loss.
Cleared history supplies a negative control: every deployed turn has its selected diagonal loss. Its best fixed loss averaged 479.667, and both couplings had the same exact expected deployed loss of 508.846, averaged over banks. Clearing changes the diagonal table and its comparator, so differences in total loss across history conditions do not identify signed state effects. The matched-coupling contrast is therefore defined within each condition.
Each seed and condition contains 28,872 logical oracle turns and 38,496 logical selector turns. Because responses are reused, these counts do not represent physical generations. One repeated base-model oracle outcome differs across recursive-history replications: the same generated SQL and token sequence for a poker_player turn passed in two banks but incurred a prediction timeout in the third. The original unit-loss timeout outcome is retained, so the bank-averaged result also includes this recorded scoring-runtime exception. Spider and cleared-history SParC base columns agree exactly across all three banks. The evaluated receipts and conditional selector errors do not measure deployment latency or adapter-switching savings.
Appendix F collects the limits of these finite-family, fixed-benchmark studies.
C.9 RESTRICTED FEEDBACK ON PRECOMPUTED SQL LOSSES
We specify the feedback rules, learning-rate formulas, and block lengths without using losses from the final evaluation set.
We apply the feedback protocols from the controlled study to the six completed 24-candidate loss matrices: Spider and cleared-history SParC for each training seed. The replay preserves the original questions, candidate outcomes, fixed order, and uniform prior, and compares all regimes with the same best fixed joint candidate within each matrix. Both tasks have zero state effect in this replay, so deployed excess loss equals diagonal selection regret and family restriction is zero. Recursive SParC is excluded: its mixed-history deployment loss cannot be reconstructed from a fixed diagonal matrix.
For each matrix and feedback regime, we run 256 selector repetitions. Full feedback exposes all 24 current diagonal entries only after deployment, while sparse feedback exposes one independent uniform probe. Deployment-only feedback exposes the selected entry and uses . Draw-once and the independent-coupling diagnostics match the controlled study. The zero-influence setting gives full EW rate , which differs from the rate (172) retained in SParC's recursive-versus-cleared comparison. The two cleared-history experiments therefore test different selector protocols.
Full-feedback and draw-once expected losses are exact. For sparse feedback, errors reflect probe randomness after integrating the deployed diagonal term, whereas deployment-only errors reflect actual trajectories. Conditional MCSEs follow Appendix C.1. Logical diagonal access is 24T entries for full feedback and for one-probe feedback, while deployment-only learners receive no diagonal oracle and observe deployed outcomes. All matrices had already been generated.
Full diagonal feedback has the lowest mean excess among these regimes on both tasks; see Table 8. Sparse feedback uses one twenty-fourth as many logical diagonal entries, with paired sparse-minus-full mean differences of expected failures on Spider and on cleared SParC. The increase is larger and has a smaller training-seed SE on cleared SParC. These differences compare the prescribed algorithms and their learning rates, not information alone.
The paired sparse-minus-deployment-only mean differences, with for deployment-only feedback, are failures on Spider and on cleared SParC. Both mean differences are smaller in magnitude than their training-seed SEs, so their observed ordering does not establish an advantage of either feedback type. Increasing the deployment block length to 16 reduces mean switches from 972.034 to 60.779 on Spider and from 1,125.211 to 71.332 on cleared SParC, while increasing mean excess. The paired minus excess-loss contrasts are and , respectively, with a larger observed loss increase on cleared SParC. Here switching cannot create beneficial or harmful state, so batching trades update opportunities for fewer configuration changes. Figures 7(c) and 7(d) show the training-seed averages, while Table 8 separately reports conditional selector uncertainty.
D ADAPTATION COSTS AND AMORTIZATION
After validating admissibility and target satisfaction as specified in Definitions 2 and 3, compare preparation and operating costs under a common evaluator and scalarization. Small regret alone does not establish target satisfaction. A break-even comparison between two modes requires both to be feasible. For , let denote one-time preparation and installation costs, and let denote transition costs, accounted for separately from the loss contamination in (67).
For validated per-use realization losses (zero for exact realization), expected scalarized costs over uses are
Here excludes realization loss, and charges interference, irreversibility, validation, or recovery once. For existing candidates, the preparation component of is a sunk cost. The model excludes nonaffine and path-dependent costs.
Proposition 14 (Feasibility-aware break-even threshold). Assume both realizations are admissible and satisfy the declared target tolerance, and that
A parameter-configuration update has no larger total cost than a text-configuration update if and only if
When the right-hand side is nonpositive, the parameter update is weakly preferred for every .
The proof is given in Appendix B.5. If , reuse alone creates no asymptotic parameter advantage. Costs can enter episodic or bounded-influence losses only with the corresponding range and memory assumptions, which exclude arbitrary path dependence.
Illustrative Adaptation Settings. For revised instructions or retrieval, charge preparation per revision and retrieval per use, with N ending at the next preparation or validation event. For target-matched structured output, an adapter with higher fixed cost but lower per-use cost breaks even at (176). Per-use cost includes input processing, generation, and verification. A model, task, or format change can invalidate this reuse horizon. A retrieval collection and a format adapter may jointly satisfy a target that neither restricted candidate family meets, subject to the common resource budget. This finite-family restriction does not establish nonreachability in the full protocol family.
Complexity-Adjusted Cost Certificates. For continued online selection, take validated, target-matched distributions on the text and parameter slices in Section 2, and let
Use the slice priors (41)–(42) and comparator-average costs, counting localization once in . Assume scalarized losses in [0,1], one mode-level setup charge, and no subsequent installation or transition costs. For a general range of width G, multiply regret by G. The stateless bound (5) gives
These selection-regret certificates satisfy exactly when
Equation (180) orders ex-post, comparator-tuned upper bounds, without establishing an ordering of realized costs. Stateless switching adds to , including per-configuration installation and separately charging any unpaid initial transition. Corollaries 3 and 4 give description-length and localized versions, with approximation counted in .
Count resource charges and signed state effects once each. Persistent state additionally requires loss control, such as Theorem 2, because transition charges alone do not justify these stateless certificates.
E ADDITIONAL RELATED WORK
Automatic Optimization of Discrete Text. Prompt optimization uses token gradients (Shin et al., 2020), generated or reinforcement-learned instructions (Zhou et al., 2023; Deng et al., 2022), critiques (Pryzant et al., 2023), optimizer histories (Yang et al., 2024a), evolution (Guo et al., 2024; Fernando et al., 2024), and textual gradients or pairwise feedback (Yüksekgönül et al., 2025; Lee et al., 2026a). MIPRO searches instructions and demonstrations (Opsahl-Ong et al., 2024), GEPA evolves textual system components (Agrawal et al., 2026), and SPRIG evolves reusable prompts and evaluates transfer (Zhang et al., 2026). Appendix A.2.5 separates candidate discovery from selection.
Compound Systems, Context, and External Memory. Demonstrations and retrieval configure inference (Brown et al., 2020; Min et al., 2022; Rubin et al., 2022; Lewis et al., 2020). Text also governs tools (Yao et al., 2023; Schick et al., 2023), retained feedback and memory (Shinn et al., 2023; Packer et al., 2023), and optimized pipelines or harnesses (Khattab et al., 2024; Lee et al., 2026b). A-Mem revises linked memories (Xu et al., 2025), LightMem separates online use from offline consolidation (Fang et al., 2026), and LongMemEval evaluates sustained retention and updates (Wu et al., 2025). These systems motivate reusable text with explicit state and resource accounting under protocol .
Prior Complexity, Description Length, and Language-Model Priors. Probably approximately correct (PAC)-Bayesian bounds charge prior KL (McAllester, 1999), while minimum description length connects coding and complexity (Grünwald, 2007). Language-model priors can also certify discrete prompts (Akinwande et al., 2024). Our online bounds use prior complexity without requiring independent and identically distributed samples.
Stateful and Adaptive Environments. Policy regret compares counterfactual trajectories (Arora et al., 2012). Related approaches include learning with memory, online Markov decision processes, reactive experts, and stateful reference policies (Anava et al., 2015; Even-Dar et al., 2009; Neu et al., 2010; de Farias & Megiddo, 2006; Feige et al., 2017). Anava et al. (2015) obtain square-root rates with oblivious memory losses, counterfactual feedback, and low switching, the mechanism underlying our full-diagonal guarantee. Decoupled exploration separates evaluation from deployment (Avner et al., 2012), including under limited switching (Cheng et al., 2023). Deployment-only feedback instead motivates policy-regret mini-batching (Arora et al., 2012).
F LIMITATIONS
Our analysis assumes a fixed, known candidate family constructed before evaluation and does not address how to construct or expand that family. A practical extension is to expand the prompt and adapter banks systematically and repeat the comparisons, examining how candidate diversity affects selection performance and family restriction. We leave this extension to future work.
Our language-model experiments focus on Spider and SParC with one base model. Repeating the evaluation with additional models and task orders would help assess how consistently the observed patterns appear. Longer dialogue sequences would also allow closer examination of how inherited state affects later decisions.