acceptodds
Published as a conference paper at NeurIPS 2026

In-Context Benign Overfitting: A Feature-Selection Model in Linear Regression ICL

Puneesh Deora, Bhavya Vasudeva, Christos Thrampoulidis

Abstract

In in-context learning (ICL), a frozen pre-trained model solves tasks by conditioning on a prompt of a few input–output examples, without gradient updates. If the task was present in pretraining but the particular prompt sequence was not, the resulting in-distribution generalization is retrieval-based ICL. Learning-based ICL instead reflects out-of-distribution generalization: the model succeeds on prompts generated by a novel task. Empirically, both forms improve with scale. By analogy to benign overfitting in supervised learning, we call this in-context benign overfitting: larger models more faithfully memorize the pretraining tasks (improving retrieval ICL) while also generalizing better to novel tasks (improving learning ICL). We prove that this phenomenon already arises in a minimal in-context linear-regression feature-selection model. In contrast, standard in-context linear-regression models exhibit a retrieval–learning tradeoff, where the emergence of learning-based ICL coincides with degraded retrieval-based performance.

Keywords:
Sydney, Main Track

Reviews

Among:
Shape:
123456this paper, Bottom 49%
Figure 1. Mean review rating of the reviewed papers at NeurIPS 2026. This paper averages 4.33 over 3 reviews, above 49% of the others.
Reviewer_mMGaOpenReview ↗
Rating
5
Clarity
2
Confidence
3
Originality
3
Quality
3
Significance
3
Read review
Summary

The paper introduces the feature-selection formulation from prior work, to be applied to the linear regression model setting in ICL. By studying the proportional limit regime, the authors convert the problem into a gaussian equivalent problem. They identify the impact of task diversity and scale which affect whether benign overfitting happens. They also provide some Transformer experiments to verify benign overfitting happens.

Strengths and weaknesses

Strengths: The writing is clear and easy to understand.

Weakness:

  • Line 81~82 and Line 87~88 seem repetitive, where feature-selection formulation is repeated twice. Related work should appear in the main paper instead of appendix.
  • The Transformer experiments seem to be pretty limited. Figure 11~15 and Figure 5 only shows its relationship with embedding dimension, but not with task diversity too. It might be helpful to look at this papers for additional experiments, although they are on markov chains, to investigate the threshold of various factors in transformer experiments [1].
  • It is unclear about the connection between section 3.3 and 4 and section 3.3 still remains hard to parse, it would be great if authors can comment on how model scale and task diversity appear in the two theorems.
  • It would be great if the authors can explicitly write more technical innovations of this work from prior work, i.e. how the feature selection mechanism interacts with the techniques in Lu et al. . Line 538~542 seems to mention a bit but it would be better to make it more explicit.

[1] Competition Dynamics Shape Algorithmic Phases of In-Context Learning. Park et al. ICLR 2025.

Questions

Questions:

  • Can you explain in more detail about the difference between p and d? In line 103 you mentioned that vanilla formulation of prior work corresponds to p = d. In equation (3), you mentioned p/d -> rho. Do you mean p <= d and is a fixed propotion of d (since it takes subsets of original features).
  • Why p appears before the lim, in both theorem 1 and 2?
  • In Section Line 232~242, can you establish a clearer and more precise criteria about the transition of in-context benign overfitting, to harmful overfitting? Does it have any relationship with T/d’s limit too?
  • Line 243~266 seem to be operating in the overparametrized regime, while it holds in standard neural network training, it does seem to be the case in language modelling, for example, scaling law might imply that we should train smaller models for much larger amount of data, can authors comment on this? It would be great if the threshold (ρ > √ν) can be drawn in Figure 4.
Limitations

Yes, it would be better to provide more thorough Transformer experiments to strengthen the paper. I am willing to raise score if the questions regarding experiments and readability of the theoretrical result are resolved.

Paper formatting concerns

No

Final justification

The rebuttal has effectively resolved my concerns.

1 comment

Thank you for the positive endorsement of our work and constructive feedback. We answer specific questions below.

Q1: Difference between p and d.

