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

Authors: Nicolas Yax, Pierre-Yves Oudeyer, Stefano Palminteri
Primary area: interpretability and explainable AI
Keywords: large language models, phylogeny, benchmark

Abstract:
This paper introduces PhyloLM, a method adapting phylogenetic algorithms to Large Language Models (LLMs) to explore whether and how they relate to each other and to predict their performance characteristics. Our method calculates a phylogenetic distance metric based on the similarity of LLMs' output. The resulting metric is then used to construct dendrograms, which satisfactorily capture  known relationships across a set of 111 open-source and 45 closed models. Furthermore, our phylogenetic distance predicts performance in standard benchmarks, thus demonstrating its functional validity and paving the way for  a time and cost-effective estimation of LLM capabilities. To sum up, by translating population genetic concepts to machine learning, we propose and validate a tool to evaluate LLM development,  relationships and capabilities, even in the absence of transparent training information.

Decision: accept (poster)
Reviewer scores: 6, 5, 10, 3

Reviews and discussion:
<thread>
creation date:
1730665643581

thread_type:
official_review

<thread_object>
creator: reviewer_lm8z

<content>
summary:
The paper utilizes a metric inspired by phylogenetic to measure similarities between LLMs, outputs dendrograms between them, and predicts performance. By putting LLMs into the evolution framework, the authors propsoes a new way to evaluate model performance in a cost effective way. For models where the training details are scarce, this new framework also helps in gaining insights into their training process.

strengths:
1. Originality: the paper is quite original in its making connection between phylogenetics and LLMs. This might open a novel avenue for studying LLM lineage and evolution
2. Significance: the paper has the potential to have high impact as it proposes a new framework of understanding LLMs. Moreover, the use of the framework in evaluating LLMs with low resources is quite valuable considering the emergence of LLMs and the scarcity of compute resources in some research communities.

weaknesses:
1. While the connection between phylogenetics and LLMs is novel, a not of the details are not worked out thoroughly in the paper. For example, the paper makes a connection between tokens used by LLMs and alleles in genetics. However, when comparing different LLMs, which usually use different tokenization schemes, the analogy breaks down. The authros tries to mitigate that using the 4-character generated by the model. Then an obvious drawback is that for models that do not exactly output a token of 4-character long, what the authors are measureing are no longer p(a|g). Why is 4 used here also seems arbitrary, and could be explained or motivated better. Have the authors done any experiments on changing this number and see if the results are different? 
2. Again on the analogy between phylogenetics and LLMs, these kinds of analogies could serve as an inspiration and starting point, but relying entirely too much on it could be questionable. For example, a key component of the paper is the definition of the similarity metric between LLMs, which is adapted from a metric in phylogenetics. But why is this metric suited for the analysis of LLM's? Since what's being compared is P(a|g), i.e., distributions, why not use some more standard metrics for distributions like divergence?
3. The writing of the paper could be improved significantly. The clarity of the paper could benefit from some proof-reading. There are many places where the use of punctuations is wrong, e.g., ’gene’,

questions:
The main questions are listed in the "weakness" section.
</content>
</thread_object>

</thread>
<thread>
creation date:
1730668969339

thread_type:
official_review

<thread_object>
creator: reviewer_mtg8

<content>
summary:
The authors transfer a well-known paradigm of phylogenetic similarity from computational biology to the study of LLMs. The authors leverage the responses of LLMs to prompts contained in common benchmarks as "genes' to evaluate the difference of responses to them as "alleles." They then apply Nei's standard genetic distance to the distance between tokens in the responses with additional character agglutination normalization on the first tokens for models with different tokenizers. The authors use their "genetic" LLM distance to build phylogenetic trees and predict the model performance on standardized benchmarks.

strengths:
This work is outstanding.
- The clarity of writing is top-notch, and this paper should be readable not only by the ML and genetics community, but by the general public
- The problem the authors are trying to address - choice of most related LLMs and inference of performance of a previously untested LLM - is timely and important, as the proliferation of LLMs and tests means that for domains of interest, it is currently impossible to select the most appropriate LLM for a given application
- Authors have a deep understanding of bases of computational genetics and phylogenetics (reference genes, ancestral species inclusion) to accurately map the concepts from that field to LLMs
- Authors also have an excellent grasp of the inner workings of LLMs (e.g., the tokenization step), allowing them to 
- Authors are able to choose appropriate statistical tools to perform tasks of interest rather than the most common ones (e.g., ICA instead of common but inappropriate PCA on L268).
- Authors perform extensive benchmarking, offering insights that are in themselves interesting and shed light on some of the long-standing questions in the LLM community, e.g., the performance of quantized vs. non-quantized models (L496-498) or synthetic dataset re-use in non-opensource models (Fig 4.)
- Supplementary data is extensive (full distance matrices), and all the necessary code to re-run the experiments is provided

