Skip to main content
QUICK REVIEW

[Paper Review] The Vendi Score: A Diversity Evaluation Metric for Machine Learning

Dan Friedman, Adji Bousso Dieng|arXiv (Cornell University)|Oct 5, 2022
Scientific Computing and Data ManagementDecision Sciences26 citations
TL;DR

The Vendi Score defines diversity as the exponential of the entropy of the eigenvalues of a user-defined similarity kernel on the sample set, providing a reference-free, general diversity metric for ML applications.

ABSTRACT

Diversity is an important criterion for many areas of machine learning (ML), including generative modeling and dataset curation. However, existing metrics for measuring diversity are often domain-specific and limited in flexibility. In this paper, we address the diversity evaluation problem by proposing the Vendi Score, which connects and extends ideas from ecology and quantum statistical mechanics to ML. The Vendi Score is defined as the exponential of the Shannon entropy of the eigenvalues of a similarity matrix. This matrix is induced by a user-defined similarity function applied to the sample to be evaluated for diversity. In taking a similarity function as input, the Vendi Score enables its user to specify any desired form of diversity. Importantly, unlike many existing metrics in ML, the Vendi Score does not require a reference dataset or distribution over samples or labels, it is therefore general and applicable to any generative model, decoding algorithm, and dataset from any domain where similarity can be defined. We showcase the Vendi Score on molecular generative modeling where we found it addresses shortcomings of the current diversity metric of choice in that domain. We also applied the Vendi Score to generative models of images and decoding algorithms of text where we found it confirms known results about diversity in those domains. Furthermore, we used the Vendi Score to measure mode collapse, a known shortcoming of generative adversarial networks (GANs). In particular, the Vendi Score revealed that even GANs that capture all the modes of a labeled dataset can be less diverse than the original dataset. Finally, the interpretability of the Vendi Score allowed us to diagnose several benchmark ML datasets for diversity, opening the door for diversity-informed data augmentation.

Motivation & Objective

  • Extend ecological diversity concepts to ML to create a general, reference-free diversity metric.
  • Define the Vendi Score as the exponential of the entropy of the eigenvalues of a normalized similarity matrix.
  • Demonstrate the metric’s flexibility, interpretability, and applicability across domains without requiring a reference distribution.
  • Contrast with existing reference-based and label-dependent diversity metrics and highlight advantages.

Proposed method

  • Define a positive semidefinite similarity function k with k(x,x)=1 and construct kernel matrix K with K_{i,j}=k(x_i,x_j).
  • Compute eigenvalues λ_1,...,λ_n of K/n and define VS_k = exp(-Σ_i λ_i log λ_i).
  • Show VS equals the exponential of the von Neumann entropy of K/n (Lemma 3.1).
  • Analyze properties: effective number, identical elements, partitioning, and symmetry (Theorem 3.1).
  • Discuss computational aspects: O(n^3) for general case, O(d^2 n) when K=X^T X via embeddings, and Nyström approximation when embeddings are unavailable.
  • Relate to related areas (DPPs, spectral clustering).

Experimental results

Research questions

  • RQ1How can diversity be quantified in ML without relying on a reference distribution or labels?
  • RQ2How does the Vendi Score behave with respect to the number of samples, similarity structure, and feature correlations?
  • RQ3Can the Vendi Score capture diversity across multiple domains (molecules, images, text) using domain-agnostic similarity functions?
  • RQ4Does the Vendi Score reveal mode collapse or diversity deficiencies not detected by existing metrics?
  • RQ5What are the computational considerations and practical implementations for computing the Vendi Score on large ML datasets?

Key findings

  • VS increases with true diversity and acts as the effective number of dissimilar elements.
  • VS accounts for correlations between features and increases when combining distinct similarity functions.
  • VS can distinguish diversity among models that have similar traditional diversity scores (e.g., IntDiv) by highlighting duplicates or clustered structure.
  • VS aligns with known diversity patterns in molecular, image, and text decoding experiments, and reveals finer-grained differences in mode collapse.
  • VS provides interpretable diagnostics for dataset diversity and can inform diversity-aware data augmentation.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.