LLM DNA: Tracing Model Evolution via Functional Representations

Zhaomin Wu, Haodong Zhao, Ziyang Wang, Jizhou Guo, Qian Wang, Bingsheng He

The number of Large Language Models (LLMs) is exploding. Hugging Face currently hosts millions of models, but their "family trees"—how they were fine-tuned, distilled, or adapted—are often a black box. This lack of transparency makes it difficult to audit safety risks, verify license compliance, or manage complex multi-agent systems.

In a new paper, researchers from the National University of Singapore and Shanghai Jiao Tong University propose a solution: LLM DNA. By treating a model’s functional behavior as a genetic signature, they have created a way to trace the evolution of AI across different architectures and tokenizers.

The Problem: An Opaque AI Landscape

When a developer releases a fine-tuned version of Llama-3, the relationship is clear. But what happens when a model is distilled from a larger one, or adapted using an entirely different tokenizer?

Existing methods for identifying models are often brittle. They might rely on specific tokenizers, require expensive training of "router" models, or only work for a fixed set of architectures. Until now, there has been no principled, mathematical framework to define what makes a model "itself" across different tasks and formats.

To solve this, the authors sought to define a representation that satisfies two biological properties:

  1. Inheritance: Small changes to a model (like minor fine-tuning) should result in small changes to its DNA.
  2. Genetic Determinism: Models with similar DNA should exhibit similar functional behaviors.

The Solution: The RepTrace Pipeline

LLM DNA is a training-free, architecture-agnostic "fingerprint" that captures a model's functional behavior in a compact 128-dimensional vector. The authors developed a pipeline called RepTrace to extract this DNA. The process is surprisingly elegant and requires no training:

The RepTrace pipeline for extracting LLM DNA.
  1. Stochastic Sampling: A set of representative prompts (from datasets like MMLU or SQuAD) is fed into an LLM.
  2. Semantic Embedding: Instead of comparing raw text, a sentence-embedding model turns the LLM's responses into vectors. This captures the meaning of the output rather than just the exact characters.
  3. Concatenation: These response vectors are stitched together into one massive, high-dimensional representation of the model's behavior.
  4. Random Projection: Using the Johnson-Lindenstrauss (JL) Lemma—a mathematical powerhouse for dimensionality reduction—this massive vector is projected down into a compact 128-dimensional "DNA" vector.

Because the projection is a random linear map, it preserves the relative distances between models without needing to be "learned" on a specific dataset.

Mapping the Evolutionary Tree

The researchers evaluated their method using a massive library of 305 LLMs from 153 different organizations. They extracted DNA using a mixture of 600 samples from standard benchmarks and used the official Hugging Face "Model Tree" as the ground truth for relationships.

t-SNE projection of LLM DNA signatures clustered by organization.

By building a phylogenetic tree and projecting the DNA signatures, the authors uncovered several key insights:

  • Uncovering Hidden Lineages: The tool successfully identified undocumented relationships. For example, it placed orca-2-13b and vicuna-7b-v1.1 firmly within the Llama family clusters, even where official metadata was sparse.
  • Evolutionary Speed: The phylogenetic analysis revealed that the Qwen and Gemma families are "evolving" (changing functionally) much faster than the older Llama series.
  • Gibberish Works: Surprisingly, extracting DNA using random, nonsensical prompts still yielded an AUC of 0.987 for relationship detection. This suggests that a model's "identity" is baked into how it handles any input, not just logical questions.

Key Results and Performance

LLM DNA proved to be highly effective across multiple downstream tasks:

  • Relationship Detection: LLM DNA achieved a 0.992 AUC in detecting whether two models were related, significantly outperforming previous state-of-the-art methods like PhyloLM (0.788 AUC).
  • Model Routing: In a task where a system must choose the best model for a query, "frozen" DNA representations outperformed EmbedLLM (a method that requires active training) with an accuracy of 67.2%.
  • Robustness: The DNA remains stable across different sentence-embedding models (such as BGE, MPNet, and Qwen3) and is statistically independent of the model's parameter size.

Limitations and Future Work

While powerful, the authors note a few hurdles. First, adaptive attacks are possible: a malicious actor who knows the extraction prompts could theoretically "poison" a model's fine-tuning to make its DNA look like a different model. Second, we cannot currently look at a specific "gene" (a single dimension in the 128-D vector) and map it to a specific trait like mathematical reasoning. Finally, closed-source APIs might reject the random string inputs used in the "gibberish" tests, requiring more sophisticated sampling methods.

By providing a data-driven map of the field’s architectural evolution, LLM DNA offers a vital, scalable tool for the next era of model governance, auditing, and safety.

Summary updated

BibTeX
@inproceedings{wu2026llm,
  author = {Zhaomin Wu and Haodong Zhao and Ziyang Wang and Jizhou Guo and Qian Wang and Bingsheng He},
  title = {{LLM DNA: Tracing Model Evolution via Functional Representations}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=UIxHaAqFqQ},
}
Figure