TL;DR: We propose the SPEC method for interpretable comparison and alignment of embeddings, identifying how two embeddings cluster a reference dataset differently via spectral analysis.
Abstract: While several feature embedding models have been developed in the literature, comparisons of these embeddings have largely focused on their numerical performance in classification-related downstream applications. However, an interpretable comparison of different embeddings requires identifying and analyzing mismatches between sample groups clustered within the embedding spaces. In this work, we propose the Spectral Pairwise Embedding Comparison (SPEC) framework to compare embeddings and identify their differences in clustering a reference dataset. Our approach examines the kernel matrices derived from two embeddings and leverages the eigendecomposition of the difference kernel matrix to detect sample clusters that are captured differently by the two embeddings. We present a scalable implementation of this kernel-based approach, with computational complexity that grows linearly with the sample size. Furthermore, we introduce an optimization problem using this framework to align two embeddings, ensuring that clusters identified in one embedding are also captured in the other model. We provide numerical results demonstrating the SPEC's application to compare and align embeddings on large-scale datasets such as ImageNet and MS-COCO. The code is available at [https://github.com/mjalali/embedding-comparison](github.com/mjalali/embedding-comparison).
Lay Summary: Feature embeddings serve as the lenses through which AI models perceive and interpret data, as they determine how different inputs are represented and compared. Traditionally, embedding models have been compared based on their performance on downstream classification tasks, such as accuracy on the benchmark ImageNet dataset. However, this approach does not reveal how the models differ in their underlying understanding of the data.
In this work, we propose a new approach for comparing and aligning embedding models by viewing each embedding as a *mechanism for assigning similarity scores between pairs of samples*. A natural question then arises: how do two embedding models cluster the same reference dataset differently? For example, one image embedding might cluster a collection of dog images by breed, while another might cluster them by color or size.
To address this, we develop a spectral method called *SPEC* that identifies clusters of samples that are captured differently by two embedding models. This enables us to explain how different models “see” the world in distinct ways. Beyond interpretability, this analysis also provides a pathway for aligning embeddings, that is, adjusting one embedding to better match the clustering structure of another. Our numerical experiments suggest promising results in applying SPEC to both compare and align embedding models across various domains.
Link To Code: https://github.com/mjalali/embedding-comparison
Primary Area: General Machine Learning->Unsupervised and Semi-supervised Learning
Keywords: Feature embeddings, Interpretable Machine Learning, Kernel methods, Spectral Analysis, Embedding Alignment
Submission Number: 6204
Loading