Intrinsic Dimension Correlation: uncovering nonlinear connections in multimodal representations

## Abstract

Abstract † † footnotetext: Correspondence to: lorenzo.basile@phd.units.it . Code is available at https://github.com/lorenzobasile/IDCorrelation To gain insight into the mechanisms behind machine learning methods, it is crucial to establish connections among the features describing data points. However, these correlations often exhibit a high-dimensional and strongly nonlinear nature, which makes them challenging to detect using standard methods.
This paper exploits the entanglement between intrinsic dimensionality and correlation to propose a metric that quantifies the (potentially nonlinear) correlation between high-dimensional manifolds. We first validate our method on synthetic data in controlled environments, showcasing its advantages and drawbacks compared to existing techniques. Subsequently, we extend our analysis to large-scale applications in neural network representations. Specifically, we focus on latent representations of multimodal data, uncovering clear correlations between paired visual and textual embeddings, whereas existing methods struggle significantly in detecting similarity. Our results indicate the presence of highly nonlinear correlation patterns between latent manifolds.

## 1 Introduction

Figure: Figure 1: Example usage of $I_{d}$Cor: we consider a $3$D dataset in which the points lie on the surface of a cylinder, hence whose intrinsic dimension ($I_{d}$) is $2$. We want to assess the correlation between the $2$D set of coordinates $xy$ (which also has $I_{d}=2$, as shown in the top-right panel) and the $1$D set $z$. Intuitively, as $x$ and $z$ describe a circle, it is evident that knowledge of $z$ (encoded by color) is very informative in determining the $x$ coordinate (e.g. a yellow point is sure to be found in the central region of the $x$ axis), but not in determining the $y$: hence, the correlation coefficient is $0.5$. Conversely, when estimating the correlation between $xz$ (whose $I_{d}$ is $1$, bottom-right panel) and $y$, we can see that having access to $y$ (which is now represented by color) does not give any information on the value of $x$ nor $z$, hence the correlation is 0 0.
Refer to caption: x1.png

Modern machine learning models have the remarkable ability to extract subtle patterns from complex datasets and use them to perform a wide variety of tasks in an astonishingly accurate way. However, to date, we still lack a complete and accurate understanding of their inner workings, especially in the case of deep neural networks.
An active field of research in the interpretability of neural networks is focused on characterizing and quantifying the similarity between different models. To this aim, many works [, , ] evaluate the statistical correlation between the latent representations produced by the models.
This quantification is key because it allows, for example, to disentangle or tie together different aspects of data representations, allowing a better interpretation of how the model makes its decisions. Moreover, assessing the similarity between representations of different models is particularly useful to determine whether the latent spaces are compatible, meaning that information extracted by one model can be successfully transferred to others.

This point is crucial particularly when data points are represented by multiple interrelated modalities, such as visual and textual. In recent times, it has been shown [, ] that it is possible to build multimodal vision-language models starting from pre-trained unimodal encoders, in an effort to match the outstanding performance of state-of-the-art vision-language models such as CLIP []. These findings indicate that modern deep models can produce compatible representations when evaluated on aligned text-image data. However, we find that standard latent similarity metrics such as CKA [] and Distance Correlation [, ] find very frail traces of correlation between paired multimodal representations. We hypothesize that this is due to the strongly nonlinear nature of these correlations, making them difficult to analyze with standard methods.

Our work tackles this challenge by introducing a novel metric, dubbed Intrinsic Dimension Correlation ($I_{d}$Cor) that leverages the concept of intrinsic dimension ($I_{d}$), i.e. the minimum number of variables required to describe the data, to quantify the correlation between high-dimensional data manifolds.
Intuitively, the metric is based on the concept that if two data representations are correlated, the intrinsic dimension of a dataset created by concatenating the features of these representations is reduced, because the information in one representation can describe some aspects of the other.
An example is provided in Fig. 1. Computational experiments indicate that our method is effective at detecting nonlinear relationships where traditional methods often fail.

Thus, the main contributions of this work can be summarized as follows:

- •
We propose a novel perspective that links the concepts of correlation and intrinsic dimension. The key concept is that being the $I_{d}$ a proxy for the information content of a dataset, the $I_{d}$ of a dataset built by merging two datasets will reflect the joint information.
- •
Building on this idea, we propose $I_{d}$Cor, a novel correlation metric based on intrinsic dimension estimation, able to unveil nonlinear correlation between high-dimensional data manifolds, even of unpaired dimensions. We evaluate our metric on synthetic data, showcasing its strengths and limitations in comparison with existing methods.
- •
We then consider more complex scenarios and quantify the correlation between the representations learned by different deep neural networks engaged in large datasets. Specifically, we focus on multimodal data, demonstrating that we can find strong evidence of correlation where standard methods struggle to identify any.

## 2 Background

### 2.1 Correlation in latent representations

Understanding whether different neural networks can learn to process data in similar ways is a crucial point when trying to make sense of their results.
Despite the inherent difficulty in defining what it means for two neural networks to be similar (or, at least, to behave similarly), research in this field has made significant progress in the last few years. A well-established approach to test if two neural networks are similar is that of measuring the statistical correlation between the data representations (or embeddings) learned by them. Recent proposals in this direction include Singular Value Canonical Correlation Analysis (SVCCA) [], Projection Weighted CCA (PWCCA) [], Centered Kernel Alignment (CKA) [], Distance Correlation [, ] and Aligned Cosine Similarity [], among others. For a more complete summary of current approaches to neural network similarity measurement, we defer the reader to [].

These techniques have been widely employed to gain a deeper understanding of various aspects of the way neural models process information: for instance to quantify how different vision architectures encode spatial information [, ] or the relation between learning disentangled features and adversarial robustness []. Taking a slightly different approach, [] provides an in-depth analysis of the sensitivity of CKA to transformations that occur frequently in neural latent spaces, showcasing the importance of gathering results from a broader range of similarity metrics to obtain reliable information.

### 2.2 Multimodal latent space alignment

