Characterizing homology-induced data leakage and memorization in genome-trained sequence models

This paper reveals that homology-induced data leakage systematically inflates the performance of genome-trained sequence models by causing them to rely on memorized associations rather than generalizable principles, and proposes the hashFrag tool to enable homology-aware data partitioning for more reliable evaluation and improved model generalizability.

Original authors: Rafi, A. M., Kiyota, B., Yachie, N., de Boer, C. G.

Published 2026-05-25
📖 3 min read☕ Coffee break read

Original authors: Rafi, A. M., Kiyota, B., Yachie, N., de Boer, C. G.

Original paper licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). ⚕️ This is an AI-generated explanation of a preprint that has not been peer-reviewed. It is not medical advice. Do not make health decisions based on this content. Read full disclaimer

Imagine you are trying to teach a computer to understand the "language" of DNA, so it can predict what a specific gene does just by reading its sequence of letters (A, C, T, G). To do this, you show the computer millions of examples (training data) and then test it on new examples it hasn't seen before (test data) to see how smart it really is.

The Problem: The "Cousin" Trap
The paper argues that the way scientists usually split this data is flawed because of homology. In the world of DNA, "homology" means sequences are related, like cousins or siblings in a family tree. They share a common ancestor and look very similar.

The authors say that traditional testing methods are like giving a student a practice exam and then, on the final test, giving them questions that are almost identical to the practice ones, just with a few words changed. Because the student (the AI model) memorized the practice answers, they ace the final test. But this doesn't mean they actually learned the principles of the subject; they just memorized the specific questions.

In the paper's view, when DNA sequences in the test set are "cousins" of the sequences in the training set, the model isn't actually predicting function based on rules; it's just recalling what it saw before. This creates a "data leak" where the model cheats, making it look much smarter than it really is.

How the Model Behaves
The researchers used simulations to show three distinct behaviors:

  1. Distant Relatives: When the test DNA is very different from the training DNA, the model does well. This is the good news—it means the model has actually learned general rules about how DNA works.
  2. Close Relatives: When the test DNA is very similar to the training DNA, the model performs too well. It's relying on memorization. If the "cousin" DNA does the same job as the original, the model gets a perfect score, but it's just cheating by remembering the answer.
  3. The Trap: The danger happens when the model relies on memorization but the "cousin" DNA has actually changed its job (functional divergence). Because the model is just recalling the old answer, it fails to predict the new reality, leading to errors that go unnoticed because the test setup was too easy.

The Solution: "HashFrag"
To fix this, the authors created a tool called hashFrag. Think of this as a super-organized librarian who can instantly spot which books in a library are just copies or slight variations of each other.

Instead of randomly shuffling the DNA data, hashFrag carefully groups these "cousin" sequences together. It ensures that if a specific family of DNA sequences is used for training, none of its relatives are allowed in the test set. This forces the model to prove it understands the underlying rules of the language, rather than just memorizing specific sentences.

The Bottom Line
The paper concludes that if we don't account for these family relationships in DNA, we are systematically lying to ourselves about how good our AI models are. By using tools like hashFrag to create "homology-aware" splits, we can stop the model from cheating, ensuring that when we say a model is reliable, it actually is.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →