bioRxiv Science⌕ Search

bioRxiv · 10.1101/2024.06.20.599903

TarDis: Achieving Robust and Structured Disentanglement of Multiple Covariates

Abstract

Addressing challenges in domain invariance within single-cell genomics necessitates innovative strategies to manage the heterogeneity of multi-source datasets while maintaining the integrity of biological signals. We introduce TarDis, a novel deep generative model designed to disentangle intricate covariate structures across diverse biological datasets, distinguishing technical artifacts from true biological variations. By employing tailored covariate-specific loss components and a self-supervised approach, TarDis effectively generates multiple latent space representations that capture each continuous and categorical target covariate separately, along with unexplained variation. Our extensive evaluations demonstrate that TarDis outperforms existing methods in data integration, covariate disentanglement, and robust out-of-distribution predictions. The models capacity to produce interpretable and structured latent spaces, including its pioneering work in ordered latent representations for continuous covariates, markedly enhances its utility in hypothesis-driven research. Consequently, TarDis offers a promising analytical platform for advancing scientific discovery, providing insights into cellular dynamics, and enabling targeted therapeutic interventions. Progress and potentialModern single-cell genomics provides an unprecedented view into cellular heterogeneity, yet the very richness that propels new discoveries also complicates downstream analysis. Gene-expression patterns emerge from overlapping biological processes (e.g., differentiation programs, disease progression) and extrinsic factors (e.g., laboratory protocols, technical artifacts). Disentanglement, in this context, aims to parse these intertwined influences into interpretable latent representations, a crucial step for elucidating how complex covariates shape cellular states. While methods that correct for batch effects have become standard, these strategies often fall short in achieving the deeper objective of capturing subtle, high-dimensional biological dynamics. In single-cell experiments, cells navigate intricate developmental trajectories, respond nonlinearly to environmental or pharmaceutical perturbations, and exhibit myriad context-specific behaviors. Without disentanglement, these diverse signals frequently remain intermingled, limiting biological interpretability and hindering hypothesis-driven research. Disentangling biological covariates is particularly vital for addressing nuanced questions in single-cell research. For example, in a disease model involving multiple genetic variants and variable drug dosing, researchers may wish to examine the effect of each variant independently or investigate how dosage influences a specific mutant background. Similarly, in developmental biology, uncovering how cells evolve across a continuum of pseudotime (e.g., from pluripotent to fully differentiated states) is critical for identifying the genes that orchestrate fate decisions while isolating the influence of developmental time from tissue-specific contexts, along with other confounding factors such as culture conditions, sample preparation, or donor genetic characteristics. Alternatively, disentangling lineage commitment signals from spatial patterning cues enables the identification of master regulators driving fate decisions. Moreover, by explicitly isolating and representing each covariate as an independent latent dimension, one can systematically navigate and interrogate a rich multidimensional covariate space. This approach extends beyond merely observing biological states, it enables exploration of novel or unmeasured cellular conditions through latent-space manipulations. For instance, disentangled latent spaces could allow researchers to computationally predict cellular responses at drug dosages or developmental stages that were never experimentally observed, significantly broadening the scope and predictive power of experimental datasets. Such analyses yield testable hypotheses for unexplored biological phenomena and enable informed planning of subsequent experimental validations. The challenge of covariate disentanglement stems fundamentally from the complexity of modeling joint distributions of gene expression conditioned simultaneously on multiple covariates, both categorical (e.g., tissue type, disease condition) and continuous (e.g., pseudotime, dosage). This is inherently an underdetermined problem because single-cell measurements represent only sparse snapshots within a vast combinatorial space of covariate conditions. Conventional modeling approaches often conflate correlated covariates, collapsing biological variability into ambiguous latent factors, and typically fail to explicitly create separate latent representations for disentangled covariates. Moreover, continuous covariates introduce an additional layer of complexity; yet discretizing them artificially imposes arbitrary boundaries, obscuring subtle transitions and hindering accurate capture of biological gradients. Therefore, preserving the continuous nature of such covariates in disentangled representations is critical, as it maintains their intrinsic ordering and enables researchers to discern nuanced biological shifts--such as identifying thresholds in dose-response relationships or characterizing gradual developmental transitions--in a naturally interpretable manner. The key idea in this paper is to devise a tailored deep generative model for systematically separating both categorical and continuous covariates into independent latent dimensions, while still ensuring coherent integration of the underlying gene-expression data. By explicitly targeting these covariates and preserving continuous variables as smooth, ordered latent axes, our approach clarifies complex interactions and uncovers nuanced patterns that remain concealed under standard analyses. The resulting disentangled representations can then support robust out-of-distribution generalizations, refined differential analyses, and more principled hypotheses about how diverse factors interact to drive cellular variation.