An example that highlights the importance of assessing similarity, quantified via correlation measures, between neural representations is further demonstrated by the recent empirical findings related to the so-called latent communication. This concept, introduced by [], builds on the idea that it is possible to transfer knowledge between latent spaces, even when they are produced by different models and on different data modalities, provided that some semantic alignment between the data exists (for example, images and their textual descriptions). The feasibility of this knowledge transfer was shown in [] through the introduction of relative representations, where each point of the original representation is mapped according to its distance from a set of fixed anchor points. Using this alternative representation of data, the authors show that it is possible to stitch [] together encoders and decoders coming from different models, with little to no additional training.

Furthermore, numerous recent studies have demonstrated that large state-of-the-art visual and textual encoders can produce transferable representations when evaluated on aligned data (i.e. the same data or data that share some semantics, such as image-caption pairs). Indeed, a simple linear transformation is usually enough to map one latent space into another [, , , ], at least in terms of performance on a specific downstream task, e.g. classification.
It is worth noting that, to perform the alignment of the data, one assumes prior knowledge about the semantic correlation between the data representations (in order to define the anchor points). Hence, while these findings suggest a remarkable similarity between compatible latent spaces, the problem of detecting these correlations without relying on any downstream evaluation is still an open problem. Indeed, our investigation into the connection between aligned textual and visual embeddings reveals a very weak correlation using existing methods, calling for the development of methods that allow the identification of nonlinear correlations in high-dimensional spaces.

### 2.3 Intrinsic dimension

The concept of the intrinsic dimension ($I_{d}$) of a dataset is widely used in data analysis and Machine Learning. Before providing a more formal definition, imagine a dataset where your data points are the cities around the globe described by their 3D Cartesian coordinates. We will say that the embedding dimension of this dataset is three. However, anyone familiar with cartography would agree that nearly the same information can be encoded with only two coordinates (latitude and longitude). Therefore, its $I_{d}$ would be equal to two. Indeed, one of the definitions of $I_{d}$ is the minimum number of coordinates needed to represent the data with minimal information loss. A complementary definition is the dimension of the manifold in which the data lie, which in this case would be a sphere.

Intrinsic dimension estimation is closely related to the field of dimensionality reduction since it gives a hint about which should be the dimension of the projection space to avoid information loss.
Thus, one possible way of estimating the $I_{d}$ is to find a meaningful projection into the lowest dimensional space possible.
A classical method for doing that is Principal Component Analysis [], but it has the drawback that, strictly speaking, it is only correct if the data lie in a hyperplane, since it performs a linear transformation.
Therefore, the development of methods for overcoming such a limitation is an active research field, resulting in techniques like Multidimensional Scaling [], Isomap [], t-distributed stochastic neighbor embedding (t-SNE) [] or Uniform Manifold Approximation and Projection (UMAP) [], to mention some. Other methods can estimate the $I_{d}$ of a dataset even in the case in which projecting in the lower dimensional space is not possible (for example, due to topological constraints). Typically, these approaches infer the $I_{d}$ from the properties of the Nearest Neighbors’ distances. While a full review of these methods is out of the scope of this work (the interested reader is referred to []), it is worth mentioning the Maximum Likelihood approach [], the Dimensionality from Angle and Norm Concentration (DANCo) approach [] or the TwoNN []. The last is the one employed in this work since it is particularly fast and behaves well even in the case of datasets with a high non-uniformity on the density of points.

More recently, several studies have estimated the intrinsic dimension of neural networks’ representations, demonstrating that $I_{d}$ is a valuable tool for understanding the geometry of the latent manifolds produced by deep models. This concept was initially explored in [], where the authors estimated $I_{d}$ across different layers of CNNs, gaining insights into the sequential information flow within these models. Later, [] and [] analyzed the representations of transformer models, across different domains, while [] studied the internal $I_{d}$ of generative diffusion models.
In a slightly different direction, [] unveiled a connection between generalization and the $I_{d}$ of the hidden representations, while [] studied the relation between $I_{d}$ and curvature in latent manifolds.

## 3 Correlation through Intrinsic Dimension

The intrinsic dimension of a dataset is closely linked to the correlations among the various features that define the data points. These correlations determine the regions in which the data points can exist, thereby shaping the underlying manifold. Let us consider the simplest example: a two-dimensional dataset. If the two variables are uncorrelated, their linear correlation coefficient ($R^{2}$) approaches zero while, if one feature is a linear function of the other, $R^{2}$ becomes equal to one. The two scenarios differ by the $I_{d}$ of the data manifold: the first case corresponds to a plane ($I_{d}=2$), while the second corresponds to a line ($I_{d}=1$). If we examine a slightly more complex case, the advantage of exploiting the $I_{d}$ for correlation becomes evident. Let us consider a spiral-shaped 2D dataset: it has $R^{2}\approx 0$ due to the nonlinear nature of the correlation between the two variables, while the behavior of the $I_{d}$ is identical to the one observed on the linearly correlated dataset, as reported in detail in section 3.1.

To leverage these interesting properties for correlation quantification, we compute the $I_{d}$s of the two representations that we want to check for correlation ($id_{1}$ and $id_{2}$) and the $I_{d}$ of the dataset build by merging the two representations ($id_{C}$) and compute the correlation index $I_{d}$Cor as:

$$ $I_{d}Cor=\frac{id_{1}+id_{2}-id_{C}}{\texttt{max}(id_{1},id_{2})}$ (1) $$

The intuition is that, if the two representations were independent, the $I_{d}$ of the merged dataset would be the sum of the two $I_{d}s$. Instead, if they were correlated, $id_{C}$ would be less then their sum since there would be some degree of redundancy between the coordinates of both representations.

A more formal view comes from information theory. Mutual information is a fundamental metric that quantifies the relationship between simultaneously sampled random variables. However, its computation from data samples is challenging due to the curse of dimensionality. One potential solution is the Sliced Mutual Information method [], which projects high-dimensional random variables to scalars and averages over random projections. In our approach, presented in detail in Algorithm 1, we utilize the properties of intrinsic dimension to avoid the need for projection, thus examining the data in its entirety. Indeed, the intrinsic dimension can serve as a proxy for the information content of a dataset [, ]. Thus, $id_{1}$ and $id_{2}$ will be the information content of each of the datasets independently considered, while $id_{C}$ will be the information content of the joint dataset. Therefore, the numerator in the $I_{d}$Cor equation will correspond to the Mutual information between the datasets (applying the decomposition formula). Summarizing, $I_{d}$Cor is analogous to the Normalized Mutual Information (NMI) with max normalization [], but it uses intrinsic dimension as a proxy for entropy.
In this way, the correlation we adopt corresponds to the fraction of information contained in the more informative representation that is shared by the other dataset. Translated in terms of manifold learning, this represents the fraction of independent variables in the higher-dimensional dataset (in terms of $I_{d}$) that can be recovered from the lower-dimensional dataset.

