Methods that merge single-cell datasets from different sequencing technologies usually work as a two-player game. An encoder compresses each cell into a short vector, and a second network, the discriminator, tries to guess from that vector which technology produced the cell. The encoder is rewarded for fooling it. This adversarial setup asks the encoder to remove every signal that tells the technologies apart, but it never says what that signal physically is.
For one important pairing, we know what much of the signal is. Full-length protocols such as Smart-seq2 read fragments along the whole transcript, so a long gene yields more reads than a short gene expressed at the same level. Tag-based droplet protocols such as 10x count molecules near one end of the transcript, so their counts are largely insensitive to length. An encoder that hides this difference has to bend the expression of every gene in proportion to its length. That bending also distorts real biology that happens to sit in long genes, such as the large chromatin regulators that are enriched among tumor suppressors.
We propose to model the length effect where it physically arises, in the part of the model that generates counts. Each protocol gets its own learned curve relating gene length to capture rate. The discriminator is then left to remove only the technology differences that length cannot explain. The question is whether this measurably reduces the distortion of long-gene biology at equal batch mixing. We also ask whether a much simpler fix, dividing Smart-seq2 counts by transcript length before integration, already does the same job.
Core Claim
Our central claim concerns a gap in current adversarial integration methods. DAVAE couples a variational autoencoder to a domain classifier through a gradient reversal layer. SAFAARI adds contrastive and open-set objectives on top of the same adversarial alignment. Both treat the technology label as an opaque category. As a result, length-dependent capture differences between Smart-seq2 and 10x are removed in the latent space, which is the wrong place, and whatever biology is correlated with gene length is removed along with them.
We claim that adding a protocol-specific, length-parameterized term to the count model has three measurable consequences. First, it lowers the adversarial pressure needed to reach a given level of batch mixing. Second, it reduces "length leakage," meaning the tendency of integration to shift genes' apparent expression in proportion to their length. Third, it preserves differential-expression structure among long genes better than both a plain adversarial model and a model given a free per-gene, per-protocol offset.
The constraint that length enters only through a smooth, low-dimensional curve is the key ingredient. It separates physics from biology. A free per-gene offset can soak up real compositional differences between datasets. A smooth function of length cannot.
Why this, and where prior work sits
The size-bias literature motivates the approach and also limits it. Several papers show that physical span inflates naive statistics. SVFX shows that longer structural variants overlap more annotations purely because of their length. It removes this effect by converting feature counts into Z-scores against 1,000 size-matched shuffles. PASL uses Box-Cox transforms to keep large gene sets from dominating its learned pathway components. RL-GenRisk penalizes gene length in its reward so that the agent stops collecting long passenger genes such as TTN.
All three methods apply a fixed, hand-chosen correction inside a single platform. None of them learns how the length effect differs between measurement technologies. We borrow their premise, that length should be modeled explicitly rather than ignored, and make the correction learned and protocol-specific.
Waks et al. supply the main constraint. They report that the largest chromatin-organizing proteins show a 62-fold enrichment for tumor suppressor activity, and that 26 of the 30 largest driver proteins are tumor suppressors. Their finding concerns protein size and driver status, not expression. Even so, it is a direct warning that length correlates with biology, so any correction that blindly removes length-correlated variance risks erasing real signal. This is why we model length through a smooth curve rather than penalizing all variation that correlates with length. It is also why preservation of long-gene signal, not only batch mixing, is our primary outcome.
AD-AE is the closest methodological relative. It trains an adversary to predict sample-level confounders, including continuous ones like age, from a bulk expression embedding. It never models gene-level physical properties. Our proposal differs in two ways: the confounder is a property of genes rather than samples, and we handle it generatively rather than adversarially.
Research Program
The model is a variational autoencoder with a negative binomial count likelihood and a gradient-reversal discriminator on the latent code, matching DAVAE's design so that comparisons isolate our change. For cell $c$, gene $g$, and protocol $p(c)$, the decoder's expected count is
$$ \mu_{cg} = s_c \,\rho_g(z_c)\, \exp\!\big(f_{p(c)}(\log L_g)\big), $$
where the terms are defined as follows. $s_c$ is the cell's library size. $\rho_g(z_c)$ is the decoder's normalized expression for gene $g$ given latent code $z_c$. $L_g$ is the gene's effective transcript length. $f_p$ is a protocol-specific smooth spline with a few knots. We fix $f$ to zero for a reference protocol, 10x, for identifiability.
We will compare three versions of the length term. The first is the learned curve. The second fixes the curve to $f_p(\log L) = \log L$ for Smart-seq2, which is equivalent to TPM-style division by length. The third replaces the curve with a free per-gene, per-protocol offset. A further extension lets the curve's slope depend weakly on the cell, through a one-dimensional cell-level covariate. This targets cell-to-cell variation in how much the length effect matters, which a fixed transform cannot capture.
Because the choice of transcript length is itself noisy, we will fit every model twice, once with RefSeq-derived lengths and once with Ensembl-derived lengths. Conclusions must hold under both.
We will also build a diagnostic that can be applied to any integration method, adversarial or not. For each gene, we compute the change in its mean reconstructed expression between the protocol-specific and the integrated representations within matched cell types. We then regress that change on log length. The slope and $R^2$ of this regression quantify length leakage.
Baselines
The naive reference point is an unintegrated model. The same variational autoencoder is trained without a discriminator and without a length term, which shows how separated the protocols are before any correction.
The strongest existing adversarial method on this question is DAVAE (DAVAE). It is the most direct competitor because it is exactly our architecture minus the length term. It reports outperforming Scanorama, DESC, and Seurat v3 on adjusted Rand index (ARI), 1−ARI for batch mixing, and kBET acceptance rate. However, no reported numerical result was found on Lacuna for DAVAE or for SAFAARI on Tabula Muris FACS versus 10x. We will therefore reproduce DAVAE ourselves rather than quote a number.
SAFAARI (SAFAARI) is the second adversarial baseline, since it reports significance against seven methods in open-set settings on this very dataset pair. We will run it closed-set for comparability, and separately with its open-set head to test whether flagged "unknown" cells are enriched for long-gene markers.
The classical baseline is ComBat via pyComBat, applied to log-normalized counts. It is fast and deterministic, and it is the method a practitioner would try first.
The two ablations isolate our key ingredient. The first uses fixed length division, TPM-style, on Smart-seq2 before a standard DAVAE. The second uses a free gene-by-protocol offset in the decoder. Together they ask, respectively, whether the curve needs to be learned and whether it needs to be constrained to length.
All neural models will share the same encoder width, latent size, and training epochs. Each gets the same search budget, sixteen configurations over the adversarial weight and learning rate, selected on a held-out validation tissue by a single combined score of ARI and kBET. Results will be averaged over five seeds.
Beating the baselines means the following. At matched kBET (within 0.02), our model should show a length-leakage slope significantly closer to zero than DAVAE and SAFAARI. It should also show higher preservation of within-protocol long-gene differential-expression rankings than both ablations, with no loss in ARI.
Why not just…?
Why not just divide Smart-seq2 counts by transcript length before integrating? This is the most serious threat, because it handles the first-order effect for free. The ablation that fixes the curve to $\log L$ tests it directly. If the learned curve's estimated slope sits near one and the leakage metrics match the fixed transform, we will report that simple division suffices and that the adversary was only ever compensating for a missing normalization. That would be a useful negative result.
We expect a difference for two reasons. First, the dependence of dropout on length is not a single proportional factor. Second, 10x is not perfectly length-flat. Both effects would appear as curvature in the learned $f_p$, but this is an expectation and not something the file establishes.
Why not just use ComBat? AD-AE reports that ComBat leaves a larger gap between internal and external prediction performance than adversarial deconfounding on bulk data (AD-AE), although no exact numbers are quoted. More to the point, ComBat corrects each gene's location and scale per batch. That is a free per-gene offset, which is the same flexibility our free-offset ablation tests, and it can absorb biology. ComBat's leakage and long-gene preservation scores will show whether this matters in practice.
Why not just give the model a free per-gene, per-protocol offset, which can absorb any length effect? It can absorb length effects, and it can also absorb real composition differences. Tabula Muris FACS and 10x do not sample identical tissues or cell-type proportions. A per-gene offset therefore cannot tell "this gene reads higher in Smart-seq2 because it is long" apart from "this gene reads higher because that dataset has more of a cell type that expresses it." The planted-signal simulation below is designed to separate these two explanations.
Proposed Experiments
The decisive check is a simulation with known ground truth. Using Splatter simulations of the kind SAFAARI employs, we will generate two "protocols." One has counts multiplied by a nonlinear function of real mouse transcript lengths, plus length-dependent dropout. The other is length-flat. We will plant a biological program in a subset of long genes and make it partly confounded with protocol, by giving one cell type a higher abundance in the length-biased protocol.
We will score each method on two things: recovery of the planted program's cell-type differential expression after integration, and the leakage slope. The proposal succeeds only if the learned-curve model recovers the planted long-gene program better than DAVAE and the free-offset ablation at matched batch mixing. If it does not, the core claim is falsified.
On real data, the primary benchmark is Tabula Muris FACS (Smart-seq2) versus 10x, with tissues as separate tasks and one tissue held out for tuning. We will report ARI, 1−ARI for batch mixing, kBET, the leakage slope, and a long-gene preservation score. That score is the rank correlation of within-protocol cell-type differential expression for genes in the top length decile, computed before and after integration.
As a targeted biological check, we will track the large chromatin-regulator genes highlighted by Waks et al. and test whether adversarial integration flattens their cell-type specificity more than our model does. Because their result concerns mutations rather than expression, this check is exploratory and not confirmatory.
A secondary, cross-modality test uses DAVAE's PBMC scRNA-seq plus scATAC-seq pair. There, peak width plays the role of length on the accessibility side, and we ask whether the same decoder term transfers.
Finally, we will report how much adversarial weight each model needs to reach the target kBET. If our model reaches it with a smaller weight, that directly supports the claim that the discriminator in existing methods spends much of its effort undoing a measurement effect that a single smooth length curve could have explained.
References
- Efficient and scalable integration of single-cell data using domain-adversarial and variational approximation
- Single-Cell Data Integration and Cell Type Annotation through Contrastive Adversarial Open-set Domain Adaptation
- SVFX: a machine learning framework to quantify the pathogenicity of structural variants
- Learning biologically-interpretable latent representations for gene expression data
- Identifying potential risk genes for clear cell renal cell carcinoma with deep reinforcement learning
- Driver gene classification reveals a substantial overrepresentation of tumor suppressors among very large chromatin-regulating proteins
- Adversarial deconfounding autoencoder for learning robust gene expression embeddings
- pyComBat, a Python tool for batch effects correction in high-throughput molecular data using empirical Bayes methods