LLM DNA: Tracing Model Evolution via Functional Representations

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

Introduction

The rapid expansion of the Large Language Model (LLM) ecosystem has led to a proliferation of models on platforms like Hugging Face. However, this growth is often opaque; many models are fine-tuned, distilled, or adapted versions of others, yet these relationships frequently go undocumented. To address this, researchers have introduced LLM DNA, a mathematically grounded framework that fingerprints models based on their functional behavior. By projecting a model's responses into a low-dimensional vector, this framework allows for the tracing of "evolutionary" lineages across hundreds of models, uncovering hidden relationships and building data-driven phylogenetic trees.

Methodology: The RepTrace Pipeline

The core of the LLM DNA framework is a low-dimensional, bi-Lipschitz representation. This property ensures that models with similar functional behaviors are mapped to nearby points in Euclidean space. To extract this signature without requiring access to internal weights or specific tokenizers, the authors developed the RepTrace pipeline.

The RepTrace pipeline for extracting functional DNA signatures from LLMs.

As illustrated above, the pipeline consists of four primary stages:

  1. Input Sampling: A set of $t$ representative prompts (e.g., from benchmarks like MMLU or SQuAD) is fed to the LLM.
  2. Semantic Embedding: Text responses are converted into vectors using a sentence-embedding model (such as BGE or MPNet) to capture semantic meaning rather than just lexical overlap.
  3. Aggregation: These individual embeddings are concatenated into a single high-dimensional vector.
  4. Random Projection: Utilizing the Johnson-Lindenstrauss (JL) lemma, the massive vector is compressed into a compact "DNA" vector (typically 128 dimensions) using a Gaussian random matrix. This process is computationally efficient and theoretically guaranteed to preserve functional distances.

Key Insights: Functional Inheritance and Evolution

The study reveals that LLM DNA follows biological-like rules of inheritance and determinism. Fine-tuned descendants maintain high DNA similarity to their parents, and models with similar DNA signatures tend to perform similarly on downstream tasks.

One of the most surprising findings is that DNA can be extracted even using randomly generated strings as prompts. This suggests that a model's functional signature is so intrinsic that it manifests even when responding to nonsense. Furthermore, the analysis identified several "shadow" lineages. For example, the DNA signatures confirmed that models like Microsoft’s orca-2-13b and LMSYS’s vicuna-7b-v1.1 are functionally clustered with specific Llama base models, even in cases where documentation was vague.

Experimental Results

The effectiveness of LLM DNA was evaluated across a suite of 305 LLMs from over 150 organizations. The framework demonstrated exceptional performance in identifying whether two models were related (e.g., parent and fine-tuned child).

Comparative performance of LLM DNA against baselines in relationship detection.

As shown in the table above, the DNA-based approach significantly outperformed previous state-of-the-art methods. Specifically, the DNA (BGE) + SVM configuration achieved an AUC of 0.992, compared to just 0.788 for the previous PhyloLM baseline.

Beyond relationship detection, the DNA vectors proved useful for model routing. In tasks requiring a system to select the best model for a specific query, using frozen DNA vectors as representations (0.672 accuracy) outperformed the EmbedLLM method (0.665), which requires more intensive training. The signatures also remained stable across different chat templates and varying fine-tuning intensities, confirming their robustness as an intrinsic model property.

Conclusion and Future Work

LLM DNA provides a powerful tool for safety auditing, model governance, and understanding the complex evolution of the AI landscape. While the framework is robust, the authors note that future work is needed to defend against potential adaptive attacks where an adversary might attempt to "poison" a model's responses to mimic a different DNA signature. Additionally, the researchers aim to identify specific "semantic genes" within the DNA vectors that might correspond to distinct capabilities like mathematical reasoning or code generation.

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