Method / tool

Sphering

A linear transform (ZCA-whitening) applied to morphological profiles that decorrelates features and equalises their variance, so no single channel or texture axis dominates distance metrics in downstream readout.

The problem — CellProfiler outputs roughly 1,500 features per well. Many of those features are highly correlated: multiple texture channels in the same stain, area and integrated intensity in the same compartment. In raw feature space, correlated axes inflate apparent distances along their shared direction, so nearest-neighbour retrieval and Percent Replicating scores are dominated by a handful of redundant axes rather than the full breadth of morphological signal. Biologically meaningful but subtle differences quietly vanish.

What it is / how it works — Sphering (ZCA-whitening) fits a covariance matrix on a reference population — typically DMSO negative-control wells from the plate — then applies the inverse square root of that covariance as a linear transform to every profile. The result is a new feature space where all axes have unit variance and are uncorrelated. The name comes from the geometric effect: an ellipsoidal cloud of control points is mapped to a sphere. Ando et al. 2017 demonstrated that this transform improves sensitivity to biological variation in high-content imaging without requiring additional labelled data. In pycytominer, the Spherize class exposes method="ZCA-corr" as its default, with a small regularising epsilon (1e-6) added to the diagonal to prevent numerical instability when features are near-perfectly correlated.

Where it breaks — The transform is only as reliable as the reference population it is fit on. If DMSO wells are sparse, contaminated, or unevenly distributed across the plate, the estimated covariance is noisy and the whitened profiles inherit that noise. Fitting on the full treatment population — which includes compound-induced phenotypes — risks removing biological variance along the very axes that distinguish treatments. Sphering also amplifies low-variance features that carry shot noise rather than signal; the epsilon fudge factor dampens this, but the right value is assay-dependent, not universal.

Always fit the sphering transform on clean, representative negative controls — not the full well population. Verify the result with [Batch Correction Without Erasing Biology](/lab-notes/batch-correction-without-erasing-biology): if percent replicating drops after sphering, the reference population is corrupt or too small.

References

Appears in these notes

← Back to the constellation