Yes. Here, dd is the ambient dimension of the features xx, while p≤dp\leq d is the subset of features selected by the model. Under the proportional scaling in Eq. (3), pp grows with dd while p/d→ρp/d \to \rho, with ρ∈(0,1]\rho \in (0, 1]. Similarly, N,T,MN, T, M grow with dd according to the ratios ν,τ,μ\nu, \tau, \mu, respectively.

Q2: Meaning of plim\text{plim}.

The notation plim⁡\operatorname{plim} denotes the limit in probability; the “p” in plim⁡\operatorname{plim} is unrelated to the model-size variable pp. Under the joint scaling in Eq. (3), as d→∞d \to \infty, the ID and OOD risks converge in probability to the deterministic limits stated in Theorems 1 and 2. Thank you for asking, we will define the operator to avoid confusion.

Q3: Benign and harmful overfitting.

Lines 232–242 compare two different ways of increasing overparameterization. In Fig. 2, we fix the number of training sequences ν=N/d\nu = N/d, task diversity μ=M/d\mu=M/d, and context length τ=T/d\tau=T/d and vary the explicit model-scale parameter ρ=p/d\rho=p/d. Beyond the interpolation threshold, both ID and OOD risks decrease. In Fig. 3, we instead fix ρ=1\rho=1 and vary 1/ν=d2/N1/\nu = d^2/N (similar to Lu et al. 2025). This changes the sample-to-dimension ratio rather than independently scaling model capacity, and in the isotropic setting shown, OOD risk decreases while ID risk increases.

Thus, the post-interpolation behavior of the two risks is the key quantity: in-context benign overfitting occurs when increasing scale improves ID performance without degrading OOD performance, whereas harmful overfitting or a retrieval–learning tradeoff occurs when ID risk increases while OOD risk decreases or vice-versa. The exact transition is determined implicitly by the risk expressions in Theorems 1 and 2 as a function of ρ,ν,μ,τ,σn2\rho,\nu,\mu,\tau,\sigma_n^2; we do not currently derive a simple universal closed-form threshold.

The context-length ratio T/dT/d also affects this transition. In both theorems, it enters through c=1+σn2τc=\frac{1+\sigma_n^2}{\tau}, and therefore changes both ID and OOD risks. Larger τ\tau provides more demonstrations to infer the underlying task in the sequence, although deriving a separate closed-form transition threshold in τ\tau is beyond the current result.

We will clarify these in reference to Lines 232-242.

Q4: Fig. 4 and scaling laws.

Figure 4 is not restricted to the overparameterized regime. For every fixed task diversity μ\mu, moving vertically by increasing ρ\rho crosses from the underparameterized regime ρ2<ν\rho^2<\nu to the overparameterized regime ρ2>ν\rho^2>\nu. The bright yellow high-loss band corresponds to the interpolation peak near ρ=ν\rho=\sqrt{\nu}​. We will explicitly draw this ρ=(ν)\rho = \sqrt(\nu) line to make this more clear.

The discussion in Lines 262–266 specifically considers fixed overparameterized models and the effect of varying task diversity: higher task diversity improves OOD generalization but worsens ID performance. This is connected to the task diversity thresholds studied in previous ICL literature (Raventos et al., 2023, Park et al., 2025).

Finally, compute-optimal language-model scaling concerns a different comparison: under a fixed compute budget, one may trade off a larger model trained on less data against a smaller model trained on more data. Our analysis instead characterizes the ID and OOD risks of the limiting solution achieved by gradient descent training: least-squares solution in the underparameterized regime and the minimum-norm interpolator in the overparameterized regime. We hold the data parameters (ν,μ,τ\nu, \mu, \tau) fixed while varying model scale ρ\rho, and do not impose a fixed compute constraint. Thus, our results isolate the statistical effect of model scale rather than identifying a compute-optimal allocation between model size and training data. Studying such an allocation would require jointly varying model size ρ\rho, the amount and length of pretraining data through ν\nu and τ\tau, and the optimization budget under an explicit compute constraint. While this is an interesting direction that we will mention in the future work section, it is beyond the scope of the current work.

W2: Transformer experiments on task diversity.

Thank you for the valuable suggestion. Figure 4 already studies this interaction where we plot the ID and OOD risks obtained in Theorems 1 and 2, capturing both the effect of model scale ρ\rho studied here and the task-diversity thresholds in μ\mu observed in prior work, including Park et al. 2025. We have additionally run corresponding transformer experiments varying both embedding dimension and task diversity, and observe the same qualitative behavior as in Fig. 4. We will include these results in the camera-ready version.

