Tutorials › Statistical Methods for Single-Cell RNA Sequencing › Shrinkage, Winner’s Curse, And Selected Marker Effects

Marker Genes and the Double-Dipping Problem · Tutorial 314 of 700

Shrinkage, Winner's Curse, And Selected Marker Effects

You will distinguish winner’s curse from ordinary estimation noise, derive a basic shrinkage estimator, and identify when shrinkage helps and when independent validation or selection-aware methods are needed.

Advanced 12 min read

What You'll Learn

  • Define winner’s curse for marker genes selected by extreme observed effects.
  • Derive the normal-means posterior mean and its shrinkage factor.
  • Calculate how selection changes the expected reported effect.
  • Distinguish shrinkage for estimation from procedures for valid post-selection inference.
  • Diagnose prior, standard-error, and selection-model failures.
  • Compare shrinkage with sample splitting and independent validation.

Why Selected Marker Effects Look Too Large

A marker gene is often reported because its observed contrast between clusters is large. But an observed contrast combines the gene’s underlying effect with sampling noise. When selection favors extreme observations, it also favors observations whose noise happened to point in the selected direction. Consequently, the reported effects tend to overstate the underlying effects. This is the winner’s curse.

This is an estimation problem, distinct from testing whether a marker passes a significance or false-discovery-rate threshold. A procedure can control a specified error rate while the estimated effects of selected genes remain exaggerated. Conversely, shrinking estimates can reduce average estimation error without making a test or interval valid after selection.

Definition: Let \(\theta_g\) be the underlying contrast for gene \(g\), and let \(\hat{\theta}_g\) be its observed estimate. If genes are selected because \(\hat{\theta}_g\) is unusually large, then the selected estimates tend, on average, to exceed their underlying effects. The excess is selection bias, or winner’s curse. For a two-sided selection rule based on \(|\hat{\theta}_g|\), exaggeration is typically in the selected direction: positive estimates tend to be too positive and negative estimates too negative.

For a cluster marker, \(\theta_g\) might represent the population difference in mean expression between a target cluster and a comparison group, measured on a specified analysis scale. A useful approximation for discussing estimation is \(\hat{\theta}_g\mid\theta_g\sim N(\theta_g,s_g^2)\), where \(s_g\) is the standard error. This is a working model, not an automatic description of raw single-cell counts: the contrast and its uncertainty must come from an analysis appropriate to the data and study design.

How Selection Creates the Exaggeration

Suppose several genes have the same true effect and independent estimation errors. If the gene with the largest observed positive contrast is reported, then its error is the largest of several errors, not a typical error. Even when every true effect is zero, the largest observed estimate will usually be positive.

Worked Example: Selecting the Larger of Two Noisy Effects

Suppose two genes both have true contrast \(\theta=0.8\) normalized-expression units. Their estimates are independent and satisfy \(\hat{\theta}_j=\theta+\varepsilon_j\), with \(\varepsilon_j\sim N(0,1^2)\). Report the gene with the larger observed estimate.

The reported estimate is \(0.8+\max(\varepsilon_1,\varepsilon_2)\). For any real numbers \(a,b\), \(\max(a,b)=(a+b+|a-b|)/2\). Since each error has mean zero, \[ E[\max(\varepsilon_1,\varepsilon_2)] =\frac{1}{2}E[|\varepsilon_1-\varepsilon_2|]. \] The difference has distribution \(N(0,2)\). For \(Z\sim N(0,\sigma^2)\), \(E|Z|=\sigma\sqrt{2/\pi}\), so \[ E[\max(\varepsilon_1,\varepsilon_2)] =\frac{1}{2}\sqrt{2}\sqrt{\frac{2}{\pi}} =\frac{1}{\sqrt{\pi}} \approx 0.5642. \] Therefore the expected reported estimate is \(0.8+0.5642=1.364\) normalized-expression units. The two genes’ true effects are both 0.8 units; the excess arises solely because the larger noisy estimate was selected. The calculation relies on equal true effects, independent normal errors, and selection of the larger signed estimate. Correlated errors or a different selection rule change the calculation.

The same mechanism applies when selection is based on a threshold rather than a rank. Among genes whose estimates exceed a positive threshold, estimates near the threshold are more common than arbitrarily large estimates, but their errors must on average be positive if their true effects are fixed at zero. The thresholded sample therefore has a positive mean estimate even under the null.

A Basic Shrinkage Estimator

Shrinkage replaces a noisy estimate with a value pulled toward a reference, often zero for a contrast. A common model makes that rule explicit: assume \(\hat{\theta}_g\mid\theta_g\sim N(\theta_g,s_g^2)\) and, across genes, \(\theta_g\sim N(0,\tau^2)\). For this simple normal-means model, suppose \(s_g\) and \(\tau\) are known. The prior says effects are centered at zero and have variance \(\tau^2\); it is a modeling assumption about effects across genes, not a fact guaranteed by the data.