To illustrate this, let us examine Fig. 1. In this synthetic 3D dataset, the data points lie on a cylinder-shaped manifold, where coordinates $x$ and $z$ are related through a nonlinear relationship, while $y$ is fully independent of the other two. This is evident when computing the $I_{d}$ values: the $I_{d}$ of the full dataset is $2$, as is the $I_{d}$ for the datasets with $xy$ or $yz$ variables, whereas the $I_{d}$ for the $xz$ dataset is $1$. Therefore, using the $I_{d}$Cor index to assess the correlation between $xy$ and $z$ yields a value of $0.5$, indicating that one of the two variables describing the $xy$ dataset can be recovered from $z$. Conversely, for the correlation between $xz$ and $y$, $I_{d}Cor=0$, confirming the statistical independence of $y$.

Nevertheless, estimating $I_{d}$ can be prone to errors. To mitigate this, we developed a method to assign a $p$-value to the observed correlation. This method employs a permutation test [] on $id_{C}$. Specifically, we calculate $I_{d}$ for several independent samples of a combined dataset, created by merging the two original datasets and randomizing the pairings to disrupt any existing correlations. This process allows us to determine the probability of accepting the hypothesis that the two datasets are uncorrelated.

Figure: Algorithm 1 $I_{d}$Cor

### 3.1 Synthetic experiments

As a first step, we evaluate our correlation method in a simple and controlled setting. We produce three 2D datasets, displayed in the Appendix in Fig. 8. Such datasets are made of two variables that are linearly correlated, uncorrelated, and nonlinearly correlated. The first setting is simply obtained by arranging $x$ and $y$ on a straight line, in the second case both random variables are sampled independently from a normal Gaussian distribution, while the last dataset contains data arranged on a spiral curve.

We report our correlation results in Table 1. In the simpler cases (linear and random data) our method agrees with linear correlation and distance correlation, correctly identifying a very strong correlation in linear data and the lack thereof in random data. The spiral dataset constitutes a more tricky testbed: while there is a clear correlation between the two variables, it is a highly nonlinear one, and the linear correlation coefficient is around 0 0. Even distance correlation, despite being a nonlinear method, fails to find any strong signal of correlation, returning a value very close to 0 0. Instead, our method correctly identifies the strong dependency between the two variables, with a correlation coefficient of $0.94$, determined with high confidence, as witnessed by the $p$-value of $0.01$.
We note here that our method relies on an intrinsic dimension estimator (in this paper, we employ TwoNN []), and it inherits substantial properties from it. On the negative side, $I_{d}$ estimators are not oracles, and they can return values that slightly differ from what one would expect (e.g. $I_{d}$ lower than $1$ in our linear dataset), or even totally fail (when the $I_{d}$ becomes large enough, the estimator is also affected by the curse of dimensionality). Conversely, the choice of employing TwoNN makes our method extremely efficient (the correlation coefficient can be obtained with just 3 calls to the estimator), allowing it to scale easily to large and high-dimensional datasets.
Moreover, it is worth noting that, since TwoNN only relies on local distances, up to the second nearest neighbor, our correlation method is automatically invariant to any transformation that preserves the local neighborhood structure of data points.

**Table 1: Correlation in 2D datasets. ($\mathbf{R^{2}}$): linear correlation coefficient; ($\mathbf{dCor}$): distance correlation coefficient; ($\mathbf{I_{d}}$): intrinsic dimension of the concatenated (2D) dataset; ($\mathbf{I_{d}Cor}$): correlation coefficient ($\varrho$) returned by our method; ($\mathbf{p}$-value): significance of the correlation detected by our method ($100$ shuffles).**
| Data | $\mathbf{R^{2}}$ | $\mathbf{dCor}$ | $\mathbf{I_{d}}$ | $\mathbf{I_{d}Cor}$ | $\mathbf{p}$-value |
| --- | --- | --- | --- | --- | --- |
| Linear | $1.00$ | $1.00$ | $0.98$ | $1.00$ | $0.01$ |
| Random | $0.00$ | $0.00$ | $1.99$ | $0.00$ | $0.37$ |
| Spiral | $0.01$ | $0.02$ | $1.07$ | $0.94$ | $0.01$ |

## 4 Results

In this section, we assess our proposed $I_{d}$Cor algorithm using representations generated by different neural networks on various datasets. We begin with a straightforward example that underscores the difficulty faced by standard methods in identifying nonlinear relationships, then progress to more extensive applications involving visual representations and multimodal text-image representations.
For some experiments, we do not report the correlation $p$-value returned by our method. In such cases, the $p$-value is always the lowest possible according to the formula in Algorithm 1 ($\frac{1}{S+1}$, where $S$ is the number of permutations, $100$ in most of our experiments).

### 4.1 A motivating example

Figure: Figure 2: Correlation results with different methods between MNIST data and their final representations computed by a randomly initialized MLP, with variable degree of activation nonlinearity, increasing on the $x$ axis.
Refer to caption: x2.png

Across different layers, neural networks encode information in complex, high-dimensional representations that differ significantly from the simpler datasets discussed earlier in this manuscript. In particular, deep models are structured to learn nonlinear functions of the input data, typically through the use of nonlinear activation functions like ReLU. This suggests that the representations produced by different networks on the same data can be correlated in complex, nonlinear ways. Consequently, methods used to detect such correlations need to be capable of capturing this degree of nonlinearity.

To illustrate this phenomenon, we showcase a simple example: we consider a randomly initialized multilayer perceptron (MLP), made of $15$ fully connected layers of $784$ neurons, followed by a LeakyReLU activation. LeakyReLU is a parametric activation function, whose behavior depends on a parameter called slope: if the slope is $1$, it behaves like the identity function, rendering our MLP a linear function of the input, while lower slope values make the network nonlinear, with 0 0 corresponding to the standard ReLU. We feed our MLP with the MNIST [] dataset at increasing degrees of nonlinearity (which corresponds to decreasing the slope) and compute the correlation between the representation at the final layer and the input data, both with our method and with established baselines (SVCCA, Distance Correlation, linear kernel CKA, and RBF kernel CKA).

