How ChromBPNet Removes Tn5 Bias: The Bias-Factorized Model Explained

How ChromBPNet Removes Tn5 Bias: The Bias-Factorized Model Explained

Every ATAC-seq dataset carries a stowaway. The Tn5 enzyme that makes the assay work has its own sequence preferences, so it cuts some DNA spellings more readily than others, and that preference is written into your data alongside the biology you actually care about. Train a model naively on that signal and it will learn the enzyme’s taste and call it regulation. ChromBPNet’s answer to this problem is its signature design: a bias-factorized model that learns the bias separately and accounts for it. This article explains where the bias comes from, why it fools ordinary models, and how the two-part ChromBPNet design keeps enzyme preference from impersonating biology.

Where Tn5 bias comes from

ATAC-seq works by sending an engineered enzyme, the Tn5 transposase, into the nucleus, where it cuts accessible DNA and tags the fragments for sequencing. The trick is elegant, and it has a catch: Tn5 does not choose its cut sites purely by accessibility. The local sequence around a site influences how readily the enzyme acts there. Some short sequences get cut eagerly; others are cut reluctantly even when the chromatin around them is genuinely open.

The result is a bias footprint baked into every ATAC-seq dataset. Part of the signal you measure is openness, and part is the enzyme’s sequence preference expressing itself millions of times across the genome. Tn5 is the famous case, and the general lesson applies to accessibility assays broadly: the measuring instrument has sequence preferences, and those preferences contaminate the measurement. Any model that learns from raw signal inherits the contamination unless the bias is dealt with explicitly.

Why naive models learn the wrong lesson

A neural network trained to predict accessibility from sequence is a pattern-finding machine with no opinions about which patterns are respectable. If sequences the enzyme prefers tend to show higher signal, the network will learn exactly that association, because it genuinely improves prediction on raw data. The model ends up crediting short sequence patterns that are really Tn5 preferences as if they were transcription factor binding motifs.

The damage shows up in two places. Interpretation goes wrong first: you extract the patterns the model relies on, and some of your supposed regulatory motifs are enzyme artifacts wearing a disguise. Variant scoring goes wrong second: a variant that creates or destroys an enzyme-preferred sequence can be scored as changing accessibility when all it changes is cuttability. Neither error is a small calibration issue. They strike at the two main reasons people train these models at all, which is why ChromBPNet treats bias handling as architecture rather than as a cleanup step.

The bias model: learning bias where biology is absent

The first half of the design is a dedicated bias model. Its training material is chosen with care: genomic regions that carry no real accessibility signal. In those regions, there is no openness biology to explain, no transcription factor activity shaping a profile. Whatever sequence-dependent pattern remains in the data there is, by construction, the enzyme’s preference and background behavior.

So the bias model studies exactly those regions and learns the sequence signature of the assay itself. It comes away knowing how Tn5’s taste, and the background statistics of the experiment, shape signal when biology is silent. That knowledge is a component the framework can now carry into the main model, instead of leaving the main model to rediscover bias mixed together with everything else.

The accessibility model: learning what is left

The second half is the accessibility model, the network that predicts the base-resolution profile and the total count for peak regions. The key is that it does not learn alone. The bias model’s account of enzyme preference is factored in, so the accessibility model is trained on the signal with the bias component accounted for. What it must explain with its own weights is the remaining variation, which is where the biology lives.

This separation is what the term bias-factorized means: the full prediction is factored into a bias part and an accessibility part, each learned by a component suited to it. The practical effect is a division of labor. The bias factor absorbs the enzyme’s habits. The accessibility factor concentrates on sequence patterns that correspond to genuine openness, the binding of transcription factors and the regulatory grammar of the cell type. A model forced to share one set of weights between those two jobs does both worse; a factorized model can do each properly.

What changes in practice

Three practical differences follow from the factorization, and experienced users notice all of them:

  • Cleaner interpretation. Contribution scores from the accessibility model point at sequence patterns that drive predicted openness, with the enzyme’s favorite sequences no longer shouting over the transcription factors. Motifs recovered downstream are far more likely to be real binding signatures.
  • More honest variant scores. When a variant changes predicted accessibility in a bias-factorized model, the change is much less likely to be a mere change in enzyme cuttability, so the score means something closer to a regulatory effect.
  • A training discipline. Because the bias model is trained first, skipping it becomes a visible, deliberate omission rather than a silent default. Groups that skip it and then wonder why training loss stalls or motifs look odd have usually found their answer.

What bias factorization does not do

It is worth being precise about the limits. The bias model removes the sequence bias it can learn from signal-free regions; it does not repair a bad experiment, rescue peaks called from the wrong cell type, or fix a genome build mismatch in your inputs. Factorization also does not make the accessibility model omniscient: it can only learn regulatory patterns present in your training data, for your cell type. Think of bias factorization as removing a known, systematic distortion from the measurement, the way a good microscope removes a known lens aberration. The specimen still has to be worth looking at.

How to tell the factorization is doing its job

You do not have to take the design on faith; its effects are visible in the outputs. Train the full pipeline and then interpret the model, and the contribution landscape should concentrate on sequence patterns that behave like transcription factor biology: crisp, motif-shaped stretches inside peaks, recurring across regions, matching the regulatory cast of your cell type. Compare that with the pathology the design exists to prevent, contribution credit smeared across the enzyme’s favorite spellings and motif clusters that correspond to nothing any factor would bind, and the difference is stark.

The same check applies to variant scoring. In a well-factorized model, variants that change predicted accessibility tend to sit inside those meaningful patterns, disrupting or creating the sequences the accessibility model actually uses. When your top-scoring variants cluster in interpretable places, the factorization, the training data, and the model are corroborating each other. When they scatter into sequence the interpretation pass found irrelevant, that disagreement is diagnostic information about your run, and it usually points back to a stage worth redoing rather than a result worth reporting.

Conclusion

Tn5 bias is not a footnote in ATAC-seq data; it is a systematic pattern strong enough to teach a neural network the wrong biology. ChromBPNet’s bias-factorized design answers it structurally: train a bias model on regions with no real signal, where only enzyme preference operates, then train the accessibility model with that bias accounted for, so its capacity goes to genuine regulatory signal. The payoff is concrete, cleaner motifs during interpretation and variant scores that reflect openness rather than cuttability. If you take one design idea away from the framework, this is the one, because it is the reason the rest of its outputs deserve trust.

Read next:

1 thought on “How ChromBPNet Removes Tn5 Bias: The Bias-Factorized Model Explained”

  1. Pingback: Interpret chrombpnet Models: Scores and TF-MoDISco

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top