weaknesses:
- Fig 5A is overloaded and confused, and 5B is non-informative. Please consider splitting out samples to make the quality of correlation clear on a first view
- There is no discussion of neutral drift vs. selective pressure, which is particularly relevant, given that the former in genetics acts as an "evolutionary clock," generally used to estimate divergence in close populations. Authors, however, selected prompts from common benchmarks, for which models are frequently optimized to perform well, and that can be seen as genes highly selected for.
- The usage of exact token matching is a major weakness. LLMs are known for their semantic variability and ability to provide answers identical in meaning but with drastically different wording, which the author's method would consider as different. While the author's approach is arguably more relevant to identifying the similarity of training data for LLMs, overall performance is more likely to be predicted by a semantic similarity metric

questions:
- L242-256, Is there a reason you did not use a 3rd-party tokenizer to calculate the distance between the models with different tokenizers? It would seem to improve the methodological consistency with the rest of the work.
- L046-L047, Is there a reason you did not cite Dawkin's "Selfish Gene", that is generally regarded as the source of the "meme" idea and hence the idea of applying population genetics to cultural artifacts?
</content>
</thread_object>

</thread>
<thread>
creation date:
1731049494768

thread_type:
official_review

<thread_object>
creator: reviewer_dqm3

<content>
summary:
The paper proposes a biology-inspired paradigm for categorizing LLMs - an "evolutionary tree" of LLMs can be constructed by sampling from each LLM using a shared prompt dataset, and then comparing all outputs. The specific term used in the paper is "phylogenetic tree". The paper proposes an algorithm for constructing such a tree. The paper also discusses results, and the correlation of such generated trees with the ground truth and model performance.

strengths:
Originality:
- Classifying LLMs into an evolutionary tree is a novel idea

Quality:
- The paper provides an algorithm, sample prompts used on LLMs, an extensive list of tested LLMs, and a re-constructed evolutionary tree on L324, vs. the "ground truth" evolutionary tree.

Clarity:
- The paper is generally clearly written, and the authors' thought process, various analogies to biology (e.g. a prompt as an "allele") are well-explained.

weaknesses:
While the connection to biology is interesting and well-described, a case was not well-made for *why* the analogies should be made as the paper describes.

For example, the paper proposes the analogy of "gene & allele" and "prompt & completion": this is a bit hand-wavy; genes & alleles suggest the idea of some inherent characteristic, but how a prompt is completed may be more a function of the training dataset, rather than some model characteristic as implied by the paper: the idea that models are "evolved", and thus classifiable into an evolutionary tree. The separate contributions of model architecture vs. training dataset to a model was not explored.

Further, the prompt datasets used in the paper appeared to be fairly trivial, and only a very short completion was evaluated. This would be like asking college applicants to write essays, but limited to 3 words each: why comparing such short completions would still be meaningful was not explored.

questions:
Suggestion: It may be more informative to apply the same technique on more well-defined and challenging tasks, such as writing an essay, rather than compare next-few-token completions on what are essentially random string prompts.

Question: What might be the relative contributions of model architecture vs. pre-training/instruction-tuning datasets when using this approach to classify models?

Question: The paper suggests that this analysis can provide an estimate of model capabilities; but why would this analysis provide any more insight than simply inspecting the model size, and directly evaluating the model on well-defined tasks?

Question: The paper appears to use a string similarity measure of sampled outputs to draw conclusions about model relationships. Could we compare sampled outputs in any "deeper" way, such as by comparing some notion of intent, or "tendencies" of particular models?
</content>
</thread_object>

</thread>
<thread>
creation date:
1731100369468

thread_type:
official_review

<thread_object>
creator: reviewer_gfne