As we report in Fig. 2, our method is weakly affected by the increasing nonlinearity in the correlation, as it consistently returns correlation coefficients above $0.75$. Existing baselines capture high correlation in linear or quasi-linear cases (high slope), but the signal tends to degrade quickly as the slope decreases. This is especially true for SVCCA, as it is a linear method, but even nonlinear alternatives see the initial correlation fade when the activation becomes ReLU, reaching values below $0.5$.

### 4.2 ImageNet representations

Moving to a more realistic setting, we test our method on measuring similarity between ImageNet [] embeddings coming from different neural encoders.
We consider a variety of pre-trained architectures, including CNNs (ResNet-18 [] and EfficientNet-B0 []), four variants of Vision Transformers [] (including a ViT-CNN hybrid) and two ViT-based models trained on a self-supervised vision-language loss (CLIP-ViT-B [] and SigLIP-ViT-B []). For all the models, we consider the output of the last hidden representation produced by the encoder, before the classification head: in supervised ViTs this choice corresponds to the last class token, while in CNNs to the pooler output. For CLIP and SigLIP, we consider instead the image representation in the shared vision-language space.

Figure: Figure 3: Correlation results on ImageNet representations, obtained using: left $I_{d}$Cor (ours); right Distance Correlation. Both methods are able to detect non-negligible correlation. More baseline results are reported in the Appendix.
Refer to caption: x3.png

Since some of the correlation methods we employ as baselines (namely, CKA) are particularly expensive in terms of memory requirements, for all our experiments we randomly sample a subset of $30000$ data points.

We report the correlation results produced by our algorithm in Fig. 3, along with the correlation scores returned by Distance Correlation (dCor), as it is the baseline method that most closely matches ours in terms of mean off-diagonal correlation ($I_{d}$Cor mean: $0.87$, dCor mean: $0.51$). Detailed results for SVCCA (mean: $0.44$), linear kernel CKA ($0.43$) and RBF kernel CKA ($0.44$) are reported in the Appendix in Fig. 6.
In this setting, all models are computing embeddings for the same data points, hence we would expect significant correlation to be present for any given pair of models. Indeed, all methods are clearly capturing such similarity, including SVCCA, which suggests that a relevant component of this correlation is actually linear.

#### 4.2.1 Coarse alignment

The previous section demonstrated that our method effectively identifies strong correlations within perfectly aligned datasets of representations. We now aim to explore how the method’s performance might vary when applied to coarsely aligned data. To test this, we utilize the inherent class information of ImageNet data. Specifically, we randomly shuffle the embeddings generated by a model while keeping the labels unchanged, and then compare this modified dataset with the original dataset prior to shuffling. In other words, given a point index $i$ of class $C_{i}$, we pair it with another randomly chosen point $j$ of class $C_{j}$ with the condition that $C_{i}=C_{j}$.
This allows us to assess the robustness of our correlation estimation in less ideal conditions: we expect the correlation signal to decrease, as alignment is a crucial property for our method to detect similarities. However, as we report in Table 3, we are still able to identify correlations with high confidence, as demonstrated by the low $p$-values. Interestingly, the values of the correlation suggest that the number of features needed to perform the classification task is between 50 and 70 %. Moreover, we observe that
the models that exhibit lower correlation are CLIP and SigLIP, which have been trained with a self-supervised loss, hence without the explicit notion of class.
For reference, we also report the $p$-values obtained when one of the two datasets is freely shuffled (irrespective of class labels), which correctly reports a lack of correlation.
It is also worth noting that, while the average value of the correlation for $I_{d}$Cor is $0.63$, the values for the baselines are in the range $(0.32-0.48)$.

**Table 2: Correlation between ImageNet representations when exact alignment is broken. Results are shown, in terms of $p$-value and correlation coefficient, for the coarse alignment case, in which data are shuffled while preserving the labeling. The last row reports the $p$-value for the fully shuffled case, in which no constraint is enforced on labels, and correlation is not present.**
| Metric | EfficientNet | SigLIP | ViT-B-16 | ViT-B-32 | ViT-hyb. | ViT-L | ResNet | CLIP |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| $p$-val. (coarse) | $0.01$ | $0.01$ | $0.01$ | $0.01$ | $0.01$ | $0.01$ | $0.01$ | $0.01$ |
| $I_{d}$Cor (coarse) | $0.61$ | $0.52$ | $0.68$ | $0.69$ | $0.63$ | $0.72$ | $0.66$ | $0.52$ |
| $p$-val. (rand) | $0.11$ | $0.64$ | $0.89$ | $0.80$ | $0.12$ | $0.19$ | $0.74$ | $0.45$ |

### 4.3 Multimodal representations

We now shift our focus to a multimodal context, where we examine the similarities between hidden spaces learned by text and image encoders. We use two datasets, N24News [] and MS-COCO 2014 [], both of which consist of image-caption pairs. This analysis will help us understand how textual and visual representations correlate when evaluated on related multimodal content. Images are encoded using a representative subset of the vision models introduced in Sec. 4.2: two CNNs (EfficientNet-B0 and ResNet-18), two ViTs (ViT-B-16 and ViT-hybrid), and the visual branch of CLIP. For text we employ five architectures, all taken pretrained: BERT [], both cased and uncased, ALBERT [], Electra [] and finally the text encoder of CLIP. For all text models, we consider the last representation of the class token.

We report the correlation results obtained on N24News in Fig. 4, comparing our method against Distance Correlation (dCor), which is once again the closest-performing baseline method. Our $I_{d}$Cor yields a mean off-diagonal correlation of $0.66$, which is noticeably higher than those of baseline methods, in the range $(0.25-0.29)$.
In fact, the correlation heatmaps for all baseline methods reveal a clear block structure, as such methods are able to capture correlation only among same-modality encoders, but fail on cross-modal correlation. Full results for baseline methods are available in the Appendix (Fig. 7). Instead, our method returns significant correlation values even across different modalities, in accordance with previous findings [] that proved N24News representations to be transferable across models and modalities.
Experiments on MS-COCO confirm the behavior observed for N24News, as discussed in the Appendix (section A).

