How Private Are DNA Embeddings? Inverting Foundation Model Representations of Genomic Sequences

This study demonstrates that DNA foundation models (DNABERT-2, Evo 2, and NTv2) are vulnerable to model inversion attacks, where adversaries can reconstruct sensitive genomic sequences from shared embeddings with high accuracy, particularly for shorter sequences and per-token representations, thereby highlighting critical privacy risks in Embeddings-as-a-Service frameworks.

Sofiane Ouaari, Jules Kreuer, Nico Pfeifer

Published Tue, 10 Ma
📖 5 min read🧠 Deep dive

Imagine you have a secret recipe for a delicious cake. To share the idea of the cake with a friend without giving them the actual recipe, you decide to send them a summary instead of the full list of ingredients. You think, "If I just tell them the cake is 'sweet, fluffy, and chocolatey,' they can't steal my secret recipe, right?"

This paper is about testing exactly that idea, but with DNA instead of cake recipes.

The Setting: The "DNA Cloud"

In modern medicine, scientists use massive AI models (called Foundation Models) to understand DNA. These models are like super-smart librarians who have read every human genome ever.

  • The Problem: People want to use these models to help with research, but they can't share the raw DNA (the actual "recipe") because it's too private. It's like your fingerprint; it identifies you uniquely and never changes.
  • The Proposed Solution: Instead of sharing the raw DNA, institutions share Embeddings. Think of an embedding as a digital fingerprint or a summary vector. It's a long list of numbers that captures the "essence" of the DNA sequence without showing the letters (A, C, G, T) directly.
  • The Service: This is called Embeddings-as-a-Service (EaaS). You send your DNA to the cloud, the cloud turns it into a summary (embedding), and sends that summary back to researchers. The promise is: "This summary is safe. You can't get the original DNA back from it."

The Attack: The "Reverse Engineer"

The authors of this paper asked a scary question: "What if someone tries to reverse-engineer the summary to get the original recipe back?"

They set up a scenario where a "hacker" (an adversary) intercepts these summaries and tries to use a different AI to reconstruct the original DNA sequence. It's like giving someone a blurry photo of a face and asking them to draw the person's face perfectly based only on that photo.

The Experiments: Testing Three "Librarians"

They tested three different types of DNA AI models (DNABERT-2, Evo 2, and NTv2) using two different ways of making the summary:

  1. The "Per-Token" Summary (The Detailed List):

    • Analogy: Imagine the AI breaks the DNA sentence into words and gives you a summary for every single word in order.
    • Result: Total Failure. The hackers could reconstruct the DNA almost perfectly (99% accuracy).
    • Takeaway: If you share a word-by-word summary, you might as well just share the raw DNA. It offers zero privacy.
  2. The "Mean-Pooled" Summary (The Blurry Average):

    • Analogy: Imagine the AI takes the whole sentence, mixes all the words together in a blender, and gives you one single "flavor profile." You lose the order and the specific words, but you get a general idea.
    • Result: Partial Failure. It was harder to reconstruct, but the hackers still did surprisingly well, especially with short DNA snippets.
    • The "Short vs. Long" Twist:
      • Short sequences (10-20 letters): The "blender" didn't mix enough. The summary was still too clear. Hackers could reconstruct 90%+ of the DNA.
      • Long sequences (100 letters): The "blender" worked better. The summary became more scrambled, making it harder to guess the original. However, it was still much better than random guessing.

The Secret Sauce: How the AI "Reads"

The paper found that the way the AI breaks up the DNA matters a lot.

  • Evo 2 & NTv2: These models read DNA like a typewriter, one letter at a time (or in fixed chunks). This makes it easy for hackers to reverse-engineer the summary.
  • DNABERT-2: This model uses a trick called BPE (Byte Pair Encoding). It's like reading a sentence and grouping common words together (e.g., "th" and "e" become "the").
    • Analogy: If the summary says "The," the hacker doesn't know if it was "The," "The," or "The" (if the original was split differently). This creates confusion.
    • Result: DNABERT-2 was the hardest to hack because the "grouping" made the summary ambiguous. It's the most secure of the three, though still not perfect.

The Big Reveal

The most important discovery was a simple rule: If the summary looks similar to another summary, the original DNA is also similar.

  • Analogy: If two cake summaries both say "very sweet and chocolatey," the cakes are likely very similar.
  • Because the AI preserves this relationship so well, the hacker can just look at the summary and say, "This looks like that DNA I know," and guess the rest. The paper found that the more the summary preserves the "shape" of the DNA, the easier it is to steal the DNA back.

The Conclusion: "Don't Trust the Summary"

The paper concludes that DNA embeddings are not safe enough yet.

  • Sharing detailed summaries is like sharing the raw data.
  • Sharing averaged summaries is like sharing a blurry photo; it's better, but a skilled hacker can still make out the face, especially for short snippets.

The Warning: Before we start sharing DNA summaries widely in hospitals and research labs, we need to invent better ways to scramble them (like adding noise or using better encryption). Otherwise, we might be accidentally handing out our most private biological secrets in the form of "safe" numbers.

In short: The "privacy shield" of DNA embeddings is currently full of holes. If you share the summary, you might as well be sharing the secret.