Why Use Controls to Estimate Unwanted Variation?
Expression measurements can vary for reasons beyond the biological comparison of interest. Library preparation, reagent lots, instrument runs, and other technical sources may contribute patterns shared across many genes. If the relevant technical labels are unavailable or incomplete, a model needs some way to learn those patterns from the data. RUV methods—“remove unwanted variation”—use control information for this purpose: either genes expected not to respond to the biology under study, or samples that share biology but differ in technical exposure.
The essential idea is not that controls reveal every source of variation. Rather, they provide observations in which the biological signal of interest is absent or cancels out, making unwanted structure easier to estimate. This requires careful control selection and a model that keeps the biological variables in view. A factor estimated from controls is not automatically “technical” merely because it was estimated by a control-based method.
The model is an approximation, usually applied to a suitably transformed expression matrix. It assumes that unwanted structure can be represented adequately by a modest number \(k\) of shared factors, with gene-specific loadings. It also assumes that the control information is informative about the unwanted factors that affect the genes being analyzed. As with other latent-factor models, \(A W^\mathsf{T}\) is not uniquely parameterized: for an invertible matrix \(Q\), \(A W^\mathsf{T}=(A Q)(W Q^{-\mathsf{T}})^\mathsf{T}\). Thus the factor coordinates, signs, and scales are not intrinsically meaningful; their usefulness is in the variation they represent and how they behave in a model retaining \(X\).
RUVg: Negative-Control Genes
In RUVg, the control genes are chosen because their expression is believed not to respond to the biological variables of interest. “Negative control” does not mean that a gene is unexpressed, has no measurement noise, or is unaffected by every biological process. It means that, for the contrast being studied and after any relevant modeled covariates are considered, the control genes have no systematic biological effect that should be protected as a target of inference.
For these genes, the biological coefficient rows of \(B\) are assumed to be zero for the variables of interest. Their expression can still vary across samples through \(W\). A simple estimation strategy centers each control gene across samples to remove its constant mean and then uses a low-rank factorization, such as a singular value decomposition (SVD), to estimate the dominant sample-wise patterns. In practice, RUV implementations may use more elaborate factor-analysis estimators, but the key assumption is the same: variation across the selected controls is informative about unwanted variation.
Worked Example: Recovering a Factor From Control Genes
Suppose six samples have a single unwanted factor \(w=(-1,0,1,-1,0,1)^\mathsf{T}\). Two hypothetical control genes have expression equal to their mean plus a gene-specific loading times \(w\): gene 1 has mean 10 and loading 2; gene 2 has mean 20 and loading \(-1\). The centered control matrix is therefore
This is rank one. Its right singular vector is \(w/2\), up to a sign, because \(w^\mathsf{T}w=4\). The single nonzero singular value is \(\sqrt{(2^2+(-1)^2)(w^\mathsf{T}w)}=\sqrt{5\cdot4}=\sqrt{20}\approx4.472\). Thus an SVD recovers the sample pattern, although the returned vector may be scaled or sign-reversed. Those differences do not change the one-dimensional factor space.
For illustration, let a target gene follow \(y=10+3x+2w\), where the condition indicator is \(x=(0,0,0,1,1,1)^\mathsf{T}\). Substitution gives \(y=(8,10,12,11,13,15)^\mathsf{T}\). A regression on an intercept, \(x\), and the recovered factor \(w\) can represent this exactly, with coefficients 10, 3, and 2. The factor is centered and \(x^\mathsf{T}w=0\), so the two varying columns are orthogonal; \(x\) itself is not centered. This example illustrates why the biological design should remain in the model rather than being replaced by a correction based on the estimated factor alone.
RUVs: Replicate Samples as Controls
RUVs uses samples that are biological replicates: their biology is sufficiently similar for the contrast of interest that differences between them can be attributed to unwanted variation plus residual error. For a pair of replicate samples \(a\) and \(b\), the biological component cancels in their difference. Under the model, for gene \(g\),
With multiple genes and replicate contrasts, the resulting differences can reveal the unwanted factor contrasts. The method estimates relative sample structure: a shared offset in \(W\) cannot be learned from differences alone. Replicate status must be justified by the study design, not merely by samples having the same condition label. If replicates differ systematically in a biological feature relevant to expression, the difference does not cleanly isolate technical variation.
Worked Example: A Replicate Contrast Isolates a Factor Difference
Consider two hypothetical replicate samples with the same biological state. Let their unwanted-factor values be \(w_a=0\) and \(w_b=2\). Three genes have biological means \((10,20,30)\) and factor loadings \((1,2,-1)\), with no residual error in this illustration. Their measurements are:
Subtracting the first sample from the second gives \((2,4,-2)^\mathsf{T}\). This agrees with the model because the factor difference is \(w_b-w_a=2\), so the expected gene-wise differences are \((1,2,-1)^\mathsf{T}\times2=(2,4,-2)^\mathsf{T}\). The shared biological means disappear from the contrast. Across suitable replicate sets and many genes, a low-rank pattern in such contrasts can estimate relative unwanted-factor variation. With just this pair, the example shows one contrast, not a general estimate of all sample factors.
Why the Controls Determine What Can Be Recovered
Control selection is an assumption about the relationship between controls, biology, and unwanted variation. For RUVg, controls should be unaffected by the biological contrast under study and should respond to the unwanted processes that also affect the target genes. Controls that are biologically responsive can make the estimated factors absorb real signal. Controls that are technically unrepresentative may fail to reveal a factor affecting the targets. A large control set is not automatically better if it contains many unsuitable genes.
For RUVs, the central control assumption is instead that the designated replicates share the relevant biology. If that assumption fails, biological differences remain in the contrasts and may be mistaken for unwanted factors. Conversely, if replicate samples do not vary in the technical ways present elsewhere in the study, their contrasts may provide little information about the unwanted variation of interest.
Worked Example: A Biologically Responsive “Control” Can Leak Signal
Suppose the condition vector is \(x=(0,0,0,1,1,1)^\mathsf{T}\), and a true unwanted factor is \(w=(-1,0,1,-1,0,1)^\mathsf{T}\). These satisfy \(x^\mathsf{T}w=0\), and \(w\) is centered. A proposed control gene actually follows \(z=5+4x+2w\), so it has a biological condition effect of 4 and is not a valid negative control for this comparison.
The six values are \(z=(3,5,7,7,9,11)^\mathsf{T}\), with mean 7. After centering, the values are \((-4,-2,0,0,2,4)^\mathsf{T}\), which also equals \(4(x-0.5\mathbf{1})+2w\). The centered condition component and \(w\) are orthogonal. Their squared contributions to the centered gene are 24 for the condition component, \(16\{(x-0.5\mathbf{1})^\mathsf{T}(x-0.5\mathbf{1})\}=16(1.5)=24\), and 16 for the unwanted component, \(4w^\mathsf{T}w=4(4)=16\). A factor estimated from this one centered control therefore combines biological and unwanted variation. It cannot identify which part is technical from this gene alone.
The practical correction is not to interpret the resulting factor as technical by definition. Reassess the controls, retain the biological design in downstream modeling, and check whether factor estimates are associated with the known condition. If controls cannot separate the biological and unwanted patterns, the data may not identify them without stronger design information.
Estimation, Use, and Diagnostics
A useful RUV workflow begins by specifying the biological design and the control rationale, then estimating a modest number of factors from the controls. The factors are generally included as covariates in a model of the target genes alongside the variables of interest. This preserves the distinction between adjustment for unwanted variation and estimation of the biological contrast. Simply subtracting a fitted factor component from every expression value can remove biological signal if the factor is contaminated or correlated with the biology.
Write down the biological contrast and known covariates in \(X\); decide which biological effects the controls must not carry.
Use RUVg when suitable negative-control genes are available; use RUVs when replicate samples provide contrasts that cancel the relevant biology.
Estimate a small set of factors and examine their relation to known technical labels, biological variables, and expression diagnostics.
Include the estimated factors with \(X\), then assess whether technical structure remains and whether the biological estimate is sensitive to reasonable choices.
Diagnostics should test the assumptions, not just confirm that the data look less variable. Inspect estimated factors against known batches, processing dates, and biological conditions. A factor strongly aligned with the condition may reflect true biology, control contamination, or confounding; it is not evidence by itself that the condition should be removed. Check whether control genes show condition-related patterns, whether replicate contrasts have coherent structure, and whether residual expression retains technical patterns. Compare results across plausible control sets and values of \(k\). Large changes in the biological estimate under small changes in controls or \(k\) indicate fragility.
How RUV Differs From Alternatives
| Approach | Information used | Key limitation |
|---|---|---|
| RUVg | Genes assumed not to respond to the biological variables of interest | Invalid or unrepresentative control genes can bias factor estimates |
| RUVs | Replicate-sample contrasts assumed to share the relevant biology | Biological differences between replicates can enter the unwanted-factor estimate |
| Known-batch adjustment | Observed batch labels included directly in a model | Cannot directly adjust for an unrecorded source using its label; design confounding still matters |
| Surrogate Variable Analysis | Genome-wide expression patterns used to estimate latent variation | It does not rely on the same explicit negative-control assumptions, but latent factors still require interpretation and protection of biology |
RUV is most attractive when credible controls are available and known batch labels do not capture all relevant variation. Known labels are valuable when recorded because they have a direct interpretation. The earlier material on Surrogate Variable Analysis covers a genome-wide strategy for latent variation; RUV’s distinguishing feature here is the explicit use of control genes or replicate samples. No method can resolve perfect confounding from expression data alone: if condition and technical exposure are inseparable in the design and controls provide no independent information, their effects are not identifiable.
Common Mistakes and Limits
- Calling every high-variance gene a negative control. High variation does not establish absence of biological response. Controls need a substantive rationale for the contrast at hand.
- Assuming a factor is technical because RUV estimated it. The method estimates shared structure under control assumptions; the factor may contain biology when those assumptions fail.
- Using too many factors without checking consequences. A larger \(k\) can capture more structure, but can also absorb signal or fit noise. Examine stability and residual diagnostics rather than choosing \(k\) solely to reduce visible batch separation.
- Subtracting factors and dropping the biological design. Factors should generally be included as covariates alongside the biological variables. Otherwise, a factor associated with condition may remove part of the target contrast.
RUV cannot manufacture information missing from a study design, guarantee that chosen controls are valid, or prove that a recovered factor is purely technical. Its results depend on a low-rank model, the suitability of controls, and the availability of enough independent variation to distinguish biology from unwanted effects. Use estimated factors as model-based adjustments, and report how controls and factor number were chosen.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions.
- In RUVg, what does it mean for a gene to be a negative control for a particular analysis?
- For a replicate pair with the same biology, why does subtracting one sample’s expression from the other help estimate unwanted variation?
- A centered control-gene matrix has rank one. What does this say about the estimated sample pattern, and what does it not establish?
- Why can a control gene with a real condition effect distort an RUVg factor estimate?
- When should known batch labels remain in the model alongside RUV factors?
Solutions. (1) Its expression has no systematic effect from the biological variables of interest, under the model and after relevant covariates are considered; it may still respond to unwanted factors. (2) The shared biological component cancels in the difference, leaving unwanted-factor differences plus residual error. (3) One dominant sample-wise pattern can represent the centered controls; rank one does not prove that the pattern is technical or that the controls are valid. (4) The factor estimate may include that condition signal and then treat some biology as unwanted variation. (5) Include known batch labels when they are relevant and estimable; RUV factors can address additional unwanted structure, but do not replace recorded information automatically.