Inferring the Phylogeny of Large Language Models and Predicting their Performances in Benchmarks

Nicolas Yax, Pierre-Yves Oudeyer, Stefano Palminteri · DOI

Introduction

The Large Language Model (LLM) landscape is expanding at an overwhelming pace. Every day, hundreds of new models are uploaded to hubs like HuggingFace, yet most remain un-benchmarked due to the high cost of evaluation. Furthermore, many models—especially proprietary ones—are "black boxes" with no transparency regarding their training data or architectural lineage.

Current evaluation methods rely on massive benchmarks (like MMLU) that are expensive to run and increasingly prone to "contamination," where models are inadvertently trained on the test questions. We lack a fast, cost-effective way to determine how a new model relates to existing ones and what its actual capabilities are without running the full gauntlet of traditional tests.

Methodology: The PhyloLM Framework

The authors introduce PhyloLM, which transposes concepts from population genetics into machine learning. This approach treats model outputs as "genetic" signatures to reconstruct evolutionary relationships.

The analogy between biological phylogeny and LLM probing.

The framework relies on several key biological analogies:

  • The Analogy: Prompts (contexts) are treated as genes, and the resulting generated tokens are treated as alleles (variants of a gene). An LLM is viewed as a population that produces these alleles with specific probabilities.
  • Distance Metric: They use Nei’s genetic distance, a standard biological measure, to calculate how similar two models are based on their output probability distributions across a set of "genes."
  • Phylogenetic Trees: Using the Neighbor-Joining (NJ) algorithm, they construct dendrograms (family trees) that visualize the relationships between models.
  • Handling Tokenization: Since different models use different tokenizers, the authors used a "proxy allele" consisting of the first four characters of the generated text to ensure a fair comparison.
  • Performance Prediction: They applied Independent Component Analysis (ICA) to reduce the dimensionality of the distance matrices and used logistic regression to predict benchmark scores.

Key Insights and Results

PhyloLM demonstrates that behavior can serve as a unique "genetic" fingerprint. Most new models inherit features, weights, or data from predecessors, and PhyloLM makes these hidden relationships visible, successfully clustering sub-families even when they aren't explicitly labeled.

Tree Accuracy and Reconstruction

The reconstructed trees for known families were found to be "topologically equivalent" to the ground truth. For instance, the algorithm correctly identified the lineage of the Mistral family, distinguishing between "parents" and "descendants."

Comparison between ground truth lineage and PhyloLM reconstruction for the Mistral model family.

Functional Validity and Efficiency

A striking insight is that "genetic" distance correlates with functional capability. If two models are close on the phylogenetic tree, they tend to perform similarly on benchmarks. This suggests that the distance metric captures deep architectural or data-driven traits, not just surface-level mimicry. Key results include:

  • Benchmark Prediction: Phylogenetic distance explained approximately 50% of the variance in benchmark performance across different model families.
  • Efficiency: Running PhyloLM is roughly 10 times cheaper than running a full MMLU benchmark, requiring significantly fewer and shorter queries.
  • Quantization Robustness: Larger models are more "genetically" stable when quantized; the compressed versions stay closer to the original on the tree.

Limitations and Future Work

The authors note the "Living Ancestor" problem: unlike biology where ancestors are often extinct, in AI, "parent" models are tested alongside their "children." This can distort visualizations that assume all models are "leaves." Additionally, proprietary chat APIs may introduce noise through hidden system prompts, making chat models appear more distant from their base versions than they are.

Future directions include applying PhyloLM to study model merging and scaling laws, as well as refining the method to better handle the specific constraints of chat-tuned models.

Summary updated

BibTeX
@inproceedings{yax2025inferring,
  author = {Nicolas Yax and Pierre-Yves Oudeyer and Stefano Palminteri},
  title = {{Inferring the Phylogeny of Large Language Models and Predicting their Performances in Benchmarks}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=rTQNGQxm4K},
}
Figure