Source connections

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Inecik, K., Kara, A., Rose, A., Haniffa, M., Theis, F. J.. 2024-06-25. TarDis: Achieving Robust and Structured Disentanglement of Multiple Covariates. https://doi.org/10.1101/2024.06.20.599903

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related preprints

CellChat Hotspot: A Targeted Approach to Cell Cell Communication Analysis With Spatial transcriptomics Validation.

Abstract. In recent years, single cell RNA sequencing (scRNA seq) has enabled the investigation of intercellular communication through Cell Cell Communication (CCC) tools such as CellChat. Despite their potential, these approaches remain challenging to interpret, particularly when global analyses generate complex interaction networks that may include biologically irrelevant signals. To address this limitation, we developed a framework termed CellChat Hotspot, designed to improve the biological interpretability of inferred communication networks. This approach integrates gene set enrichment analysis with a context driven filtering strategy, selecting both genes and cells based on their functional relevance prior to communication inference. Applied to stage II colon cancer data, CellChat Hotspot enabled the identification of condition-specific interaction patterns associated with recurrence. Non recurrent patients showed enrichment of immune related processes, whereas recurrent cases were characterized by pathways associated with invasion and metastasis. Notably, a loss of interaction in the HSPG pathway between CALB1+ and stromal cells was observed in recurrent patients, suggesting a potential disruption of cell matrix adhesion mechanisms. To verify the reliability of this finding, we applied the framework to spatial transcriptomics data, which confirmed the presence of the HSPG2 DAG1 interaction in non-recurrent tumors and its near absence in recurrent ones. Overall, this framework provides a biologically guided strategy for studying intercellular communication in complex systems such as the tumor microenvironment.

bioinformatics↗

SIFT: Syncmer-Informed Selection of Haplotypes for T2T Imputation

Genome patching improves the completeness of fragmented assemblies by filling unresolved gaps with sequences from reference genomes. Pangenome panels provide diverse candidate haplotypes for this task, but identifying suitable references efficiently becomes increasingly challenging as these panels grow. We present SIFT, a compressed indexing method for selecting reference haplotypes for genome patching with ImpuT2T. SIFT combines closed-syncmer parsing, phrase-level indexing, and pseudo-maximal exact match (pseudo-MEM) queries. Closed syncmers provide a context-independent parsing rule with bounded distances between consecutive selected positions, enabling consistent parsing of reference and query sequences. We demonstrate that two closed syncmers determine the distance at which they can occur consecutively in any string, so that equal substrings of two parses represent identical sequences and no gap sequence need be stored. SIFT indexes the reference parse and its reverse using run-length compressed suffix arrays and adapts the Boyer-Moore-Li search procedure to identify pseudo-MEMs between the reference parse and query parse. It then aggregates matching evidence to identify candidate reference haplotypes for downstream patching. This framework connects compressed sequence indexing with haplotype selection and provides a basis for querying large reference panels at the phrase level. SIFT is publicly available under the GNU license at https://github.com/EddieFerro/SIFT.

bioinformatics↗

Assessing the Capacity of Genomic Language Models to Generate Informative Embeddings of Viral Genome Fragments

Genomic language models (gLMs) trained on large volumes of nucleotide sequences are becoming an alternative to classical methods in metagenomic analysis, particularly for studying genomic "dark matter". In this work, we investigate the ability of four gLMs (DNABERT-2, DNABERT-S, ViraLM, and Evo2-7B) to generate taxonomically informative vector representations of short viral genome fragments. We constructed a balanced reference dataset of viruses based on the ICTV Virus Metadata Resource and compared the representations generated by gLMs with conventional k-mer profiles and MinHash sketches using clustering and neighborhood-based metrics (adjusted Rand index (ARI), precision@k, and CROSS precision@k). On the reference dataset, three of the four gLMs outperformed the 4-mer profile in terms of ARI and precision@5 under the same evaluation protocol. The best performance was generally achieved by intermediate model layers. Conventional k-mer profiles consistently outperformed MinHash sketches. We further evaluated the methods on two viral orders (egoviruses and mriyaviruses) absent from the reference dataset, with model layers and k-mer lengths selected exclusively on the reference dataset. DNABERT-S showed the most consistently strong performance across these two orders, ranking first on mriyaviruses and second on egoviruses, while k-mer profiles with Jensen-Shannon distance remained competitive. We also observed the consistency of representations between forward fragments and their reverse complements. Overall, the best-performing gLMs surpassed conventional baselines, although their advantage depended on the dataset and evaluation metric. The consistently strong performance of DNABERT-S suggests a potential benefit of contrastive fine-tuning and indicates that larger models are not necessarily more effective for generating taxonomically informative representations.

bioinformatics↗