The Platonic Representation Hypothesis — part 5/6

Cleaned-text code points [61502, 77152). Bibliography omitted here; source.md includes it.

Our initial efforts to measure alignment with CKA revealed a very weak trend of alignment between models, even when comparing models within their own modality. This has also been observed by ( Bansal et al., 2021 ) , which had relied on alternative metrics such as model-stitching as it “reveals aspects of representations that measures such as centered kernel alignment (CKA) cannot” ( Bansal et al., 2021 ) .

We chose to use nearest-neighbor as a metric, as methods like CKA has a very strict definition of alignment, which may not fit our current needs. For instance, understanding the precise similarity between unrelated items, such as an orange and Bill Gates, may not be critical.

#### Relationship between CKA and Mutual Nearest-Neighbors

Let ϕ i ∈ ℝ n \phi_{i}\in\mathbb{R}^{n} and ψ i ∈ ℝ m \psi_{i}\in\mathbb{R}^{m} be vectorized features of two models ( e.g. language and vision models). Let 𝐊 i ​ j = κ ⁡ ( ϕ i , ϕ j ) \mathbf{K}_{ij}=\kappa(\phi_{i},\phi_{j}) and 𝐋 i ​ j = κ ⁡ ( ψ i , ψ j ) \mathbf{L}_{ij}=\kappa(\psi_{i},\psi_{j}) be the kernel matrices computed from a dataset using some kernel-function κ \kappa . Using an inner-product kernel, the i ​ j ij -th entry of the centered counterpart of these Kernel matrices is: 𝐊 ¯ i ​ j = ⟨ ϕ i , ϕ j ⟩ − 𝔼 l ​ [ ⟨ ϕ i , ϕ l ⟩ ] 𝐋 ¯ i ​ j = ⟨ ψ i , ψ j ⟩ − 𝔼 l ​ [ ⟨ ψ i , ψ l ⟩ ] \displaystyle\bar{\mathbf{K}}_{ij}=\langle\phi_{i},\phi_{j}\rangle-\mathbb{E}_{l}[\langle\phi_{i},\phi_{l}\rangle]\qquad\qquad\bar{\mathbf{L}}_{ij}=\langle\psi_{i},\psi_{j}\rangle-\mathbb{E}_{l}[\langle\psi_{i},\psi_{l}\rangle] (12) Then, the cross-covariance of 𝐊 \mathbf{K} and 𝐋 \mathbf{L} is given by: 𝖧𝖲𝖨𝖢 ⁡ ( 𝐊 , 𝐋 ) = 1 ( n − 1 ) 2 ​ 𝖳𝗋𝖺𝖼𝖾 ​ ( 𝐊 ¯ ​ 𝐋 ¯ ) \displaystyle\mathsf{HSIC}(\mathbf{K},\mathbf{L})=\frac{1}{(n-1)^{2}}\mathsf{Trace}(\bar{\mathbf{K}}\bar{\mathbf{L}}) (13) which serves as an empirical estimator of the Hilbert-Schmidt Independence Criterion ( Gretton et al., 2005 ) . The Centered Kernel Alignment (CKA) ( Kornblith et al., 2019 ) is then its normalized counterpart: 𝖢𝖪𝖠 ⁡ ( 𝐊 , 𝐋 ) = 𝖧𝖲𝖨𝖢 ⁡ ( 𝐊 , 𝐋 ) 𝖧𝖲𝖨𝖢 ⁡ ( 𝐊 , 𝐊 ) ​ 𝖧𝖲𝖨𝖢 ​ ( 𝐋 , 𝐋 ) \displaystyle\mathsf{CKA}(\mathbf{K},\mathbf{L})=\frac{\mathsf{HSIC}(\mathbf{K},\mathbf{L})}{\sqrt{\mathsf{HSIC}(\mathbf{K},\mathbf{K})\mathsf{HSIC}(\mathbf{L},\mathbf{L})}} (14) CKA measures the congruence between two random variables, with a maximum alignment of 1 1 and a minimum of 0 0 . It is invariant to isotropic scaling and offers a strict notion of alignment, measuring alignment across all samples. Hence, the CKA score reflects the global similarities of the models. This can be illustrated by expanding the trace term in HSIC: 𝖳𝗋𝖺𝖼𝖾 ⁡ ( 𝐊 ¯ ​ 𝐋 ¯ ) = ∑ i ∑ j ( ⟨ ϕ i , ϕ j ⟩ − 𝔼 l ​ [ ⟨ ϕ i , ϕ l ⟩ ] ) ​ ( ⟨ ψ i , ψ j ⟩ − 𝔼 l ​ [ ⟨ ψ i , ψ l ⟩ ] ) \displaystyle\mathsf{Trace}(\bar{\mathbf{K}}\bar{\mathbf{L}})=\sum_{i}\sum_{j}\left(\langle\phi_{i},\phi_{j}\rangle-\mathbb{E}_{l}[\langle\phi_{i},\phi_{l}\rangle]\right)\left(\langle\psi_{i},\psi_{j}\rangle-\mathbb{E}_{l}[\langle\psi_{i},\psi_{l}\rangle]\right) (15) One can modify the definition of alignment to restrict the cross-covariance measurement to samples considered to be nearest neighbors of the current sample i i . This emphasizes similarity over dissimilarity, biasing the measure toward local alignment: 𝖠𝗅𝗂𝗀𝗇 𝗄𝗇𝗇 ​ ( 𝐊 , 𝐋 ) \displaystyle\mathsf{Align_{knn}}(\mathbf{K},\mathbf{L}) = ∑ i ∑ j α ⁡ ( i , j ) ⋅ ( ⟨ ϕ i , ϕ j ⟩ − 𝔼 l ​ [ ⟨ ϕ i , ϕ l ⟩ ] ) ​ ( ⟨ ψ i , ψ j ⟩ − 𝔼 l ​ [ ⟨ ψ i , ψ l ⟩ ] ) \displaystyle=\sum_{i}\sum_{j}\alpha(i,j)\cdot\left(\langle\phi_{i},\phi_{j}\rangle-\mathbb{E}_{l}[\langle\phi_{i},\phi_{l}\rangle]\right)\left(\langle\psi_{i},\psi_{j}\rangle-\mathbb{E}_{l}[\langle\psi_{i},\psi_{l}\rangle]\right) (16) where α ( i , j ) = 𝟙 [ ϕ j ∈ 𝗄𝗇𝗇 ( ϕ i ) ∧ ψ j ∈ 𝗄𝗇𝗇 ( ψ i ) ∧ i ≠ j ] \displaystyle\text{where}\qquad\alpha(i,j)=\mathbb{1}[\phi_{j}\in\mathsf{knn}(\phi_{i})\land\psi_{j}\in\mathsf{knn}(\psi_{i})\land i\neq j] (17)

