- Rating
- 4
- Clarity
- 2
- Confidence
- 2
- Originality
- 2
- Quality
- 3
- Significance
- 3
Read review
Summary
The paper studies the problem that in in-context learning and RAG, prompt examples are often selected adaptively after observing the query and data store, which the authors call “context overfitting.” The authors argue that the empirical performance of a selected context may be optimistically biased because the same data are used both to construct the prompt and to evaluate its quality. To formalize this problem mathematically, they treat the language model as a frozen map, and model prompt construction as an adaptive process that maps a query and data store to a complete prompt transcript. Using theoretical tools from adaptive data analysis, concentration inequalities, and PAC-Bayes, they prove generalization bounds for the selected context and propose stability-constrained retrieval rules. The authors conduct experiments that mainly use synthetic and API-backed diagnostic settings to illustrate finite prompt search, multi-round prompt editing, and validation leakage. They also extend the framework to weighted contexts, clustered data stores, latent tasks, multi-round construction, and Bayesian linear in-context regression.
Strengths and weaknesses
Strengths:
-
The paper studies a timely and important problem in in-context learning and RAG. The background and intuition are illustrated clearly.
-
The paper provides a rigorous formulation of "context overfitting", and the main theorems are technically solid.
-
The paper also considers several useful extensions, including weighted contexts, clustered data stores, latent tasks, multi-round prompt construction, and Bayesian linear in-context regression.
Weaknesses:
-
The theoretical contribution seems limited. The theoretical results appear to be direct applications or translations of existing theoretical tools (e.g., PAC-Bayes) to a new prompt-construction setup.
-
The assumptions for the theory are stated clearly, but they are not sufficiently justified for realistic RAG or ICL systems.
-
The experiments in Section 5 are mostly synthetic or diagnostic. They illustrate the predicted scaling behavior, but they do not convincingly show empirically that the proposed certificates are useful in realistic RAG or ICL systems.
-
The presentation is somewhat dense. The core intuition is simple, but the paper introduces many technical objects and extensions quickly. Some parts are not sufficiently explained, and several technical details and secondary extensions could be moved to the appendix to make the main contribution clearer.
Questions
-
Could the authors clarify the theoretical contributions beyond reformulating the “context overfitting” problem? Many results seem to directly translate existing tools to the new problem setup. In addition, could the authors discuss the connections with classical statistics and machine learning literature on related post-selection phenomena, such as winner’s curse?
-
Could the authors provide more intuition for the theoretical conditions used in the main theorems, and explain why these conditions are reasonable in real-world ICL and RAG systems?
-
Could the authors explain more concretely how the proposed results can be applied in practice, and provide empirical examples showing that the proposed certificates are not vacuous and useful in realistic settings?
Limitations
yes
Paper formatting concerns
No major concerns noticed.
Final justification
The authors address my concerns regarding the assumptions and practical applicability. However, my concern about the overall novelty and significance remains: the framework primarily adapts established information-theoretic and PAC-Bayesian tools, while the broader impact of the two technical additions is still unclear. Given the meaningful improvements provided in the rebuttal, I have increased my score by one point, but the remaining concerns prevent a larger increase.
We are grateful to the reviewer for the careful reading and the encouraging assessment: that the paper studies a timely and important problem with clearly illustrated background and intuition, that the formulation of context overfitting is rigorous with technically solid main theorems, and that the extensions are useful. The largest updates below: a real-pipeline experiment completed during the discussion period showing the certificates are valid and non-vacuous (W3/Q3), a concrete restructuring plan (W4), and the winner's-curse connection the reviewer suggested, which we adopt (Q1).
W1 + Q1, first part: theoretical contribution. The reviewer is right, and the imports are broader than PAC-Bayes: Thm 4.1 is Xu–Raginsky's Thm 1 applied to the empirical mean over the k selected examples (Donsker–Varadhan decoupling, Lemma D.12); Thm 4.3 is approximate max-information transfer (Dwork et al.) conditioned on the query; Prop 4.8 is a conditional chain rule; Thm 4.7's construction is a finite-class Rademacher maximum; Thm 6.1 is fixed-λ Catoni-form PAC-Bayes; Hoeffding sits underneath. Thm 4.2 is an instance of Bu–Zou–Veeravalli (2019) and Jiao–Han–Weissman (2017), both missing from our bibliography (our omission); we will cite them and demote Thm 4.2 from the contribution list. The claimed contribution is the one Table 1 states ("not a new concentration inequality in isolation"): the certified object, the selected-context empirical mean, and the composable capacity accounting over prompt-construction pipelines.
Two steps survive our re-audit as technical deltas. (i) The selected-subsample step (proof of Thm 4.1, App D.3): conditionally on a fixed transcript, the k adaptively selected examples are independent under the ghost store, giving variance proxy σ2/k with denominator k rather than the store size n. We are not aware of a prior statement of the information bound in this selected-subsample form; the closest results (Russo–Zou; Xu–Raginsky; Bu–Zou–Veeravalli; Steinke–Zakynthinou) normalize by the full sample size, and the latter's selection variables are data-independent supersample bits rather than adaptively chosen indices. (ii) The gate-charge rule in Thm 6.1: a data-dependent candidate gate A(S,u) is charged −logΠu(A) inside the KL to the ambient prior; we found no counterpart phrased for retrieval gating (its gated oracle comparison is asserted in App. D.13; the explicit derivation is part of the revision). The revision replaces App G's prose with a per-theorem provenance table naming source theorems, plus the missing citations.
Q1, second part: winner's curse and post-selection. The connection is apt, and Thm 4.7 is itself a winner's-curse statement: the expected maximum of N centered empirical means is ≳logN/k. A new related-work subsection will connect our accounting to the winner's curse (Zöllner–Pritchard 2007); simultaneous post-selection inference (Berk et al. 2013: our κ plays the PoSI constant's role, in nats); exact conditional selective inference (Lee et al. 2016; Fithian–Sun–Taylor: conditioning as the alternative to an information charge); data-snooping reality checks (White 2000); leaderboard reuse (Blum–Hardt 2015); and max-information for post-selection testing (Rogers–Roth–Smith–Thakkar 2016: the same object as our Def 3.5, in the testing role). The delta: those works certify inference on parameters after selection; our object is the selected-context empirical mean itself, with the in-context count k as effective sample size and a capacity that composes across construction rounds.
W2 + Q2: assumptions in real systems. The request for more justification is reasonable, and the answers are concrete: each assumption in Table 3 except conditional i.i.d. is satisfied or satisfiable by construction in deployment. Frozen learner: true for a version-pinned model during the search window. Bounded losses: free for standard RAG metrics, since 0-1 exact match gives σ2=1/4 automatically. Logged transcript: a logging discipline; retrieval stacks already log candidates, scores, and seeds (App F checklist). Prior domination: a design choice, satisfied by fixing Π before any score is read (Alg 1, step 2). Standard Borel: purely technical. Conditional i.i.d. is the strongest idealization for scraped corpora (near-duplicates, cross-document dependence). We state this ranking explicitly; the in-paper mitigations are Prop 4.5 (block-level certificates kblk: many chunks from one document count as one block), blocked resampling, and a fresh holdout (zero capacity if never used to choose, edit, or stop). Revision: a fourth Table 3 column ("when this holds in deployment") and intuition sentences after Defs 3.4/3.5 and Thm 6.1.
W3 + Q3: are the certificates useful in realistic systems? This is a fair concern: as submitted the paper had not demonstrated it (App A.4 itself calls Sec 5 "diagnostic rather than benchmark-scale"), so we ran the certificates on a real pipeline. Protocol: Banking77 intent classification; frozen Qwen2.5-7B-Instruct, temperature 0; 2,000-example store embedded with bge-small-en-v1.5, demonstrations retrieved per query; M=64 recipes (templates × retrieval rules × demo configurations) fixed before any score was read; selection reuses k validation examples; risk on a fresh 1,024-example holdout; 400 resamples per configuration; 87,040 model calls (parse failures 0.73%, counted as errors). Recipe holdout errors span 0.092–0.366 (zero-shot 0.373): a genuinely heterogeneous library. Capacity is known by construction: best-of-M spends at most logM=4.16 nats; SCAR's KL(Q∥Π) is computed exactly.
Results (0-1 loss, δ=0.05). (1) The predicted bias is real, growing with M (at k=64: −0.003 at M=4, noise-dominated; 0.016 at M=16; 0.023 at M=64) and shrinking with k per the table, i.e., the logM/k pattern on a real LLM pipeline. (2) The certificate held in 100% of the 12,000 selection events (all 30 (M,k) configurations, 400 resamples each; nominal ≥95%): non-vacuous, but conservative by roughly an order of magnitude on this benign library (the price of worst-case tightness, Thm 4.7), and the tail is real (cf. the submission's nonce-label stress test).
(3) The useful regime, SCAR vs. greedy (certified risk = val err + surcharge; greedy: Thm 4.3 with κ=log(M/β), β=δ=0.025; SCAR: Thm 6.1 at the a-priori λ∗):
Even at k=64 SCAR certifies, from reused validation data alone, that the selected prompt beats zero-shot (0.292<0.373); greedy cannot (0.388).
A same-protocol replication on a second model family, completed during the discussion period (gpt-4.1-mini; 52,224 calls; holdout 512), reproduces the findings on the configurations tested: selection bias at the same magnitude (mean gap 0.024, p95 0.074 at M=64, k=64, shrinking to 0.008 at k=256), 100% certificate validity, and SCAR's tighter certificates (0.296 at k=64, 0.204 at k=256, vs greedy's 0.390/0.248) at essentially equal realized risk. One instructive difference: against this model's stronger zero-shot baseline (0.282), the beats-zero-shot certification requires k=256, exactly as the certificate arithmetic predicts.
How to apply it: capacity is budgeted from logs, not estimated by reverse-engineering the pipeline. Choosing among M recipes costs at most logM; SCAR costs its logged KL(Q∥Π) including gate mass; R adaptive rounds cost the sum of per-round capacities (Prop 4.8); a fresh holdout costs zero. The boundary: an unmodified deterministic pipeline that reveals raw store contents (plain top-k dense retrieval over a large store) can reach log(kn) nats or be unbounded (Sec. 3), and Thm 4.7 shows no method can certify that regime in the worst case; certificates cover logged, finite, or randomized pipelines, while the diagnosis covers all adaptive pipelines.
W4: density. We agree and will restructure: keep the eleven-statement main-text spine (definitions, upper and lower bounds, composition, SCAR, propagation); move Def 3.4 + Thm 4.2, Props 4.4/4.5/4.6 (collapsed into one extensions remark: keff, kblk, latent tasks), Cor 4.9, Prop 4.10, and Prop 7.2 + Cor 7.3 to the appendix, each replaced by a one-sentence takeaway; add a notation table and an end-of-Sec-1 roadmap; co-locate Fig 6 with its Sec 5 discussion. One batch of mechanical fixes: the empty App C, App E's "Figures 2–6" cross-reference, and Fig 4's caption (a null/control outcome).
These revisions address clarity (the restructuring) and applicability (certificates demonstrated on a real pipeline); the certified selected-context object and its composable accounting stand, now positioned within the post-selection literature.
We would be glad to provide further detail on any of these points during the discussion phase. We deeply appreciate the reviewer's comprehensive evaluation and the constructive suggestions, each of which is now a concrete revision item above.