<content>
summary:
The paper introduces PhyloLM, a method adapting phylogenetic algorithms to Large Language Models (LLMs) to explore whether and how they relate to each other and to predict their performance characteristics. More concretely, the authors make an analogy between phylogeny and LLM, with token context corresponding to the genes and generated tokens corresponding to the alleles. Then by applying Nei Generic distance to the empirically sampled character distribution conditional on some context, the authors first compute the similarities between models and then use the NJ algorithm to construct the phylogenetic tree. Experimentally, the authors have evaluated the choice of hyperparameters of the phylogenetic algorithms, the correctness of the recovered trees, and the quality of prediction when using the model similarities to infer their eval performances. They found that the recovered trees correspond to the know relationships of the different model (classes) and the performance prediction correlate well with the actual performance.

strengths:
- The presentation of the paper is clear and easy-to-read and the methodology seems reasonable and sound.
- The idea of applying phylogenetic algorithms to study the evolution of language models, to the best of my knowledge, is a novel and interesting idea. This could inspire new works along this direction.
- The observation that using the conditional empirical distribution (with N=32) of the conditional generation of 4 subsequent letters could already provide a lot of information about the identify of the language model is an interesting (and to me surprising) observation which can be further explored by future works.

weaknesses:
- **[Practical usefulness of the phylogenetic tree]** In the current paper, the phylogenetics of Language models identified by running the NJ algorithm is verified using existing knowledge of the open and closed source models. Here, despite not knowing the exact training set/algorithm for some of the close models, their high-level relationships are still known to their end users (such as what company produces these models, which generation they are from, how they relate to previous models of the same company, etc). So it’s not clear to me whether any additional information can be gained by constructing the similarities and the phylogenetic tree that is not already know to the public. I believe this work still has its value purely for exploring this academically interesting direction, but from reading it, I haven’t got a sense whether the authors believe their methods could provide new insights about model evolution/relationships that’s not already publicly known.
- **[How to think about the benefits of performance prediction using similarities]** In terms of the contribution of using the similarity score to predict the downstream eval benchmarks’ performance, the authors have mentioned in line 312 - 315 that their estimation could use fewer queries than actually evaluating on the actual benchmarks such as MMLU. However, I think the authors could use more space to discuss the type of tradeoffs involved in actually using the similarity matrix-based performance estimators. For example, although the authors’ method use fewer inference compute for eval, they also are only correlated with the actual values but not very accurate, which makes me think some further discussion on what scenarios the authors could imagine their methods as practically useful for performance prediction/comparison.
- Minor:
    - There is a small amount of content redundancy between line 211 - 214 on  page 4 and line 297 - 305 on page 6 discussing the very expensive distance matrix.
    - The *completion models* on line 384 could be italicized.

questions:
Beyond the two questions above, I’m also curious whether the authors have experimented with any prompt ($c$) distribution other than math and coding and whether there are any distributions where the recovered phylogenetic trees do not correspond to our prior knowledge of how the models relate.
</content>
</thread_object>

</thread>
<thread>
creation date:
1732728930367

thread_type:
official_comment

<thread_object>
creator: authors

<content>
title:
Global Rebuttal

comment:
We would like to start by thanking all the reviewers for their very valuable feedback. We found it very encouraging that the reviewers found the work “novel” (Gfne08), “interesting” (Gfne08) and “original” (DQM308,Lm8z03). We are glad most of them found it very clear and easy to read/well explained (DQM308,mtg803,Gfne08). We are particularly happy that reviewers found the work outstanding (mtg803), potential high impact (Lm8z03) that it could inspire new works in the same direction (Lm8z, Gfne08).

The field of LLMs is evolving extremely fast with more than 600 new open access LLMs released everyday on the huggingface hub and proprietary models of always increasing intelligence and complexity while being less and less transparent. To differentiate between models people use benchmarks to assess their capabilities on specific tasks such as reasoning, general knowledge or coding. However these benchmarks are extremely expensive to compute and more than 90% of LLMs are not benchmarked. How can we reliably evaluate and select the most suitable LLM for a specific task amidst the abundance of unbenchmarked models? In a landscape where powerful proprietary models are increasingly opaque, how do we effectively study and understand their capabilities and limitations?
It is in this light that we propose PhyloLM, an algorithm inspired from genetics that is able to produce distance matrices between models at a very low cost making it possible to draw phylogenetic trees of language models but also to estimate benchmark capabilities of many models very cheaply. 

The use of phylogenetic algorithms to trace the evolution of cultural artifacts has repeatedly demonstrated its effectiveness across various domains [1-7]. Although cultural artifacts differ fundamentally from genes, they share a similar evolutionary process: myths gradually refine over time, allowing their evolutionary history to be reconstructed by analyzing similarities among versions [1,4]. Similarly, musical practices evolve through gradual changes in techniques and instruments, enabling the reconstruction of their histories [6]. Richard Dawkins also likened the evolution of memes to genetic evolution [7].

PhyloLM shows very good results in recovering the families of models among 17 different families and more than 150 LLMs but also the evolution within a family. These results validate the methodology, the evolutionary analogy with LLMs and the use of phylogenetic tools in LLMs paving a new way in the field of model analysis and understanding.

We sincerely thank all the 4 reviewers for their very valuable feedback that really helped improve the paper. Here is a list of the main points raised during the discussion and how we addressed them. All changes are written in green in the revised paper. 
- Reviewers Gfne08 and mtg803 enquired about whether some gene sets could be designed to not reflect the phylogeny but other qualities of LLMs. We updated the paper with few more appendices starting with adding more sets of genes to show the impact of gene choice in appendix J. We show that using a gene set based on chinese poetry doesn’t lead to good phylogenetic trees but makes it very clear which LLM speak chinese. Using a chat-formatted gene set doesn’t reconstruct a good evolutionary tree either but the tree reflects which models where trained on chat interactions. These results show that, while we focused on gene sets to reconstruct the phylogenetic tree in the main text, many more questions can be answered with a well tailored gene set. This would be a very interesting direction to delve into for future work.
- Reviewers DQM3 and Lm8z questioned the arbitrary values about the gene length and completion length. We tested various values and show that the ones from the main text are nearly optimal in terms of contrast of the similarity matrix and phylogenetic tree accuracy. Results are shown in appendix K. 
- Reviewers Lm8z03 questioned the validity of cutting 4 first characters of LLM completions in order to compare them in a similar referential rather than using tokens and mtg803 proposed to use a 3rd party tokenizer to do this comparison. We answered that cutting the 4 first characters of a LLM completion is akin to using a universal 3rd party tokenizer for which tokens are 4 characters long.
- Finally we reviewer mtg803 suggested to change Figure 5 to increase its clarity. We swapped Figure 5 from the main text with figures from the appendix F for better clarity, furthermore, we put additional very relevant references and corrected minor text formatting issues as pointed out by reviewers mtg803 Gfne08.

In addition to this global rebuttal we address each reviewer question and comment in individual rebuttal. Overall we believe these suggestions have helped improve the clarity of the paper both in terms form and content. Code and data used to generate these additional figures will be made available publicly as well.
</content>
</thread_object>

</thread>


Metareview:
metareview:
The paper: 
* Proposes similarity score between any two LLMs, which is, averaged over a huge set of prompts, the (normalized) dot product between string-response distributions.
* Uses this similarity score to construct a phylogenetic tree of 100+ LLMs, showing ancestral similarities (e.g. OpenAI models belong on one subtree, same with Gemini, etc.)
* Similarity matrix can be used to predict the performance of held-out LLMs on ARC benchmark.

## Strengths
* The use of the string-response distribution metric is well-motivated, and the empirical results do show that they do have some predictive power.
* The research is timely and important, especially for introducing data-analysis techniques for performance prediction on evaluation metrics.

## Weaknesses
* The biological analogies seem more distracting than helpful. For instance, in my summary of the paper, I was able to use purely mathematical notation to explain the contributions, without needing to use any evolutionary terminology. 
  * The phylogenetic tree isn't particular either - it can be seen as just one type of "clustering", but there are others that could've worked just as well (e.g. spectral/k-means)
* Some efforts would have been better spent providing more fundamental analysis. For instance, since the similarity score is simply the dot product of the normalized text output distributions, each LLM can be represented as its own feature vector. This feature vector could perhaps be very high dimensional but informative, if applied over more prompt datasets than just math and code.
  * For the performance prediction, additional modeling techniques (different kernel / similarity definition) could have also made things more effective.
  * The mechanics of the string output distribution could've been studied further (e.g. why is 4 response characters optimal?).