Each Patient as Their Own Reference: Self-Controlled Deconvolution of Serial Bulk Biopsies

When a drug changes a tissue, a bulk RNA-seq measurement averages over every cell in the sample. That average cannot say whether the drug changed which cells are present (for example, more T cells arrived) or what the existing cells are doing (the same T cells switched on new genes). This problem is called cellular heterogeneity masking. Clinical studies add a second problem. Patients who receive a drug differ from those who do not, often in ways nobody recorded. Epidemiology handles that second problem with the self-controlled case series (SCCS), a design in which each patient is compared only with themselves at another time, so every fixed trait of that patient cancels out. We propose to apply the same cancellation inside the unmixing step that splits bulk tissue into cell types, not after it.

The core idea is easy to state. In a patient sampled before and after exposure, the patient's own cell-type expression profiles are a fixed nuisance, just like the patient-specific baseline rate in SCCS. These profiles are shaped by germline genetics, ancestry, and chronic disease state, and they are exactly where reference atlases go wrong. Fitting a single model to all of a patient's samples, with those profiles shared across timepoints and treated as nuisance, should do two things at once. It should remove confounding by indication. It should also remove the patient-specific part of the error that comes from unmixing bulk tissue against a mismatched reference. That leaves an exposure effect split into a change in composition and a change in expression within each cell type.

Core Claim

Current practice deconvolves each sample on its own, using tools such as BayesPrism, DWLS, or MuSiC, and then compares the estimated fractions between patients. Our claim is that this order of operations throws away information the within-person design makes available. Joint, self-controlled deconvolution should produce better-calibrated exposure effects on cell composition than either cross-sectional comparison or naive differencing of separately estimated fractions. It should also attribute the effect correctly to composition change versus within-cell-type expression change, which neither alternative can do.

We also expect, and will test, one failure that the self-controlled design does not fix. When the exposure itself changes tumor purity, the purity-dependent misclassification documented in breast cancer benchmarks varies over time, so it does not cancel. It can therefore appear as a spurious drug effect.

Relation to Prior Work

Two SCCS extensions motivate the outcome model but stop short of cells. Continuous SCCS applies within-person differencing to continuous lab values such as fasting glucose and LDL, with Gaussian errors and a variant restricted to adjacent time windows. Factorized SCCS shares statistical strength across many drugs and outcomes through low-rank latent factors. Neither handles cell fractions, which must be non-negative and sum to one, or count-valued expression. Neither has any notion of a latent cell type. We borrow the fixed-effect cancellation from the first paper and the idea of sharing strength across many outcomes, here genes and cell types, from the second.

Three deconvolution lines supply the measurement model and constrain the design. MEAD shows that plugging estimated fractions into downstream regressions inflates false positives, and it provides sandwich variance estimates. That is the main reason we carry the uncertainty from unmixing into the effect estimate instead of differencing point estimates. SCDC combines multiple single-cell references to reduce reference mismatch. We attack the same mismatch from the other direction: we learn a patient-specific deviation that is pinned down by that patient's own repeated samples. Count Bridges treats expression as integer counts. That argues for a count likelihood rather than CSCCS-style least squares, but it remains a deconvolver for single, static samples.

On the causal side, sensGAN bounds how strong an unmeasured confounder would have to be to erase a genomic association. It works cross-sectionally on donor pseudobulks, so it gives sensitivity bounds rather than cancellation, and it cannot say whether a confounder acts through composition. inVAE separates biological from technical variation in single-cell data but has no exposure timeline.

The empirical anchor for why any of this matters is the OHDSI benchmark. Uncalibrated observational designs covered the true effect only about half the time. SCCS adjusting for other drugs achieved the highest discrimination, and calibration with negative controls restored coverage. The breast cancer deconvolution benchmark constrains us: most methods mislabel normal epithelium as cancer epithelium as purity rises, and that is precisely the error a within-person design cannot cancel when treatment moves purity.

Model

For patient $i$ at sample $t$, with exposure indicator $E_{it}$, gene $g$ and cell type $k$, we model the bulk count as

$$y_{itg} \sim \text{NegBin}\Big(s_{it}\sum_k p_{itk}\,\mu^{\text{ref}}_{kg}\, e^{\delta_{ikg} + \gamma_{kg}E_{it}},\ \theta_g\Big), \qquad p_{it\cdot} = \text{softmax}\big(a_{i\cdot} + \beta\, E_{it}\big).$$

In this model $s_{it}$ is library size and $\mu^{\text{ref}}_{kg}$ is the atlas profile. The term $\delta_{ikg}$ is the patient's fixed deviation from the atlas, shrunk toward zero, and $a_{ik}$ is the patient's baseline composition. Both are time-invariant nuisances, playing the role of the patient baseline rate in SCCS. The parameter $\beta_k$ is the exposure effect on the log-ratio composition of type $k$, and $\gamma_{kg}$ is the effect on expression within type $k$, given a sparsity penalty. Including a negative-binomial dispersion $\theta_g$ makes the model a count likelihood rather than a Gaussian one.

Only within-patient contrasts identify $\beta$ and $\gamma$. A composition shift moves all of type $k$'s marker genes together, while a within-type expression effect is gene-specific and sparse. That asymmetry is what separates the two, and we will verify in simulation that it actually holds. Inference uses a sandwich variance clustered by patient, followed by empirical calibration in the OHDSI style. The negative controls are exposures known to be inert and genes not expected to respond. The positive controls are known effects injected into real pseudobulk.