Definition: Under the normal likelihood and zero-centered normal prior above, the posterior mean is \(\tilde{\theta}_g=\lambda_g\hat{\theta}_g\), where \(\lambda_g=\tau^2/(\tau^2+s_g^2)\). This is a shrinkage estimate: \(0<\lambda_g<1\), so the estimate is pulled toward zero. The posterior variance is \(\tau^2s_g^2/(\tau^2+s_g^2)\).

The factor \(\lambda_g\) is smaller when the estimate is less precise relative to the assumed spread of true effects. If \(s_g^2\) is large relative to \(\tau^2\), the data provide comparatively little information about that gene’s effect and the estimate moves more toward zero. If \(s_g^2\) is small relative to \(\tau^2\), the estimate stays closer to the observed contrast.

The formula follows by multiplying the normal likelihood by the normal prior and completing the square. Ignoring factors that do not depend on \(\theta_g\), the posterior density is proportional to \[ \exp\left\{-\frac{1}{2}\left[ \frac{(\hat{\theta}_g-\theta_g)^2}{s_g^2} +\frac{\theta_g^2}{\tau^2}\right]\right\}. \] The coefficient of \(\theta_g^2\) inside the brackets is \(1/s_g^2+1/\tau^2\), so the posterior variance is its reciprocal. The coefficient of the linear term is \(\hat{\theta}_g/s_g^2\); multiplying it by that variance gives the posterior mean: \[ \frac{\hat{\theta}_g/s_g^2}{1/s_g^2+1/\tau^2} =\frac{\tau^2}{\tau^2+s_g^2}\hat{\theta}_g. \] This derivation establishes the formula only under the stated model.

Worked Example: Shrinking a Noisy Cluster Contrast

Suppose a gene’s estimated target-versus-comparison contrast is \(2.4\) normalized-expression units with standard error \(s_g=0.8\) units. For illustration, assume the zero-centered normal prior has standard deviation \(\tau=1.2\) units, and treat both standard deviations as known. The gene was reported because its estimate exceeded a prespecified positive reporting threshold of 2.0 units.

The shrinkage factor is \[ \lambda_g=\frac{1.2^2}{1.2^2+0.8^2} =\frac{1.44}{1.44+0.64} =\frac{1.44}{2.08} \approx 0.6923. \] Thus the posterior mean is \[ \tilde{\theta}_g=0.6923(2.4)\approx 1.662 \] normalized-expression units. The posterior variance is \[ \frac{1.44(0.64)}{2.08}\approx 0.4431 \] squared units, corresponding to a posterior standard deviation of \(\sqrt{0.4431}\approx0.6656\) units. Shrinkage reduces the point estimate from 2.4 to about 1.662 units under the assumed model; it does not establish that 1.662 is the true effect.

The threshold explains why this estimate was selected, but it does not appear in the displayed posterior formula. If selection is a deterministic rule based only on the observed estimate, and the estimate itself is observed, then conditioning on that selection event adds no information beyond the observed estimate in this Bayesian calculation. That fact does not mean the selected estimates are unbiased under a fixed-effects repeated-sampling interpretation, nor does it guarantee that the assumed prior and likelihood are adequate.

What Shrinkage Can—and Cannot—Correct

Shrinkage can reduce the influence of noisy extremes. Under the normal-means model, the posterior mean is optimal for squared-error loss when the prior and likelihood are correct. More generally, a well-calibrated shrinkage rule can improve average estimation accuracy across a collection of genes. That is not the same as removing the selection mechanism. A selected estimate can remain exaggerated after shrinkage, especially if the shrinkage is mild, the selection is severe, or the prior is misspecified.

For a transparent illustration, let \(Y\sim N(0,1)\) for a gene whose true effect is zero, and report it only when \(Y>1.5\). Under this threshold rule, the conditional mean of the reported estimate is \(E[Y\mid Y>a]=\phi(a)/(1-\Phi(a))\), where \(\phi\) and \(\Phi\) are the standard normal density and distribution functions. This identity follows by integrating the normal density: \(\int_a^\infty y\phi(y)\,dy=\phi(a)\), and dividing by \(P(Y>a)=1-\Phi(a)\).

Worked Example: Threshold Selection Leaves Residual Bias After Shrinkage