Where α ⁡ ( i , j ) \alpha(i,j) is a scalar weighting that assigns 1 1 if j j is a mutual nearest neighbors to both ϕ i \phi_{i} and ψ i \psi_{i} , and 0 0 otherwise. We refer to this metric as the Centered Kernel Nearest-Neighbor Alignment (CKNNA) metric. As the number of nearest neighbors k → dim ( 𝐊 ) k\rightarrow\dim(\mathbf{K}) , we recover the original CKA metric.

𝖢𝖪𝖭𝖭𝖠 ⁡ ( 𝐊 , 𝐋 ) = 𝖠𝗅𝗂𝗀𝗇 𝗄𝗇𝗇 ​ ( 𝐊 , 𝐋 ) 𝖠𝗅𝗂𝗀𝗇 𝗄𝗇𝗇 ​ ( 𝐊 , 𝐊 ) , 𝖠𝗅𝗂𝗀𝗇 𝗄𝗇𝗇 ​ ( 𝐋 , 𝐋 ) \displaystyle\mathsf{CKNNA}(\mathbf{K},\mathbf{L})=\frac{\mathsf{Align_{knn}}(\mathbf{K},\mathbf{L})}{\sqrt{\mathsf{Align_{knn}}(\mathbf{K},\mathbf{K}),\mathsf{Align_{knn}}(\mathbf{L},\mathbf{L})}} (18)

We can further relax the metric to treat the cross-covariance term identically across all nearest-neighbor samples. This is equivalent to the assumption that all nearby samples have the same distance. This simplification leads us back to the mutual nearest neighbor metric: ∑ i ∑ j α ⁡ ( i , j ) ⋅ 1 = n ⋅ k ⋅ m NN ​ ( ϕ i , ψ i ) \displaystyle\sum_{i}\sum_{j}\alpha(i,j)\cdot 1=n\cdot k\cdot m_{\texttt{NN}}(\phi_{i},\psi_{i}) (19)

By equating these metrics, we analyze the changes in alignment between language and vision models as we vary the number of neighbors k k in Eqn. 18 . In Figure 10 , we compute the average alignment score across all LLM models. For each k k , we center the scores to the smallest vision model and divide by the standard deviation of the scores. We find that high values of k k show less conclusive alignment across tasks while decreasing k k shows a coherent trend across both models and tasks.

## Appendix B Consistency across various metrics