W3: Connections between Sec. 3.3 and Sec. 4.

We welcome your feedback on the presentation. The formulas in Section 3.3 capture explicit dependencies on all the principal problem parameters: model scale ρ\rho, task diversity μ\mu, context length τ\tau, number of pretraining sequences ν\nu, and noise level σn2\sigma_n^2​. Model scale enters directly through ρ\rho and the overparameterization ratio ρ2/\rho^2/, while task diversity enters through the Marchenko–Pastur ratio used in the empirical task covariance matrix γ=ρ/μ\gamma=\rho/\mu.

Because these dependencies are coupled through the Stieltjes transform and the fixed-point quantities (Eq. 8), we only briefly discuss the most interpretable one in the paragraph following Theorems 1 and 2. For example, in the underparameterized regime,κ∞→∞\kappa_\infty\to\infty as ν/ρ2→1+\nu/\rho^2\to1+, causing both ID and OOD risks to diverge. On the overparameterized side, as ν/ρ2→1−\nu/\rho^2\to1-, the fixed-point quantities aa and βˉ∗\bar\beta_*​ become singular, again yielding divergence of both risks at the interpolation threshold.

In order to clearly see the dependencies on model scale and task diversity, in Section 4, we plot the exact ID and OOD loss predictions given by Theorems 1 and 2. Figure 2 varies model scale ρ\rho while fixing the other parameters, Figure 3 varies ν\nu with ρ=1\rho=1, and Figure 4 jointly varies model scale ρ\rho and task diversity μ\mu.

We will add a small paragraph immediately after Theorem 2 summarizing how the problem parameters ρ,μ,ν,τ\rho,\mu,\nu,\tau, and σn2\sigma_n^2 enter the risk formulas, and short roadmap at the beginning of Section 4 explaining that Figs. 2-4 evaluate these formulas along the ρ\rho-, ν\nu-, and joint (ρ,μ)(\rho,\mu)-directions, respectively.

W4: Technical innovations relative to Lu et al. 2025.

Thank you for the question. The technical differences from Lu et al., 2025 are twofold. First, we introduce and analyze a new feature-selection model for ICL. Lu et al., 2025 consider the full-feature setting p=dp=d, whereas our model restricts the learner to a random subset SS of pp visible coordinates. This does not merely introduce an additional parameter ρ(p/d)\rho (p/d): it changes the regression-feature dimension to p2p^2, places the interpolation threshold at p2=Np^2=N (equivalently, ρ2=ν\rho^2=\nu), and replaces the full empirical task covariance by

1M∑i=1Mwi[S]wi[S]⊤\frac{1}{M}\sum_{i=1}^{M}w_i[S]w_i[S]^\top,

whose limiting spectrum depends jointly on model scale and task diversity through p/M→ρ/μp/M\to\rho/\mu. Consequently, the risks for the model using feature selection cannot be obtained by simply replacing dd with pp in the formulas of Lu et al., 2025.

Second, we use different technical machinery to analyze this new model. We first compute the relevant first- and second-order moments of the selected features and query labels, and construct a Gaussian linear problem matching the feature covariance, feature-label cross-covariance, and label second moments. We then apply the CGMT to characterize the least-squares and minimum-norm estimators of this Gaussian equivalent problem and derive the corresponding ID and OOD risks (as discussed in the proof sketch in Section 5).

Gaussian equivalence and CGMT are flexible and well-established tools in modern high-dimensional statistics and learning theory. In contrast, Lu et al., 2025 directly analyze their full-feature ridge formulation through an extended-resolvent random-matrix calculation. We will make both technical innovations: i) the introduction and analysis of the feature-selection model, ii) and the use of this distinct analytical route more explicit in the camera-ready version.

W1: Related work.

Thank you for the suggestion. We will fix the repetition between Lines 81-82 and 87-88 and move the related-work discussion into the main body in the camera-ready version, where the page limit allows an additional page.

Reviewer_ahC7OpenReview ↗
Rating
4
Clarity
2
Confidence
4
Originality
2
Quality
3
Significance
2
Read review
Summary