In the null setting above, \(\phi(1.5)\approx0.1295\) and \(1-\Phi(1.5)\approx0.06681\). Therefore \[ E[Y\mid Y>1.5]=\frac{0.1295}{0.06681}\approx1.939. \] The average estimate among reported genes is about 1.939 standard-error units, even though each gene’s true effect is zero. Now apply a fixed shrinkage rule \(\tilde{Y}=0.6Y\). Its conditional average among reported genes is \[ E[\tilde{Y}\mid Y>1.5]=0.6(1.939)\approx1.163. \] The estimate is smaller, but it is still above the true value of zero. This calculation assumes a standard normal null estimate and selection exactly when \(Y>1.5\); the factor 0.6 is chosen only to illustrate the point and is not derived from a fitted prior.

There is an important distinction between a model-based posterior statement and repeated-sampling bias at a fixed true effect. If the prior describes the gene effects well and the likelihood is correct, then posterior means have a conditional-expectation interpretation given the observed data. But estimates selected from a particular realized data set can still be misleading if the model omits relevant structure, uses poorly estimated hyperparameters, or treats adaptive clustering and marker selection as though they had not occurred. Shrinkage is an estimation tool, not a universal post-selection correction.

Assumptions, Diagnostics, and Alternatives

Before using the normal-means shrinkage formula, check that the contrast and standard error are meaningful for the study design, that the normal likelihood is a reasonable approximation at the relevant scale, and that the prior’s center and spread are defensible for the genes being modeled. If \(\tau\) is estimated from data, its estimation procedure matters. Estimating it from a set already restricted to extreme markers can distort the estimated distribution of effects; treating \(\tau\) as known can hide this uncertainty.

  • Inspect the selection rule. Record whether selection used a signed contrast, absolute contrast, test statistic, adjusted p-value, or a combination. These rules imply different selection effects.
  • Check standard errors and model fit. A normal-means model cannot rescue standard errors that fail to reflect the experimental units, dependence, or uncertainty in the contrast.
  • Assess the prior and its fit. A zero-centered prior may be inappropriate if effects are systematically nonzero, and one common variance may be inadequate when genes have distinct levels of variability.
  • Compare raw and shrunken estimates. A large reduction concentrated among imprecise extreme estimates is plausible; a result dominated by a few genes or by a small change in the assumed prior spread calls for sensitivity analysis.
  • Distinguish estimation from evidence. A shrunken point estimate alone does not provide a calibrated p-value, confidence interval, or guarantee of false-discovery-rate control.

The main alternatives address different parts of the problem. Sample splitting uses one part of the data to select markers and another to estimate or test them, reducing reuse of the same noise for both tasks at a cost in precision. Independent-dataset validation checks whether effects recur in new data and is especially valuable for assessing generalizability. Selection-aware methods instead model the selection event when making inferential claims. The earlier material on selective inference and on independent-dataset validation develops those approaches; neither is interchangeable with simply shrinking a point estimate.

Shrinkage is most useful when the goal is to stabilize many related effect estimates under a credible shared model. It is limited when the selection process is complex or poorly recorded, when the prior is unreliable, or when the scientific claim requires valid uncertainty after selection. In those settings, report the selection rule and the shrinkage assumptions explicitly, and use a design or inferential method suited to the claim.

Common Mistake

Common mistake: “The marker estimate was shrunk toward zero, so the winner’s curse is corrected and the reported effect is unbiased.” Shrinkage only changes the estimate according to a rule and assumptions. It can reduce exaggeration, but it does not generally eliminate conditional selection bias or validate post-selection uncertainty. A correction claim needs a justified model of both estimation and selection, or an honest independent estimation strategy.

Check Your Understanding

Answer each question, then compare your reasoning with the solutions.

  1. Two genes have equal true effects and independent errors with standard deviation 0.5 units. If the gene with the larger signed estimate is reported, what is the expected excess of that estimate over the common true effect?
  2. A normal-means model has \(\tau=2\) units and \(s_g=1\) unit. For an observed estimate of 3 units, calculate the shrinkage factor and posterior mean.
  3. Why does reducing a selected estimate’s magnitude not by itself establish that it is unbiased?
  4. Name one diagnostic concern if the prior spread \(\tau\) is estimated using only genes that passed an extreme-effect filter.

Solutions. (1) The expected excess is \(s_g/\sqrt{\pi}=0.5/\sqrt{\pi}\approx0.2821\) units, using the two-independent-normal maximum calculation. (2) \(\lambda_g=2^2/(2^2+1^2)=4/5=0.8\), so \(\tilde{\theta}_g=0.8(3)=2.4\) units. (3) Selection makes the observed errors among reported genes systematically point toward the selection criterion; multiplying estimates by a factor below one may reduce, but need not eliminate, that conditional excess. (4) The filtered genes are not a representative sample of the gene-effect distribution, so the estimated prior spread may be distorted and the resulting amount of shrinkage unreliable.

Clinical Biostats