We describe the metrics in Table 11 and their corresponding properties. The symmetric property implies that the metric is symmetric with respect to the data points d ⁡ ( x , y ) = d ⁡ ( y , x ) d(x,y)=d(y,x) . The global property means all samples are used to compute the distance with respect to every sample. The ordinal property is when the ordering of the distance is taken into consideration. For example, mutual nearest neighbor is not ordinal since the nearest neighbors { a , b , c } \{a,b,c\} and { c , a , b } \{c,a,b\} are treated equally. The batchable property is a computational property that makes it feasible to compute in a reasonable time frame.

#### Vision-vision comparison

In Figure 12 , we evaluate Spearman’s rank correlation among different metrics and hyperparameters over 78 78 vision models (details in Section C.1 ). We find most metrics highly correlated with each other.

#### Cross-modal comparison

We measure vision-language alignment using a range of alternative metrics. We visualize the corresponding alignment results in Figure 13 and Figure 14 . Our findings indicate that alignment sensitivity not only depends on the metric used to compute it but also varies according to the specific tasks on which the vision models are trained.

## Appendix C Experiments on Evaluating Alignment and Convergence

To demonstrate representational convergence, we take off-the-shelf models at multiple scales and multiple modalities and measure their representational alignment.

### C.1 Vision-Vision Alignment and Representation Quality

We consider 78 vision models in total: • 17 17 ViT models ranging from ViT-tiny to ViT-giant, trained on tasks including ImageNet-21k ( Dosovitskiy et al., 2020 ) classification, Masked Autoencoders ( He et al., 2021 ) , DINO ( Caron et al., 2021 ) , and CLIP ( Radford et al., 2021 ) , including some finetuned on ImageNet-12k.

• 1 1 randomly initialized ResNet-50.

• 11 11 ResNet-50 models trained with contrastive learning on ImageNet-1k, Places-365 ( Zhou et al., 2017 ; López-Cifuentes et al., 2020 ) , and 9 9 synthetic image datasets used in Baradad et al. (2022) .

• 49 49 ResNet-18 models trained with Alignment and Uniformity contrastive loss ( Wang & Isola, 2020 ) on ImageNet-100, Places-365, and 47 47 realistic and synthetic image datasets from Baradad et al. (2021) .

To test representation quality, we evaluate linear probing performance on all 19 VTAB classification tasks ( Zhai et al., 2019 ) , which is a standard multi-task transfer learning benchmark containing structured, specialized, and natural datasets covering diverse domains. To reduce compute requirements, we subsample training and validation datasets to have at most 10,000 samples. We consider a representation solves a task if its performance is ≥ 80 % \geq 80\% of the best performance on that task across all 78 models.

To compute the alignment metric, we use k = 10 k=10 nearest neighbors over 1000 1000 image representations computed on Places-365’s validation dataset ( Zhou et al., 2017 ) . This dataset is disjoint from VTAB datasets, although both contain natural images.

### C.2 Cross-Modal Alignment

We compare the representation of an image in a vision model to the representation of a caption describing that image in a language model. The language model families we consider are BLOOM ( BigScience et al., 2022 ) , OpenLLaMA ( Geng & Liu, 2023 ) , and LLaMA ( Touvron et al., 2023 ) . For Figure 4 , we included more recent model families such as OLMo ( Groeneveld et al., 2024 ) , LLaMA3 ( Meta, 2024 ) , Gemma ( Team et al., 2024 ) , and Mistral/Mixtral ( Jiang et al., 2023 ; Jiang et al., 2024 ) . These models were downloaded from Huggingface ( Wolf et al., 2019 ) .

For vision models, we consider ViT models ( Dosovitskiy et al., 2020 ) of various sizes trained on various data and objectives. We mainly consider the popular vision models: classification on ImageNet-21K ( Russakovsky et al., 2015 ) , MAE ( He et al., 2021 ) , DINOv2 ( Oquab et al., 2023 ) , CLIP ( Radford et al., 2021 ) , and CLIP finetuned on ImageNet-12K. These models were downloaded from PyTorch Image Models (TIMM; Wightman (2021) ). This is a subset of the models used in vision-vision comparison.

To compute the alignment metric, we use k = 10 k=10 nearest neighbors over 1024 samples from WIT (Wikipedia-based Image Text; Srinivasan et al. (2021) ). For the vision model, we use class token of each layer, and for the language model, we average pool each layer to a single token. Since it is not trivial to determine where the alignment might occur, we draw inspiration from BrainScore ( Schrimpf et al., 2018 ) and compute pairwise alignment scores, then take the maximum. One of these pairwise comparisons also includes concatenated features. We apply l 2 l_{2} normalization to the features before measuring the distance. As transformer architectures have “emergent outliers” ( Dettmers et al., 2022 ) , we truncate the elements in the features that are above the 95 95 -th percentile.