This paper proves that in-distribution (ID) and out-of-distribution (OOD) in-context learning (ICL) performance can both improve in the limit of large model capacity. The authors call this phenomenon, "in-context benign overfitting", as an analogue of the similar phenomenon in supervised learning. The main argument is that this phenomenon is present even in the most minimal model and is therefore not a unique feature of larger-scale models. The suthors show further that this phenomenon depends on the model scale parameter.

Strengths and weaknesses

The paper reads well and the theory appears correct, validated with small-scale numerical experiemnts. I have several concerns.

  1. I do not believe the term "benign overfitting" is appropriate for the phenomenon considered. Benign overfitting means interpolating while still generalizing, enabled by overparameterisation. In fact, increasing the model scale almost does not suppress the ID loss and does not decrease OOD loss below the limit of vanishing model scale (Fig 2); this is far from "generalizing" either ID or OOD
  2. The model scale is tied to the data dimension (seen by the model). The results therefore confound the effects of data dimensions and those from varying model scale.
  3. The paper makes a distinction between in-context benign overfitting and standard ICL, but it is unclear whether this behavior is purely due to the properties of the linear tasks or to in-context learning. As it is formulated, they are confounded.
  4. The use of min-norm formulation results in interpolation singularity at p=N, which dominates the figure and masking the effects of model scale, data size and task diversity. Small but larger-scale transfromers are known to adapt to the data and implement an algorithm closer to optimally tuned ridge regression with no or much weaker interpolation peak.
  5. Both ID and OOD defined in the paper are in-task-distribution. That is, the training and test tasks are from the same probability distribution. OOD generally implies some form of distribution shift which is absent from the current work. The authors should rectify the termoinology or significantly clarify this point so readers do not confuse the OOD case with out-of-task-distribution.
  6. Related to the above, how does the current work compare with those that consider out-of-task-distribution generalization (e.g., https://openreview.net/forum?id=YKyza9lrv4)? Do the authors expect the insights from this work to also apply there?
  7. In Fig 4, what do the dashed lines represent? Are they contour lines? The left and right panels have different color scales, making it hard to directly compare ID and OOD generalization.
Questions

Please see Strengths And Weaknesses.

Limitations

Yes

Paper formatting concerns

No concerns

Final justification

The authors have agreed to modify terminology surrounding ID/OOD which will significantly improve the clarity. The assumptions of the theory remain a limitation, but they are in line with average published work in this area.

1 comment

Thank you for the careful reading and constructive feedback. We respond to specific comments and questions below. We hope the responses address your concerns, and we would be happy to answer any additional questions.

1. On Benign overfitting terminology.

We agree that one common reading of classical benign overfitting is interpolation of the training data together with good generalization to fresh samples. A closely related reading, particularly in the double-descent literature, concerns behavior beyond interpolation: increasing model capacity improves population prediction rather than causing generalization to deteriorate. Our use of the term is the task-level analogue of this latter behavior. Beyond interpolation of the NN pretraining sequences, increasing capacity improves prediction on fresh sequences from the pretraining tasks while retaining performance on unseen tasks. This is the behavior established by our theoretical analysis and observed more generally in our experiments, motivating our terminology.

In the in-context setup, the key distinction is that the ID loss in Fig. 2 is not the training loss. Our training set consists of NN fixed sequences generated from a finite pool of pretraining tasks, and in the overparameterized regime p2≥Np^2\geq N, these sequences are interpolated exactly. At inference time, ID evaluation uses a fresh sequence whose task is sampled from the finite pretraining task pool, whereas OOD evaluation uses a fresh sequence whose task is independently sampled from Dtask\mathcal D_{\mathrm{task}}​ and is therefore almost surely outside that finite pool. Consequently, neither risk is expected to vanish merely because the pretraining sequences are interpolated: label noise, finite context length, finite pretraining data, and feature selection all contribute to nonzero prediction risk.

Concretely, in the isotropic setting of Fig. 2, the overparameterized extreme achieves substantially lower ID loss than the underparameterized extreme while attaining comparable OOD loss. The power-law covariance experiments in Appendix H show the stronger case in which both overparameterized risks fall below their respective underparameterized minima.

Overall, we agree that this distinction would benefit from being stated more explicitly, and we will clarify the post-interpolation, meaning of “in-context benign overfitting” where the terminology is introduced.

2. Model scale tied to data dimension seen by model.

We agree that, in our theoretical model, the number of selected features pp is linked to the number of trainable parameters p2p^2. This is a deliberate choice: in classical double descent literature [Hastie et al., 2019; Belkin et al., 2020], feature selection provides a minimal mechanism to control the model size, and we similarly use it as one way to control model capacity. Importantly, in Fig. 2, the ambient dimension dd, the underlying data and task distributions, and all other data-generation parameters are fixed; only pp (model scale proxy) is varied. Thus, the underlying data distribution does not change.

Within the standard p=dp=d linear-attention formulation, there is no separate model-capacity parameter. Increasing the parameter-to-sample ratio therefore requires varying dd relative to NN, as in Lu et al. [2025]. As shown in Fig. 3, this scaling does not capture the desired model-scale effect: OOD loss improves, but ID loss worsens.

The transformer experiments provide a complementary check where the input dimension and all data-generation parameters remain fixed, while model scale is varied through one of the standard ways by increasing the embedding dimension. Thus, unlike in the theoretical model, model size is not tied to the number of features selected by the model. We still observe the same qualitative post-interpolation behaviour in both linear-attention and softmax transformers.

3. Distinction between in-context benign overfitting and standard ICL.

Thanks for the question. Prior work [Raventos et al., 2023, Park et al., 2025] on retrieval and learning modes have primarily studied the effect of task diversity at a fixed model architecture or capacity. These works identify a task-diversity threshold: as the number of pretraining tasks increases, the model transitions from good retrieval performance (low ID loss but high OOD loss) to good learning performance (low OOD loss but higher ID loss).

Empirical observations in larger language models [Wei et al., 2023] suggest that retrieval- and learning-based ICL can both improve with scale; our goal is to show that this coexistence can already arise in a minimal, analytically tractable model for ICL (Fig. 2). Figure 4 makes the distinction between these two effects explicit. Horizontal cuts, which vary task diversity at fixed model scale, recover the task-diversity effects identified in prior work. Vertical cuts, which vary model scale at fixed task diversity, reveal the in-context benign-overfitting behavior studied here. Thus, our framework recovers the known effects of task diversity while additionally characterizing the effect of model scale.

4. Interpolation peak and minimum norm formulation.

First a clarification: the interpolation threshold in our model is p2=Np^2 =N, rather than p=Np=N. The interpolation threshold in our model is p2=Np^2 =N, rather than p=Np=N. We agree that the divergence exactly at this threshold is a consequence of the ridgeless minimum-norm formulation. However, the height of this peak is not central to our claim, which concerns the behavior along the post-interpolation branch: as model scale increases beyond the threshold, ID performance improves substantially while OOD performance is retained (compared to the underparameterized extreme). This effect is clearly visible in Fig. 2, while Fig. 4 separately characterizes the joint effects of model scale and task diversity.

We also distinguish the minimum-norm solution used to fit the model across the NN pretraining sequences from the algorithm implemented in-context over the TT demonstrations. Prior works [Garg et al. 2022, Akyurek et al. 2023, etc.] showing that transformers can implement ridge-like in-context estimators concern the latter and do not imply that the outer pretraining problem cannot be interpolated.

Finally, the transformer experiments (Fig 5. and App. H) are not restricted to our minimum-norm theoretical formulation. Nevertheless they follow the same pattern: their training loss falls to approximately zero as embedding dimension increases, after which both ID and OOD losses exhibit the same qualitative post-interpolation descent. Thus, weakening or smoothing the interpolation peak does not alter the model-scale phenomenon studied in the paper.

5. OOD terminology.

We agree that our use of “OOD” does not refer to a conventional distribution shift. Rather, it is task-level: ID evaluation uses fresh sequences generated by tasks from the finite pretraining task pool, whereas OOD evaluation uses fresh sequences generated by tasks not contained in that pool. The pretraining and OOD tasks are nevertheless drawn from the same parent task distribution. Section 2 explicitly states this finite-MM distinction and notes that we follow the terminology used in prior finite-task ICL work [Park et al. 2025]. Please also refer to Rev 1 Q2: we will clarify this further in the camera-ready.

6. Comparison with out-of-task-distribution work.

Thank you for the reference. Goddard et al., 2025 study a complementary setting in which the pretraining tasks cover a restricted region of task space and evaluation includes tasks outside that pretraining distribution. Our setting instead fixes the parent task distribution and studies the effect of model scale with a finite pretraining task pool. Accordingly, our current results do not directly address shifts in the underlying task distribution. Understanding how model scale interacts with such task-distribution shifts is an interesting direction for future work. We will add a discussion in the camera-ready.

7. Dashed lines in Fig 4.

Yes, the dashed lines are iso-risk contours, with each line connecting values of task diversity μ\mu and model scale ρ\rho that yield the same loss. At fixed model scale, increasing task diversity raises ID loss while lowering OOD loss, consistent with prior work on task-diversity thresholds [Raventos et al., 2023, Park et al., 2025]. The upper ID contour shows that larger models can accommodate a more diverse pretraining task pool before reaching the same fixed ID loss, reflecting greater task-memorization capacity. The corresponding OOD contour slopes in the opposite direction because, on the post-interpolation branch, both increasing model scale and increasing task diversity improve OOD performance; hence, larger models require less task diversity to reach the same fixed OOD loss. We use different color scales because ID loss varies over a substantially wider range than OOD loss; the colors are intended to show trends within each panel rather than to be compared across panels. We will clarify the contour levels and color scales in the revised version.

References:

Goddard et al., 2025. When can in-context learning generalize out of task distribution?

Reviewer_c9tfOpenReview ↗
Rating
4
Clarity
3
Confidence
3
Originality
2
Quality
3
Significance
3
Read review
Summary

This paper studies how the two modes of in context learning evolve as model size grows. The first is the retrieval mode, which corresponds to in distribution generalization on tasks seen during pretraining. The second is the learning mode, which corresponds to out of distribution generalization on tasks that are novel relative to pretraining. The authors introduce the notion of in context benign overfitting, defined as the property that a sufficiently large model can simultaneously memorize the pretraining task set, achieving very low in distribution risk, while also generalizing to novel tasks, achieving very low out of distribution risk. The study is carried out in a minimal in context linear regression setting with a simplified linear attention predictor, where a feature selection mechanism controls model size while the underlying data distribution is held fixed. The authors point out that feature selection is precisely the key ingredient that makes benign overfitting visible, in contrast to the prior setting that uses all features and therefore observes only a tradeoff between retrieval and learning, and they support this with the recovery of task diversity thresholds and with transformer experiments.

Strengths and weaknesses

Strengths

  • The conceptual contribution is clean and natural. Lifting benign overfitting from the sample level to the task level is a natural idea that had not been formalized in the in context learning setting. The framing also reconciles the scaling intuition with prior tradeoff results, which gives the paper a clear and coherent narrative.
  • The theory is a sharp characterization rather than merely a bound. The paper gives closed form asymptotic expressions for both the in distribution and the out of distribution risk in the overparameterized and the underparameterized regimes, expressed through a low dimensional fixed point system and the Stieltjes transform of the Marchenko Pastur law.

Weaknesses

  • The model is fairly simple and the capacity mechanism is somewhat artificial relative to real scaling. The analysis uses only linear attention, the predictor relies on a fixed averaging estimator as its internal feature rather than an attention mechanism that is genuinely trained to implement an algorithm, and overparameterization is induced by randomly dropping input coordinates rather than by widening a network. The mapping from this feature selection knob to what happens when a real transformer is made wider is therefore only a proxy.
  • The out of distribution notion is finite sample in nature, namely tasks drawn from the true task distribution but falling outside the finite training pool, rather than a genuine distribution shift. As the number of training tasks grows this gap vanishes, so the learning mode here is a milder form of generalization than the term out of distribution might suggest. The authors note this, but it limits how far the reassuring conclusion can be carried.
Questions
  1. The Gaussian equivalence principle is verified only empirically, yet both main theorems rest on it. Can the authors give either a partial proof for this specific construction, or quantitative evidence on how the empirical gap between the original problem and the Gaussian equivalent problem scales as the dimension grows. A convergence rate or a finite dimension error measurement, even for one setting, would substantially raise confidence that Theorem 1 and Theorem 2 describe the original model and not only its Gaussian surrogate.

  2. The out of distribution mode is finite pool generalization, and the gap vanishes as the number of training tasks grows. Can the authors quantify, within their own formulas, at what task diversity the out of distribution risk becomes statistically indistinguishable from the in distribution risk, so that a reader can see how strong the reassuring conclusion remains once the training pool is large relative to the model scale.

Limitations

Yes

Paper formatting concerns

no

1 comment

Thank you for the careful reading and constructive feedback. We are encouraged that you find the conceptual framing clean and the theoretical characterization sharp. We respond to specific comments and questions below.

Q1: Gaussian Equivalence gap

Thank you for raising this important point. To clarify the scope of the results, Theorems 1 and 2 are rigorous asymptotic characterizations of the linear Gaussian-equivalent problem. Gaussian equivalence is then used to transfer these predictions to the original structured, non-Gaussian feature model; it is not an additional assumption within the CGMT analysis itself.

We briefly explain why we expect Gaussian equivalence to hold in our setting. As defined in Definition 2, we choose the Gaussian feature covariance as Σg=ΣHSp:=1NEX,ϵ[HSp⊤HSp]\Sigma_g=\Sigma_{H_{S_p}}:=\frac{1}{N}\mathbb{E}_{X,\epsilon}[H_{S_p}^{\top}H_{S_p}] and the effective regression parameter as θ⋆:=1NΣHSp−1σHSpy\theta_\star:=\frac{1}{N}\Sigma_{H_{S_p}}^{-1}\sigma_{H_{S_p}\mathbf{y}}, where σHSpy:=EX,ϵ[HSp⊤y]\sigma_{H_{S_p}\mathbf{y}}:=\mathbb{E}_{X,\epsilon}[H_{S_p}^{\top}\mathbf{y}]. We then choose the noise variance for sample ii as σni2:=σx2∣∣wi∣∣2+σn2−θ⋆⊤ΣHSpθ∗\sigma_{n_i}^{2}:=\sigma_x^{2}||w_i||^{2}+\sigma_n^{2}-\theta_\star^{\top}\Sigma_{H_{S_p}}\theta_*. Thus, the Gaussian-equivalent problem exactly matches the feature covariance, feature-label cross-covariance, and label second moments of the original problem. The explicit expressions for these quantities are derived in App. B.

The squared-loss structure provides additional reason to expect these matched moments to capture the relevant behavior. For any fixed predictor θ\theta, its population risk is

$\mathbb{E}_{X,\epsilon}[(\theta^\top h_{S_p}(X)-y_q)^2] =\theta^\top\mathbb{E}_{X,\epsilon}[h_{S_p}(X)h_{S_p}(X)^\top]\theta -2\theta^\top\mathbb{E}_{X,\epsilon}[h_{S_p}(X)y_q] +\mathbb{E}_{X,\epsilon}[y_q^2]$,

and therefore depends only on precisely the second-order quantities matched by the Gaussian construction. Universality based on such quantities has proved robust in many high-dimensional squared-loss problems.

This observation does not by itself prove Gaussian equivalence. The learned least-squares or minimum-norm estimator θ^Sp\widehat{\theta}_{S_p} is a data-dependent nonlinear function of the empirical feature matrix HSpH_{S_p} and labels y\mathbf{y}. Proving universality of its asymptotic risk therefore requires additional problem-specific control of these random quantities and is often a separate technical contribution from the Gaussian analysis itself.

Our results in Figs. 2 and 3 provide complementary quantitative evidence: the empirical ID and OOD risks of the original structured model are closely tracked by the theoretically derived risks of the Gaussian-equivalent problem across both the underparameterized and overparameterized regimes. This being said, we do not currently have a formal Gaussian equivalence proof for our structured features and their feature-label dependence. Establishing one, potentially by adapting recent universality techniques [Hu and Lu, 2022; Montanari et al., 2023], is an important future direction, as already noted in Lines 191-195.

W2, Q2: OOD generalization and task diversity

We agree that in our paper, “OOD'' does not refer to changes in the underlying task distribution; rather it refers to unseen tasks relative to the finite pretraining task set. As discussed in Section 1, this distinction is used to study retrieval (low ID, high OOD loss) and learning (high ID, low OOD loss) models of ICL.

You are right in your comment that “ID/OOD distinction disappears in the large task diversity limit” and this is indeed something that can be seen directly from our formulas. Task diversity enters through γ=ρμ=pM,\gamma=\frac{\rho}{\mu}=\frac{p}{M}, which governs the empirical task covariance. Keeping all other problem parameters fixed, taking μ→∞\mu\to\infty gives γ→0\gamma\to 0. In this limit, the Marchenko-Pastur law converges to a point mass at 11. For example,

\qquad m_\gamma'(-c) \longrightarrow \frac{1}{(1+c)^2}.$$ Substituting these limits into the risk expressions makes the ID and OOD risks coincide. Thus, the relevant scaling is $$M\gg p, \qquad\text{or equivalently}\qquad \mu\gg\rho,$$ rather than a universal absolute number of tasks. Because our formulas describe deterministic asymptotic risks, a point at which the risks are statistically indistinguishable additionally requires specifying a tolerance. For any $\varepsilon>0$, this can be formalized as $\mu_\epsilon := \inf ( \mu :|\mathcal{L}_{\mathrm{ID}}(\mu)-\mathcal{L}_{\mathrm{OOD}}(\mu)| \leq \epsilon ).$ which is directly computable from Theorems 1 and 2 for any fixed problem parameters. Importantly, the in-context benign-overfitting result **does not rely** on this $\mu \to \infty$ limit. It is a **fixed-task-diversity** statement: at finite $\mu$, where the ID and OOD risks remain distinct, increasing model scale can yield low ID risk while retaining low OOD risk. This is precisely the behavior illustrated by the vertical cuts (fixed $\mu$) in Fig. 4. Thank you for the suggestion. We will elaborate on this point in the camera-ready. **W1: Simplicity of the model and the feature-selection proxy.** We agree that feature selection is a deliberately minimal proxy for model scale rather than a literal model of widening a Transformer. Its purpose is to vary the capacity of the predictor while holding the data distribution fixed: selecting $p$ out of $d$ coordinates gives $p^2$ trainable parameters, while $d$ and the underlying task distribution remain unchanged. This follows the feature-selection mechanism commonly used to study double descent and benign overfitting in linear regression [Hastie et al., 2019, Belkin et al., 2020]. In contrast, in the standard $p=d$ formulation, varying model scale requires varying the ambient dimension (relative to number of sequences $N$) itself. As shown in Fig. 3, this does not capture the phenomena of in-context benign overfitting. The averaging estimator is also not an unrelated algorithm imposed externally on the predictor. The model $f_{\theta}(X) = x_q^\top\Theta w_{\text{avg}}$ is the standard reduced form of a one-layer linear-attention model [Zhang et al. 2025], and similar forms have been used in several prior works [Zhang et al., 2025, Lu et al., 2025, Wu et al., 2023, Zhang et al., 2023, Frei and Vardi, 2024] to study ICL in linear regression (discussed in lines 80-85). We will discuss the reduction in the appendix. Finally, the phenomenon of in-context benign overfitting is not limited to the feature-selection model. In Fig. 5, we train both linear-attention-only and full softmax-attention Transformers and vary their embedding dimension while keeping the ambient data dimension fixed. Both exhibit the same qualitative post-interpolation improvement in ID and OOD risk. We therefore view feature selection as a tractable mechanism that isolates the effect of capacity, rather than an exact architectural model of width. Having said that, we agree it would be an interesting future direction to develop this theory for richer architectures like softmax attention as well as deeper transformers, as mentioned in the conclusion.

Comments on the paper

1 comment
Meta-review

The reviewers appreciate the paper's theoretical analysis of the relationship between retrieval- and learning-based in-context learning and find the proposed characterization of model-scale effects to be interesting. However, several important issues should be addressed in the rebuttal. Among them, the authors should especially clarify (1) the interpretation and terminology of ``in-context benign overfitting,'' including its relationship to the classical notion of benign overfitting and the distinction between in-distribution and the paper's notion of out-of-distribution generalization, (2) the extent to which the conclusions depend on the simplified feature-selection model and how they relate to scaling in practical transformer-based ICL, and (3) the empirical and theoretical evidence supporting the proposed framework, including the role of the Gaussian equivalence and the connection between the theoretical predictions and the transformer experiments. This paper seem be to borderline due to mixed recommendations.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.