Figure: Figure 4: Correlation results on N24News representations, obtained using: left $I_{d}$Cor (ours); right Distance Correlation (dCor). Like all other baselines we evaluate, dCor is only able to spot correlations between encoders of the same modality, while $I_{d}$Cor reveals significant correlation for all model pairs.
Refer to caption: x4.png

### 4.4 Computational resources

We performed all the computations on a NVIDIA A100 GPU, equipped with 40GB of RAM. The main computational hurdle of our method is the estimation of $I_{d}$ through TwoNN: our implementation follows closely that of [], which we translated to PyTorch to enable GPU acceleration. With this setup, $I_{d}$Cor runs in the order of $1$s on two $1024$-dimensional datasets of $30000$ points. Just like our correlation method, all the representation similarity baselines we employ greatly benefit from GPU acceleration: we used them in their PyTorch implementations provided by [] (SVCCA), [] (CKA) and [] (Distance Correlation), with minor adaptations. Pretrained models were obtained from the Transformers library by HuggingFace [], details on the checkpoints we employed are provided in the Appendix (section D).

## 5 Discussion

Our work introduces a novel and robust method for detecting complex nonlinear correlations in high-dimensional spaces. Due to its flexibility, this method can be employed in a wide range of applications, from natural language processing to computer vision and beyond (including other fields of science, like physics), offering a new type of analysis to address how machine learning models represent data.
Remarkably, our results show the effectiveness of the method to detect a correlation signal in multimodal data where we know a correlation should exist but where standard methods struggle to identify any.

##### Limitations

Among the possible drawbacks of the method, it is worth mentioning that it is fully dependent on the precision of the $I_{d}$ estimator, so, if the $I_{d}$ is wrongly predicted the method will fail to find correlations. This would likely happen when the $I_{d}$s involved are big, so even last-generation estimators will be affected by the curse of dimensionality.

##### Future directions

Our method lays the foundations
for many interesting future research avenues. For example, it can be used to disentangle data representations by minimizing the correlation between representations from two or more datasets. This approach could be highly relevant in applications such as multimedia analysis, cross-modal retrieval, and data fusion, potentially resulting in more interpretable neural networks.
In conclusion, our method not only enhances the understanding of high-dimensional data correlations but also paves the way for innovative solutions in representation learning and interpretability, making it a valuable tool across many fields of machine learning.

## Appendix A Results on MS-COCO

In figure 5 we report the correlation results we obtain on MS-COCO [], a multimodal dataset containing images and the corresponding captions. We employ the same models used for N24News (section 4.3). As for the other dataset, we observe that $I_{d}$Cor outperforms previous baselines, which significantly struggle to find similarities between embeddings of different modalities.

Figure: Figure 5: Correlation results on MS-COCO representations, obtained using: (A) our method $I_{d}$Cor; (B) linear kernel CKA; (C) RBF kernel CKA; (D) SVCCA; (E) Distance Correlation
Refer to caption: x5.png

## Appendix B Additional correlation baselines

Here we provide detailed results for latent correlation in ImageNet and N24News, using SVCCA, linear kernel CKA and RBF kernel CKA. These methods perform similarly to Distance Correlation, and only capture high correlation between representations belonging to the same data modality.

Figure: Figure 6: Additional baseline correlation results on ImageNet representations, obtained using: (A) Linear CKA; (B) RBF CKA; (C) SVCCA
Refer to caption: x6.png

Figure: Figure 7: Additional baseline correlation results on N24News representations, obtained using: (A) Linear CKA; (B) RBF CKA; (C) SVCCA
Refer to caption: x7.png

## Appendix C 2D datasets

In this section, we display the 2D synthetic datasets we used in section 3 as a first validation for our method.

Figure: Figure 8: Synthetic datasets, each associated with its intrinsic dimension.
Refer to caption: x8.png

## Appendix D Model details

All models we employ are taken pretrained from the HuggingFace transformers [] library. We report here the full list of pretrained models we employed in this work, associated with the name of the corresponding checkpoint in the library.

**Table 3: Reference guide for pre-trained model checkpoints in HuggingFace transformers [] library.**
| Name in the paper | Pretrained checkpoint name |
| --- | --- |
| ALBERT | albert/albert-base-v2 |
| BERT-C | google-bert/bert-base-cased |
| BERT-U | google-bert/bert-base-uncased |
| Electra | google/electra-base-discriminator |
| CLIP (-T/-V) | openai/clip-vit-base-patch16 |
| EfficientNet | google/efficientnet-b0 |
| SigLIP | google/siglip-base-patch16-224 |
| ViT-B-16-224 (ViT) | google/vit-base-patch16-224 |
| ViT-B-32-384 | google/vit-base-patch32-384 |
| ViT-hybrid | google/vit-hybrid-base-bit-384 |
| ViT-L-16-224 | google/vit-large-patch16-224 |
| ResNet | microsoft/resnet-18 |

## Peer Reviews

confidence: 4
contribution: 3
initial_rating: 5
presentation: 3
questions: - How does IdCor perform under different levels of added noise, especially when applied to real-world, noisy datasets?

- Why is Id+ not included in Table 2?
soundness: 3
strengths: - IdCor introduces an interesting approach of measuring nonlinear correlations by combining the notions of mutual information and intrinsic dimensionality.

-  The paper conducts experiments using both synthetic and real-world datasets.

- The paper is well-written and organized.

- Interesting discussion on latent space alignment.
summary: The paper introduces a new metric, Intrinsic Dimension Correlation (IdCor), designed to detect nonlinear correlations between features describing data points, in particular the latent representations output by deep networks. IdCor leverages "intrinsic dimension" (Id) as a proxy for information and estimates correlation using a normalized mutual information approach. By quantifying correlation based on the minimal number of variables required to represent data, IdCor aims to provide insight into nonlinear dependencies that standard methods may not achieve. The authors test their method on a variety of synthetic datasets and deep neural networks, including multimodal models.
weaknesses: __Choice of Id estimator:__ Not enough reasons are given for the choice of using TwoNN. Given that this is the main point of the paper, benchmarking it against other more popular methods for Id estimation would be strongly advised, e.g., Levina & Bickel's. Moreover, through lines 179--185, the authors list several references that estimated the Id found in the representations output by deep networks. I believe it would be helpful to list which methods those authors used for computing Id and possibly using the same ones to compare against using TwoNN.

