Introduction
PhyloLM applies the principles of evolutionary biology to the rapidly expanding world of Artificial Intelligence. By treating Large Language Models (LLMs) like biological species, researchers can map out their "family tree." By analyzing how similarly different models respond to the exact same prompts, PhyloLM can accurately reconstruct model lineages and predict a model's benchmark performance at a fraction of the cost of traditional testing.
The Problem: Opacity and Evaluation Fatigue
The LLM landscape is expanding at a dizzying pace, with hundreds of new models appearing on platforms like Hugging Face every week. This creates two major headaches for AI researchers and developers:
- Opacity: Many models—especially proprietary ones like GPT-4 or Gemini—are "black boxes." The public does not know exactly what data they were trained on or which existing open-source models they might be based on.
- Evaluation Fatigue: Standard benchmarks (like MMLU or GSM8k) are expensive to run, slow, and increasingly prone to "contamination," where models are accidentally trained on the test questions themselves.
This paper asks a fundamental question: Can we understand a model’s capabilities and origins simply by looking at its "behavioral DNA"—the specific way it chooses tokens in response to a prompt?
Methods: The Biological Analogy
The core innovation of PhyloLM is a clever analogy between population genetics and machine learning. The framework maps biological concepts to LLM behaviors:
- Population: A specific LLM.
- Gene: A specific prompt or context (e.g., a snippet of a math problem).
- Allele: The specific token (word or character) the model generates in response.
The researchers selected "genes" from math (Open-Web-Math) and coding (MBXP) datasets and probed 156 models (111 open-source, 45 closed). By querying each model multiple times for the same prompt, they built a probability distribution of their outputs.
They then applied the Nei genetic distance—a standard mathematical tool in biology—to measure how "related" two models are. Finally, they used the Neighbor-Joining algorithm to visualize these relationships as a dendrogram (an evolutionary tree). To handle the fact that different models use different "alphabets" (tokenizers), they used a proxy approach, comparing the first four characters of the generated text rather than raw tokens.
Key Insights
- LLMs aren't created ex-nihilo: Most new models are "descendants" of others, inheriting features through shared training data or initial weights. PhyloLM captures this "inheritance" signal remarkably well.
- The "Math" vs. "Code" Lens: A model's relative position in the family tree remains stable, but its "genetic distance" to others can shift depending on whether you evaluate its math skills or its coding skills.
- Benchmarking without Benchmarks: A model's position on the tree is a strong predictor of its performance. If a new, unknown model sits right next to Mistral-7B on the tree, researchers can accurately guess its MMLU score without ever running the full, expensive MMLU test.
- Quantization Resilience: As models get larger, "quantizing" them (shrinking them to run on smaller hardware) has less impact on their "genetic" identity. They stay closer to their original "parent" model than smaller quantized models do.
Key Results
Topological Accuracy
The algorithm successfully reconstructed known relationships. For example, it correctly grouped all Llama variants together and identified that models like Zephyr were derived from Mistral.
Cost Efficiency and Predictive Power
Running PhyloLM is roughly 10 times cheaper than running a full MMLU benchmark in terms of the number of tokens required. Furthermore, using only the genetic distance matrix, the researchers could explain roughly 50% of the variance in benchmark scores across different model families.
Proprietary Insights
The method provided a rare look at closed models, showing, for instance, how Gemini models relate to Google’s earlier PaLM models and how they compare to the GPT-4 lineage.
Limitations and Future Work
While powerful, the PhyloLM approach has a few limitations:
- The "Living Ancestor" Problem: In biology, ancestors are usually extinct. In AI, the "parent" (like Llama 2) exists simultaneously with its "descendants" (fine-tuned versions). Standard phylogenetic trees aren't perfectly designed for this "overlapping generations" scenario.
- Chat Interface Bias: Comparing "base" models to "chat" models is tricky because chat interfaces add hidden system prompts (like "You are a helpful assistant") that can skew the output similarity.
Future work will apply PhyloLM to study model merging (where two models are combined) and scaling laws to see how a model's "DNA" changes as it grows in size. The authors also aim to refine the prediction models by using multiple sets of "genes" simultaneously.
Summary updated