June 11, 2026
Invariant learning can fail even when the invariant structure is statistically identifiable. We show a conditional computational barrier: under a black-box samplable supervised sparse recovery primitive motivated by average-case sparse-recovery reductions, there exist samplable multi-environment instances with a one-dimensional predictive invariant subspace (\(k=1\)) that are learnable with polynomial samples by exhaustive search, while any polynomial-time constant-accuracy recovery algorithm would contradict the primitive. We further quantify environment diversity by a separation parameter \(\gamma\), which controls identifiability and the curvature of invariance objectives. Under sufficient diversity and local Gaussian regularity, the minimax risk is \(\mathbb{E}[\mathop{\mathrm{dist}}(\hat{V},V_{\mathrm{inv}})^2]=\Theta(k(d-k)/(n|\mathcal{E}|))\), and under label-induced shifts a phase transition occurs at \(n^*\propto k(d-k)/(|\mathcal{E}|\gamma^2)\) with refined estimation error scaling proportional to \(1/\gamma^2\). Synthetic and real datasets illustrate the predicted gaps and transitions and motivate simple diversity diagnostics.
Machine learning models often exploit spurious correlations that hold in training data but fail under distribution shift [1]. This issue appears in several related forms, where models must detect inputs outside the training distribution [2]–[5], and co-occurrence bias in image classification, where models may rely on unstable correlations among classes rather than class-specific evidence [6]–[11]. Invariant learning uses multi-environment data to target features whose predictive relation with the label is stable across environments [12], [13]. Theory shows that such invariant structure can be statistically identifiable under diversity assumptions [14], yet empirically, invariant methods sometimes help and sometimes do not [15], [16]. We ask whether this inconsistency can arise even in idealized settings where invariances are identifiable.
We answer yes by establishing a computational–statistical separation for spurious correlation removal. Under a black-box samplable supervised sparse recovery primitive, motivated by average-case sparse-recovery reductions but not claimed to follow directly from existing Planted-Clique-to-sparse-CCA reductions, we construct samplable multi-environment instances where the predictive invariant direction is identifiable as the unique maximizer of an invariance–predictivity population score and is recoverable with polynomially many samples by exhaustive (exponential-time) search, but any polynomial-time constant-accuracy recovery algorithm at comparable sample sizes would contradict the primitive (Theorem 6). The construction maps the black-box sparse primitive to labeled multi-environment samples without accessing the hidden support.
A second message is that the number of environments matters less than their diversity. We quantify diversity by a separation parameter \(\gamma\) measuring how differently environments perturb spurious correlations (Definition 2). When \(\gamma=0\) (i.e., environments do not induce distinguishable variation in spurious conditional means), the invariant subspace can be unidentifiable even with unlimited data (Corollary 1). When \(\gamma>0\) and the environment-induced spurious shifts are sufficiently directionally rich (Proposition 10), recovery becomes possible and the required sample size decreases as diversity increases; in a structured label-induced shift regime the critical scaling is proportional to \(1/\gamma^2\) (Theorem 16). This predicts that a few diverse environments can be more informative than many similar ones.
We make four contributions. First, under a black-box samplable supervised sparse-recovery primitive, we construct samplable multi-environment instances exhibiting a computational–statistical gap for invariant subspace recovery. Second, we quantify environment diversity through a separation parameter \(\gamma\) and relate it to identifiability, minimax risk, and sample-complexity transitions. Third, we identify structural conditions under which polynomial-time methods achieve near-optimal rates. Finally, experiments on synthetic and standard spurious-correlation benchmarks illustrate compute–sample tradeoffs, diversity dependence, and practical diagnostics. Our hardness results are worst-case and conditional; the framework suggests estimating environment diversity before attributing invariant-learning failures to optimization or algorithmic limitations.
The authors declare that they have no financial conflicts of interest related to this work. In particular, this paper does not evaluate any model, dataset, product, or service developed by an organization that financially supports or employs any of the authors in a way that would constitute a conflict under the ICML peer-review ethics guidelines.
We model spurious correlation removal as invariant subspace recovery from multi-environment data, focusing on a linear-Gaussian setting. For a subspace \(V\subseteq\mathbb{R}^d\), let \(P_V\) be the orthogonal projector and \(\mathrm{Gr}(k,d)\) the Grassmannian of \(k\)-dimensional subspaces.
Definition 1 (SC Problem Instance). A spurious correlation (SC) instance consists of orthogonal subspaces \(V_{\mathrm{inv}},V_{\mathrm{sp}}\subseteq\mathbb{R}^d\) with \(V_{\mathrm{inv}}\oplus V_{\mathrm{sp}}=\mathbb{R}^d\) and \(\dim(V_{\mathrm{inv}})=k\), and environments \(\mathcal{E}=\{1,\ldots,|\mathcal{E}|\}\) with distributions \(\{\mathbb{P}_e\}_{e\in\mathcal{E}}\) over \((X,Y)\in\mathbb{R}^d\times\mathbb{R}\) such that \[X=X_{\mathrm{inv}}+X_{\mathrm{sp}},\qquad X_{\mathrm{inv}}=P_{V_{\mathrm{inv}}}X,\qquad X_{\mathrm{sp}}=P_{V_{\mathrm{sp}}}X.\] The instance satisfies that (C1) the conditional mechanism \(\mathbb{P}_e(Y\mid X_{\mathrm{inv}})\) is identical across \(e\), and (C2) \(\mathbb{P}_e(X_{\mathrm{sp}}\mid X_{\mathrm{inv}})\) differs for some \(e\neq e'\).
Assumption 1 (Gaussian Model). For each \(e\in\mathcal{E}\), \((X^{(e)},Y^{(e)})\) is jointly Gaussian, \(X^{(e)}\sim\mathcal{N}(\mu^{(e)},\Sigma^{(e)})\), and the distribution of \(P_{V_{\mathrm{inv}}}X^{(e)}\) is identical across environments. Moreover, the conditional mechanism \(\mathbb{P}_e(Y\mid P_{V_{\mathrm{inv}}}X)\) is environment-invariant.
Under Assumption 1, the environment-invariance of \(\mathbb{P}_e(Y\mid X_{\mathrm{inv}})\) means that the conditional law of \(Y\) given \(X_{\mathrm{inv}}\) is identical across environments. In the statistical analysis (Section 4) we add the standard linear-Gaussian structural assumption that \(Y=\langle w^*,X_{\mathrm{inv}}\rangle+\epsilon\) with \(w^*\in V_{\mathrm{inv}}\).
We quantify cross-environment variation in spurious features by a separation parameter.
Definition 2 (Environment Separation). For \(x\in\mathbb{R}^k\) and \(j\in\{1,\ldots,d-k\}\), define \(\mu_{e,j}(x):=\mathbb{E}_e[X_{\mathrm{sp},j}\mid X_{\mathrm{inv}}=x]\) and \(\Delta_j(x):=\max_{e\in\mathcal{E}}\mu_{e,j}(x)-\min_{e\in\mathcal{E}}\mu_{e,j}(x)\). Let \(M(x):=\max_{1\le j\le d-k}\Delta_j(x)^2\). Define \(\gamma := \big(\mathbb{E}[M(X_{\mathrm{inv}})]\big)^{1/2}\), where the expectation is under the common marginal of \(X_{\mathrm{inv}}\) when it is environment-invariant, and otherwise under the averaged environment marginal. In the mean-shift setting where \(\mathbb{E}_e[X_{\mathrm{sp}}\mid X_{\mathrm{inv}}]=\mu^{(e)}_{\mathrm{sp}}\), we have \(\gamma=\max_{e,e'\in\mathcal{E}}\big\|\mu^{(e)}_{\mathrm{sp}}-\mu^{(e')}_{\mathrm{sp}}\big\|_\infty\).
Remark 1 (Coordinate separation versus directional diversity). The scalar \(\gamma\) is a coordinate-level separation parameter. It is useful for axis-aligned features and for diagnostics in learned representations, but by itself it does not guarantee that every spurious direction is exposed by environment variation. Full subspace identifiability generally requires a directional richness condition. In the label-induced shift model, this role is played by the environment-difference matrix \[\mathcal{F} = \sum_{e<e'} (\mu_{\mathrm{sp}}^{(e)}-\mu_{\mathrm{sp}}^{(e')}) (\mu_{\mathrm{sp}}^{(e)}-\mu_{\mathrm{sp}}^{(e')})^\top ,\] and especially by \(\lambda_{\min}(\mathcal{F})\). The phase-transition result therefore assumes \(\lambda_{\min}(\mathcal{F})\gtrsim \gamma^2\). Without such a directional condition, a large coordinate-wise separation may still leave some spurious directions nearly unperturbed.
Definition 3 (Empirical Diversity Proxy). The separation \(\gamma\) is coordinate-dependent and is intended for axis-aligned features or learned representations; rotated settings use spectral quantities such as \(\lambda_{\min}(\mathcal{F})\). Empirically, we use \[\begin{align} \hat{\gamma} &:=\mathrm{median}_{j}\left( \max_e\hat{\rho}_j^{(e)}-\min_e\hat{\rho}_j^{(e)} \right),\\ \hat{\rho}_j^{(e)} &:=\mathrm{Corr}(X_j^{(e)},Y^{(e)}), \end{align}\] and write \(\hat{\gamma}_{\mathrm{repr}}\) when computed on learned features.
Let \(n_e\) be the sample size in environment \(e\), \(N:=\sum_{e\in\mathcal{E}}n_e\), and \(n_{\min}:=\min_e n_e\). In the balanced case, \(n_e=n\) and \(N=n|\mathcal{E}|\).
Given samples from all environments, recover \(V_{\mathrm{inv}}\). We evaluate estimators \(\hat{V}\) using the subspace distance \(\mathop{\mathrm{dist}}(V,V'):=\|P_V-P_{V'}\|_F\); for axis-aligned subspaces we also report feature selection accuracy (fraction of true invariant coordinates among the selected top-\(k\)).
Remark 2 (Environment-wise sampling). We adopt the standard multi-environment setting where samples are independent across environments and within each environment are i.i.d. In particular, the hard family in Section 3 is constructed by running the primitive sampler \(\mathcal{R}(A)\) independently per environment with fresh randomness.
We show that spurious correlation removal can be statistically feasible yet computationally intractable in a conditional black-box sense. The computational lower bound in this section is for a samplable multi-environment wrapper around a supervised sparse recovery primitive, while the linear-Gaussian statistical theory is developed separately in Section 4.
Hypothesis 3 (Planted Clique Hardness). Let \(G(m,1/2)\) denote the Erdős–Rényi random graph on \(m\) vertices with edge probability \(1/2\). In the planted clique problem, we observe \(G\sim G(m,1/2)\) with a planted \(\kappa\)-clique on a uniformly random subset \(S\subseteq[m]\), and the goal is to recover \(S\). Planted Clique Hardness states that for \(\kappa=m^{1/2-\delta}\) with any constant \(\delta>0\), no polynomial-time algorithm recovers \(S\) with probability \(1-o(1)\) [17]–[20].
Hypothesis 3 is included as motivation for average-case sparse-recovery hardness. The formal lower bound below is conditional on the black-box supervised sparse recovery primitive in Hypothesis 4; the key requirement for our reduction is samplability, namely that samples can be generated in randomized polynomial time from the primitive input without using the hidden sparse direction or its support.
We use a standard average-case hardness template: planted-clique-based reductions motivate sparse predictive recovery tasks, such as sparse CCA and related problems. In the main reduction below, we use a supervised sparse recovery primitive as a black-box hardness assumption; Appendix 14 discusses its relationship to standard sparse CCA reductions and the scalar-response caveat.
Hypothesis 4 (Samplable Supervised Sparse Recovery Primitive). There exist parameters \((d_Z,s)\) with \(d_Z=\mathrm{poly}(m)\) and \(s=\Theta(\kappa)\), a randomized polynomial-time sampler \(\mathcal{R}\), and a sign-invariant population predictive score \(\Phi_P(u)=\Phi_P(-u)\) defined for unit vectors \(u\in\mathbb{R}^{d_Z}\) and normalized so that \(0\le \Phi_P(u)\le 1\), such that, given an average-case input \(A\), \(\mathcal{R}(A)\) outputs i.i.d.samples \((Z_t,Y_t)\in\mathbb{R}^{d_Z}\times\mathbb{R}\) satisfying the following properties:
under the null case, the samples contain no sparse predictive direction with nontrivial population score;
under the planted case, there exists an unknown \(s\)-sparse unit vector \(v\in\mathbb{R}^{d_Z}\) whose support encodes the planted structure, the conditional law of \(Y\) given \(Z\) depends on \(Z\) only through \(v^\top Z\), and \(v\) is the unique sparse predictive direction in the sense that for some constants \(c_{\mathrm{prim}}>0\) and \(\delta_{\mathrm{prim}}>0\), \[\Phi_P(v)\ge \sup_{\substack{u\in\mathbb{S}^{d_Z-1}\\ \mathop{\mathrm{dist}}(\mathrm{span}(u),\mathrm{span}(v))\ge \delta_{\mathrm{prim}}}} \Phi_P(u)+c_{\mathrm{prim}} .\] Moreover, the signal scale \[s_{\mathrm{cond}} := \Big(\mathbb{E}[(\mathbb{E}[Y\mid v^\top Z])^2]\Big)^{1/2}\] is bounded below by a positive constant;
\(\Phi_P(u)\) admits empirical estimates with polynomial-sample uniform concentration over the candidate class used by exhaustive search, and the samples have uniformly bounded moments sufficient for the wrapper covariance statistics to concentrate;
any polynomial-time algorithm that, from polynomially many samples, outputs a vector with constant overlap with \(v\) yields a polynomial-time solver for the underlying average-case sparse-recovery problem;
the underlying average-case sparse-recovery problem is computationally hard in this parameter regime: no randomized polynomial-time algorithm solves it with constant success probability.
Hypothesis 4 is a conditional primitive. It is motivated by average-case sparse-recovery and sparse-CCA reductions, but we do not claim that it follows directly from existing Planted-Clique-to-sparse-CCA results. In particular, it is not the exposed scalar covariance model \(\mathrm{Cov}(Z,Y)=\lambda v\), which can be easy by empirical covariance estimation in some regimes. The empirical version of the score \(\Phi_P\) is part of the primitive interface used by the exhaustive-search learner. Equivalently, the primitive specifies a statistically estimable predictive criterion whose population maximizer is the hidden sparse direction. The reduction in Section 3.2 does not assume access to the hidden support or hidden direction; it only uses samples generated by the primitive and the empirical score estimator guaranteed by Hypothesis 4(iii). Therefore the hardness statement should be interpreted as a black-box transfer result for any supervised sparse-recovery task satisfying this interface.
We wrap the supervised sparse primitive into an SC instance. The constraint is that the resulting instance must satisfy Definition 1, in particular the invariance condition (C1).
Lemma 1 (Valid SC Instance). Construction 5 defines an SC instance in the sense of Definition 1. In the planted case, the conditional law of \(Y\) given \(P_{V_{\mathrm{inv}}}X\) is identical across environments because, by Hypothesis 4, the conditional law of \(Y\) given \(Z\) depends on \(Z\) only through \(v^\top Z\). The spurious block \(W^{(e)}=\mu^{(e)}Y+\eta^{(e)}\) creates environment-dependent variation in \(X_{\mathrm{sp}}\mid X_{\mathrm{inv}}\) whenever the shifts are not all equal. Moreover, if \[\Delta_\mu:=\max_{e,e'}|\mu^{(e)}-\mu^{(e')}|,\] then in the one-dimensional spurious block used here, \[\gamma=\Theta(s_{\mathrm{cond}}\Delta_\mu),\] where \(s_{\mathrm{cond}}=(\mathbb{E}[(\mathbb{E}[Y\mid v^\top Z])^2])^{1/2}\) is the signal scale in Hypothesis 4. Thus constant-size shifts give constant separation whenever \(s_{\mathrm{cond}}=\Theta(1)\).
For a candidate one-dimensional subspace \(V\in\mathrm{Gr}(1,d)\), let \(u_V=(u_Z,a)\) be any unit vector spanning \(V\), where \(u_Z\in\mathbb{R}^{d_Z}\) is the primitive block and \(a\in\mathbb{R}\) is the spurious block. If \(u_Z\neq 0\), write \(\bar u_Z=u_Z/\|u_Z\|\); if \(u_Z=0\), set the predictive score below to zero. We define the predictive component inherited from the supervised sparse primitive by \[A(V):= \begin{cases} \|u_Z\|^2\Phi_P(\bar u_Z), & u_Z\neq 0,\\ 0, & u_Z=0. \end{cases}\] To penalize environment-dependent spurious components, define the environment-wise association statistic \[\theta_V^{(e)}:=\mathrm{Cov}_e(Y,u_V^\top X)\] and \[T(V):=\max_{e\neq e'}\big(\theta_V^{(e)}-\theta_V^{(e')}\big)^2.\] The covariance statistic is used only to detect the environment-dependent spurious block in the wrapper; the predictive hardness is inherited from the black-box primitive through \(\Phi_P\). We combine the two terms into \[S(V):=A(V)-\lambda T(V),\] where \(\lambda>0\) is chosen large enough that non-invariant spurious directions are penalized more than any gain in predictivity. In Construction 5, many directions can be invariant but non-predictive; the score \(S(V)\) combines invariance with predictive power to rule out such directions.
Lemma 2 (Uniform Score Margin). Consider Construction 5 in the planted case. Let \[\Delta_\mu:=\max_{e,e'}|\mu^{(e)}-\mu^{(e')}|>0, \qquad \sigma_Y^2:=\mathrm{Var}(Y),\] and assume \(\sigma_Y^2\) is bounded above and below by positive constants. Suppose the primitive score satisfies Hypothesis 4 with margin \(c_{\mathrm{prim}}>0\). Then for every fixed constant recovery radius \(\delta\in(0,1)\), there exist constants \(\lambda>0\) and \(c_{\mathrm{mar}}>0\), depending only on \(\delta,c_{\mathrm{prim}},\Delta_\mu,\sigma_Y^2\) and the primitive moment bounds, such that \[S(V_{\mathrm{inv}}) \ge \sup_{\substack{V\in \mathrm{Gr}(1,d)\\ \mathop{\mathrm{dist}}(V,V_{\mathrm{inv}})\ge \delta}} S(V)+c_{\mathrm{mar}} .\] In particular, taking \(\delta=0.1\) gives the margin used in Lemma 3.
Given Lemma 2, an exponential-time search over an \(\epsilon\)-net of \(\mathrm{Gr}(1,d)\) can recover the invariant one-dimensional subspace by maximizing an empirical version of \(S(V)\). The required sample size follows from uniform concentration over the finite net and environment pairs.
Lemma 3 (Statistical Learnability). There exists an exponential-time algorithm that recovers \(V_{\mathrm{inv}}\) in Construction 5 with a polynomial number of samples \(N=\tilde{O}(\mathrm{poly}(m)/c_{\mathrm{mar}}^2)\).
The proof follows by uniform concentration over an \(\epsilon\)-net of \(\mathrm{Gr}(1,d)\) and is given in Appendix 13.8.
To obtain hardness, we show that constant-accuracy recovery of \(V_{\mathrm{inv}}\) yields constant-overlap recovery of the hidden sparse direction in the supervised sparse primitive. Any algorithm that outputs \(\hat{V}\) with \(\mathop{\mathrm{dist}}(\hat{V},V_{\mathrm{inv}})\le \delta_0\) induces a constant-accuracy recovery of the direction \(v\) in the primitive, which by Hypothesis 4(iv) yields a solver for the underlying average-case sparse-recovery problem.
Lemma 4 (Reduction Correctness). There exists an absolute constant \(\delta_0\in(0,1/2)\) such that if an algorithm outputs \(\hat{V}\) with \(\mathop{\mathrm{dist}}(\hat{V},V_{\mathrm{inv}})=\|P_{\hat{V}}-P_{V_{\mathrm{inv}}}\|_F\le \delta_0\) on Construction 5, then one obtains a polynomial-time solver for the underlying average-case sparse-recovery problem with probability \(\geq 2/3\).
The proof is by projecting the recovered one-dimensional subspace onto the primitive block and invoking the decoder in Hypothesis 4; see Appendix 13.9.
Any approximation or sampling discrepancy included in a concrete instantiation of the primitive only changes success probabilities by the corresponding total-variation amount, so the constant-success decoding implication remains valid whenever the primitive provides such a guarantee.
Theorem 6 (Computational Hardness). Assume the black-box samplable supervised sparse recovery primitive in Hypothesis 4. There exist samplable SC instances with tunable separation, in particular with \(\gamma=\Theta(1)\) when the signal scale satisfies \(s_{\mathrm{cond}}=\Theta(1)\) and the environment shifts are constant-size, such that:
\(V_{\mathrm{inv}}\) is invariant-predictive identifiable: it is the unique maximizer of \(S(V)\) over \(\mathrm{Gr}(1,d)\) (and in particular achieves \(T(V)=0\));
exhaustive search recovers \(V_{\mathrm{inv}}\) with polynomially many samples;
any polynomial-time algorithm achieving \(\mathop{\mathrm{dist}}(\hat{V},V_{\mathrm{inv}})\le \delta_0\) at this sample size would yield a polynomial-time solver for the underlying average-case sparse-recovery problem, and hence contradict Hypothesis 4.
Theorem 7 (Computational–Statistical Gap). Under the black-box samplable supervised sparse recovery primitive in Hypothesis 4, there exists a polynomial sample size \(N_{\mathrm{stat}}\) at which exhaustive search succeeds, whereas any polynomial-time algorithm achieving constant-accuracy recovery of \(V_{\mathrm{inv}}\) on the hard family would contradict the hardness clause of the primitive. Here constant-accuracy means \(\mathop{\mathrm{dist}}(\hat{V},V_{\mathrm{inv}})\le \delta_0\) for the constant \(\delta_0\) in Lemma 4.
Remark 8 (Few environments). Hardness does not rely on many environments: the construction already works with a constant number of environments (e.g., \(|\mathcal{E}|=2\)) provided \(\mu^{(1)}\neq \mu^{(2)}\) so that \(T(V)\) detects spurious components.
This section characterizes when \(V_{\mathrm{inv}}\) is identifiable and how sample complexity scales. The key quantity is environment diversity (Definition 2): insufficient diversity makes recovery statistically impossible, while sufficient diversity yields well-posed recovery with sharp finite-sample transitions.
Definition 4 (Invariance Gap). For \(V\in \mathrm{Gr}(k,d)\), define \(X_V:=P_V X\) and \[\mathcal{I}_{\mathrm{gap}}(V) := \max_{e \neq e'} \mathbb{E}_{X_V}\!\left[ D_{\mathrm{KL}}\!\left( \mathbb{P}_e(Y \mid X_V)\,\|\, \mathbb{P}_{e'}(Y \mid X_V)\right) \right],\] where the expectation is taken over \(X_V\) under the marginal distribution induced by \(\mathbb{P}_e\).
Definition 5 (Criterion-identifiability). We say that \(V_{\mathrm{inv}}\) is identifiable by the invariance-gap criterion over a model class \(\mathcal{P}\) if, for the population family \(\{\mathbb{P}_e\}_{e\in\mathcal{E}}\), every \(k\)-dimensional subspace \(V\) satisfying \[\mathcal{I}_{\mathrm{gap}}(V)=0\] must equal \(V_{\mathrm{inv}}\). Equivalently, for every \(\epsilon>0\), compactness and continuity imply the existence of a population separation \[\inf_{\mathop{\mathrm{dist}}(V,V_{\mathrm{inv}})\ge \epsilon}\mathcal{I}_{\mathrm{gap}}(V)>0 .\] This is a criterion-level notion: it asks whether the population invariance objective uniquely specifies the invariant subspace, rather than whether a particular finite-sample algorithm succeeds.
By (C1), \(\mathcal{I}_{\mathrm{gap}}(V_{\mathrm{inv}})=0\). Intuitively, if \(V\) contains only invariant information, then the predictive mechanism \(Y\mid X_V\) should not change across environments; if \(V\) mixes in spurious directions, conditioning on \(X_V\) can induce environment-dependent behavior.
Theorem 9 (Identifiability by the Invariance-Gap Criterion). Under Assumption 1, \(V_{\mathrm{inv}}\) is identifiable by the invariance-gap criterion in the sense of Definition 5 if and only if it is the unique \(k\)-dimensional subspace satisfying \(\mathcal{I}_{\mathrm{gap}}(V)=0\).
Proofs for this section are deferred to Appendix 13.
In many spurious-correlation settings, environments affect how spurious features correlate with the label rather than changing the \(Y\mid X_{\mathrm{inv}}\) mechanism. We formalize this next.
Proposition 10 (Diversity Condition (Label-Induced Shift)). Assume a linear-Gaussian SC instance where:
\(Y=\langle w^*,X_{\mathrm{inv}}\rangle+\epsilon\) with \(w^*\in V_{\mathrm{inv}}\), \(\|w^*\|=1\), and \(\epsilon\sim\mathcal{N}(0,\sigma_\epsilon^2)\) independent of \(X_{\mathrm{inv}}\);
\(X_{\mathrm{inv}}\sim\mathcal{N}(0,I_k)\) in every environment;
environments differ only through a label-induced spurious shift: \[X_{\mathrm{sp}}^{(e)} = \mu_{\mathrm{sp}}^{(e)}\,Y + \eta^{(e)},\qquad \eta^{(e)}\sim\mathcal{N}(0,I_{d-k}),\] independently of \((X_{\mathrm{inv}},Y)\).
Let \[\mathcal{F} := \sum_{e < e'} (\mu_{\mathrm{sp}}^{(e)} - \mu_{\mathrm{sp}}^{(e')}) (\mu_{\mathrm{sp}}^{(e)} - \mu_{\mathrm{sp}}^{(e')})^\top \in \mathbb{R}^{(d-k)\times(d-k)}.\] Then, generically (i.e., outside the algebraic non-cancellation degeneracy set characterized in Appendix 13.3), \(V_{\mathrm{inv}}\) is identifiable (i.e., it is the unique \(k\)-dimensional subspace with \(\mathcal{I}_{\mathrm{gap}}(V)=0\)) whenever \(\mathrm{rank}(\mathcal{F}) = d-k\).
Remark 11 (Number of environments required by the full-rank condition). Since \(\operatorname{rank}(\mathcal{F})\le |\mathcal{E}|-1\), the sufficient condition \(\operatorname{rank}(\mathcal{F})=d-k\) requires \(|\mathcal{E}|\ge d-k+1\). Thus Proposition 10 gives a full-dimensional sufficient condition. With fewer environments, identifiability can still hold under lower-dimensional or structured spurious variation, but not through this full-rank criterion.
Remark 12 (Generic non-cancellation). The rank condition ensures that every nonzero spurious component is exposed by some environment difference. In rotated subspace models, exact Gaussian conditional-law cancellations can occur only on an algebraic degeneracy set; Appendix 13.3 gives the formal generic non-cancellation argument.
Corollary 1 (Zero Diversity Implies Unidentifiability (in the label-induced model)). Under the setting of Proposition 10, if \(\mu_{\mathrm{sp}}^{(e)}\) is identical across all environments \(e\in\mathcal{E}\), then \(V_{\mathrm{inv}}\) is unidentifiable regardless of sample size.
Remark 13 (On \(\gamma=0\) versus “no variation of \(\mu_{\mathrm{sp}}^{(e)}\)”). In the label-induced model, \(\mathbb{E}_e[X_{\mathrm{sp}}\mid X_{\mathrm{inv}}]=\mu_{\mathrm{sp}}^{(e)}\,\mathbb{E}[Y\mid X_{\mathrm{inv}}] =\mu_{\mathrm{sp}}^{(e)}\langle w^*,X_{\mathrm{inv}}\rangle\). Thus, if \(\mu_{\mathrm{sp}}^{(e)}\) does not vary across environments then \(\gamma=0\) by Definition 2. The converse (“\(\gamma=0\) implies \(\mu_{\mathrm{sp}}^{(e)}\) identical”) can fail in degenerate cases where \(\mathbb{E}[Y\mid X_{\mathrm{inv}}]\equiv 0\). Our standing linear-Gaussian assumption with \(\|w^*\|=1\) rules out such degeneracy.
We next quantify the best possible estimation error with unlimited computation. The term \(k(d-k)\) is the intrinsic degrees of freedom of a \(k\)-dimensional subspace in \(\mathbb{R}^d\), while the factor \(n|\mathcal{E}|\) reflects the effective total sample size across environments in the balanced case.
Definition 6 (Spurious Complexity). For \(\epsilon>0\), define the \(\epsilon\)-confusing set \[\mathcal{V}_{\mathrm{conf}}(\epsilon) := \{V\in \mathrm{Gr}(k,d): \mathcal{I}_{\mathrm{gap}}(V)\le \epsilon\},\] and its metric entropy \[\mathcal{C}_{\mathrm{sp}}(\mathcal{E},\epsilon):=\log \mathcal{N}\big(\mathcal{V}_{\mathrm{conf}}(\epsilon),\, \epsilon\big),\] where \(\mathcal{N}(\cdot,\epsilon)\) denotes the \(\epsilon\)-covering number under the subspace distance \(\mathop{\mathrm{dist}}(\cdot,\cdot)\).
The quantity \(\mathcal{C}_{\mathrm{sp}}\) captures how many subspaces appear approximately invariant: high diversity shrinks \(\mathcal{V}_{\mathrm{conf}}(\epsilon)\) to a neighborhood of \(V_{\mathrm{inv}}\), while low diversity can create many near-invariant “confusers.”
Assumption 2 (Regularity Conditions for Minimax Rates).
\(\sigma_{\min}^2 I \preceq \Sigma^{(e)} \preceq \sigma_{\max}^2 I\) for all \(e\) with condition number \(\kappa_\Sigma:=\sigma_{\max}^2/\sigma_{\min}^2\);
the linear-Gaussian structural model holds with \(\|w^*\|=1\) and \(\mathrm{SNR}:=1/\sigma_\epsilon^2\in[\underline{\mathrm{SNR}},\overline{\mathrm{SNR}}]\);
\(\gamma \ge \gamma_0>0\) and the invariance gap has nondegenerate local quadratic curvature: for some constants \(r_0,c_{\mathrm{id}},C_{\mathrm{id}}>0\), \[c_{\mathrm{id}}\gamma_0^2\mathop{\mathrm{dist}}(V,V_{\mathrm{inv}})^2 \le \mathcal{I}_{\mathrm{gap}}(V) \le C_{\mathrm{id}}\mathop{\mathrm{dist}}(V,V_{\mathrm{inv}})^2\] whenever \(\mathop{\mathrm{dist}}(V,V_{\mathrm{inv}})\le r_0\), and \(\mathcal{I}_{\mathrm{gap}}(V)\) is bounded away from zero outside this neighborhood;
the local Gaussian likelihood in a Grassmannian chart around \(V_{\mathrm{inv}}\) satisfies standard LAN regularity, with Fisher information bounded above and below by constants depending only on \((\kappa_\Sigma,\mathrm{SNR},\gamma_0,c_{\mathrm{id}},C_{\mathrm{id}})\).
The next result is a regular local minimax statement. Its assumptions explicitly include local quadratic curvature of the invariance gap and LAN-type Gaussian regularity. Thus the theorem should not be read as deriving these regularity properties in full generality. Rather, it states that once environment diversity yields a locally well-conditioned invariant subspace problem, the optimal statistical rate is the regular parametric Grassmannian rate with dimension \(k(d-k)\) and total sample size \(n|\mathcal{E}|\). The label-induced shift model in Section 4.3 then gives one concrete setting in which the local curvature scales with diversity.
Theorem 14 (Regular Local Minimax Estimation Risk). Under Assumptions 1 and 2 with \(n\) per environment (balanced):
Lower bound. For any estimator \(\hat{V}\), \[\sup_{\mathbb{P}} \mathbb{E}[\mathop{\mathrm{dist}}(\hat{V},V_{\mathrm{inv}})^2] \ge c_{\mathrm{low}}(\kappa_\Sigma,\mathrm{SNR},c_{\mathrm{id}},\gamma_0)\cdot \frac{k(d-k)}{n|\mathcal{E}|}.\]
Upper bound. Moreover, there exists an (inefficient) estimator such that \[\begin{align} \sup_{\mathbb{P}} \mathbb{E}\big[\mathop{\mathrm{dist}}(\hat{V},& V_{\mathrm{inv}})^2\big] \le\; C(\kappa_\Sigma,\mathrm{SNR},\gamma_0,c_{\mathrm{id}},C_{\mathrm{id}})\cdot \frac{1}{n|\mathcal{E}|} \\ &\times \Big(k(d-k)+\mathcal{C}_{\mathrm{sp}}\!\left(\mathcal{E},\, c_1/\sqrt{n|\mathcal{E}|}\right)\Big), \end{align}\] where \(c_1>0\) is an absolute constant corresponding to the estimation resolution. In particular, when \(\gamma=\Theta(1)\) and \(\mathcal{C}_{\mathrm{sp}}=O(k(d-k))\), the minimax risk is \(\Theta(k(d-k)/(n|\mathcal{E}|))\).
Corollary 2 (Sample Complexity for Target Error). Under Theorem 14, to achieve \(\mathbb{E}[\mathop{\mathrm{dist}}(\hat{V},V_{\mathrm{inv}})^2]\le \epsilon^2\), it suffices (up to log factors) that \[n \ge \tilde{\Theta}\!\left(\frac{k(d-k)}{|\mathcal{E}|\epsilon^2}\right),\] with constants depending on \((\kappa_\Sigma,\mathrm{SNR})\) and on diversity through the local curvature/identifiability of \(\mathcal{I}_{\mathrm{gap}}\).
Remark 15 (Scope of \(\gamma\)-dependence). The minimax rate above is stated under \(\gamma\ge \gamma_0>0\); in general \(\gamma\) affects constants via identifiability/curvature. An explicit \(1/\gamma^2\) scaling is available under additional label-induced shift structure.
To make the role of diversity explicit, we specialize to the label-induced shift regime (Proposition 10). In this setting, diversity controls the smallest eigenvalue of the environment-difference matrix \(\mathcal{F}\) and hence the local curvature of invariance objectives around \(V_{\mathrm{inv}}\).
Assumption 3 (Label-Induced Shift Model for Phase Transition). In addition to Assumption 2:
The explicit \(1/\gamma^2\) scaling below uses Assumption 3, which links the coordinate-level diagnostic \(\gamma\) to the spectral directional diversity \(\lambda_{\min}(\mathcal{F})\). More generally, the same argument gives rates controlled by \(1/\lambda_{\min}(\mathcal{F})\); the displayed \(1/\gamma^2\) form applies when \(\lambda_{\min}(\mathcal{F})\ge c_{\mathcal{F}}\gamma^2\).
Theorem 16 (Phase Transition). Under Assumptions 1, 2, and 3, define the critical sample size (per environment) \[n^* := C_0(\kappa_\Sigma,\mathrm{SNR},c_{\mathcal{F}})\cdot \frac{k(d-k)}{|\mathcal{E}|\gamma^2}.\] Super-critical (\(n>2n^*\)): there exists an estimator with \[\mathbb{E}\!\left[\mathop{\mathrm{dist}}(\hat{V},V_{\mathrm{inv}})^2\right] \le C_1 \frac{k(d-k)}{n|\mathcal{E}|\gamma^2}.\] In particular, when \(\gamma=\Theta(1)\), this reduces to the rate \(O(k(d-k)/(n|\mathcal{E}|))\). Sub-critical (\(n<n^*/2\)): any estimator satisfies \[\sup_{\mathbb{P}} \mathbb{E}\!\left[\mathop{\mathrm{dist}}(\hat{V},V_{\mathrm{inv}})^2\right] \ge c_{\mathrm{sub}},\] where \(c_{\mathrm{sub}}>0\) is a constant depending on \((\kappa_\Sigma,\mathrm{SNR},c_{\mathcal{F}})\).
Remark 17 (Constant dependencies). The constants depend on the covariance condition number \(\kappa_\Sigma\), the signal-to-noise ratio, and the diversity structure constant \(c_{\mathcal{F}}\). The refined estimation error contains the factor \(1/\gamma^2\); the rate \(k(d-k)/(n|\mathcal{E}|)\) is recovered in the constant-diversity regime \(\gamma=\Theta(1)\).
The hardness result is worst-case. In many practical settings, additional structure gives efficient certificates for recovering \(V_{\mathrm{inv}}\). We summarize four sufficient regimes.
Theorem 18 (Tractability templates, informal). Under Assumptions 1 and 2, polynomial-time or mildly super-polynomial estimators achieve \[\mathbb{E}\big[\mathop{\mathrm{dist}}(\hat{V},V_{\mathrm{inv}})^2\big] =\tilde{O}\!\left(\frac{k(d-k)}{n|\mathcal{E}|}\right)\] whenever one of the following structures holds:
Sparse invariant structure: \(V_{\mathrm{inv}}\) has a sparse basis, reducing recovery to support search.
Spectral separation: an efficiently computable cross-environment contrast matrix has an eigengap separating invariant and spurious directions.
Low-order moment identifiability: spurious directions induce detectable environment variation in correlations or moments, while invariant directions remain stable.
Environment-wise uncorrelatedness: invariant and spurious features are uncorrelated within each environment, enabling coordinate-wise tests.
A practical diagnostic is to compute per-feature correlation ranges \[v_j=\max_e \hat{\rho}_j^{(e)}-\min_e \hat{\rho}_j^{(e)},\qquad \hat{\rho}_j^{(e)}=\mathrm{Corr}(X_j^{(e)},Y^{(e)}),\] or the representation-space proxy \(\hat{\gamma}_{\mathrm{repr}}\). Large separation between stable predictive coordinates and varying spurious coordinates suggests that simple screening, spectral methods, or group-aware objectives should be effective. Detailed algorithms and checks are given in Appendix 16.
Our tractability conditions provide a compact interpretation of prior benchmark behavior: datasets with low-dimensional, strongly shifting spurious signals (e.g., ColoredMNIST/CelebA/Waterbirds) approximately satisfy (T3) and favor moment- or group-aware methods, whereas high-dimensional and subtle shifts (e.g., DomainBed-style) can weaken (T2)–(T4). More discussion is in Appendix 15.
We empirically study three aspects of our framework: (i) compute–sample gaps on synthetic hard instances; (ii) phase transitions and diversity-dependent thresholds; (iii) behavior on standard spurious-correlation benchmarks. Details and ablations are in Appendix 15.
| \(N\) | Method | OOD Acc | Gap vs Oracle |
|---|---|---|---|
| 500 | Oracle (gray) | \(.820 \pm .012\) | |
| Adv-Color | \(.745 \pm .018\) | \(0.075\) | |
| IRM | \(.720 \pm .022\) | \(0.100\) | |
| ERM | \(.690 \pm .025\) | \(0.130\) | |
| 2000 | Oracle (gray) | \(.930 \pm .008\) | |
| Adv-Color | \(.915 \pm .010\) | \(0.015\) | |
| IRM | \(.910 \pm .009\) | \(0.020\) | |
| ERM | \(.900 \pm .012\) | \(0.030\) |
We make axis-aligned instances inspired by the hardness mechanisms in Section 3, where invariant coordinates are hidden among spurious “confusers” whose cross-environment statistics partially mimic invariance. We report feature selection accuracy (fraction of true invariant coordinates among the selected top-\(k\)). We compare exhaustive subset search (exponential time) against polynomial-time baselines including invariance screening (Section 5) and other efficient heuristics (Appendix 15). Unless stated otherwise we use \(d=20\), \(k=4\), \(|\mathcal{E}|=4\) and vary \(n\) or \(\gamma\). These instances are not intended to implement the planted-clique reduction; rather, they probe compute–sample tradeoffs in regimes that create many near-invariant alternatives.
We evaluate on ColoredMNIST, CelebA (Blond_Hair with spurious Male), and Waterbirds (bird type with spurious background). For ColoredMNIST we explicitly control diversity by varying the difference in color-label flip probabilities across training environments, which serves as a practical proxy for \(\gamma\) in Definition 2.
On synthetic hard instances, Fig. 1 shows a large sample-complexity gap: exhaustive search achieves a fixed target accuracy with up to \(27\times\) fewer samples than the best polynomial-time method. Holding the dataset fixed, Fig. 2 further shows a monotone compute–accuracy frontier: moving from simple filtering (\(O(d)\)) to greedy (\(O(kd)\)), to beam search, and finally to exhaustive evaluation consistently improves recovery.
On real data, Table 1 exhibits an analogous small-sample separation between an oracle invariant pipeline (grayscale) and learned invariance-promoting methods: at \(N=500\) IRM trails the oracle by 10 points, while the gap shrinks at \(N=2000\), consistent with increased data easing the learning problem. Since the oracle uses grayscale preprocessing (different input), this gap should be interpreted cautiously: it suggests the difficulty of discovering invariant structure from finite multi-environment data rather than proving computational hardness for deep networks. Adv-Color partially controls for input differences by using the same colored input while explicitly suppressing color information.
Fig. 2 shows phase-transition behavior: on synthetic instances, polynomial-time methods transition sharply from failure to success around a critical sample size, while exhaustive search stays near-optimal across the range. On ColoredMNIST, the same figure shows a smoother but qualitatively similar improvement with \(n\), and Table 1 confirms that the small-sample regime is where invariant learning is most brittle and additional samples quickly reduce the gap. Additional training dynamics are deferred to Appendix (Fig. 3).
2.5pt
| Dataset | Method | Low Diversity | High Diversity | ||
|---|---|---|---|---|---|
| 3-4 (lr)5-6 | Overall | Worst | Overall | Worst | |
| CMNIST | ERM | \(.82{\pm}.01\) | \(.54{\pm}.02\) | \(.92{\pm}.01\) | \(.76{\pm}.02\) |
| IRM | \(.84{\pm}.01\) | \(.61{\pm}.02\) | \(\mathbf{.95{\pm}.01}\) | \(\mathbf{.84{\pm}.01}\) | |
| CelebA | ERM | \(.90{\pm}.01\) | \(.76{\pm}.02\) | \(.93{\pm}.01\) | \(.89{\pm}.01\) |
| IRM | \(.89{\pm}.01\) | \(.82{\pm}.02\) | \(.92{\pm}.01\) | \(.90{\pm}.01\) | |
| GDRO | \(.89{\pm}.01\) | \(\mathbf{.85{\pm}.01}\) | \(.92{\pm}.01\) | \(\mathbf{.91{\pm}.01}\) | |
| Wbirds | ERM | \(.85{\pm}.02\) | \(.68{\pm}.03\) | \(.87{\pm}.01\) | \(.84{\pm}.02\) |
| IRM | \(.84{\pm}.02\) | \(.74{\pm}.02\) | \(.87{\pm}.01\) | \(.86{\pm}.02\) | |
| GDRO | \(.83{\pm}.02\) | \(\mathbf{.79{\pm}.02}\) | \(.87{\pm}.01\) | \(\mathbf{.87{\pm}.01}\) | |
CMNIST: Low=\(\gamma=0\), High=\(\gamma=0.8\)
. CelebA/Wbirds use bias strength as an operational proxy: Low=shared spurious bias 0.9, High=reduced shared bias 0.0.
Fig. 2 visualizes diversity necessity: on synthetic data, performance is poor when \(\gamma=0\) and increases sharply once environments become informative; on ColoredMNIST, both OOD and worst-group accuracy improve as diversity increases. Table 2 extends this pattern across datasets: moving from the operational low-diversity/high-bias setting to the operational high-diversity/low-bias setting improves worst-group accuracy on CelebA and Waterbirds and improves OOD accuracy on ColoredMNIST. Finally, Table 3 shows that a representation-space proxy \(\hat{\gamma}_{\mathrm{repr}}\) computed on ERM features correlates with worst-group performance, supporting diversity estimates as a practical diagnostic.
Table 4 connects Section 5 to empirical performance by varying structural factor at a time. Increasing diversity (\(\gamma=0.1\to 0.6\)) yields the largest gain, consistent with the identifiability/curvature role of \(\gamma\) (Section 4). Increasing sample size (\(n=200\to 2000\)) improves performance but with diminishing returns once diversity is high, matching phase-transition intuition. Reducing \(k\) (a proxy for sparsity / effective search-space size) improves recovery, aligning with (T1). Increasing SNR helps but does not replace diversity, illustrating noise and diversity are distinct bottlenecks.
| Dataset | Setting | \(\hat{\gamma}_{\mathrm{repr}}\) | Worst-Grp | Overall |
|---|---|---|---|---|
| CMNIST | Low div. | \(.12 \pm .03\) | \(.61 \pm .02\) | \(.84 \pm .01\) |
| High div. | \(.45 \pm .04\) | \(.84 \pm .01\) | \(.95 \pm .01\) | |
| CelebA | High bias | \(.18 \pm .04\) | \(.82 \pm .02\) | \(.89 \pm .01\) |
| Low bias | \(.38 \pm .05\) | \(.90 \pm .01\) | \(.92 \pm .01\) | |
| Wbirds | High bias | \(.22 \pm .05\) | \(.74 \pm .02\) | \(.84 \pm .02\) |
| Low bias | \(.42 \pm .06\) | \(.86 \pm .02\) | \(.87 \pm .01\) |
Compute a diversity proxy \(\hat{\gamma}_{\mathrm{repr}}\) in representation space (Table 3) by applying Definition 3 to learned features. If it is small, collecting more diverse environments is typically more effective than collecting more samples from similar environments. When performance improves monotonically with compute at fixed data (Fig. 2), the instance behaves like a hard regime where efficient objectives may struggle.
| Condition | Baseline | Improved | \(\Delta\) Acc |
|---|---|---|---|
| Diversity: \(\gamma = 0.1 \to 0.6\) | \(.20 \pm .04\) | \(1.0 \pm .00\) | \(+.80\) |
| Samples: \(n = 200 \to 2000\) | \(.70 \pm .06\) | \(1.0 \pm .00\) | \(+.30\) |
| Sparsity: \(k = 8 \to k = 3\) | \(.73 \pm .05\) | \(1.0 \pm .00\) | \(+.27\) |
| Signal: \(\mathrm{SNR} = 1 \to 10\) | \(.75 \pm .05\) | \(.93 \pm .03\) | \(+.18\) |
We build on spurious-correlation and invariant learning benchmarks (e.g., IRM/REx and GroupDRO) and on average-case computational lower bounds for sparse recovery, including Planted-Clique-motivated samplable reductions. A detailed discussion and references are deferred to Appendix 10.
We establish a conditional computational–statistical gap for spurious correlation removal: under a black-box samplable supervised sparse recovery primitive, there exist samplable multi-environment instances where the predictive invariant subspace is identifiable as the unique maximizer of an invariance–predictivity population score and learnable with polynomial samples by exhaustive search, yet any polynomial-time constant-accuracy recovery algorithm at comparable sample sizes would contradict the primitive. We also characterize the role of environment diversity in identifiability and finite-sample behavior, obtaining minimax risk \(\Theta(k(d-k)/(n|\mathcal{E}|))\) under sufficient diversity and local Gaussian regularity, and a label-induced phase transition at \(n^*\propto k(d-k)/(|\mathcal{E}|\gamma^2)\) with refined estimation error scaling proportional to \(1/\gamma^2\). Finally, we give tractability conditions under which efficient methods achieve near-optimal rates. Future work includes sharper gap frameworks and extending lower bounds beyond linear-Gaussian models.
This work was partially supported by the “Pioneer” and “Leading Goose” R&D Program of Zhejiang (Grant No.2025C01037) and the Key R&D Program Project of Hangzhou (Grant No.2024SZD1A03).
Our framework helps practitioners diagnose failures in invariant learning by distinguishing statistical limitations (insufficient samples or diversity) from potential computational barriers (hard problem structure). This can:
reduce wasted effort on algorithmic improvements when the issue is data diversity;
guide data collection toward more informative environments rather than simply more samples;
improve deployment decisions by identifying when learned models may be unreliable under shift.
Conditional worst-case hardness results could be misinterpreted as discouraging work on invariant learning or as evidence that such methods are fundamentally flawed. We emphasize:
many practical problems satisfy tractability conditions (Section 5), explaining why invariant learning often works;
our hardness results are worst-case conditional constructions, not claims about typical problems.
This appendix provides formal proofs, proof refinements, implementation details, extended experiments, and practical guidance supporting the main text.
It is organized as follows:
Appendix 9: notation summary.
Appendix 10: additional related work and positioning.
Appendix 11: formal restatements and logical status of the main theoretical claims.
Appendix 12: status of the supervised sparse primitive and scalar covariance sanity checks.
Appendix 13: complete proofs and proof refinements.
Appendix 14: connection to Planted-Clique-based sparse CCA reductions.
Appendix 15: experimental details and extended results.
Appendix 16: practical diagnostic guide.
The computational lower bound uses the supervised sparse recovery primitive in Hypothesis 4 as a black-box average-case hardness primitive. Existing Planted-Clique-to-sparse-CCA reductions motivate this type of sparse-recovery hardness, but sparse CCA is naturally a two-view/vector-response problem. We therefore do not claim that the supervised scalar-response primitive follows directly from existing sparse CCA reductions. In particular, the primitive should not be interpreted as the exposed scalar covariance model \(\mathrm{Cov}(Z,Y)=\lambda v\), which can be easy by empirical covariance estimation in some regimes.
| Symbol | Description |
|---|---|
| \(d\) | Ambient feature dimension |
| \(k\) | Dimension of invariant subspace \(V_{\mathrm{inv}}\) |
| \(p=d-k\) | Dimension of spurious subspace |
| \(q=k(d-k)\) | Local dimension of \(\mathrm{Gr}(k,d)\) |
| \(\mathcal{E}\) | Set of environments |
| \(|\mathcal{E}|\) | Number of environments |
| \(n\) | Samples per environment in balanced case |
| \(N=n|\mathcal{E}|\) | Total sample size in balanced case |
| \(V_{\mathrm{inv}}\), \(V_{\mathrm{sp}}\) | Invariant and spurious subspaces |
| \(P_V\) | Orthogonal projector onto \(V\) |
| \(\mathrm{Gr}(k,d)\) | Grassmannian of \(k\)-dimensional subspaces in \(\mathbb{R}^d\) |
| \(\mathop{\mathrm{dist}}(V,V')\) | Subspace distance \(\|P_V-P_{V'}\|_F\) |
| \(\gamma\) | Environment separation parameter |
| \(\hat{\gamma}\) | Empirical diversity proxy |
| \(\hat{\gamma}_{\mathrm{repr}}\) | Diversity proxy in representation space |
| \(\mathcal{I}_{\mathrm{gap}}(V)\) | Invariance gap functional |
| \(\mathcal{C}_{\mathrm{sp}}\) | Confusing-set metric entropy |
| \(d_Z,s,c_{\mathrm{prim}},s_{\mathrm{cond}}\) | Sparse primitive dimension, sparsity, primitive margin, and signal scale |
| \(v\) | Hidden sparse direction in primitive |
| \(\mu^{(e)}\) | Environment-specific spurious shift |
| \(\theta_V^{(e)}\) | Environment-wise covariance score |
| \(A(V),T(V),S(V)\) | Predictivity, invariance penalty, combined score |
Table 5 summarizes the main symbols used in the paper and appendix. We separate statistical quantities such as \(\gamma\), \(\mathcal{I}_{\mathrm{gap}}\), and \(\mathcal{C}_{\mathrm{sp}}\) from computational-hardness quantities such as \(d_Z\), \(s\), \(v\), and \(\Phi_P\), reflecting the two components of our framework.
This section expands the literature context and clarifies how our results differ from existing work on invariant learning, identifiability, and computational lower bounds.
IRM, REx, GroupDRO, and related methods aim to learn predictors whose label mechanism is stable across environments. Prior theory emphasizes that multi-environment information is useful only when environments are sufficiently diverse; otherwise, invariances can be statistically unidentifiable. Our work is complementary: even when invariant structure is identifiable in a population sense, efficient recovery can still be obstructed under a conditional sparse-recovery hardness primitive.
Average-case reductions from Planted Clique are a standard tool for demonstrating computational-statistical gaps in high-dimensional statistics, especially sparse PCA and sparse CCA. Our reduction differs in that the target problem is multi-environment invariant subspace recovery. The embedding must preserve the invariance condition and must be samplable without using the hidden sparse direction or its support.
Sparse CCA reductions naturally produce vector-response two-view models. The supervised scalar-response sparse primitive used in the main text is treated as a black-box primitive rather than as a direct consequence of sparse CCA. Appendix 14 explains the relationship and the limitation of directly projecting sparse CCA to a scalar response.
Hypothesis 19 (Formal restatement of Hypothesis 4). This is the appendix restatement of the black-box samplable supervised sparse recovery primitive in Hypothesis 4. Namely, there exist parameters \((d_Z,s)\), with \(d_Z=\mathrm{poly}(m)\) and \(s=\Theta(\kappa)\), a randomized polynomial-time sampler \(\mathcal{R}\), and a sign-invariant population predictive score \(\Phi_P\) such that the null, planted, concentration, decoding, and hardness properties stated in Hypothesis 4 hold. This hypothesis is not an additional assumption beyond Hypothesis 4; it is included only to make the appendix proof dependencies explicit.
Theorem 20 (Formal conditional hardness theorem). Assume Hypothesis 4 (equivalently, its appendix restatement Hypothesis 19). Then Construction 5 is a randomized polynomial-time samplable map from the underlying average-case sparse-recovery input to multi-environment SC samples. Moreover, the resulting SC family has:
a unique invariant-predictive maximizer of the score \(S(V)\);
polynomial-sample recovery by exhaustive search;
no polynomial-time constant-accuracy recovery algorithm unless Hypothesis 4 fails.
Theorem 21 (Formal minimax rate theorem). Under the locally regular Gaussian SC class described in Assumption 2, with diversity bounded below by \(\gamma_0>0\), the minimax squared subspace risk satisfies \[\inf_{\hat{V}}\sup_{\mathbb{P}} \mathbb{E}_{\mathbb{P}}\!\left[\mathop{\mathrm{dist}}(\hat{V},V_{\mathrm{inv}})^2\right] = \Theta\!\left(\frac{k(d-k)}{n|\mathcal{E}|}\right),\] with constants depending on the Gaussian regularity, covariance condition number, SNR, and local curvature constants.
Theorem 22 (Formal diversity-dependent transition). In the label-induced shift class satisfying Assumption 3, the refined upper rate is \[\mathbb{E}\!\left[\mathop{\mathrm{dist}}(\hat{V},V_{\mathrm{inv}})^2\right] \lesssim \frac{k(d-k)}{n|\mathcal{E}|\gamma^2}.\] This is the refined phase-transition rate stated in the main text. In the constant-diversity regime \(\gamma=\Theta(1)\), it reduces to the usual parametric rate \(k(d-k)/(n|\mathcal{E}|)\).
Lemma 5 (Empirical covariance recovery in easy scalar regimes). Let \((Z_i,Y_i)_{i=1}^N\) be i.i.d.centered jointly Gaussian samples with \[\operatorname{Cov}(Z,Y)=\lambda v,\qquad \operatorname{Cov}(Z)=\sigma_Z^2I_{d_Z},\qquad \operatorname{Var}(Y)=\sigma_Y^2,\] where \(v\in\mathbb{R}^{d_Z}\) is a unit vector. Define \[\hat{c}:=\frac{1}{N}\sum_{i=1}^N Z_iY_i.\] Then with probability at least \(1-\delta\), \[\|\hat{c}-\lambda v\|_2 \le C\sigma_Z\sigma_Y \sqrt{\frac{d_Z+\log(1/\delta)}{N}}.\] If \(v\) is \(s\)-sparse with minimum nonzero coordinate at least \(c_0/\sqrt{s}\), coordinate thresholding recovers the support when \[N\gtrsim \frac{\sigma_Z^2\sigma_Y^2}{\lambda^2}s\log(d_Z/\delta).\]
Proof. Each coordinate \(Z_{ij}Y_i-\mathbb{E}[Z_{ij}Y_i]\) is sub-exponential with parameter controlled by \(\sigma_Z\sigma_Y\). Vector Bernstein gives the \(\ell_2\) bound, and coordinatewise Bernstein plus a union bound gives the \(\ell_\infty\) bound needed for thresholding. ◻
Remark 23 (Why the primitive is stated abstractly). Lemma 5 shows that a bare scalar Gaussian model with exposed cross-covariance \(\operatorname{Cov}(Z,Y)=\lambda v\) can be easy in the corresponding sample regime. Therefore Hypothesis 19 should not be interpreted as this exposed covariance model. The hardness reduction uses a black-box sparse predictive recovery primitive whose computational hardness is assumed directly.
Proposition 24 (Proxy Approximation Conditions). Consider a linear Gaussian model with standardized features. Suppose:
invariant coordinates have cross-environment correlation range at most \(\delta_{\mathrm{inv}}\);
at least half of the spurious coordinates have population correlation range at least \(\gamma_0\);
\(n_{\min}\ge C\log d\).
Then with probability at least \(1-d^{-1}\), \[|\hat{\gamma}-\gamma_{\mathrm{pop}}| \le C\sqrt{\frac{\log(d|\mathcal{E}|)}{n_{\min}}} +\delta_{\mathrm{inv}},\] where \[\gamma_{\mathrm{pop}} := \mathrm{median}_j\left( \max_e\rho_j^{(e)}-\min_e\rho_j^{(e)} \right).\]
Proof. For each \(j,e\), empirical correlations concentrate: \[|\hat{\rho}_j^{(e)}-\rho_j^{(e)}| \le C\sqrt{\frac{\log(d|\mathcal{E}|)}{n_{\min}}}\] uniformly over all \(j,e\) with probability at least \(1-d^{-1}\). Therefore the empirical range \[\hat{r}_j=\max_e\hat{\rho}_j^{(e)}-\min_e\hat{\rho}_j^{(e)}\] satisfies \[|\hat{r}_j-r_j| \le 2C\sqrt{\frac{\log(d|\mathcal{E}|)}{n_{\min}}}.\] The median is 1-Lipschitz under coordinatewise \(\ell_\infty\) perturbations, yielding the result. The \(\delta_{\mathrm{inv}}\) term accounts for residual invariant variation. ◻
Proof. Define \[\mathcal{Z}=\{V\in\mathrm{Gr}(k,d):\mathcal{I}_{\mathrm{gap}}(V)=0\}.\] By the invariance condition, \(V_{\mathrm{inv}}\in\mathcal{Z}\). If another \(V'\neq V_{\mathrm{inv}}\) also lies in \(\mathcal{Z}\), the invariance functional cannot distinguish the two. Conversely, if \(\mathcal{Z}=\{V_{\mathrm{inv}}\}\), then for every \(\epsilon>0\), compactness of \[\{V:\mathop{\mathrm{dist}}(V,V_{\mathrm{inv}})\ge\epsilon\}\] and continuity of Gaussian conditional KL imply a strictly positive population gap away from \(V_{\mathrm{inv}}\). Hence \(V_{\mathrm{inv}}\) is identifiable. ◻
Let \[A=X_{\mathrm{inv}},\qquad B^{(e)}=X_{\mathrm{sp}}^{(e)},\qquad p=d-k.\] In the label-induced model, \[Y=w^{*\top}A+\epsilon,\qquad B^{(e)}=\mu_{\mathrm{sp}}^{(e)}Y+\eta^{(e)}.\] For a candidate subspace \(V\) with orthonormal basis \[Q= \begin{pmatrix} Q_A\\Q_B \end{pmatrix},\] define \[T_e=Q^\top X^{(e)},\qquad r_e=Q_B^\top\mu_{\mathrm{sp}}^{(e)}.\] Then \[T_e=(Q_A^\top+r_ew^{*\top})A+r_e\epsilon+Q_B^\top\eta^{(e)}.\] The conditional law \(Y\mid T_e\) is Gaussian with parameters \[\beta_e=\Sigma_{T,e}^{-1}c_e,\qquad \sigma_{e|T}^2=\sigma_Y^2-c_e^\top\Sigma_{T,e}^{-1}c_e,\] where \[c_e=Q_A^\top w^*+\sigma_Y^2r_e\] and \[\Sigma_{T,e} = I_k+Q_A^\top w^*r_e^\top+r_ew^{*\top}Q_A+\sigma_Y^2r_er_e^\top.\]
Lemma 6 (Generic non-cancellation). For fixed \(Q_B\neq0\), the set of parameters for which \(r_e\neq r_{e'}\) but \[\mathbb{P}_e(Y\mid Q^\top X)=\mathbb{P}_{e'}(Y\mid Q^\top X)\] is contained in a proper algebraic variety and therefore has Lebesgue measure zero.
Proof. The conditional parameters are rational functions of \(r_e,Q_A,Q_B,w^*,\sigma_\epsilon^2\). Equality of two conditional Gaussian laws gives rational equations; after multiplying by nonzero determinant factors, these become polynomial equations. These polynomials are not identically zero because one can choose \(r_e=0\) and \(r_{e'}\neq0\) so that \(c_e\neq c_{e'}\) generically. Hence the degeneracy set is a proper algebraic variety. ◻
Proof of Proposition 10. Assume the generic non-cancellation condition of Lemma 6. If \(Q_B=0\), then \(V\subseteq V_{\mathrm{inv}}\), and since both have dimension \(k\), \(V=V_{\mathrm{inv}}\). If \(Q_B\neq0\), full rank of \(\mathcal{F}\) implies that the environment differences span \(V_{\mathrm{sp}}\), so there exist \(e,e'\) such that \[Q_B^\top(\mu_{\mathrm{sp}}^{(e)}-\mu_{\mathrm{sp}}^{(e')})\neq0.\] Thus \(r_e\neq r_{e'}\). By generic non-cancellation, the conditional laws \(Y\mid Q^\top X\) differ across environments, so \(\mathcal{I}_{\mathrm{gap}}(V)>0\). Therefore \(V_{\mathrm{inv}}\) is the unique zero-gap subspace. ◻
Proof of Corollary 1. If all \(\mu_{\mathrm{sp}}^{(e)}\) are identical, then the joint law of \((X,Y)\) is identical across environments. Therefore \(\mathcal{I}_{\mathrm{gap}}(V)=0\) for every \(V\), so \(V_{\mathrm{inv}}\) is not identifiable. ◻
Near \(V_{\mathrm{inv}}\), write \[Q_\Theta= \begin{pmatrix} I_k\\\Theta \end{pmatrix} (I_k+\Theta^\top\Theta)^{-1/2}, \qquad \Theta\in\mathbb{R}^{(d-k)\times k}.\] For small \(\Theta,\Theta'\), \[\mathop{\mathrm{dist}}(V_\Theta,V_{\Theta'}) \asymp \|\Theta-\Theta'\|_F.\] The local dimension is \(q=k(d-k)\).
Take a local packing of size \(\log M\gtrsim q\) with pairwise distance \(\epsilon\). Gaussian KL regularity gives \[\mathrm{KL}(P_{\Theta_i}^{\otimes N}\|P_{\Theta_j}^{\otimes N}) \le CN\epsilon^2.\] Choosing \(\epsilon^2\asymp q/N\) and applying Fano yields \[\inf_{\hat{V}}\sup_{\mathbb{P}} \mathbb{E}[\mathop{\mathrm{dist}}(\hat{V},V_{\mathrm{inv}})^2] \gtrsim \frac{q}{N}.\]
Under local Gaussian LAN regularity, the local MLE satisfies \[\hat{\Theta}-\Theta_0 = I(\Theta_0)^{-1}\frac{1}{N}\nabla_\Theta L_N(\Theta_0) +o_{\mathbb{P}}(N^{-1/2}),\] where \[cI_q\preceq I(\Theta_0)\preceq CI_q.\] Therefore \[\mathbb{E}\|\hat{\Theta}-\Theta_0\|_F^2 \le C\frac{q}{N}.\] Using the local chart equivalence gives \[\mathbb{E}[\mathop{\mathrm{dist}}(\hat{V},V_{\mathrm{inv}})^2] \le C\frac{k(d-k)}{n|\mathcal{E}|}.\] The entropy term \(\mathcal{C}_{\mathrm{sp}}\) enters when model selection among approximately invariant local basins is required.
Proof of Corollary 2. Set the upper bound to be at most \(\epsilon^2\), yielding \[n \gtrsim \frac{k(d-k)}{|\mathcal{E}|\epsilon^2}\] up to logarithmic and regularity-dependent factors. ◻
Proposition 25 (Refined phase transition). Under Assumptions 1, 2, and 3, \[N\gamma^2\lesssim k(d-k) \quad\Longrightarrow\quad \inf_{\hat{V}}\sup_{\mathbb{P}} \mathbb{E}[\mathop{\mathrm{dist}}(\hat{V},V_{\mathrm{inv}})^2]\ge c,\] while \[N\gamma^2\gtrsim k(d-k) \quad\Longrightarrow\quad \exists \hat{V}: \mathbb{E}[\mathop{\mathrm{dist}}(\hat{V},V_{\mathrm{inv}})^2] \le C\frac{k(d-k)}{N\gamma^2}.\]
Proof. The label-induced model gives a local KL expansion \[\mathrm{KL}(P_\Theta\|P_{\Theta'}) \asymp \gamma^2\|\Theta-\Theta'\|_F^2.\] The lower bound follows from Fano using a constant-radius packing when \(N\gamma^2\lesssim k(d-k)\). The upper bound follows from the LAN argument with Fisher information lower bounded by \(c\gamma^2I_q\), yielding squared error \(O(q/(N\gamma^2))\). ◻
Proof of Theorem 16. The critical sample size \[n^* \asymp \frac{k(d-k)}{|\mathcal{E}|\gamma^2}\] is equivalent to \(N\gamma^2\asymp k(d-k)\). The subcritical lower bound follows from Proposition 25 when \(N\gamma^2\lesssim k(d-k)\). The supercritical upper bound follows from Proposition 25 when \(N\gamma^2\gtrsim k(d-k)\), giving the refined rate \[\mathbb{E}[\mathop{\mathrm{dist}}(\hat{V},V_{\mathrm{inv}})^2] \le C\frac{k(d-k)}{N\gamma^2} = C\frac{k(d-k)}{n|\mathcal{E}|\gamma^2}.\] In the constant-diversity regime \(\gamma=\Theta(1)\), this further simplifies to \(O(k(d-k)/(n|\mathcal{E}|))\). ◻
This section clarifies how Hypothesis 19 is embedded into the SC instance.
Lemma 7 (TV transfer). If two dataset distributions are within \(\varepsilon\) in total variation, then every algorithm’s success probability differs by at most \(\varepsilon\) under the two distributions.
Proof. Total variation contracts under Markov kernels, and randomized algorithms are Markov kernels. ◻
Given \(A\), Construction 5 runs \(\mathcal{R}(A)\) independently in each environment and then samples \[W^{(e,t)}=\mu^{(e)}Y^{(e,t)}+\eta^{(e,t)}\] using public randomness. The hidden sparse direction and its support are never used.
Construction 5 satisfies the SC conditions as in Lemma 1: by Hypothesis 4, \(Y\mid X_{\mathrm{inv}}\) depends only on \(v^\top Z\) and is identical across environments, while \(W\mid X_{\mathrm{inv}}\) varies with \(\mu^{(e)}\). The sampler-generated construction inherits the recovery and hardness statements up to the total-variation discrepancies specified by the primitive, when applicable.
Let \(u=(u_Z,a)\) be a unit vector spanning \(V\), where \(u_Z\in\mathbb{R}^{d_Z}\) and \(a\in\mathbb{R}\). Let \(u^*=(v,0)\) span \(V_{\mathrm{inv}}\), and write \(r=\|u_Z\|=(1-a^2)^{1/2}\). If \(r>0\), define \(\bar u_Z=u_Z/r\).
For the true direction, \[S(V_{\mathrm{inv}})=A(V_{\mathrm{inv}})=\Phi_P(v), \qquad T(V_{\mathrm{inv}})=0.\] Since \(0\le \Phi_P\le 1\) and the primitive margin is positive, \(\Phi_P(v)\) is bounded below by a positive constant depending on \(c_{\mathrm{prim}}\).
We first compute the invariance penalty. In Construction 5, \[u^\top X=u_Z^\top Z+aW^{(e)} =u_Z^\top Z+a\mu^{(e)}Y+a\eta^{(e)} .\] The primitive samples \((Z,Y)\) have the same distribution in every environment, and \(\eta^{(e)}\) is independent of \(Y\). Hence \[\theta_V^{(e)} =\mathrm{Cov}_e(Y,u^\top X) =\mathrm{Cov}(Y,u_Z^\top Z) +a\mu^{(e)}\mathrm{Var}(Y).\] Therefore, for any pair \(e,e'\), \[\theta_V^{(e)}-\theta_V^{(e')} = a(\mu^{(e)}-\mu^{(e')})\sigma_Y^2,\] and consequently \[T(V) = \max_{e,e'}(\theta_V^{(e)}-\theta_V^{(e')})^2 = a^2\Delta_\mu^2\sigma_Y^4 .\]
Fix the target separation radius \(\delta\in(0,1)\). Choose a small constant \(\alpha=\alpha(\delta)>0\). We split into two cases.
Since \(A(V)\le 1\), \[S(V)\le 1-\lambda\alpha^2\Delta_\mu^2\sigma_Y^4 .\] Choosing \(\lambda\) sufficiently large, depending only on \(\alpha,\Delta_\mu,\sigma_Y^2\), ensures \[S(V)\le S(V_{\mathrm{inv}})-c_1\] for some constant \(c_1>0\).
For \(\alpha\) sufficiently small as a function of \(\delta\), the condition \(\mathop{\mathrm{dist}}(V,V_{\mathrm{inv}})\ge\delta\) implies that \(\mathrm{span}(\bar u_Z)\) is bounded away from \(\mathrm{span}(v)\) by a constant \(\delta'=\delta'(\delta)>0\). By the primitive margin, \[\Phi_P(\bar u_Z)\le \Phi_P(v)-c_{\mathrm{prim}}'\] for some \(c_{\mathrm{prim}}'>0\) depending only on \(c_{\mathrm{prim}}\) and \(\delta'\). Since \(r^2\le 1\) and \(T(V)\ge0\), \[S(V) = r^2\Phi_P(\bar u_Z)-\lambda T(V) \le \Phi_P(v)-c_{\mathrm{prim}}' = S(V_{\mathrm{inv}})-c_{\mathrm{prim}}' .\] If \(r=0\), then \(A(V)=0\) by definition and the same conclusion is immediate.
| Combining the two cases gives $$S(V_{}) |
|---|
| {(V,V{})}S(V) |
| c_{},$$ where |
| \(c_{\mathrm{mar}}=\min\{c_1,c_{\mathrm{prim}}'\}>0\). This proves the |
| claim. |
Take an \(\epsilon\)-net of \(\mathrm{Gr}(1,d)\) of size at most \((C/\epsilon)^{d-1}\). The primitive concentration assumption gives uniform convergence of the empirical predictive score, and the bounded-moment condition gives uniform concentration of the wrapper covariance statistics over the net. With \[n_{\min} \gtrsim \frac{d\log(C/\epsilon)+\log(|\mathcal{E}|/\delta)}{c_{\mathrm{mar}}^2},\] up to primitive-dependent polynomial factors, the empirical score is uniformly within \(c_{\mathrm{mar}}/4\) of the population score. The margin in Lemma 2 then implies that the empirical maximizer lies within constant distance of \(V_{\mathrm{inv}}\).
For one-dimensional subspaces, \[\|P_{\hat{V}}-P_{V_{\mathrm{inv}}}\|_F^2=2\sin^2\phi,\] where \(\phi\) is the principal angle. Hence \[|\langle \hat{u},(v,0)\rangle|^2\ge1-\delta_0^2/2.\] Restricting \(\hat{u}\) to the \(Z\)-block gives constant overlap with \(v\), sufficient for the primitive decoder in Hypothesis 19. Therefore any polynomial-time SC recovery algorithm would solve the underlying average-case sparse-recovery problem, contradicting the hardness clause in Hypothesis 4.
Theorem 18 is a summary of sufficient tractability templates. Representative formal versions are given below.
Proposition 26 (Sparse enumeration). If the invariant subspace is axis-aligned and supported on a \(k\)-set with population score gap \(\Delta\), exhaustive subset search recovers it with \[n|\mathcal{E}|\gtrsim \frac{k\log d+\log(1/\delta)}{\Delta^2}.\]
Proposition 27 (Spectral separation). If an efficiently computable contrast matrix has eigengap \(\Delta\) separating invariant and spurious eigenspaces, then Davis–Kahan gives \[\mathop{\mathrm{dist}}(\hat{V},V_{\mathrm{inv}})^2 \lesssim \frac{\|\hat{M}-M\|_{\mathrm{op}}^2}{\Delta^2}.\]
Proposition 28 (Moment screening). If invariant and spurious coordinates have population correlation-range separation \(\Delta\), then empirical correlation screening succeeds when \[n_{\min}\gtrsim \frac{\log(d|\mathcal{E}|/\delta)}{\Delta^2}.\]
This section is motivational and does not serve as a formal derivation of Hypothesis 19. The formal hardness assumption used in the paper is the black-box supervised sparse recovery primitive in Hypothesis 4.
Sparse CCA observes two Gaussian views \((Z,U)\) with \[\operatorname{Cov}(Z,U)=\lambda vw^\top,\] where \(v,w\) are sparse. Standard Planted-Clique-based reductions establish hardness of sparse CCA in certain regimes.
A scalar-response supervised primitive may be heuristically related to sparse CCA by projecting \(U\) to a scalar \(Y=g^\top U\), which gives \[\operatorname{Cov}(Z,Y)=\lambda(g^\top w)v.\] However, this projection changes the signal strength and may enter regimes where simple covariance estimation succeeds. Therefore Hypothesis 19 is used as a black-box conditional sparse predictive recovery assumption rather than derived directly from sparse CCA.
This section preserves the experimental details and labels referenced in the main text.
We generate synthetic data using the linear Gaussian construction described in the main text. The invariant features satisfy \[X_{\mathrm{inv}}\sim\mathcal{N}(0,I_k), \qquad Y=\langle \mathbf{1}_k/\sqrt{k},X_{\mathrm{inv}}\rangle+\epsilon.\] Spurious features are generated with environment-dependent correlations with \(Y\). The diversity parameter is controlled through the range of these correlations.
Algorithms include exhaustive subset search, invariance screening, greedy forward selection, beam search, and spectral baselines.
This subsection provides additional empirical results supporting the main-text claims. Table 6 reports extra ColoredMNIST results across diversity levels, Table 7 summarizes worst-group accuracy as sample size increases, and Table 8 together with Fig. 3 shows the training dynamics of IRM on ColoredMNIST.
| \(\gamma\) | \(N\) | Method | OOD Acc | Worst-Group |
|---|---|---|---|---|
| 0.0 | 2000 | ERM | \(.820\pm.012\) | \(.540\pm.025\) |
| 0.0 | 2000 | IRM | \(.835\pm.010\) | \(.610\pm.020\) |
| 0.4 | 1000 | ERM | \(.885\pm.012\) | \(.690\pm.020\) |
| 0.4 | 1000 | IRM | \(.900\pm.010\) | \(.760\pm.018\) |
| 0.8 | 2000 | ERM | \(.920\pm.008\) | \(.760\pm.018\) |
| 0.8 | 2000 | IRM | \(.945\pm.006\) | \(.840\pm.012\) |
Table 6 complements the main ColoredMNIST results by varying both diversity and sample size. When \(\gamma=0\), worst-group accuracy remains low, indicating that additional samples alone cannot fully resolve the lack of informative environment variation. As \(\gamma\) increases, both ERM and IRM improve, with IRM benefiting more in worst-group accuracy, consistent with the role of environment diversity in identifying invariant structure.
| Dataset | Method | \(N=1\mathrm{k}\) | \(N=5\mathrm{k}\) | \(N\ge10\mathrm{k}\) |
|---|---|---|---|---|
| CMNIST | ERM | \(.60\pm.03\) | \(.76\pm.02\) | — |
| CMNIST | IRM | \(.62\pm.03\) | \(.84\pm.01\) | — |
| Wbirds | ERM | \(.62\pm.04\) | \(.74\pm.03\) | \(.79\pm.02\) |
| Wbirds | IRM | \(.68\pm.03\) | \(.79\pm.02\) | \(.83\pm.02\) |
| Wbirds | GDRO | \(.72\pm.03\) | \(.82\pm.02\) | \(.85\pm.02\) |
Table 7 illustrates the sample-size effect on real benchmarks. Worst-group accuracy generally improves as \(N\) increases, supporting the finite-sample transition picture in the main text. The gains are especially visible in the small-to-moderate sample regime, suggesting that invariant or group-aware methods are most brittle when both diversity and sample size are limited.
| Epoch | OOD Acc | Worst-Group | \(\hat{\gamma}_{\mathrm{repr}}\) | Train Acc |
|---|---|---|---|---|
| 5 | .890 | .710 | .040 | .940 |
| 10 | .925 | .790 | .022 | .970 |
| 15 | .940 | .825 | .015 | .985 |
| 20 | .945 | .835 | .012 | .990 |
| 29 | .948 | .840 | .011 | .993 |
Table 8 shows that OOD and worst-group accuracy improve throughout IRM training, while \(\hat{\gamma}_{\mathrm{repr}}\) computed on the evolving IRM representation decreases. This is not in conflict with the diversity diagnostic in the main text: there, \(\hat{\gamma}_{\mathrm{repr}}\) is used on preliminary ERM features to assess whether environments expose spurious variation, whereas during IRM training a decreasing proxy can indicate that color-related spurious information is being suppressed in the learned representation.
Fig. 3 visualizes the same training behavior. OOD accuracy rises quickly, while worst-group accuracy improves more slowly and saturates later. This gap between average OOD performance and worst-group robustness is consistent with the main-text observation that invariant structure may be statistically useful before it is fully recovered by practical training objectives.
Fig. 4 summarizes the practical workflow suggested by our theory and experiments. The key diagnostic is to first estimate representation-level diversity; if diversity is low, collecting more diverse environments is prioritized, whereas if diversity is adequate but the sample size is below the predicted threshold, collecting more samples or reducing effective dimension is recommended.
The flowchart in Fig. 4 is intended as a heuristic decision aid rather than a formal algorithm. It operationalizes the two main quantities emphasized in the paper: diversity, estimated by \(\hat{\gamma}_{\mathrm{repr}}\), and effective sample complexity, estimated through the scaling \(n^*\propto k_{\mathrm{eff}}(d_{\mathrm{eff}}-k_{\mathrm{eff}})/(|\mathcal{E}|\hat{\gamma}_{\mathrm{repr}}^2)\). In practice, these estimates should be combined with validation performance and worst-group metrics when available.
Train a preliminary ERM model and compute \(\hat{\gamma}_{\mathrm{repr}}\) on penultimate features.
If \(\hat{\gamma}_{\mathrm{repr}}\) is small, prioritize collecting more diverse environments.
Estimate the critical scaling \[n^*\propto \frac{k_{\mathrm{eff}}(d_{\mathrm{eff}}-k_{\mathrm{eff}})}{|\mathcal{E}|\hat{\gamma}_{\mathrm{repr}}^2}.\]
If \(n\ll n^*\), collect more samples or reduce effective dimension.
Choose methods based on structure: GroupDRO when groups are available, IRM/REx when environments are informative, and spectral or screening methods when tractability conditions hold.
The statistical theory is linear-Gaussian, and the computational component is worst-case and conditional on the black-box supervised sparse recovery primitive. The hardness result should be interpreted as a conditional lower bound for constructed hard families, not as a claim about typical benchmark datasets.