__Id assumptions:__ The proposed measure IdCor assumes that the intrinsic dimensionality is roughly constant throughout the data. That is unlikely to be true for most real-world data (in line with what the authors point out in lines 312--313). A simple example is one in which we have clustered data but different clusters might have different dimensionalities -- a reasonable assumption if one takes into account that a clustered representation might be clustered precisely due to the fact that different "concepts" may require different topologies. E.g., the dimensionality of the space of images of dogs is likely to much much higher than that of images of soccer balls due to the different symmetries and "directions" of variability (e.g. color) between the two objects encountered in natural scene data. Here are a couple of recent papers that directly consider this possibility and propose solutions for dealing with this dimensional heterogeneity:

[1] Allegra, M., Facco, E., Denti, F., Laio, A., & Mira, A. (2020). "Data segmentation based on the local intrinsic dimension". Scientific reports, 10(1), 16449. 

[2] Dyballa, L., Zucker, S., (2023). “IAN: Iterated Adaptive Neighborhoods for manifold learning and dimensionality estimation”, Neural Computation, 35 (3): 453-524. 

The first one is in fact by the same group as that of the TwoNN method. So I would consider both including this limitation in Discussion section, and proposing a way to adapt the IdCor computation that would allow for multiple dimensionalities to be present within the same dataset. (E.g., considering each subset with homogeneous dimension at a time and later aggregating the results somehow seems like a reasonable candidate strategy.)

__Synthetic results:__ I believe the authors jump prematurely into the deep net section without sufficiently exploring the synthetic data first (important, because it provides ground truth). For example: since the data is randomly sampled, how many times has this experiment been repeated. Then, values reported in Table 2 should show the mean and standard. dev. across multiple random seeds, not just one instance. (as far as I understand it, although multiple permutations were considered to compute the p-values, they all came from the same data set, correct?)  How many points are sampled? (Important when estimating dimensionality.) How robust are the results w.r.t. the average sampling density? How is the sampling done? Uniformly or drawn from a Gaussian distribution? (both should be tested) Why not show the results for several values of Id? I think the results with synthetic data can be made considerable more interesting but adding these. These modifications are easy to implement (see [2] for examples), and it would be a much stronger way of empirically testing the robustness of the proposed method. (I would also suggest to move these results into the Results section.)

__Figure 2:__ the points plotted should also be the mean across several different weight initializations of the MLP, with std. dev. shown as error bars.

__Figure 3:__ Authors show that the value of IdCor are high when the same dataset is compared across multiple representations output from networks. I believe it would be important to show that if the dataset is changed, then IdCor should go down considerable (this would work as a sanity check that the method is not simply giving a high correlation between any two high-dimensional datasets). The multimodal results in Table 3 do not help in showing this, since the values produced by IdCor are still the highest (or close to) every case.

__Minor points:__

Line 239-240: It is confusing to call these datasets "2D", given that two of them are actually 1-D manifolds. What is common between them is that they are all embedded in 2D space;  this should be made more clear. Line 196: for the same reason, it is inadvisable to call the spiral shaped dataset simply a "2D dataset". It is a 1-D manifold embedded in 2-D ambient space. This is in fact what was shown in Fig. 1, bottom-right: the Id of the circle is correctly labeled as 1.

The paper could elaborate more on how IdCor’s detection of nonlinear correlations leads to interpretability benefits, providing examples of how this information could aid in model evaluation or adjustment. In other words, clarifying how quantifying similarity between different models (lines 36--37, 107)) can help interpreting them?

TwoNN should be defined either in the main text or the Appendix since it is the method underlying all Id computations used in IdCor.

Lines 163-164: PCA might not be correct even if the data lie in a hyperplane: for example, a circle (1-dimensional) would lie on a hyperplane yet would require 2 principal component coordinates to be embedded. Thus, PCA can find the minimum number of dimensions required to embed the data (dimension of the ambient space), but not necessarily their intrinsic dimension (in the topological sense).

The methods listed in lines 166--169 can be used for dimensionality reduction but not for dimensionality estimation. Unlike PCA, which produces a way to rank dimensions based on their explained variance, all of these require the user to pre-specify the desired dimension.

---

confidence: 4
contribution: 2
initial_rating: 5
presentation: 2
questions: 1. Have you run experiments where you examine more than two nearest neighbors of each point when computing intrinsic dimension?
2. What is the exact computational complexity of your proposed approach?
3. Why is only the p-value reported for coarse vs. random alignment? I would like to see the IdCor value as well.
4. Are the p-values consistently the lowest possible in all the multimodal heatmaps?
5. For the N24News dataset, do you treat the headline as the corresponding text component or the caption?
soundness: 3
strengths: 1. Innovative Use of Intrinsic Dimensionality for Correlation Measurement: Extending traditional distance correlation by looking at intrinsic dimension correlation is a novel perspective in representation similarity metrics. 
2. Focus on Multimodal and Nonlinear Correlation: $I_{d}$Cor is specifically designed to tackle non-linear correlations in multimodal data, an area where traditional similarity metrics often struggle. 
3. $I_{d}$Cor incorporates permutation testing to establish the statistical significance of its correlation scores. This approach adds robustness to the metric, allowing users to differentiate between meaningful correlations and spurious ones with a quantifiable p-value.
summary: The paper presents Intrinsic Dimension Correlation ($I_{d}$Cor), a novel similarity metric aimed at detecting correlations between high-dimensional data representations, particularly in nonlinear, multimodal contexts. Unlike traditional similarity metrics that rely on pairwise distances or explicit mappings, $I_{d}$Cor leverages intrinsic dimensionality (ID) as a proxy to assess correlation. It operates by measuring the reduction in combined intrinsic dimensionality when two datasets are concatenated, capturing their shared structural complexity. The paper applies $I_{d}$Cor to multimodal datasets, showing potential in revealing non-linear correlations between different modalities of data corresponding to the same source. $I_{d}$Cor demonstrates the ability to detect correlations that traditional metrics like CKA, CCA, and Distance Correlation (dCorr) might miss.
weaknesses: I believe the current version of the manuscript requires several improvements, but I’ve summarized my primary concerns below:

