CLASSIFYING A TISSUE SAMPLE ONE DNA FRAGMENT AT A TIME
Assigning a DNA fragment to its most likely cell of origin gets harder as the number of possible cell types grows. The solution turned out to be letting the model know when to remain unsure.
This is a rather long blog post, and depending on your background and reading goal, you might want to read it in full or focus on specific sections. With this in mind, we have split it into four parts.
Part IThe context. In this section, we briefly discuss the role of epigenetic factors in cell differentiation, the general motivation for determining the cell-type composition of a tissue sample, a specific application of this knowledge in cancer, and our vision for a perfect tumor ecosystem deconvolution method. If you are interested in data-driven soft labels only, with potential applications outside the deconvolution problem, you may skip this part.
Part IIThe problem. Why one pattern can belong to many labels, explained with a thought experiment about green pixels, and how the same problem appears when DNA reads are assigned to cell types.
The solution. Here, we explain our main methodological contributions: data-driven soft labels and a confidence-weighted loss, with interactive panels to explore both. We also explain the elements of Syto, our new framework for read-level cell-type deconvolution, and discuss each component: the classifier, deconvolver, and calibrator.
Part IVThe findings. This part focuses on the results. We close with limitations and next steps.
Part IThe context
What makes cells different?
The human body is a complex organism combining more than thirty trillion cells working in synergy to support a vast network of co-dependent processes. Different organs are composed of various tissues which, in turn, harbor different cell types. Some are highly specific, like cardiomyocytes found only in the heart or sex cells like sperm and egg; others are more diverse, like epithelial cells covering everything from skin to the internal surface of our organs. When your author was studying biology in school, about two hundred “normal” cell types were known. These days, the estimate is at least double this number and growing, as technology allows us to capture diverse functions of previously undifferentiated cells.
This has largely become possible thanks to molecular analyses and methods that apply them at single-cell resolution, measuring things like DNA composition (genomics), gene transcription (transcriptomics), protein production (proteomics), and traces of cellular processes (metabolomics) — collectively referred to as -omics. Cardiomyocytes and neurons, for example, produce different proteins and therefore transcribe different genes. These signals can be used to distinguish cell types. DNA, however, is largely the same in every cell of our body and contains the full set of instructions for every possible cell type. The question is: how does each cell know which genes to express?
How does DNA tell us which cell is which?
The full answer is complex, but DNA spatial organization and accessibility are perhaps among the most important factors. Accessibility determines whether transcription machinery can reach DNA and convert genes of interest into RNA, precursors of proteins. Spatial organization, in turn, can enhance or reduce transcription depending on the DNA’s three-dimensional configuration. These properties can be measured directly, for example with methods like ATAC-seq, but another question immediately arises: what drives DNA structure?
DNA accessibility and organization are largely regulated by two factors: DNA methylation and histone modifications. DNA methylation is the chemical addition of a methyl group to a cytosine that is followed by a guanine on the same strand (a CpG site). It is not a mutation because the nucleotide itself stays the same. If DNA were a text and each nucleotide a letter, DNA methylation would be an accent that does not change the letter but may affect the meaning of the larger message. Histones are protein complexes that compact DNA into chromatin — a mixture of DNA and proteins that forms chromosomes. Various histone modifications can promote chromatin compaction or opening, therefore reducing or facilitating transcription. Just as different cell types express different genes, their DNA methylation and histone modifications will also vary, with localized alterations directly attributable to changes in protein yield. In practice, it means that epigenetic factors can be used to discriminate between cell types. Perhaps even more importantly, changes in the epigenome may herald structural shifts in cell state and function well before those shifts result in altered RNA and protein production. At the same time, certain methylation signatures may remain well preserved even after cells undergo dramatic transformation, like in cancer cells that, despite a largely aberrant methylome, can be traced back to their normal cell of origin by focusing on a few stable inherited methylation domains. This is why DNA methylation and histone modification are specifically interesting targets for any type of analysis where time is an important factor, with strong applications in aging and disease.
Why do we care about cell-type composition?
One clinically relevant problem that relies on cell-type-specific signals is cell-type deconvolution: determining the proportions of contributing cell types in a given biological sample, whether it is a tissue slice from a solid biopsy or blood plasma. Solving this problem matters because accurate quantification of tissue composition is decision-level information for diagnosis, prognosis, and treatment selection. Healthy and malignant tissues differ drastically in cellular composition, but precise determination of cellular subtypes can further distinguish otherwise similar-looking diseases with widely different prognostic outcomes and optimal treatment options. This applies to various conditions, but even more so to cancers, where cancer cell clones and surrounding immune and stromal cells collectively form a tumor microenvironment (TME) that can be “hot” (infiltrated by immune cells and more responsive to treatment) or “cold” (inaccessible to immune cells and favorable to cancer growth)2 susceptible to treatment or inaccessible to immune infiltration and fertile for cancer proliferation. While constituent cell proportions inform diagnosis at a given time point, observing longitudinal changes in TME composition allows us to assess treatment efficacy and overall disease progression and can potentially be used for routine monitoring during recovery, provided that underlying technology is both available and accessible. Therefore, the results of tumor ecosystem deconvolution, which estimates the proportions of tumor clones together with the cells of the surrounding tumor microenvironment (TME), represent a valuable input for clinical analysis in addition to traditional methods like pathology.
Why not just measure every cell?
Worldwide, research labs increasingly rely on single-cell multi-omics methods to produce comprehensive TME profiles. This single-cell granularity means researchers can annotate each sampled cell individually and, more often than not, map it to a specific location in the tissue. Case by case, it contributes to the creation of single-cell atlases that will undoubtedly be extremely useful references for future methods development. But in 2026, as we write this, single-cell profiling is too cumbersome, slow, and costly to use in clinics en masse. Cheaper, faster, and easier-to-execute protocols are being put into practice, largely through collaboration between labs and clinics, but fully independent clinical pipelines are becoming increasingly possible. The technology is a major driver of this trend, with Oxford Nanopore sequencing setting a new bar for the speed and cost of genome profiling and improving potential accessibility and affordability for patients. In 2023, DNA methylation signals collected using ONT platforms were used for ultra-fast classification of central nervous system (CNS) tumors, with results available as fast as 80 minutes after sample collection.
From cancer classification to tissue composition
More recently, pan-cancer (capable of generalizing beyond a single cancer group) deep learning classifiers trained on multi-platform methylation data3,4,5 have emerged to broaden possible application contexts. Classification alone, however, does not allow examination of TME content, and even explainability tools that point to the specific CpGs influencing the decision do not give the decision-maker information they can quickly link to disease biology. A more relatable measure, with a broader set of estimation methods, is the proportion of cancer cells in a given sample, also called tumor purity and applicable to solid biopsies; or the proportion of the circulating tumor DNA in the cell-free DNA found in the bloodstream, also called tumor fraction. Existing case studies using methylomes for purity estimates are typically limited to specific cancer families, but we believe pan-cancer versions are undoubtedly in the making. At first glance, cancer classification combined with purity estimates sounds like a better package than classification alone — purity can be used to make inferences about disease progression or efficacy of treatment. Yet, as Haider et al.6 show (and we agree), purity estimates suffer from low concordance between methods and hide important heterogeneity in TME composition. Still, an accurate tumor purity estimate is useful for paremetrization and interpretation of genomic analysis6, but on its own it answers a narrow question. Tumor ecosystem deconvolution, by contrast, is a different story. Assuming the recovered profiles are correct, tumor purity is trivially derived, and cancer type can be predicted using the obtained proportions as features, providing an interpretability layer that pathologists can directly cross-link with H&E slides.
What would we want from a deconvolution method?
Above all, it must be accurate, but it must also be convenient, which means, among many other things, broad applicability. Those criteria are real; alas, knowing them is not the same as achieving them. So, we did what people in our tribe do regularly and with gusto — we assumed the qualities that are necessary for meeting those criteria, sorted them nicely and put them into a list.
VISIONFIVE QUALITIES FOR THE MASTER TUMOR ECOSYSTEM DECONVOLUTION METHOD
CriterionCommon today→Target
1GRANULARITYDifferentiation between similar normal cell types and various cancer clones requires support for hundreds of cell types
TWO (BINARY)tumor vs. everything else
Dozensof cell-type groups at various levels of granularity
Hundredsof granular cell types, including tumor clones
2PATTERN-SPECIFICITYWhile many cell lineages can be differentiated by comparing averaged signal, increased granularity requires better precision
AVERAGED SIGNALfor example, for DNA methylation, averaging is performed either for each CpG position (by pooling signal from all reads overlapping target location) or for each read (by pooling signal from all CpGs covered by read).
READ-LEVEL PATTERN-SPECIFICpatterns linked to cell identity
3READ-LENGTH AGNOSTICITYLong-read platforms hold promise for improved analysis of solid tissues; short reads remain relevant as reference data and for liquid biopsy
OPTIMIZED FOR SHORTlearns or constructs reference using short reads; does not encode longer pattern-level dependencies
OPTIMIZED FOR LONGutilizes long reads fully but may collapse in short-read setting
Short + longworks well with short reads when necessary; takes advantage of long reads when available
4GENOME-WIDE APPLICABILITYSimilar patterns conveying close meaning may occur in different parts of the genome. Disregarding reads that do not overlap the target reference is suboptimal and may even be prohibitive for reaching the necessary separation between similar cell types or clone groups
Curated regionsmethod only makes predictions for the reads overlapping a limited set of preselected informative regions
Entire genomeextrapolates beyond regions selected for training; differentiates between reads with high and low informational content
5MULTIMODALITYCrosstalk among cell-type informative signals is context-specific and can be redundant, complementary, or orthogonal. A single assay can be insufficient to disentangle groups of interest; using multiple assays is less practical. A good method adapts to both scenarios
In summary, a good tumor ecosystem deconvolution method is scalable to hundreds of cell types, pattern-specific, works on short- and long-read libraries, can be applied to entire genomes, and can use whatever cell-informative signal is available. No, “good” is not the right word; it would be perfect. No single method checks all the boxes, and no wonder—it is a tall order. Plenty of methods scale to a dozen cell types and could work with hundreds, assuming reliable reference. Still, they're all unimodal, use averaged signal instead of pattern-specific signal, and work within the curated set of regions or markers. Pattern-specific methods are scarce and, until recently, only three published methods existed; all relied on marker selection and applied only to short reads, primarily in the binary context (tumor purity estimation), though one demonstrated deconvolution to five cell types.1 Two use more than one modality (DNA sequence plus methylation). A recent preprint7 introduced another pattern-specific method that applies to long reads and, as a result, is not constrained by a predefined set of regions, yet collapses with short reads, uses only methylation, and is also binary.
In our paper, we mainly focus on a common limitation of previous pattern-specific methods: scalability across many cell types. We propose a solution that scales three previous methods from a binary to a multi-label setting. We also propose an implementation of the framework that can support further development into a method satisfying all desirable criteria stated above.
Part IIThe problem
One green strip
Imagine you are a tiny animal with sensory input limited to a strip of 8 × 1 pixels. Let’s say that you feed on green apples, breed in the green grass, and are afraid of green snakes for some instinctive reason. Everything else is inconsequential, so from your tiny animal perspective, telling apples, grass, and snakes apart is key to a happy life. One of these days you are out there, minding your business, when suddenly the next picture fills your view.
What do you make out of it?
What should you do? Freeze in fear, run ahead and fight for your love, or reach for cutlery (apparently, you have manners, too). Luckily, this is not your first day living, and you have seen this green strip before — on numerous occasions it was a perfectly juicy apple, and a couple of times you have had a good time in the grass. Was it ever a sign of a snake? You don't recall; probably not; definitely not a snake; must be an apple, then! Where is my fork? You reach for your cutlery and take a step forward, only to be eaten by a large green snake the next instant.
Reborn the next evening (yes, reincarnation is a thing where you live, and you conveniently retain all your memories), you ponder what happened. “Perhaps I was making my decisions too hastily, and I should tread more lightly the next time.” You realize your biggest mistake was basing your decision on a single, limited observation, so next time you see a green strip, you decide to watch it longer and look around for other cues. And unless you are very hungry, you stay hidden until you are absolutely sure what you see is one of three things: a snake, an apple, or a blade of grass. Then you label each new partial observation and update your view of the world accordingly. Of course, sooner or later you'll need to act before you can be certain; otherwise, someone else may beat you to dinner, but at least you will try to get a few observations and score them first before assessing your chances.
ONE WAY TO MAKE YOUR DECISIONS BASED ON PARTIAL EVIDENCE
1WATCH AND LEARN
You wait until you are sure what you are looking at, then attribute each strip to the observed category
🐍Snake
🍏Apple
🌿Grass
2Keep score
As you gain more experience, you count your evidence and associate each unique strip with a single most frequent category
🍏🍏🍏🐍🐍🌿Best 🍏
🐍Best 🐍
🍏Best 🍏
3DECIDE QUICKLY!
Something new appears and you are hungry - no time to wait until you would have known for sure. You give each strip its best prediction and guess based on majority vote.
🍏🐍🍏🐍🍏🐍🍏
?
🍏 4🐍 3🌿 0Every plain green strip counts fully for apple, although you have also seen it on snakes and in grass. You will guess it to be an apple.
So, you adopt this new system, and after three complete observations, you decide it is time to put it to practice. You look seven times; four out of seven are most likely an apple, and the remaining three point to a snake. Risky, but you are so hungry! You must advance! “Thanks-s-s-ssss,” you could have heard if you had ears. Alas, you are wrong this time, again. It was a snake all right.
LEARNING "HARD" FROM CONTRADICTIONS IS HARD INDEED
The strategy the tiny animal adopted in our whimsical example is not computationally equivalent, but close in spirit, to what would happen if each partial observation were labeled by source and a neural classifier were trained using stochastic gradient descent and mini-batches.
Think about how the algorithm acquires knowledge. It adjusts its associations according to the evidence it sees in each batch. For example, if in the first mini-batch every green strip is assigned to a snake, then the algorithm is satisfied: there is no doubt that the strip belongs to a snake. But in the second mini-batch there are examples in which the same green strip is shown half in snakes and half in apples, leading to confusion: the loss goes up and the gradient changes direction.
Apply this reasoning throughout the entire training process. Features which occur repeatedly and almost solely in one category are more easily assigned to the right class, so the algorithm is more likely to establish the associated link. On the other hand, features that are equally likely to occur in several categories give conflicting evidence. The gradients for these features can cause the model to move in different directions from one mini-batch to the next and may therefore lead to unstable learning or inadequate convergence when using suboptimal training parameters. The imbalance among the classes can also bias the representation learned from the data.
The more different things a feature can properly be assigned to, the more difficult it becomes for the learner to link it with the right source, and therefore its final solution—if it ever converges—may remain a long way from the true answer. This is the thing with phenomena where true mapping between features and targets is not many-to-one but many-to-many. In the many-to-one case, crisp labels are expected: if you give a computer vision learner a picture of a creature that is undoubtedly a kitten, then classifying it accordingly is not wrong. As for the tiny creature problem, confidently labeling each piece of partial evidence is harmful. Instead, we can provide an algorithm with a "soft" target, effectively shifting from classification problem to a kind of label distribution learning. The panel below gives a simplified example.
ONE PREVIOUS WAY AND ONE OTHER WAY FOR A CREATURE TO MAKE DECISIONS
"HARD" LOGICDecision is made as before by considering crisp labels
🍏
🐍
🍏
🐍
🍏
🐍
🍏
🍏 4🐍 3🌿 0"What I see is most likely an apple -- time to eat!"
"SOFT" APPROACHThe evidence takes into account nuances and contradictions
🍏 3 · 🐍 2 · 🌿 1
🐍 only
🍏 3 · 🐍 2 · 🌿 1
🐍 only
🍏 3 · 🐍 2 · 🌿 1
🐍 only
🍏 3 · 🐍 2 · 🌿 1
🐍 62%🍏 29%🌿
"What I see is most likely a snake -- better hide somewhere safe"
FROM GREEN STRIPS TO GENOMIC READS
As in our green strip example, genomic reads are partial elements of a single observation formed by applying a sequencing technique to a target biological sample. The collection of reads from one experiment is called a read library. In such libraries, each read can be attributed to a single cell type if we apply bulk sequencing to a purified sample with a known target, or if we use single-cell or single-nucleus sequencing, where each read can be traced to a specific cell. In our chosen task, cell-type deconvolution, unlike the green strip example, we do not try to predict the probability that a whole library of reads belongs to a single category. Yet, a deconvolution approach that relies on information from individual reads similarly requires a computational component that scores them — a read classifier. The probability of a cell type given a read is a common choice of scale, and if one decides to train such a classifier, they need to join many such libraries to facilitate learning. As the number of possible cell types grows, complications from unstable learning and class imbalance accumulate.
Previously, when discussing a toy example with a green strip, we exaggerated the potential detrimental effects of hard labels: with three possible classes, an algorithm is more likely to converge to a softer solution than the one shown, because its loss surface is relatively simple.
Yet in our case, we have two serious difficulties:
We need to scale from binary to dozens, then to hundreds of classes.
In any given region, all but a few patterns (typically one) are ambiguous across cell types. As we add classes, the share of informative reads, and with it the average information per read, keeps falling.
To understand why it happens, we need to examine the nuances of DNA methylation distribution across the human genome and how one selects data for training. If we sequence the entire human genome and look at the resulting CpG methylation, represented by roughly thirty million CpGs, the absolute majority of them will show the same methylation level regardless of the cell type. For example, transposable elements, highly methylated domains, and CpG islands that cover up to 80% of all CpGs are non-discriminatory (either methylated or unmethylated everywhere), and even segments with variable methylation may fluctuate for reasons unrelated to cell type. In practice, this means that if we pick a relatively short DNA fragment at random and try to assign it to a distinct cell type based on its methylome, we will fail most of the time. This is especially true for short reads (see Part I): the longer the read, the higher the chance it will cross a specific region, and vice versa. Cell-type-specific regions are a kind of differentially methylated region (DMR). DMRs are computed from annotated data and can be used to differentiate one cell type vs. all, one cell-type group vs. another cell-type group, and one cell type vs. another cell type. Most of the cell-type-specific DMRs are hypomethylated - that is, the overall methylation level of CpGs in the target cell types is close to zero. Finally, some regions remain discriminatory for cell type and cell state, especially in disease. Still, these are not as widely used, were not our focus in this paper, and we mention them here only because we believe nuanced region analysis will be essential for our future work.
The methylomes of healthy differentiated cells are indistinguishable across most of the genome
≈ 77%Same in every cell type≈ 23%Varies across observations
Within cell typesBetween cell types
Transposable elementsAbout 50% of DNA. Methylated in most cells to prevent their moving across genomeHighly methylated domainsGene bodies and intergenic DNA, kept methylated by transcription-linked marksCpG islandsUnmethylated in most cell typesPartially methylated domainsSlight, disordered loss that deepens with cell divisionGroup DMRUnmethylated in related cell typesCell-type DMRUnmethylated in one cell typeNuanced regionSame average; reads differ by pattern
HepatocyteEroded
T cellAllele-specific
B cellEroded
NeuronAllele-specific
One readMethylated CpGUnmethylated CpGIllustrative reads, not atlas data.
Adapted from Gu et al., G3 2016, doi:10.1534/g3.115.025437.8 and Smith, Hetzel & Meissner, Nat Rev Genet 2025, doi:10.1038/s41576-024-00760-8.9
To learn strong associations between cell type and the methylome, a classifier must be trained on a sufficient number of informative reads. For short-read libraries, it is common to focus only on DMRs and filter out everything else. This is equivalent to considering each read that does not overlap with a DMR as uninformative or equally probable across target modeled cell types. What remains has a better signal-to-noise ratio. The experiments we feature in our paper use this common approach as well. When applied to a binary setting, as in previously published pattern-specific methods, this results in a clear dichotomy — every read that is not representative of one cell type or group is automatically representative of another. With three cell types, it already breaks. Computationally, you might have a situation where reads from a first cell type are fully unmethylated, reads from a second cell type are fully methylated, and reads from a third cell type have an average methylation level of exactly fifty percent. In practice, you are much more likely to land on a situation where, in a given region, the reads from one cell type are hypomethylated while reads from the other two cell types are hypermethylated and indistinguishable. In the binary case, knowing the methylation pattern fully resolves cell types in an ideal scenario; with three cell types, it only does so 33% of the time (assuming full class balance). Extrapolate further, and you’ll appreciate the increased complexity of scaling to many cell types.
SCALING FROM BINARY TO MULTI-CLASS SETTING REDUCES THE RELATIVE NUMBER OF INFORMATIVE READSEach row is a cell type and each column a marker region (cell-type specific DMR). This example uses region-selection that focuses on hypomethylated DMRs, as in the data we used for modeling in the paper.
NUMBER OF CELL TYPES TO MODEL
Marker regions, grouped by the cell type they identify →
Unmethylated Methylated
{{ atlasTextB }}
Binary case is illustrative. Case with 39 cell types is a simplified version of Fig.3a from Loyfer et al.10, Nature 2023, doi:10.1038/s41586-022-05580-6.
If you keep original labels for each read and try to apply "hard logic" as in our green strip example above, the learning objective will be so ambiguous that your classifier will take a “shortcut” and quickly converge to predicting a uniform vector regardless of the pattern. In their work, Jeong et al.11 used a trick to reshape the learning objective from directly predicting the class of a read to first predicting whether a read is cell-type specific for its region and then resolving the cell type from region targets (because each region in their reference was strictly specific to a single cell type). The corresponding paper features an example with five cell types. We originally overlooked it, and when we later applied it to our setting with 39 cell types, the model converged. However, the final deconvolution results using the classifier predictions were still considerably worse than one of the baselines we had compared at the time. Also, this approach wouldn’t work for regions that aren't one-vs-all, and we wanted a method that would be region-agnostic once we switch to long reads, for which providing explicit DMR context might not be necessary. As such, before our work, scaling pattern-specific, read-level classification-based cell type deconvolution to many cell types remained an unsolved problem.
Part IIITHE SOLUTION
ONE WAY TO SCALE HARD LABELS
Before presenting the main contribution of our paper, we should mention another solution we came up with, which extends the method of Jeong et al. mentioned earlier. The method is simple: when we take a read, we keep its label corresponding to the biological sample only if it falls within the genomic region specific to the cell type the sample covers. We assign the remaining reads a new, separate label.2 This way, we avoid the impossible task of differentiating within uninformative reads while keeping the original labels for informative reads, allowing the model to output target class probabilities directly. In retrospect, we found it conceptually similar to foreground-background separation in object detection, where the learning task is steered toward differentiating among a finite set of target objects or object types, with everything else falling into the background. Hence, we call the added label “a background class” and the method's output: hard labels with background.
Indeed, when we trained two candidate classifiers on the original labels, both oscillated around high initialization losses and never converged. Adding a background class reliably fixed the problem for one classifier, Dismir. For MethylBERT, we needed to pair it with either changes to the target loss function (applying focal loss)12 or a minibatch-balanced sampling technique to guarantee convergence. The latter proved more efficient, so we adopted it for the entire study.
VALIDATION LOSS DYNAMICS FOR METHYLBERT TRAINING ON A DATASET WITH 39 CELL TYPES: ORIGINAL HARD LABELS VS HARD LABELS WITH BACKGROUND
Hard labels without backgroundHard labels with background (minibatch balancing)Hard labels with background (focal loss)
So, in hard labels with background, we found a working solution; why not stop there? Our intuition was that clumping all reads into one background class is a crude compression step, because it buries useful variance within a single, undifferentiated group. The thing is that the regions vary in their degree of specificity — even with the simplest region selection scheme that favors black-and-white separation between a target cell type and everything else, there are more and less separable cases. One way to measure this is a proxy gap specificity score. Suppose we work with a reference set of regions, each hypomethylated in a target cell type. Then, for each such region, we calculate the fraction of hypomethylated reads in target samples and subtract the maximal fraction of hypomethylated reads across all remaining cell types in the reference. A perfect separation yields a score of exactly 1, meaning an unmethylated read in a given region is observed in only one target cell type in the data. However, this is not the case in the real reference. Take a single region that is supposedly characteristic of adipocytes; not only will you find that the fraction of unmethylated reads found in adipocyte samples is 73%, but also that endothelial cells, erythrocyte progenitors, and oligodendrocytes are unmethylated in the same genomic regions in 23–27% of cases. You take another adipocyte region; this time, the fraction of unmethylated reads in adipocyte samples is 100%, great! Alas, the second-largest fraction comes from heart fibroblasts, at 60%.
PROXY GAP SPECIFICITY SCORES IN THE ORIGINAL ATLAS EMPLOYED FOR MODELING Each row is a cell type; each box summarizes its marker regions (median, interquartile range, whiskers and outliers).
One may object that we measure specificity by considering a limited set of patterns reflected in the score. When we look only at unmethylated reads based on criteria like an average read methylation threshold, we may not recover the full separation potential. But even at the pattern level, perfect separation is not achievable, and as we move to more granular reference levels, patterns tend to overlap more and more. In contrast to object detection, where background is noise we want to get rid of, here background contains additional mutual information. This is exactly the many-to-many case, and it raises the question: how do we encode every possibility a single feature may be evidence of?
Data-Driven Soft Labels
The idea of reshaping a learning objective by changing the target from a single label to a representative vector is not novel and falls under its own machine learning task—label distribution learning. Xin Geng coined the term in 2016 in his seminal work with the same title13, along with three main principles differentiating it from classification: 1) the label distribution is a natural part of the original data; 2) the overall label distribution is a goal of learning; 3) the performance should be measured by similarity or distance between the learned distribution and the target.
The first principle can be fulfilled in many ways, which fall into two categories: either explicitly provided with data, typically by aggregating human annotations, like the distribution of discrete movie scores on IMDb; or computed in a domain-specific or more general way. One example of domain-specific computation would be deriving gene expression for genes associated with various diseases, where, for each gene, its expression vector is computed for each target disease and transformed into a target label distribution via normalization. An example of a general algorithm is Graph Laplacian Label Enhancement by Ning Xu14, which recovers the label distribution by leveraging hard-labeled data and exploiting associations between different labels by analyzing the feature space. Our proposed method falls into the group of general methods, as it applies to any many-to-many mapping between feature vectors and label distributions where each feature vector is already paired with a single label.
The method is simple and intuitive. Indeed, when working with sequencing libraries where each read can be directly attributed to its cell of origin, one may compute data-driven soft labels trivially.
VISUAL EXAMPLE OF COMPUTING DATA-DRIVEN SOFT LABELSThe example considers two patterns represented by the same set of CpG locations in the same genomic region which is primarily hypomethylated for cell type C.
Cell type ACell type BCell type C
Coverage, all regionsMillion reads; median 2.0 M2.0 M2.3 M0.48 M
Pattern 1mostly unmethylated
1ORIGINAL COVERAGEReads with this pattern in this region, pooled across reference samples31013
3Soft labelAdjusted counts rescaled to sum to 10.510.450.04
A 0.51B 0.45
Cell type C has a quarter of the median coverage, so each of its reads is scaled up about four times. Without this step, deeply sequenced cell types or cell types that have more samples in the reference would dominate every label.
Vanilla data-driven soft labels are not without limitations. One immediate problem is patterns with low overall coverage—if a pattern appears only a few times in the data, its counts lack statistical power, and the derived soft label will be noisy and not representative of the true label distribution. Low coverage can be a property of the data, but it can be exacerbated further by changes in how we define the pattern. For our experiments, we represent each read at labeling as a sequence of binary CpG calls, but one may switch to continuous methylation confidence scores when working with ONT or PacBio data, which makes every read unique under the vanilla scheme. The probability of obtaining unique reads also increases when increasing read length.
To account for low coverage in existing data and potential causes of low coverage in the future, we extended data-driven soft labels with a pooling mechanism. The idea of pooling is simple — for each case where the count of a particular observed feature pattern is low, the coverage may be increased by adding counts from similar feature patterns. In our paper, we propose a specific implementation of this pooling idea, using Jaccard distance to measure similarity between the target and pooling-candidate methylation patterns. For our method, one defines a minimum count threshold below which pooling applies and a maximum Jaccard distance beyond which a pair is no longer considered similar. The method adds counts from the closest pooling candidate to the furthest until it either reaches the count threshold or runs out of candidates.
AN EXAMPLE OF POOLING MECHANISM APPLICATIONLet's assume four unique patterns over the same seven CpGs in one region, with three possible cell types. Next, we set a minimal count threshold to 10 and a maximum Jaccard distance to 0.41. Based on the threshold, patterns 1 and 2 have enough reads and patterns 3 and 4 need pooling.
Jaccard distance between patternsEach pattern is treated as a set of (CpG, state) pairs. Distance = 1 − number of shared CpG marks / total number of unique CpG marksOne differing CpG: 1 − 6/8 = 0.25. Two differing CpGs: 1 − 5/9 = 0.44. Only pairs at 0.41 or less (shaded) may pool, so pattern 1 can draw on 2, pattern 2 on 1 and 3, pattern 3 on 2, and pattern 4 on none.
=Pooled counts16 reaches the threshold of 10; stop16916
Soft label without pooling
B 0.75C 0.25
Soft label with pooling
B 0.38C 0.56
Four reads alone suggested cell type B at 0.75. With its close neighbor’s reads added, the label spreads across B and C.
Pattern 4
ABCΣ
1Own readsDistance 0.005106
2Next candidate: pattern 3Distance 0.83, above 0.41out of range; stop
Soft label without pooling
A 0.83B 0.17
No pattern lies within range, so pattern 4 keeps its own six reads and stays below the threshold.
Methylated CpGUnmethylated CpGIllustrative numbers. Coverage adjustment is left out for clarity; in practice it is applied to the pooled counts.
By construction, data-driven soft labels capture the available information in every read, but it can't make truly uninformative reads more surprising. Reads that fall into the background will have near-uniform soft labels, with entropy close to the maximum. And with many classes, it reintroduces the class imbalance problem, this time with high-entropy reads dominating mini-batch data observed at training time. Left unattended, the model will struggle to converge without taking a shortcut and predicting uniform labels to satisfy most of the data. One approach that came to mind was to solve for a feasible learning-hyperparameter range, but we dismissed it as too constrained and inefficient. Instead, we decided to weight our evidence by how confidently we can attribute an instance to a single label. The rationale was that instances strongly associated with a single class are a target signal that should be preserved. In contrast, instances with near-uniform label distribution are non-informative and represent true background that can be disregarded. Anything in between is down-weighted in proportion to how far its highest label probability falls below 1. Based on this logic, we introduced a confidence-weighted cross-entropy loss, which we used for training. In retrospect, we found it to be conceptually inverse to the one designed by Jing Wang and Xin Geng15, where they upweight examples with higher entropy.
Confidence-weighted cross-entropy
For a read ri with soft label ti over C cell types and predicted probabilities ui, the standard cross-entropy is scaled by how far the label's peak rises above uniform:
Interactive illustration of loss computation for an example with 10 labels.
{{ bar.readout }}
{{ bar.abbr }}
Top cell type{{ maxPct }}{{ maxIdxLabel }}
Label entropy{{ entropyLabel }}bits, of {{ entropyMax }} max
Confidence weight{{ weightLabel }}{{ maxVal }} − 0.101 − 0.10{{ weightReadout }}% of full loss
{{ verdict }}
SYTO - A MODULAR READ-LEVEL DECONVOLUTION FRAMEWORK
Soft labels let the classifier learn more nuanced label distributions for individual reads, preserving more per-read information. The deconvolution step is applied to the classifier output. Previous methods implemented the deconvolution step using variants of Maximum Likelihood Estimation. We do not find this approach generally correct because classifier confidence scores are not guaranteed to be well-calibrated measures of true probabilities, especially for neural networks. We also believe the family of possible deconvolvers could be extended with unsupervised and supervised methods alike, since the true mapping between classifier outputs and cell-type proportions may be nonlinear. Finally, one can further calibrate the deconvolution results on unseen data to correct learned biases. We combined these three stages—classification, deconvolution, and calibration — into a unified modular framework, Syto, named for the Ukrainian word for a sieve.
The scheme below shows how reads pass through Syto end to end, at training and at inference; the following subsections discuss each element in turn.
SYTO ARCHITECTURE, TRAINING AND INFERENCEThe framework at inference (top) and training (bottom). Each of the three stages is trained separately and can be replaced independently.
Extended read-level classifiers
The first stage of Syto is to apply a read-level classifier to assign cell-type probabilities to each read. In our paper, we included three existing classifiers, supplemented with extensions to support multi-label fitting, plus a new, deliberately simple classifier that memorizes each unique methylation pattern and its label from the data and predicts new reads by resolving the label from the resulting lookup table. Among previously published classifiers included in Syto source code are our implementation of CancerDetector16, as well as our extensions of Dismir17 and MethylBERT11. Syto is not limited to these options; you can plug in any other classifier that produces a score vector that sums to one and matches the required shape. It does not enforce labeling schemes, and the classifier can be non-pattern-specific; for example, CancerDetector models cell-type probabilities given reads using beta-binomial distributions over average read methylation levels.
PREDICTIONS GENERATED BY PATTERN-SPECIFIC CLASSIFIERS FEATURED IN THE PAPER
The panel below features real data from six regions, each specific to its own cell type. For every depicted methylation signature, a filled square is a methylated CpG, an open square is an unmethylated one, and a dashed outline is a CpG the read did not cover. The number to the right of each signature shows the total count of reads in the held-out test data. In this specific reference, the cell-type specific reads are primarily unmethylated, which is why mostly methylated, off-target reads are far more common. The regions are not cherry-picked; for some of them, the classifiers fail to learn reliably regardless of the chosen labeling scheme (see Ovary-Ep and Oligodend for example)
methylatedunmethylatednot coveredright-hand number: test reads. Rows run from the most cell-type-specific pattern down to the most shared.
Soft label for this pattern
{{ softPct }}{{ softName }}
{{ patReads }} test reads · {{ patTrain }} training reads · {{ pooledNote }}
Trained on hard labels
{{ row.label }}{{ row.name }} · {{ row.pct }}
Trained on soft labels, pooled
{{ row.label }}{{ row.name }} · {{ row.pct }}
{{ verdictLine }}
{{ regionCt }}another cell typebackground class
PASSING CLASSIFIER SCORES TO DECONVOLVER
As you might recall, each read in the library is partial evidence and a very weak predictor of the constituent cell types. Only when you account for information from many reads can you apply a deconvolution step. One thing to decide is how to pass the predictions to the deconvolver. One way is to propagate scores as-is, but that means each read must be custom-weighted, which quickly becomes computationally prohibitive. A sensible approach is to aggregate information from multiple reads, for example, by taking a simple average. This is similar in spirit to average pooling common in convolutional neural networks. In our case, a weighted average scheme is more appropriate, where the weight is proportional to the number of CpGs each read covers — this way, the read that overlaps eight CpGs contributes twice as much as the read that overlaps only four. In principle, one can aggregate the predictions from the entire library, resulting in a single vector covering all possible classes. This, however, will flatten the signal because most reads are uninformative. Grouping by cell-type-specific regions, or by regions with similar feature-target associations, yields a much better signal-to-noise ratio within each group. The resulting G × C matrix is a first step in compressing classifier output before deconvolution.
Three ways to pass read predictions to the deconvolverAs can be seen from this toy example, averaging per region group strikes the balance between compression and preserved information.
(1)Pass every read
GrpCpGsABCDEG1.78.05.05.07.05G1.30.17.16.22.15G2.24.18.17.24.17G2.14.52.10.14.10G3.23.17.19.24.17G3.15.08.50.17.10G4.25.15.15.30.15G4.07.05.06.76.06G5.22.18.17.24.19G5.14.09.09.15.53⋮ and so on, for every read in the sample
Deconvolver inputN × CGrows with sequencing depth, and every read needs its own weight downstream.
(2)Average the library
All reads averaged together, each weighted by the number of CpGs it covers.p̄ = Σr wr pr / Σr wr
ABCDE.25.16.16.26.17
The average is getting much closer to uniform. It remains somewhat discriminative in this example, but as the number of reads and possible classes grows, it will become increasingly uniform.
Deconvolver input1 × CCompact, but uninformative reads flatten the signal for every cell type.
(3)Average per region group
The same weighted average, taken separately within each group of cell-type-specific regions.
Each group's informative reads stay visible on the diagonal.
Deconvolver inputG × CFixed size regardless of depth, and the cell-type signal survives.
When looking at the resulting G × C matrices, we observed differences between labeling schemes. Hard labeling with background produces matrices in which only the diagonal and background-class columns carry strong signal, with off-diagonal entries very close to zero. This is expected by design, as information about the label distribution of cell-type subsets that are not specific to the region from which the read is drawn is clumped into the background class. The data-driven soft labeling scheme produces a different pattern—the diagonal signal remains very strong but is attenuated in proportion to cell-type specificity based on the reference regions. Furthermore, the off-diagonal elements of the matrix also emit signal, encoding real crosstalk between cell types in the data.
Aggregated prediction matrices, hard against soft labelsThe example demonstrates resulting feature matrices for the MethylBERT classifier trained with two different labeling schemes. Each matrix comes from an in-silico pure mixture made of reads of one cell type. Rows are DMR cell-type groups, columns are predicted cell types, and the row and column of the target cell type are outlined.
Hard labels + background
0{{ s5HMax }}
Soft labels with pooling
0{{ s5SMax }}
Difference hard − soft
−{{ s5DMax }}+{{ s5DMax }}
soft higherhard higher
{{ s5Note }}
As our analysis shows, the information distribution within aggregated feature matrices depends on the choice of labeling scheme. Even with soft labels, the features can be further filtered without losing discriminatory power. In references where most cell types are well separated within their regions, crosstalk is minimal, so only a few off-diagonal elements remain informative after aggregation. In our experiment, using only the 156 most relevant of the 39 × 39 = 1,521 matrix values achieves 99.95% of the performance compared to using the full feature matrix.
Pseudobulk generation
A deconvolver learns a mapping between an aggregated prediction matrix and the corresponding cell-type proportions, so it needs many matrices with known true proportions. Generating enough real mixtures with known ground truth is an undertaking no small lab can afford, and public sources offer no alternatives either. Pseudobulks—synthetically generated mixtures based on known purified references—are a common solution to this problem. Syto features pseudobulk generation logic that generates corresponding aggregated feature matrices from the classified libraries.
GENERAL SCHEME FOR GENERATING A SINGLE PSEUDOBULKThis example features a toy reference with five cell types (A–E) and five region groups (G1–G5)
01DRAW TARGET PROPORTIONS
Pick which cell types to mix. Their proportions are drawn from a target distribution and normalized to sum to 1.
Example recipe · 3 of 5 cell types
B.47D.32E.21
A and C are not in this mixture.
02Turn proportions into read counts
Multiply each proportion by the pseudobulk size N and round down. Let's assume N = 475,000 reads.
Typeπn = ⌊N · π⌋π̂ = n / N′B0.47223,2500.4700D0.32152,0000.3200E0.2199,7500.2100Total N′475,000
The effective proportions π̂ become the training target.
03Draw reads from the reference
Each cell type's reads are spread across the G region groups at random, about n / G per group, and drawn with replacement from the reference reads of that cell type in that group.
REPEAT WITH NEW TARGET PROPORTIONSK pseudobulks each for training, validation and test. Each split draws only from its own reference reads.
Deconvolution
As described earlier, the deconvolution step is just a mapping between aggregated classifier predictions and the corresponding cell type proportions. This means that one may largely adapt many existing methods that work with beta or alpha values. For example, in our paper, we include the Non-Negative Least Squares (NNLS) constrained linear regression, a backbone of many published deconvolution algorithms. We also feature another unsupervised variant, Probability Simplex Least Squares (PSLS), which enforces outputs to sum to one. We could not include them all in the paper, but adding them is straightforward.
To assess the feasibility of learning a transfer function, we also feature three supervised methods: Extreme Gradient Boosting Decision Trees (XGB) and two small neural classifiers with slightly different architectures (SWN and MLP).
FEATURES CAN BE MAPPED TO PROPORTIONS IN UNSUPERVISED AND SUPERVISED WAYThe toy example represents a single sample processed by a classifier that predicts five cell types across five genomic regions. The predictions are already aggregated and only nine out of twenty-five features remain after filtering.
G × C matrix · sampleABCDEG1.20.20G2.14.43G3.20G4.16.36G5.17.30
We first record feature matrices generated by running classifiers on the pure mixtures for each unique cell type -- this becomes our reference. In least-squares methods, the target sample is represented as a linear combination of pure feature matrices with unknown proportions. Solving for the weights results in the cell-type proportions. This group of methods does not require prior training. In Syto, we only implemented NNLS and PSLS methods, both solving a constrained least-squares problem, but other families of methods, such as EM-based methods, also fall into the same category.
Sample
=
0.47Pure B
+
0.32Pure D
+
0.21Pure E
+
0Pure A
+
0Pure C
π = argminπ ‖Rπ − x‖²π ≥ 0 for NNLS; also Σπ = 1 for PSLS
Supervised methods
IMPLEMENTED IN SYTO: XGB, SWN, MLP
The mapping from features to proportions is learned from the K pseudobulks, each a pair of features xk and effective proportions π̂k. The models are fitted on simulated mixtures. With suitable inductive bias, the resulting mapping function can be non-linear and include specific bias that depends on the simulation process itself. Depending on how well the simulation represents underlying biological reality, the bias may help or harm model performance.
Features xkTarget π̂k.20.43.20.36.30.20.14.16.17→0.470.32.21.50.20.40.20.20.13.20.20.20→.600.4000.20.20.20.63.28.20.20.09.18→000.85.15⋮ K training pairs
π = fθ(x)at inference, a single forward pass
CALIBRATION
We originally considered the calibration problem in relation to classification outputs, motivated by evidence in the paper “On Calibration of Modern Neural Networks” by Chuan Guo et al.18 and subsequent research. Our idea was to align predicted and ground-truth label distributions more closely, such that the obtained scores are better representative of the true probabilities. This would have let us use maximum likelihood estimation as the deconvolution step. Later, we shifted to applying calibration as a post-deconvolution step, based on the observation that our methods and baselines we have compared to all share a linearly correctable bias in their deconvolution results. We believe this bias arises from the reference all methods share; therefore, calibration in Syto is designed to correct it. In our paper, we implemented three hyperparameter-free calibration schemes that can be applied in standalone mode. We did not have time to return to the original idea: calibrating classifier outputs and measuring its influence on the end-to-end results remains an open problem.
Linear calibration of predicted proportionsUncalibrated and calibrated proportions (linear calibrator with simplex projection)19 predicted by one of the Syto variants on the validation and test sets, for the two cell types with the worst calibration. The calibrator learns correction on the training and validation sets and applies it to the test set.
Validation set · uncalibrated
Validation set · linear calibration
Test set · uncalibrated
Test set · linear calibration
Part IVTHE FINDINGS
EXPERIMENTAL RESULTS
We ran two experiments. Both used the Loyfer et al. atlas for training, as briefly mentioned earlier in this blog post. To date, it remains the largest publicly available methylation atlas by the number of unique donors (137) and cell types (39). Since our goal at the time was to scale to the largest viable set of possible labels, this was our choice. The term “atlas” may sound foreign to someone outside the field. Put simply, an atlas here is an annotated dataset that includes raw or aggregated data and metadata, plus processed data sufficient to characterize distinctive methylome patterns in the featured cell types. In this atlas, we had access to summary read statistics that could be used to recover original methylomes exactly, along with a set of informative markers—DMRs—shipped with the publication. The terminology can be confusing: these marker sets are also often referred to as the atlas (in the paper, we use atlas in both senses, depending on context).
A word on our baselines, the existing deconvolution methods we set out to outperform. Syto effectively subsumed all previous pattern-specific methods designed to work on short reads: extended versions of CancerDetector, Dismir, and MethylBERT became choices in our framework. So there was no point comparing, for example, with previous versions of CancerDetector and Dismir that were not designed to run in the non-binary case (as for the original MethylBERT, as we mentioned before, its labeling scheme and deconvolver lagged behind the baselines we eventually chose, so we never included it in the main paper text, but there is an extensive comparison in supplementary B.7, if you want to check it out). Therefore, we selected baselines from non-pattern-specific methods. We compared Syto against four established reference-based deconvolution methods: UXM10, CelFiE20, Houseman CP21, and EpiDISH22, all of which have demonstrated strong performance in previous benchmarks23,24,25.
The first experiment examined in-sample performance by splitting the atlas into training and held-out test samples from non-overlapping donors. We carried these sets end-to-end, from classification to calibration, to avoid information leakage. Following the framework, we trained various classifiers, then generated pseudobulks by mixing with random target proportions, different for each set. We fitted deconvolvers on those pseudobulks and calibrators on the deconvolvers' output. We tested 360 Syto combinationsin total, plus 4 external baselines. Additionally, we applied various calibration schemes to baselines to see whether calibration can be used outside Syto to improve existing model results.
In this first experiment, the best Syto configuration reduces mean squared error on the predicted proportions from 3.28 to 0.88 (×10⁻⁴) against the strongest baseline — a 3.7-fold reduction — and reaches an R² of 98.9%.
PSEUDOBULK TEST ERRORMean squared error on predicted cell-type proportions, ×10⁻⁴. Lower is better.
EpiDISH RPC8.79
Houseman CP7.52
UXM4.27
CelFiE (best baseline)3.28
Syto (best setting)0.88
Pseudobulks are a common way to test models, but they are a bit like giving students practice questions from the textbook written by the tutor who also wrote the exam. Even separating different donors between splits cannot guarantee generalization beyond this dataset. The ideal test would be to deconvolve samples with known, reliable ground truth; alas, we could neither generate nor find such data at the time.
We ended up using a different methylation atlas as held-out test set, made with another sequencing method, that included 16 types of human tissue from 260 samples26. We didn't have ground truth for these tissues, but we could use another external reference built with single-cell data27 to define a set of constituent cell types for each target tissue, still without actual target proportions. That gave us an opportunity to compute a surrogate performance measure—the sum of predicted cell-type proportions from the target set. In a perfect algorithm, it would have been 100%, and in a perfectly wrong one, 0%. We called it the Tissue Concordance Score (TCS). The caveat is that TCS is blind to errors within the correct set of cell types, so a score of 80% means it is at least 20% wrong but could be much more wrong. So, it is an imperfect, upper-bound measure of an achievable performance. For this reason, we also analyzed TCS failure modes extensively (supplementary E.7). Overall, we concluded that TCS on out-of-distribution data is an informative complement to pseudobulk-based performance measures, which showed no major issues under our specific experimental conditions, but it must be rigorously profiled whenever used in reporting.
In the second experiment, Syto also improved on the baselines: its best configuration scored 12.8 points above the best one.
Tissue concordance scoreShare of predicted proportions assigned to the expected cell types of each tissue, averaged over the 16 tissues, on a 0–100 scale. Higher is better. Baselines as published, without calibration.
EpiDISH RPC59.2
UXM60.3
Houseman CP63.0
CelFiE (best baseline)64.5
Syto (best setting)77.3
Best setting: Lookup with soft labels without pooling, NNLS and vector scaling.
Finally, we combined results from the two experiments into a single grid to see whether one could predict the other. We found some mutual information between the two, along with substantial unexplained variance, highlighting the complementary nature of the two tests and the need to evaluate beyond pseudobulks.
EVERY CONFIGURATION ON BOTH EXPERIMENTS
Each dot in this grid is one Syto configuration: in-distribution accuracy on pseudobulks (R²) against out-of-distribution tissue concordance. Open squares are the four external baselines as published; filled diamonds are the same baselines with one of our calibrators, joined to their uncalibrated version by a dotted line. The staircase is the Pareto frontier: no configuration beats a frontier point on both axes. The shaded corner beats every published (uncalibrated) baseline on both.
The plot also uses an additional labeling scheme featured in our paper: canonical soft labels, constructed by mixing hard labels with a uniform label distribution at weights 0.9 and 0.1, respectively. It was never intended as a suitable labeling scheme for this problem, but as a contrast to our data-driven soft labels. Methods with hard labels also use an additional feature selection scheme: diagonal+background—an alternative to the top 156 features used throughout that we tried for comparison.
The 360 configurations create a limited set of fixed alternatives; by considering them together across multiple metrics, you can see interesting patterns emerging. These are the insights that caught our attention.
1. The labels matter more than the classifier choice.The three pattern-specific classifiers in our research—previously published Dismir and MethylBERT, and our simple Lookup classifier—are grounded in different inductive biases and vary substantially in capacity and complexity. All of them have demonstrated different learning abilities, reflected in their performance, but the gap between results was explained more by the choice of labeling scheme than by the choice of classifier. With hard labels, Lookup, as expected, lagged behind the much more sophisticated Dismir and MethylBERT in both experiments. Once we switched to soft labels, it achieved comparable performance. MethylBERT, when trained on hard labels, dropped significantly on the TCS scale despite performing relatively well on pseudobulks. We observed no such drop for data-driven soft labels. We believe computing labels this way substantially simplifies the classifier's job.
From hard to soft labels, classifier by classifierEach marker is the best configuration of that classifier under one labeling scheme, taken over all feature schemes, deconvolvers and calibrators; the bar joins hard labels to the better of the two soft schemes (with or without pooling), whose value is shown in bold. Lookup has no canonical-soft variant. Below each panel, for each of the 20 deconvolver and calibrator combinations on the top-156 features, how often the better of the two soft schemes (with or without pooling) scores higher than hard labels. CancerDetector uses a prior instead of a labeling scheme and is not shown. The dashed vertical line marks the best external baseline as published, without calibration.
HardCanonical softData-Driven Soft, no poolingData-Driven Soft, pooled
Pseudobulk R² · in-distribution
Soft beats hard in matched pairs:MethylBERT 19 / 20Dismir 20 / 20Lookup 20 / 20
Tissue concordance · out-of-distribution
Soft beats hard in matched pairs:MethylBERT 20 / 20Dismir 16 / 20Lookup 20 / 20
2. Calibration might be the way to improve existing deconvolvers. The baselines we examined all showed a linearly correctable bias, for example, consistently underpredicting the proportion of colon fibroblasts, a cell type with the least data in the reference (only three marker regions versus 25 for each other cell type) and the least specific markers. It turns out that calibrating them on pseudobulk mixtures constructed from a subset of the reference data achieves better alignment between predicted and ground-truth proportions, which carries over to out-of-distribution data, as we observe in our second experiment. As such, it can be a computationally cheap way to improve the performance of existing deconvolvers and, in the long run, adapt to specific tasks without changing the reference. One could imagine, for example, calibrating for a different sequencing source with its own technical biases or for a target tissue. We also saw that the existing vector calibrator and our two proposed linear calibrators, with clip and normalize and with simplex projection, have characteristics that are more or less desirable depending on the application. For example, the simplex method enforces sparsity in the results, while the vector method allocates more mass to the dominating component.
What our calibrators do to the four baselinesEach row is one external baseline, uncalibrated and with each of our three calibrators: linear with clip and normalize (Clip), linear with simplex projection (Simplex) and vector scaling (Vector). All values are averages over the out-of-distribution tissue samples;
UncalibratedClipSimplexVector
BenefitLESS MASS ALLOCATED TO CERTAINLY WRONG CELL TYPESEvery calibrator raises TCS for every baseline, with gains growing from Clip to Simplex to Vector.
PrecautionMore mass on the top cell typeAll calibrators push extra mass onto the component that already dominates the uncalibrated result, with Vector gaining the most.
PrecautionSmall components set to zeroSimplex consistently zeroes out more cell types, trading detection limit for fewer false calls. Vector leaves sparsity almost unchanged.
3. Most of the gains from pattern-level information are yet to be captured. Our extension of CancerDetector, which uses average methylation per read and discards the within-read pattern entirely, ranked second among uncalibrated configurations. If you factor in the environment in which CancerDetector was tested, it is not surprising that it performed well—the utilized marker set is optimized to separate reads based on the number of close-to-fully and fully unmethylated reads, with methylated reads on the opposite end. Our extended CancerDetector models average methylation values per read for each genomic region and class as a Beta Distribution; therefore, its probabilistic model matches the marker set well, where the alpha value alone is informative by design. Accepting this result as evidence of parity between alpha-value-based methods and pattern-specific methods would be a grave mistake. We believe pattern-specificity gains are yet to be seen and will emerge when applied to more nuanced atlases needed to achieve higher granularity in cell typing and longer reads, where alpha-value alone won’t be sufficient to discriminate between classes.
A hypothetical region where α-values fail
This small hypothetical example demonstrates why pattern-level methods will have an advantage where average-based methods fail. As our research advances, we hope to show this on real data.
Different patterns can mark different cell types yet give the same α
In one marker region, cell type X methylates the left half of the region and cell type Y the right half. Every read carries four methylated CpGs out of eight.
8 CpGsαX0.50X0.50X0.50X0.50Y0.50Y0.50Y0.50Y0.50
Filled: methylated CpG. α: share of methylated CpGs on the read.
In such a case, α cannot discriminate between reads
What each kind of classifier can tell about a single read.
α-value modelSees only α = 0.50, identical for X and Y.
Any readX 50%Y 50%
Pattern-specific modelSees which CpGs are methylated.
Left-half readX 97%
Right-half readY 97%
Accurate deconvolution from average read methylation is no longer possible
A sample made of 70% X and 30% Y, deconvolved from its reads in this region.
TruthX 70%Y 30%
α-value modelX 50%Y 50%
Pattern-specific modelX 70%Y 30%
The α-value model returns its prior for every mixture, because the region carries no α-level signal. The pattern-specific model recovers the mixture.
LIMITATIONS AND THE NEXT STEPS
If you followed this blog post through, you may already see that we are far from the perfect deconvolution method we aim for. Data-driven soft labels pave the way to scaling to many cell types, but we still need more prerequisite work to accommodate hundreds of normal cell types and a wide range of tumor types and subclones. The task demands unprecedented data generation and new methods to identify pattern-specific markers, as well as methods to integrate bulk tumor samples into a common tumor-normal reference. Scaling to long reads, by contrast, is a solved problem; efficient architectures exist that process much longer sequences than those in our paper. Yet a single read-length-agnostic configuration capable of simultaneously achieving strong results on long and short reads interchangeably remains to be created. Needless to say, multimodality, which is one of the hottest topics in computational biology, is another aspect still lacking. Bringing together methylation, chromatin accessibility, and histone marks may expand differentiation limits, allowing discrimination of cell types that are inseparable when analyzed from a single angle alone. So the problem we claimed to resolve is already focused and limited in scope. Within that scope there are further limitations, things we could have done or covered that relate directly to scaling to many cell types. We did not have ground-truth out-of-distribution data for validation, so we came up with TCS, which is far from perfect and invites concerns that only rigorous argument and detailed analysis can address; we did both in the paper. Validation on real mixtures is still needed and will be done in subsequent research. Another aspect of our research relates to the choice of atlases, which, while having its merits, is not ideal in terms of resolution and source—many samples in this atlas are derived from tumor-adjacent normal tissues, which raises concerns about applicability for normal cell-type deconvolution. The reference samples also have purity issues; they are not strictly 100% pure, and 17 out of 205 are below 80%. This means the reference is contaminated and the derived labels are noisy, which makes pseudobulk targets noisy too.
Our ultimate goal is to enable tumor ecosystem deconvolution. In this paper, we covered only normal cell types. We foresee many applications of Syto, from cancer detection to longitudinal monitoring of disease and treatment progression in liquid and solid biopsies. In this publication, we wanted to demonstrate that scaling to multiple cell types for pattern-specific methods is unlocked. The path to clinical application now hinges on our ability to integrate malignant data from target tumors.
Notes
Three end-to-end read-level classification methods existed before this work: CancerDetector, Dismir, and MethylBERT. Only the latter two preserve the methylation pattern within a read, and only MethylBERT had been demonstrated beyond two classes, at up to five cell types. Another method, called ROCIT7, was released as a preprint in March 2026—we did not have time to include it in our paper, but doing so would require some adaptation (it was designed around a binary use case run on long reads).
Off-target reads are not noise in the usual sense. They are perfectly good reads; they are simply being observed in a region that was chosen to distinguish a cell type other than their own.
"I Saw Through Platonia" is a final track in Boards of Canada Inferno album, released in may 2026. We thought it would make for a good title.
References
Hanahan D. Hallmarks of cancer: new dimensions. Cancer Discovery 12(1):31–46, 2022.
Wang L, Geng H, Liu Y, et al. Hot and cold tumors: immunological features and the therapeutic strategies. MedComm 4(5):e343, 2023.
Capper D, Jones DTW, Sill M, et al. DNA methylation-based classification of central nervous system tumours. Nature 555:469–474, 2018.
Vermeulen C, Pagès-Gallego M, Kester L, et al. Ultra-fast deep-learned CNS tumour classification during surgery. Nature 622:842–849, 2023.
Yuan D, Jugas R, Pokorna P, et al. crossNN is an explainable framework for cross-platform DNA methylation-based classification of tumors. Nature Cancer 6(7):1283–1294, 2025.
Haider S, Tyekucheva S, Prandi D, et al. Systematic assessment of tumor purity and its clinical implications. JCO Precision Oncology 4:995–1005, 2020. doi:10.1200/PO.20.00016
Baker TM, Matulionis N, Andrasz C, et al. Genome-wide classification of tumor-derived reads from bulk long-read sequencing. bioRxiv, 2026. doi:10.64898/2026.03.03.709085
Gu J, Stevens M, Xing X, et al. Mapping of variable DNA methylation across multiple cell types defines a dynamic regulatory landscape of the human genome. G3: Genes, Genomes, Genetics 6(4):973–986, 2016. doi:10.1534/g3.115.025437
Smith ZD, Hetzel S, Meissner A. DNA methylation in mammalian development and disease. Nature Reviews Genetics 26(1):7–30, 2025. doi:10.1038/s41576-024-00760-8
Loyfer N, Magenheim J, Peretz A, et al. A DNA methylation atlas of normal human cell types. Nature 613:355–364, 2023. doi:10.1038/s41586-022-05580-6. GEO GSE186458; source of the UXM method.
Jeong Y, Gerhäuser C, Sauter G, et al. MethylBERT enables read-level DNA methylation pattern identification and tumour deconvolution using a transformer-based model. Nature Communications 16:788, 2025.
Lin T-Y, Goyal P, Girshick R, He K, Dollár P. Focal loss for dense object detection. ICCV, 2980–2988, 2017.
Geng X. Label distribution learning. IEEE Transactions on Knowledge and Data Engineering 28(7):1734–1748, 2016.
Xu N, Liu Y-P, Geng X. Label enhancement for label distribution learning. IEEE Transactions on Knowledge and Data Engineering 33(4):1632–1643, 2021.
Wang J, Geng X. Classification with label distribution learning. IJCAI, 2019.
Li W, Li Q, Kang S, et al. CancerDetector: ultrasensitive and non-invasive cancer detection at the resolution of individual reads using cell-free DNA methylation sequencing data. Nucleic Acids Research 46(15):e89, 2018.
Li J, Wei L, Zhang X, et al. DISMIR: deep learning-based noninvasive cancer detection by integrating DNA sequence and methylation information of individual cell-free DNA reads. Briefings in Bioinformatics 22(6):bbab250, 2021.
Guo C, Pleiss G, Sun Y, Weinberger KQ. On calibration of modern neural networks. In: Proceedings of the 34th International Conference on Machine Learning (ICML), PMLR 70:1321–1330, 2017.
Duchi J, Shalev-Shwartz S, Singer Y, Chandra T. Efficient projections onto the l1-ball for learning in high dimensions. ICML, 272–279, 2008.
Caggiano C, Celona B, Garton F, et al. Comprehensive cell type decomposition of circulating cell-free DNA with CelFiE. Nature Communications 12:2717, 2021.
Houseman EA, Accomando WP, Koestler DC, et al. DNA methylation arrays as surrogate measures of cell mixture distribution. BMC Bioinformatics 13:86, 2012.
Teschendorff AE, Breeze CE, Zheng SC, Beck S. A comparison of reference-based algorithms for correcting cell-type heterogeneity in epigenome-wide association studies. BMC Bioinformatics 18:105, 2017.
De Ridder K, Che H, Leroy K, Thienpont B. Benchmarking of methods for DNA methylome deconvolution. Nature Communications 15:4134, 2024.
Sun T, Yuan J, Zhu Y, et al. Systematic evaluation of methylation-based cell type deconvolution methods for plasma cell-free DNA. Genome Biology 25:318, 2024.
Giuili E, Van de Velde S, Kint S, et al. A benchmark of DNA methylation deconvolution methods for tumoral fraction estimation using DecoNFlow. bioRxiv, 2025. doi:10.1101/2025.11.27.688590
Li S, Zeng W, Ni X, et al. Comprehensive tissue deconvolution of cell-free DNA by deep learning for disease diagnosis and monitoring. PNAS 120(28):e2305236120, 2023. RRBS atlas of 29 human tissues, GEO GSE233417; used for the out-of-distribution evaluation.
The Tabula Sapiens Consortium. The Tabula Sapiens: a multiple-organ, single-cell transcriptomic atlas of humans. Science 376:eabl4896, 2022.
Full citations, all 360 configurations and the supplementary experiments are in the paper.
Cite this work
@inproceedings{rizdvanetskyi2026syto,
title = {Data-Driven Soft Labeling Scales DNA Read Classification
to Whole-Body Cell-Type Deconvolution},
author = {Rizdvanetskyi, Dmytro and Roos, Nathan and Lutsik, Pavlo},
booktitle = {Advances in Neural Information Processing Systems},
year = {2026},
eprint = {2607.04987},
archivePrefix = {arXiv}
}