예시 선택의 대가: 적응형 문맥 내 학습의 문맥 과적합
The Price of Choosing Examples: Context Overfitting in Adaptive In-Context Learning
한국어 초록
문맥 내 학습을 분석할 때는 보통 학습기를 고르기 전에 프롬프트 예시를 표본 추출했다고 가정한다. 실제 배포 시스템에서는 질의와 데이터 저장소를 확인한 뒤 예시를 검색하고, 필터링하고, 순위를 다시 매기고, 편집하고, 반복해서 시험한다. 본 연구는 조건부 확률 커널의 계산 체계를 사용해 프롬프트 구성을 적응적 데이터 분석으로 다룸으로써 이 차이를 정식화한다. 핵심량은 데이터 저장소와 최종 프롬프트 기록 사이의 상호정보량 또는 근사 최대정보량인 문맥 용량이다. 가중치를 고정한 임의의 문맥 내 학습기와 용량 $\kappa$의 임의의 적응형 문맥 파이프라인에 대해 $\sqrt{\kappa/k}$ 차수의 유한 표본 문맥 일반화 경계를 증명한다. 여기서 $k$는 선택한 예시 중 보고 점수의 계산에 손실이 사용되는 예시 수다. 같은 차수의 하한을 증명했으며, $\log k\ll\kappa\ll k$일 때 그 상수는 정확하다. 또한 PAC-베이즈 검색 규칙 두 가지를 도출한다. 첫째는 데이터에 따라 정한 후보 채택 규칙에 그 사전확률 질량을 반영하는 1차 깁스 규칙이고, 둘째는 자기 정규화 2차 규칙이다. Banking77에서 검색 구성 64개와 모델 계열 두 개를 평가한 결과, 재표본화한 선택 사건 24,000건 모두에서 성능 보증이 성립했다. 검증 질의 64개(Qwen2.5-7B) 또는 128개(GPT-4.1-mini)를 재사용하면 깁스 규칙은 검증 표본 추출의 99%를 넘는 경우에서 제로샷 오차보다 위험이 낮음을 보증했다. 마지막으로 질의 방향을 기준으로 한 상위 $k$개 가우스 검색의 순서통계량 분석을 포함해, 이 이론을 베이즈 선형 문맥 내 회귀에 적용했다. 이 결과는 문맥의 품질과 문맥 성능을 보증할 수 있는지를 구분한다. 길거나 관련성 높은 문맥은 선택 절차가 충분히 안정적이어서 선택한 문맥의 근거를 일반화할 수 있을 때에만 위험을 낮춘다.
원문 초록
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.
제출 이력
확인된 버전만 표시합니다. 전체 제출 이력은 arXiv 원문에서 확인하세요.
함께 살펴볼 논문
공통 태그를 근거로 연결했습니다. 실제 인용 관계나 논문의 우수성을 뜻하지 않습니다.
공통 태그로 연결된 공개 논문이 아직 없습니다.
토론
이 논문과 연결된 포럼 글이 아직 없습니다.
저자 비고
arXiv Comments
Accepted at NeurIPS 2026. Xiaoyu Li and Jiangxuan Long contributed equally. 31 pages, 8 figures, 5 tables