1. **Insufficient Evaluation:** $I_{d}$Cor’s evaluation lacks rigor in assessing fundamental metric properties. I would like to see a comprehensive study on the metric’s invariance properties (e.g., scaling, rotation, linear/non-linear transformations, translations, subset translations, etc.). Additionally, Ding et al. [1] proposed a comprehensive set of sensitivity and specificity tests for validating new similarity metrics. Performing these tests on $I_{d}$Cor would help establish its standing among existing metrics.


2. **Lack of Comparison to Recent, Relevant Metrics:**  $I_{d}$Cor is compared only to CCA and CKA, yet several newer similarity metrics have since emerged, such as Representation Topology Divergence (RTD) [2], Graph-Based Similarity (GBS)[3], and Inner Product Similarity[4]. You could even look at Deep CCA [5]. These metrics are known to capture complex structural and topological differences, often outperforming CKA and CCA. Benchmarking $I_{d}$Cor against these advanced metrics would clarify its effectiveness and limitations, especially in high-dimensional and multimodal contexts. 

3. **Ambiguity in Purpose:** The paper’s positioning of $I_{d}$Cor as either a structural or functional similarity metric is unclear. It is referred to as a correlation metric, but intrinsic dimension calculation relies on distances between data points, suggesting a structural basis. However, the metric is evaluated on its ability to detect similarities between multimodal representations (which, according to Maiorca et al. [6], differ primarily by affine transformations), leaning toward functional similarity. The choice of benchmarking $I_{d}$Cor against structural similarity metrics like CKA (known to be limited to scaling and orthogonal invariances) instead of functional metrics contributes to this ambiguity. I recommend clarifying the intended classification in the paper.

4. **Limitations of TwoNN:** 
- $I_{d}$Cor ’s reliance on intrinsic dimension estimation through second-nearest neighbor (TwoNN) consistency severely limits its insight into global structural alignment. I find it hard to see how $I_{d}$Cor could accurately quantify correlation between two spaces as a global value when it relies only on 2-NN consistency to assess similarity. Many fundamental changes can be made to a representation space while maintaining 2-NN consistency. Since the metric is “automatically invariant to any transformation that preserves the local neighborhood structure of data points,” it would miss changes that impact global structure but not local neighborhoods. This narrow focus makes $I_{d}$Cor unreliable in scenarios requiring a functional or comprehensive structural alignment.
- The paper evaluates $I_{d}$Cor on multimodal alignment with spaces that are already trained and tend to have good nearest neighbor consistency. I would like to see tests on spaces with high local but low global consistency to see if  $I_{d}$Cor can still perform well. This limitation raises the concern that  $I_{d}$Cor may be reporting high correlations due to a lack of sensitivity to broader transformations rather than genuinely revealing correlations among multimodal spaces. Additional experiments with controlled transformations (such as subset translations) are necessary to determine whether  $I_{d}$Cor’s high correlation scores reflect meaningful similarity or an inability to detect fundamental changes in the representation space.


    
    



[1] Frances Ding, Jean-Stanislas Denain, and Jacob Steinhardt. Grounding representation similarity
through statistical testing. Advances in Neural Information Processing Systems, 2021. 

[2] Serguei Barannikov, Ilya Trofimov, Nikita Balabin, and Evgeny Burnaev. Representation topology
divergence: A method for comparing neural network representations. Proceedings of
the 39th International Conference on Machine Learning, 2022

[3] Zuohui Chen, Yao Lu, Jinxuan Hu, Wen Yang, Qi Xuan, Zhen Wang and Xiaoniu Yang. Graph-Based Similarity of Neural Network Representations. arXiv 2021

[4] Wei Chen, Zichen Miao, and Qiang Qiu. Inner product-based neural network similarity. In
Thirty-seventh Conference on Neural Information Processing Systems, 2023.

[5] Galen Andrew, Raman Arora, Jeff Bilmes, Karen Livescu.  Deep Canonical Correlation Analysis.  Proceedings of the 30th International Conference on Machine Learning, PMLR 28(3):1247-1255, 2013.

[6] Valentino Maiorca, Luca Moschella, Antonio Norelli, Marco Fumero, Francesco Locatello, and
Emanuele Rodola. Latent space translation via semantic alignment. Thirty-seventh Conference
on Neural Information Processing Systems, 2023.

---

confidence: 4
contribution: 3
initial_rating: 5
presentation: 3
questions: I don't have any questions.
soundness: 2
strengths: 1. Simple and well-motivated idea. I really like this idea! 
2. Writing is good and easy to read.
3. Potentially influential application for deep learning and many field like neural science (distance between artificial/biological neural representation).
summary: This paper propose a way to define a proxy metric for mutual information to measure the relationship between two high dimensional distribution. The idea is fairly simple. Given distribution X and Y, and joint distribution X \times Y, it uses manifold learning based dimension reduction algorithm to reduce the dimension of X, Y and X \times Y. Intuitively, if X \times Y can be reduced to the same dimension of X or Y, then X and Y must be highly related. Moreover, the relationship between X and Y can be nonlinear due to the nonlinear dimension reduction algorithm. 

They author shows clean and well illustrated toy example to illustrate how the metric identify the nonlinear relationship between data. And show the model can be applied to analyze the distance between two neural representations and multi-model neural representations.
weaknesses: 1. I think you want to show the discriminative power of I_dCor. This is probably the most important weakness. i.e. show I_dCor is not just a high score in general. If it maps different neural representation trained on imagenet to be close, then it should also map neural representations pre-trained on different dataset to be far away. So it would nice if you can come up with a task or metric that measure the discriminative power of your method I_dCor compared to other method. For example, construct subset of Imagenet using class label, map through a pretrained encoder, and use I_dCor to measure distance between the subset. You can use the distance metric and maybe just nearest neighbor to classify the label of each subset. Then show the I_dCor is superior then other measure. This might not be the best idea, but I believe you guys can come up with something better.