Research Program

We will build three things.

The first is a simulator of longitudinal pseudobulk with known ground truth. Within each donor of the Wu breast cancer atlas used in the deconvolution benchmark, we resample the donor's own cells to make baseline and follow-up pseudobulks. We then inject known composition shifts and known within-type expression shifts. We impose confounding by indication by making exposure probability depend on donor-level traits, such as subtype and baseline immune content, that also drive composition. To get realistic donor-specific reference mismatch at scale, we repeat the construction with Onek1k, the million-cell, roughly thousand-donor blood cohort that Count Bridges uses. There, genetic differences between donors naturally produce the deviations $\delta_{ikg}$.

The second is the joint estimator together with its calibration procedure.

The third is a real-data application on paired pre- and on-treatment bulk biopsies. The melanoma immunotherapy cohorts assembled for POPPY are the candidate. We cannot confirm from the available material which of those trials contain within-patient pairs, so this step depends on that check.

Baselines

The naive reference point is a cross-sectional comparison. Each sample is deconvolved with BayesPrism, and the post-exposure fractions of exposed patients are compared with those of unexposed patients by regression on log-ratio-transformed fractions. This is the design the OHDSI results warn against. Beating it means nominal coverage under simulated confounding by indication, where we expect it to fail.

The strongest simple competitor is paired differencing of independently deconvolved samples. We run BayesPrism or DWLS, the best performers on granular immune lineages in the breast benchmark, separately on each sample. We then take the within-patient log-ratio difference and attach MEAD-style variance. This is essentially CSCCS applied to fractions, with uncertainty propagated. That benchmark reports no numeric RMSE, and no reported result on Lacuna was found for paired or longitudinal deconvolution on any dataset.

As an external accuracy anchor, SCDC reports Pearson 0.991 with ground truth on a 6:3:1 cell-line mixture (SCDC). We will reproduce SCDC and MEAD on our pseudobulks to confirm they behave as reported before using them in comparisons. For calibration, the anchors are the OHDSI figures: SCCS discrimination AUC of 0.95 to 0.98, and new-user cohort coverage moving from 0.73 to 0.89 after calibration (benchmark).

The cross-sectional confounder-adjustment baseline applies MEAD to propensity-matched exposed and unexposed patients.

Two ablations isolate our ingredients. The first removes $\delta_{ikg}$, so the model is joint across timepoints but uses only the atlas reference; this tests whether the shared patient profile is what helps. The second removes calibration.

Fairness rules apply to every method. All use the same single-cell reference, the same gene set, the same pseudobulks, and the same per-method hyperparameter search budget, with tuning done on simulation seeds held apart from evaluation seeds.

Beating paired differencing means meeting all of the following. Coverage of $\beta$ must be within a few points of 95% where paired differencing falls short. Mean squared error of within-patient composition change must be lower at equal depth. The method must separate composition from expression effects with an attribution AUC that paired differencing cannot reach, since paired differencing has no expression term.

Why not just…?

Why not just difference independently deconvolved fractions and propagate MEAD variance? This is the real threat, and it may suffice for composition alone whenever reference mismatch is small. The experiment settles it. We vary the size of donor-specific deviations in the Onek1k simulation and plot each method's error against that size. If paired differencing matches the joint model even at large deviations, the shared patient profile is not earning its keep, and we will say so. There is one thing it cannot do in any case: it has no way to attribute an effect to within-type expression change. A pure expression shift in marker genes will show up in its output as a composition change, which is exactly the masking failure.

Why not just run longitudinal single-cell sequencing? Where it is affordable, it is the gold standard, and we use it as the source of ground truth. But archived clinical biopsies and trial tissue are overwhelmingly bulk, and serial single-cell sampling across hundreds of patients is rarely feasible. The method targets those cohorts.

Why not just use cross-sectional matching or sensGAN-style sensitivity bounds? Matching depends on recorded covariates. The OHDSI benchmark found that such designs leak unmeasured confounding badly, with only about half of uncalibrated intervals covering the truth. sensGAN reports how strong a confounder would have to be, not what the effect is, and it works on pseudobulks. Our simulations will include a confounder that is unmeasured but fixed for each patient, and we will report coverage for each approach under it.

Why not just apply CSCCS directly to fractions? CSCCS with Gaussian errors on raw fractions can predict fractions outside the zero-to-one range, and it ignores the uncertainty from unmixing. Applying it to log-ratio fractions is effectively the paired-differencing baseline above, so it is tested directly.

Decisive Checks

Four results decide whether the proposal holds up.

First, under confounding by indication, the cross-sectional baseline's coverage should collapse while both self-controlled methods hold. If it does not collapse, the simulation is too easy.

Second, the joint model should beat paired differencing as donor-specific mismatch grows, and the ablation without $\delta_{ikg}$ should lose most of that gain.

Third, in a purity-shift scenario, where treatment shrinks the tumor fraction and the true normal-epithelial effect is zero, we will measure the false-positive rate for normal epithelium under every method. We expect self-controlled designs to inherit the purity-trap bias. If calibration with negative-control cell types does not remove it, that is a stated limit of the approach, not something to hide.

Fourth, on paired real biopsies, the calibrated effects should reproduce known biology where it exists, such as T and NK cell involvement in immunotherapy response as reported by POPPY. The null distribution from negative-control genes should be centered after calibration.