potentialpaper

The Price of Choosing Examples: Context Overfitting in Adaptive In-Context Learning

Keep the title, authors and abstract in paper.json

potentialpaper · 2026-11-23 20:47 UTC · c2c0d38aef23 ·

.potentialpaper/metadata.json modified

+++ b/.potentialpaper/metadata.json
@@ -1,22 +1,5 @@
{
- "layout": 5,
- "identifiers": [
- {
- "scheme": "openreview",
- "value": "Gzmzr2tIux"
- }
- ],
- "title": "The Price of Choosing Examples: Context Overfitting in Adaptive In-Context Learning",
- "authors": [
- "Xiaoyu Li",
- "Jiangxuan Long"
- ],
- "abstract": "In-context learning is usually analyzed as if the examples in the prompt were sampled before the learner is chosen. In deployed systems they are not: examples are retrieved, filtered, re-ranked, edited, and repeatedly tested after seeing the query and the data store. We formalize this gap by treating prompt construction as adaptive data analysis through a conditional stochastic-kernel calculus. Our main quantity is the context capacity, the mutual information or approximate max-information between the data store and the final prompt transcript. For any frozen in-context learner and any adaptive context pipeline with capacity $\\kappa$, we prove a finite-sample context generalization bound of order $\\sqrt{\\kappa/k}$, where $k$ is the number of selected examples whose losses form the reported score. We prove a matching lower bound, whose constant is exact when $\\log k\\ll\\kappa\\ll k$, and derive two PAC-Bayesian retrieval rules: a first-order Gibbs rule that charges data-dependent candidate gates their prior mass, and a self-normalized second-order rule. On Banking77 with 64 retrieval recipes and two model families, the certificates hold in all 24,000 resampled selection events, and from 64 (Qwen2.5-7B) or 128 (GPT-4.1-mini) reused validation queries the Gibbs rule certifies a risk below the zero-shot error in over 99% of validation draws. Finally, we instantiate the theory for Bayesian linear in-context regression, including an order-statistics analysis of query-aligned top-$k$ Gaussian retrieval. The results separate context quality from context certification: longer or more relevant contexts improve risk only when the procedure used to choose them is stable enough for selected-context evidence to transfer.",
- "year": 2026,
- "venue": "NeurIPS 2026",
- "source": "openreview",
- "license": {
- "metadata": "CC0-1.0",
- "abstract": "CC0-1.0"
- }
+ "layout": 6,
+ "kind": "paper",
+ "key": "04d9d113-46c0-4834-8275-b3adb2f0aaa4"
}

paper.json added

+++ b/paper.json
@@ -0,0 +1,12 @@
+{
+ "title": "The Price of Choosing Examples: Context Overfitting in Adaptive In-Context Learning",
+ "authors": [
+ "Xiaoyu Li",
+ "Jiangxuan Long"
+ ],
+ "abstract": "In-context learning is usually analyzed as if the examples in the prompt were sampled before the learner is chosen. In deployed systems they are not: examples are retrieved, filtered, re-ranked, edited, and repeatedly tested after seeing the query and the data store. We formalize this gap by treating prompt construction as adaptive data analysis through a conditional stochastic-kernel calculus. Our main quantity is the context capacity, the mutual information or approximate max-information between the data store and the final prompt transcript. For any frozen in-context learner and any adaptive context pipeline with capacity $\\kappa$, we prove a finite-sample context generalization bound of order $\\sqrt{\\kappa/k}$, where $k$ is the number of selected examples whose losses form the reported score. We prove a matching lower bound, whose constant is exact when $\\log k\\ll\\kappa\\ll k$, and derive two PAC-Bayesian retrieval rules: a first-order Gibbs rule that charges data-dependent candidate gates their prior mass, and a self-normalized second-order rule. On Banking77 with 64 retrieval recipes and two model families, the certificates hold in all 24,000 resampled selection events, and from 64 (Qwen2.5-7B) or 128 (GPT-4.1-mini) reused validation queries the Gibbs rule certifies a risk below the zero-shot error in over 99% of validation draws. Finally, we instantiate the theory for Bayesian linear in-context regression, including an order-statistics analysis of query-aligned top-$k$ Gaussian retrieval. The results separate context quality from context certification: longer or more relevant contexts improve risk only when the procedure used to choose them is stable enough for selected-context evidence to transfer.",
+ "license": {
+ "metadata": "CC0-1.0",
+ "abstract": "CC0-1.0"
+ }
+}