Simply taking the last token did not show any strong alignment signal. We also experimented with prompting the language model and taking the last token representation. The prompt we used was An image with the caption ‘<caption>’. This is an image of a <fill> Using prompting showed similar trends to average pooling but had slightly lower alignment scores.

## Appendix D Color Cooccurrence Experiment

Here we describe the details of how we created the four color representations visualized in Figure 8 , from left to right.

#### Perceptual representation from CIELAB color space

We embed pixels taken from the CIFAR-10 image dataset ( Krizhevsky et al., 2009 ; Torralba et al., 2008 ) based on the CIELAB color space, which is designed as a perceptually uniform space that changes numerical values correspond to similar perceived changes in color.

#### Three representations from cooccurrence in VISION and LANGUAGE

For these three representations, we first obtain a dissimilarity matrix over colors (in different ways detailed below), then use multidimensional scaling ( Shepard, 1980 ) to find a 3-dimensional embedding in which Euclidean distance between the embeddings for A A and B B , z A {z}_{A} and z B {z}_{B} , best matches this dissimilarity matrix. We use 1,000 1{,}000 fits and take the best match. Afterward, we visually align it with the CIELAB space by finding the best rotation, translation, scaling, and flipping, by running the Kabsch-Umeyama algorithm ( Kabsch, 1976 ; Kabsch, 1978 ; Umeyama, 1991 ) twice, once on 𝐳 \mathbf{z} and once on − 𝐳 -\mathbf{z} , to account for flipping. The dissimilarity matrix we used in each case is described as following: • VISION: Pixel cooccurrence. We collect color cooccurrence statistics from the CIFAR-10 dataset, and estimate a joint distribution p ⁡ ( A , B ) p(A,B) over 300,000 300{,}000 randomly sampled pixel colors A A and B B that occur within a radius of at most 4 pixels of one another. Colors are quantized on a grid in RGB space and represented as discrete variables, and p ⁡ ( A , B ) p(A,B) is modeled as a table of normalized counts, from which we compute the empirical pointwise mutual information matrix K 𝖯𝖬𝖨 ​ ( A , B ) K_{\mathsf{PMI}}(A,B) . Quantization ensures that there is no bias from how color distances are represented in RGB space. Dissimilarity matrix is defined as − K 𝖯𝖬𝖨 ​ ( A , B ) + c -K_{\mathsf{PMI}}(A,B)+c , where c = max A , B ⁡ K 𝖯𝖬𝖨 ​ ( A , B ) c=\max_{A,B}K_{\mathsf{PMI}}(A,B) is an offset to ensure non-negativity (similar to the constant in Section 4.2 and Proposition F.1 that ensures neural networks can express K 𝖯𝖬𝖨 K_{\mathsf{PMI}} ).

• LANGUAGE. We used an approach similar to Abdou et al. (2021) . – We take 20 20 pairs of (color, word) appeared in the dataset collected by Lindsey & Brown (2014) , where 51 51 participants were asked to free name each of the 330 330 colors from the Munsell Color Chart. We filtered words that appeared less than 100 100 times, and computed each word’s associate color by taking the centroid in CIELAB space. Our filtering process followed Abdou et al. (2021) exactly, but resulted in 20 20 colors, a slightly different set than the 18 18 colors they claimed.

– For each of the 20 20 color words <col> , we construct three sentences: The color <col>. This color is <col>. The color of this thing is <col>. and obtain the average sentence embedding from the language encoder, as the embedding for <col> (details below). We find this approach more effective than Abdou et al. (2021) , which uses object names that potentially have color biases, even though the objects may appear in multiple colors.

– Unlike Abdou et al. (2021) , we did not perform linear regression from language embedding to CIELAB space, which distorts distances and easily overfits with only 20 20 samples. Instead, we used multidimensional scaling to best preserve distances, as described above.

– Masked language contrastive learning (SimCSE) embedding: We used sentence embedding from the unsupervised SimCSE RoBERTa-L ( Gao et al., 2021 ) to encode the above sentences into 1024 1024 -dimensional embeddings, and used the pairwise Euclidean distances among <col> embeddings as the dissimilarity matrix.

– Masked language predictive learning (RoBERTa) embedding: We concatenated hidden states of the last four layers of RoBERTa-L ( Liu et al., 2019 ) , following ( Devlin et al., 2018 ) . We averaged across token dimensions, and obtained a 4096 4096 -dimensional embedding for each of the above sentences, and used the pairwise Euclidean distances among <col> embeddings as the dissimilarity matrix.

## Appendix E Caption Density Experiments

We use LLaMA3-8B-Instruct ( Meta, 2024 ) to generate summary captions at various densities for images in the Densely Captioned Images dataset ( Urbanek et al., 2023 ) from the train split. Following Urbanek et al. (2023) , we prompt the language model with the following instructions to generate captions at differing granularity: