NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Comparing Foundation Models using Data Kernels

Brandon Duderstadt, Hayden S. Helm, Carey E. PriebearXiv 2023

Abstract: Recent advances in self-supervised learning and neural network scaling have enabled the creation of large models, known as foundation models, which can be easily adapted to a wide range of downstream tasks. The current paradigm for comparing foundation models involves evaluating them with aggregate metrics on various benchmark datasets. This method of model comparison is heavily dependent on the chosen evaluation metric, which makes it unsuitable for situations where the ideal metric is either not obvious or unavailable. In this work, we present a methodology for directly comparing the embedding space geometry of foundation models, which facilitates model comparison without the need for an explicit evaluation metric. Our methodology is grounded in random graph theory and enables valid hypothesis testing of embedding similarity on a per-datum basis. Further, we demonstrate how our methodology can be extended to facilitate population level model comparison. In particular, we show how our framework can induce a manifold of models equipped with a distance function that correlates strongly with several downstream metrics. We remark on the utility of this population level model comparison as a first step towards a taxonomic science of foundation models.

Introduction

The current gold standard for comparing models like BERT or GPT is benchmarking: running them on a battery of tasks and looking at aggregate metrics like accuracy or perplexity. However, this approach has significant flaws. Aggregate scores often hide where a model fails; two models might achieve identical accuracy while failing on completely different subsets of data. Furthermore, benchmarking is heavily dependent on the availability of high-quality evaluation metrics, which may not exist for niche or emerging tasks. Finally, benchmarks fail to provide a "taxonomy"—they tell us which model is better but not how models are related or how specific training interventions alter a model’s internal representation of the world.

This paper introduces a novel framework to look under the hood of foundation models by analyzing the "shape" of the data inside their embedding spaces. By moving toward a taxonomic science, we can compare models based on their internal geometry rather than just their final test scores.

The Data Kernel Framework

The core of the proposed methodology is the Data Kernel. For a given set of input data, a model generates embeddings that represent the semantic relationships between points. The authors represent the geometry of these embeddings as a $k$-nearest neighbor (k-NN) graph. If two points are close in the model's embedding space, they share an edge.

To compare these graphs statistically, the framework treats them as Random Dot Product Graphs (RDPGs), where the probability of an edge depends on the dot product of latent positions. Because embedding spaces can be rotated or flipped without changing their semantic meaning, they cannot be compared directly. The authors solve this using Omnibus Embeddings, which jointly embed multiple graphs into a single space, effectively aligning them for a fair comparison.

The Data Kernel pipeline: from individual embeddings to joint alignment and hypothesis testing for detecting distribution shifts.

Once aligned, a bootstrap hypothesis testing procedure is used to generate a null distribution. This allows researchers to assign a p-value to every single data point, highlighting exactly where two models disagree. This metric-agnostic discovery surfaces specific data points where models diverge, which can identify hidden biases or data quality issues without knowing what to look for ahead of time.

Experimental Validation

The framework was validated using two primary datasets:

  1. English Wikipedia: A subset of 10,000 articles used to validate the bootstrap method and visualize the alignment process.
  2. DBPedia14: A dataset of 40,000 documents across 14 classes. This was used for an ablation study where models were trained on specific subsets (e.g., removing all "Plant" data) to see if the framework could detect the missing information.

Key Results

  • Successful Detection: The datum-level test successfully identified documents from the ablated "Plant" class with high statistical significance. Interestingly, the framework also detected "semantic bleed," where removing one category changed how the model represented related categories like "Animals" and "Natural Places."
  • Model Manifold: By calculating the distance between aligned graphs using spectral norms, the authors used Multi-Dimensional Scaling (MDS) to plot models as points in a low-dimensional space. This induced "model manifold" correlated strongly with downstream metrics, showing an $R^2 > 0.8$ when regressed against classifier similarity.
  • Manifold Accuracy: When training models with varying mixtures of data classes, the resulting empirical manifold almost perfectly reconstructed the theoretical 2D simplex of the training data concentrations.

Discussion and Future Work

While powerful, the methodology is computationally intensive. It relies on Adjacency Spectral Embedding (ASE), which requires Singular Value Decomposition (SVD). Performing this repeatedly for a bootstrap is expensive and currently difficult to scale to millions of data points. Additionally, while the experiments were conducted in controlled settings, future work is needed to see how well this scales to "wild" models (e.g., comparing Llama-3 to Mistral) where architectures and tokenizers differ significantly.

The ultimate goal is to scale this to the "Hugging Face Hub" level, creating a searchable manifold of all public foundation models to help users select the best model for their specific data distribution based on geometric compatibility.

Summary updated

BibTeX
@misc{duderstadt2023comparing,
  author = {Brandon Duderstadt and Hayden S. Helm and Carey E. Priebe},
  title = {{Comparing Foundation Models using Data Kernels}},
  year = {2023},
  eprint = {2305.05126},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2305.05126},
}
Figure