2. The assumption might be too strong. Like the author mentions, this idea is depends on the manifold learning algorithm for non-linear dimension reduction. The manifold learning must be able to identify the manifold from a high dimensional ambient space. But personally I think it's fine if you show the method actually works well, but you need more analyze to define "work well" than what you currently have. For example, see 1.

3. The analysis in figure 3 could be less ambiguous. I think you want to say the different (neural) representation of ImageNet is consistently similar under I_dCor, i.e. the similarity score has small variance. But it has a much bigger variance under a different metric under other metrics. I think this could be better shown than using two tables. 

4. I'm not sure if figure 2 is that meaningful. Because these different metric are under different scale right? As the network becomes more nonlinear, other metric decrease, so is I_dCor. So I'm not sure what it really says.

---

confidence: 3
contribution: 3
initial_rating: 8
presentation: 3
questions: In table 3/Section 4.2.1 "Coarse Alignment", it is seen that IdCor is outperformed by other methods for CLIP and SigLIP. The authors do give an explanation as to why, stating that these two use a self-supervised loss, which have no explicit notion of class. This is a good explanation, but I think this should be discussed a little bit further. Is it that any model with no explicit notion of class/using a self-supervised loss will cause IdCor to be less performant (meaning this should be put as a limitation), or is this a fluke of these two specific examples, and on other methods with self-supervised loss, IdCor outperforms other metrics? Either a theoretical explanation of why this is the case, or a few more examples using self-supervised loss on coarsely aligned data could help greatly towards ensuring that future works do not encounter problems with IdCor by inadvertantly using it incorrectly.
soundness: 3
strengths: From an originality/novelty perspective, the paper is quite novel in that this is a new use case for the relationship between intrinsic dimension and entropy, being substituted into a mutual information context.

The paper is quite clear, and it is very easy to see not only how various parts are put together, but the rationale between combining them as well. This is especially apparent in the beginning of Part 3: "Correlation through Intrinsic Dimension", where the authors give a very clear example why ID is needed, and the relationship betwen ID and NMI. 

The authors do a very good job anticipating many of the questions readers might have, and explaining abnormalities in the results. In the results, they address several oddities that appear, such as the apparent lack of comparative performance on SigLIP and CLIP for coarsely aligned imagenet.

On the topic of results, the results are very good, with IdCor demonstrating very good performance, and a clear picture is painted as to its ability to deal with nonlinearity when obtaining a correlation metric. 

The authors have a very substantial list of references, and are hitting many of the related and necessary works for understanding what the authors are trying to do. 

The combination of these come together to create a very high-quality paper. Moreover, I believe this could have a moderate to highly significant impact on the field, and I can see how this new metric can certainly help with discovering the underlying mechanics of deep neural networks.
summary: The authors introduce a novel metric for determining the correlation of high dimensional datasets. They propose to use normalized mutual information, whereby the mutual information, expressed in the form of entropies, is replaced with the intrinsic dimension, which they calculate using the Two-NN method. This metric is then tested on synthetic data against CCA and dCor, showing that IdCor can effectively find correlation in non-linear settings, and can do so better than dCor. The authors then go on to show this in the context of large vision models, showing the correlation between various large vision models, and then extend into a multi-modality setting, showing a correlation between vision models and LLMs on a multi-modality dataset.
weaknesses: While the work is generally very clear, there is one place where a slight modification would help significantly. 

While the reasoning behind using IdCor and not Id by itself is made fairly clear, the inclusion of the intrinsic dimension itself in table 1 could cause some confusion in this matter. A quick explanation of why Id is not sufficient (I believe no more than a sentence or two would be needed) should be all that is needed to ensure that it is clear that IdCor gives a better estimate, and is more useful. 

Other than that, there are only a few very minor grammatical mistakes. The most pressing is Section I, last paragraph, bullet point 1,

---

confidence: 5
contribution: 3
initial_rating: 8
presentation: 4
questions: 1) Related to the weakness 1, I would like to know whether exists a formulation for more than two modalities.
soundness: 4
strengths: 1) The paper explores the latent space from an information-theoretic point of view, which is very valuable considering that nowadays lots of papers just do so from architectural and neural points of view.
2) The method proposed in the paper consider the nonlinearity of the data, representing a crucial advancement with respect to previous methods that mainly focus on linear structures.
3) Results of the method seem consistent across different types of representations, ranging from different models to multimodal.
4) The paper is readable and easily understandable.
summary: This paper introduces a novel metric for latent space analysis based on intrinsic dimension correlation. With respect to previous metrics, this paper proposes a method that takes care of data nonlinearities and computations efficiency, two crucial aspects of real-worls problems.

I would like to thank the authors for this interesting paper. Overall, I find the paper interesting and relevant to the scope of the conference.
weaknesses: 1) Although the authors claim that the proposed method can be extended to more than two modalities, no mathematical formulation is presented for this in the method section. Indeed, equations (1,2,3) focus on X and Y, and I am curious if it is possible to extend this to three or more.
2) A graphical representation, which is lacking, of the differences between the various methods (like figure 1) may help the reader better understand that method and its advantages.
3) The authors could maybe insert a downstream example in which their method makes the difference. This would make the paper more effective and also highlight the importance of the proposal to practical researchers.

Minor concerns that do not affect my rating but that the authors could improve:
1) In scientific writing, the Saxon genitive should be avoided, even though I know that both some LLMs and Grammarly suggest using it. I would personally remove the usage of the Saxon genitive in the paper.
2) Usually, figures of results are presented putting on the left the old method and on the right the proposed one. In this paper, the authors often do the opposite, which may confuse the reader. I suggest changing to the conventional method of results presentation.

Meta-review: This paper proposed a new definition of correlation between two data manifolds based on an estimator of intrinsic dimensionality, namely the IdCor, and tested it on synthetic and multimodal data and revealed better similarity between paired embedding across modalities. All reviews recognized the simple and reasonable definition. The paper has been improved substantially in the rebuttal phase.

The reviewers further discussed the limitation of this work, which provides a definition without discussing its basic properties with theoretical arguments. The reviewers suggested to discuss how perturbations affect IdCor and its invariance, and discuss whether a high value of IdCor actually identifies correlations, and support the correlation detection with downstream applications like transfer learning or model stitching. The authors are highly recommended to address these comments in the final version.

Decision: Accept (Poster)