Title: SNEkhorn: Dimension Reduction with Symmetric Entropic Affinities
Venue: NeurIPS 2023
Accepted: yes
Keywords: Dimension Reduction

Optimal Transport

Affinities
Abstract: Many approaches in machine learning rely on a weighted graph to encode the
similarities between samples in a dataset. Entropic affinities (EAs), which are notably used in the popular Dimensionality Reduction (DR) algorithm t-SNE, are particular instances of such graphs. To ensure robustness to heterogeneous sampling densities, EAs assign a kernel bandwidth parameter to every sample in such a way that the entropy of each row in the affinity matrix is kept constant at a specific value, whose exponential is known as perplexity. EAs are inherently asymmetric and row-wise stochastic, but they are used in DR approaches after undergoing heuristic symmetrization methods that violate both the row-wise constant entropy and stochasticity properties. In this work, we uncover a novel characterization of EA as an optimal transport problem, allowing a natural symmetrization that can be computed efficiently using dual ascent. 
The corresponding novel affinity matrix derives advantages from symmetric doubly stochastic normalization in terms of clustering performance, while also effectively controlling the entropy of each row thus making it particularly robust to varying noise levels. Following, we present a new DR algorithm, SNEkhorn, that leverages this new affinity matrix. We show its clear superiority to state-of-the-art approaches with several indicators on both synthetic and real-world datasets.

SNEkhorn: Dimension Reduction with Symmetric Entropic Affinities

Abstract

Many approaches in machine learning rely on a weighted graph to encode the similarities between samples in a dataset. Entropic affinities (EAs), which are notably used in the popular Dimensionality Reduction (DR) algorithm t-SNE, are particular instances of such graphs. To ensure robustness to heterogeneous sampling densities, EAs assign a kernel bandwidth parameter to every sample in such a way that the entropy of each row in the affinity matrix is kept constant at a specific value, whose exponential is known as perplexity. EAs are inherently asymmetric and row-wise stochastic, but they are used in DR approaches after undergoing heuristic symmetrization methods that violate both the row-wise constant entropy and stochasticity properties. In this work, we uncover a novel characterization of EA as an optimal transport problem, allowing a natural symmetrization that can be computed efficiently using dual ascent. The corresponding novel affinity matrix derives advantages from symmetric doubly stochastic normalization in terms of clustering performance, while also effectively controlling the entropy of each row thus making it particularly robust to varying noise levels. Following, we present a new DR algorithm, SNEkhorn, that leverages this new affinity matrix. We show its clear superiority to existing approaches with several indicators on both synthetic and real-world datasets.

1 Introduction

Exploring and analyzing high-dimensional data is a core problem of data science that requires building low-dimensional and interpretable representations of the data through dimensionality reduction (DR). Ideally, these representations should preserve the data structure by mimicking, in the reduced representation space (called latent space ), a notion of similarity between samples. We call affinity the weight matrix of a graph that encodes this similarity. It has positive entries and the higher the weight in position ( i, j ) , the higher the similarity or proximity between samples i and j . Seminal approaches relying on affinities include Laplacian eigenmaps [2], spectral clustering [50] and semi-supervised learning [55]. Numerous methods can be employed to construct such affinities. A common choice is to use a kernel ( e.g. , Gaussian) derived from a distance matrix normalized by a bandwidth parameter that usually has a large influence on the outcome of the algorithm. Indeed, excessively small kernel

Titouan Vayer

Univ. Lyon, ENS de Lyon, UCBL, CNRS, Inria

LIP UMR 5668

Nicolas Courty

Université Bretagne Sud, CNRS

bandwidth can result in solely capturing the positions of closest neighbors, at the expense of largescale dependencies. Inversely, setting too large a bandwidth blurs information about close-range pairwise relations. Ideally, one should select a different bandwidth for each point to accommodate varying sampling densities and noise levels. One approach is to compute the bandwidth of a point based on the distance from its k -th nearest neighbor [53]. However, this method fails to consider the entire distribution of distances. In general, selecting appropriate kernel bandwidths can be a laborious task, and many practitioners resort to greedy search methods. This can be limiting in some settings, particularly when dealing with large sample sizes.

Entropic Affinities and SNE/t-SNE. Entropic affinities (EAs) were first introduced in the seminal paper Stochastic Neighbor Embedding (SNE) [16]. It consists in normalizing each row i of a distance matrix by a bandwidth parameter ε i such that the distribution associated with each row of the corresponding stochastic ( i.e. , row-normalized) Gaussian affinity has a fixed entropy. The value of this entropy, whose exponential is called the perplexity , is then the only hyperparameter left to tune and has an intuitive interpretation as the number of effective neighbors of each point [49]. EAs are notoriously used to encode pairwise relations in a high-dimensional space for the DR algorithm t-SNE [46], among other DR methods including [6]. t-SNE is increasingly popular in many applied fields [20, 32] mostly due to its ability to represent clusters in the data [27, 5]. Nonetheless, one major flaw of EAs is that they are inherently directed and often require post-processing symmetrization.

Doubly Stochastic Affinities. Doubly stochastic (DS) affinities are non-negative matrices whose rows and columns have unit ℓ 1 norm. In many applications, it has been demonstrated that DS affinity normalization ( i.e. , determining the nearest DS matrix to a given affinity matrix) offers numerous benefits. First, it can be seen as a relaxation of k-means [51] and it is well-established that it enhances spectral clustering performances [10, 52, 1]. Additionally, DS matrices present the benefit of being invariant to the various Laplacian normalizations [50]. Recent observations indicate that the DS projection of the Gaussian kernel under the KL geometry is more resilient to heteroscedastic noise compared to its stochastic counterpart [23]. It also offers a more natural analog to the heat kernel [30]. These properties have led to a growing interest in DS affinities, with their use expanding to various applications such as smoothing filters [33], subspace clustering [25] and transformers [41].

Contributions. In this work, we study the missing link between EAs, which are easy to tune and adaptable to data with heterogeneous density, and DS affinities which have interesting properties in practical applications as aforementioned. Our main contributions are as follows. We uncover the convex optimization problem that underpins classical entropic affinities, exhibiting novel links with entropy-regularized Optimal Transport (OT) (Section 3.1). We then propose in Section 3.2 a principled symmetrization of entropic affinities. The latter enables controlling the entropy in each point, unlike t-SNE's post-processing symmetrization, and produces a genuinely doubly stochastic affinity. We show how to compute this new affinity efficiently using a dual ascent algorithm. In Section 4, we introduce SNEkhorn: a DR algorithm that couples this new symmetric entropic affinity with a doubly stochastic kernel in the low-dimensional embedding space, without sphere concentration issue [29]. We finally showcase the benefits of symmetric entropic affinities on a variety of applications in Section 5 including spectral clustering and DR experiments on datasets ranging from images to genomics data.

Notations. [ [ n ] ] denotes the set { 1 , ..., n } . exp and log applied to vectors/matrices are taken elementwise. 1 = (1 , ..., 1) ⊤ is the vector of 1 . ⟨· , ·⟩ is the standard inner product for matrices/vectors. S is the space of n × n symmetric matrices. P i : denotes the i -th row of a matrix P . ⊙ ( resp. ⊘ ) stands for element-wise multiplication ( resp. division) between vectors/matrices. For α , β ∈ R n , α ⊕ β ∈ R n × n is ( α i + β j ) ij . The entropy of p ∈ R n + is 1 H( p ) = -∑ i p i (log( p i ) -1) = -⟨ p , log p -1 ⟩ . The Kullback-Leibler divergence between two matrices P , Q with nonnegative entries such that Q ij = 0 = ⇒ P ij = 0 is KL( P | Q ) = ∑ ij P ij ( log( P ij Q ij ) -1 ) = ⟨ P , log ( P ⊘ Q ) -11 ⊤ ⟩ .

2 Entropic Affinities, Dimensionality Reduction and Optimal Transport

Given a dataset X ∈ R n × p of n samples in dimension p , most DR algorithms compute a representation of X in a lower-dimensional latent space Z ∈ R n × q with q ≪ p that faithfully captures and represents pairwise dependencies between the samples (or rows) in X . This is generally achieved

by optimizing Z such that the corresponding affinity matrix matches another affinity matrix defined from X . These affinities are constructed from a matrix C ∈ R n × n that encodes a notion of 'distance' between the samples, e.g. , the squared Euclidean distance C ij = ∥ X i : -X j : ∥ 2 2 or more generally any cost matrix C ∈ D := { C ∈ R n × n + : C = C ⊤ and C ij = 0 ⇐⇒ i = j } . A commonly used option is the Gaussian affinity that is obtained by performing row-wise normalization of the kernel exp( -C /ε ) , where ε > 0 is the bandwidth parameter.

Entropic Affinities (EAs). Another frequently used approach to generate affinities from C ∈ D is to employ entropic affinities [16]. The main idea is to consider adaptive kernel bandwidths ( ε ⋆ i ) i ∈ [ [ n ] ] to capture finer structures in the data compared to constant bandwidths [47]. Indeed, EAs rescale distances to account for the varying density across regions of the dataset. Given ξ ∈ [ [ n -1] ] , the goal of EAs is to build a Gaussian Markov chain transition matrix P e with prescribed entropy as

The hyperparameter ξ , which is also known as perplexity , can be interpreted as the effective number of neighbors for each data point [49]. Indeed, a perplexity of ξ means that each row of P e (which is a discrete probability since P e is row-wise stochastic) has the same entropy as a uniform distribution over ξ neighbors. Therefore, it provides the practitioner with an interpretable parameter specifying which scale of dependencies the affinity matrix should faithfully capture. In practice, a root-finding algorithm is used to find the bandwidth parameters ( ε ⋆ i ) i ∈ [ [ n ] ] that satisfy the constraints [49]. Hereafter, with a slight abuse of language, we call e H( P i : ) -1 the perplexity of the point i .

Dimension Reduction with SNE/t-SNE. One of the main applications of EAs is the DR algorithm SNE [16]. We denote by C X = ( ∥ X i : -X j : ∥ 2 2 ) ij and C Z = ( ∥ Z i : -Z j : ∥ 2 2 ) ij the cost matrices derived from the rows ( i.e. , the samples) of X and Z respectively. SNE focuses on minimizing in the latent coordinates Z ∈ R n × q the objective KL( P e | Q Z ) where P e solves (EA) with cost C X and [ Q Z ] ij = exp( -[ C Z ] ij ) / ( ∑ ℓ exp( -[ C Z ] iℓ )) . In the seminal paper [46], a newer proposal for a symmetric version was presented, which has since replaced SNE in practical applications. Given a symmetric normalization for the similarities in latent space [ ˜ Q Z ] ij = exp( -[ C Z ] ij ) / ∑ ℓ,t exp( -[ C Z ] ℓt ) it consists in solving

In other words, the affinity matrix P e is the Euclidean projection of P e on the space of symmetric matrices S : P e = Proj ℓ 2 S ( P e ) = arg min P ∈S ∥ P -P e ∥ 2 (see Appendix A.1). Instead of the Gaussian kernel, the popular extension t-SNE [46] considers a different distribution in the latent space [ ˜ Q Z ] ij = (1 + [ C Z ] ij ) -1 / ∑ ℓ,t (1 + [ C Z ] ℓt ) -1 . In this formulation, ˜ Q Z is a joint Student t -distribution that accounts for crowding effects: a relatively small distance in a high-dimensional space can be accurately represented by a significantly greater distance in the low-dimensional space.

̸

Considering symmetric similarities is appealing since the proximity between two points is inherently symmetric. Nonetheless, the Euclidean projection in (Symmetric-SNE) does not preserve the construction of entropic affinities . In particular, P e is not stochastic in general and H( P e i : ) = (log ξ + 1) thus the entropy associated with each point is no longer controlled after symmetrization (see the bottom left plot of Figure 1). This is arguably one of the main drawbacks of the approach. By contrast, the P se affinity that will be introduced in Section 3 can accurately set the entropy in each point to the desired value log ξ +1 . As shown in Figure 1 this leads to more faithful embeddings with better separation of the classes when combined with the t-SNEkhorn algorithm (Section 4).

t-SNE

t-SNEkhorn

6

S

8

Pe

Pse

260

32

120

30

30

0

200

400

600

800100012001400

87

0

200

400

600

800

100012001400

Sample i

Sample i

Symmetric Entropy-Constrained Optimal Transport. Entropy-regularized OT [37] and its connection to affinity matrices are crucial components in our solution. In the special case of uniform marginals, and for ν > 0 , entropic OT computes the minimum of P ↦→⟨ P , C ⟩ -ν ∑ i H( P i : ) over the space of doubly stochastic matrices { P ∈ R n × n + : P1 = P ⊤ 1 = 1 } . The optimal solution is the unique doubly stochastic matrix P ds of the form P ds = diag( u ) K diag( v ) where K = exp( -C /ν ) is the Gibbs energy derived from C and u , v are positive vectors that can be found with the celebrated Sinkhorn-Knopp's algorithm [8, 42]. Interestingly, when the cost C is symmetric ( e.g. , C ∈ D ) we can take u = v [17, Section 5.2] so that the unique optimal solution is itself symmetric and writes

In this case, by relying on convex duality as detailed in Appendix A.2, an equivalent formulation for the symmetric entropic OT problem is

where 0 ≤ η ≤ n (log n +1) is a constraint on the global entropy ∑ i H( P i : ) of the OT plan P which happens to be saturated at optimum (Appendix A.2). This constrained formulation of symmetric entropic OT will provide new insights into entropic affinities, as detailed in the next sections.

3 Symmetric Entropic Affinities

In this section, we present our first major contribution: symmetric entropic affinities. We begin by providing a new perspective on EAs through the introduction of an equivalent convex problem.

3.1 Entropic Affinities as Entropic Optimal Transport

We introduce the following set of matrices with row-wise stochasticity and entropy constraints:

This space is convex since p ∈ R n + ↦→ H( p ) is concave, thus its superlevel set is convex. In contrast to the entropic constraints utilized in standard entropic optimal transport which set a lower-bound on the global entropy, as demonstrated in the formulation (EOT), H ξ imposes a constraint on the entropy of each row of the matrix P . Our first contribution is to prove that EAs can be computed by solving a specific problem involving H ξ (see Appendix A for the proof).

Proposition 1. Let C ∈ R n × n without constant rows. Then P e solves the entropic affinity problem (EA) with cost C if and only if P e is the unique solution of the convex problem

Interestingly, this result shows that EAs boil down to minimizing a transport objective with cost C and row-wise entropy constraints H ξ where ξ is the desired perplexity. As such, (EA as OT) can be seen as a specific semi-relaxed OT problem [39, 14] ( i.e. , without the second constraint on the marginal P ⊤ 1 = 1 ) but with entropic constraints on the rows of P . We also show that the optimal solution P ⋆ of (EA as OT) has saturated entropy i.e. , ∀ i, H( P ⋆ i : ) = log ξ +1 . In other words, relaxing the equality constraint in (EA) as an inequality constraint in P ∈ H ξ does not affect the solution while it allows reformulating entropic affinity as a convex optimization problem. To the best of our knowledge, this connection between OT and entropic affinities is novel and is an essential key to the method proposed in the next section.

Remark 2. The kernel bandwidth parameter ε from the original formulation of entropic affinities (EA) is the Lagrange dual variable associated with the entropy constraint in (EA as OT). Hence computing ε ⋆ in (EA) exactly corresponds to solving the dual problem of (EA as OT).

Remark 3. Let K σ = exp( -C /σ ) . As shown in Appendix A.5, if ε ⋆ solves (EA) and σ ≤ min( ε ⋆ ) , then P e = Proj KL H ξ ( K σ ) = arg min P ∈H ξ KL( P | K σ ) . Therefore P e can be seen as a KL Bregman projection [3] of a Gaussian kernel onto H ξ . Hence the input matrix in (Symmetric-SNE) is P e = Proj ℓ 2 S (Proj KL H ξ ( K σ )) which corresponds to a surprising mixture of KL and orthogonal projections.

-

10

5

0

5

10

10

-

5

0

5

10

15

P

ds

10

5

0

5

10

-

10

-

5

0

5

10

15

P

se

2

4

6

8

10

12

14

0

.

000

0

.

025

0

.

050

0

.

075

0

.

100

0

.

125

0

.

150

0

.

175

0

.

200

P

ds

P

se

5

10

15

20

Perplexity

5

10

15

20

Perplexity

-

-

-

-

3.2 Symmetric Entropic Affinity Formulation

Based on the previous formulation we now propose symmetric entropic affinities: a symmetric version of EAs that enables keeping the entropy associated with each row (or equivalently column) to the desired value of log ξ +1 while producing a symmetric doubly stochastic affinity matrix. Our strategy is to enforce symmetry through an additional constraint in (EA as OT), in a similar fashion as (EOT). More precisely we consider the convex optimization problem

where we recall that S is the set of n × n symmetric matrices. Note that for any ξ ≤ n -1 , 1 n 11 ⊤ ∈ H ξ ∩S hence the set H ξ ∩S is a non-empty and convex set. We first detail some important properties of problem (SEA) (the proofs of the following results can be found in Appendix A.4).

Proposition 4 (Saturation of the entropies) . Let C ∈ S with zero diagonal, then (SEA) with cost C has a unique solution that we denote by P se . If moreover C ∈ D , then for at least n -1 indices i ∈ [ [ n ] ] the solution satisfies H( P se i : ) = log ξ +1 .

In other words, the unique solution P se has at least n -1 saturated entropies i.e. , the corresponding n -1 points have exactly a perplexity of ξ . In practice, with the algorithmic solution detailed below, we have observed that all n entropies are saturated. Therefore, we believe that this proposition can be extended with a few more assumptions on C . Accordingly, problem (SEA) allows accurate control over the point-wise entropies while providing a symmetric doubly stochastic matrix, unlike P e defined in (Symmetric-SNE), as summarized in Table 1. In the sequel, we denote by H r ( P ) = (H( P i : )) i the vector of row-wise entropies of P . We rely on the following result to compute P se .

Proposition 5 (Solving for SEA) . Let C ∈ D , L ( P , γ , λ ) = ⟨ P , C ⟩ + ⟨ γ , (log ξ +1) 1 -H r ( P ) ⟩ + ⟨ λ , 1 -P1 ⟩ and q ( γ , λ ) = min P ∈ R n × n + ∩S L ( P , γ , λ ) . Strong duality holds for (SEA) . Moreover, let γ ⋆ , λ ⋆ ∈ argmax γ ≥ 0 , λ q ( γ , λ ) be the optimal dual variables respectively associated with the entropy and marginal constraints. Then, for at least n -1 indices i ∈ [ [ n ] ] , γ ⋆ i > 0 . When ∀ i ∈ [ [ n ] ] , γ ⋆ i > 0 then H r ( P se ) = (log ξ +1) 1 and P se has the form

By defining the symmetric matrix P ( γ , λ ) = exp (( λ ⊕ λ -2 C ) ⊘ ( γ ⊕ γ )) , we prove that, when γ > 0 , min P ∈S L ( P , γ , λ ) has a unique solution given by P ( γ , λ ) which implies q ( γ , λ ) = L ( P ( γ , λ ) , γ , λ ) . Thus the proposition shows that when γ ⋆ > 0 , P se = P ( γ ⋆ , λ ⋆ ) where γ ⋆ , λ ⋆ solve the following convex problem (as maximization of a concave objective)

Consequently, to find P se we solve the problem (Dual-SEA). Although the form of P se presented in Proposition 5 is only valid when γ ⋆ is positive and we have only proved it for n -1 indices, we emphasize that if (Dual-SEA) has a finite solution, then it is equal to P se . Indeed in this case the solution satisfies the KKT system associated with (SEA).

Numerical optimization. The dual problem (Dual-SEA) is concave and can be solved with guarantees through a dual ascent approach with closed-form gradients (using e.g. , SGD , BFGS [28] or ADAM [18]). At each gradient step, one can compute the current estimate P ( γ , λ ) while the gradients of the loss w.r.t. γ and λ are given respectively by the constraints (log ξ + 1) 1 -H r ( P ( γ , λ )) and 1 -P ( γ , λ ) 1 (see e.g. , [4, Proposition 6.1.1]). Concerning time complexity, each step can be performed with O ( n 2 ) algebraic operations. From a practical perspective, we found that using a change of variable γ ← γ 2 and optimize γ ∈ R n leads to enhanced numerical stability.

Remark 6. In the same spirit as Remark 3, one can express P se as a KL projection of K σ = exp( -C /σ ) . Indeed, we show in Appendix A.5 that if 0 < σ ≤ min i γ ⋆ i , then P se = Proj KL H ξ ∩S ( K σ ) .

Comparison between P ds and P se . In Figure 2 we illustrate the ability of our proposed affinity P se to adapt to varying noise levels. In the OT problem that we consider, each sample is given a mass of one that is distributed over its neighbors (including itself since self-loops are allowed). For each sample, we refer to the entropy of the distribution over its neighbors as the spreading of its mass. One can notice that for P ds (DS) (OT problem with global entropy constraint (EOT)) , the samples do not spread their mass evenly depending on the density around them. On the contrary, the per-row entropy constraints of P se force equal spreading among samples. This can have benefits, particularly for clustering, as illustrated in the rightmost plot, which shows the eigenvalues of the associated Laplacian matrices (recall that the number of connected components equals the dimension of the null space of its Laplacian [7]). As can be seen, P ds results in many unwanted clusters, unlike P se , which is robust to varying noise levels (its Laplacian matrix has only 3 vanishing eigenvalues). We further illustrate this phenomenon on Figure 3 with varying noise levels.

0

.

5

1

.

0

1

.

5

2

.

0

2

.

5

3

.

0

3

.

5

0

.

0

0

.

2

0

.

4

0

.

6

0

.

8

1

.

0

Adjusted rand index (ARI)

P

ds

P

se

Noise level

σ

4 Optimal Transport for Dimension Reduction with SNEkhorn

In this section, we build upon symmetric entropic affinities to introduce SNEkhorn, a new DR algorithm that fully benefits from the advantages of doubly stochastic affinities.

SNEkhorn's objective. Our proposed method relies on doubly stochastic affinity matrices to capture the dependencies among the samples in both input and latent spaces. The KL divergence, which is the central criterion in most popular DR methods [44], is used to measure the discrepancy between the two affinities. As detailed in sections 2 and 3, P se computed using the cost [ C X ] ij = ∥ X i : -X j : ∥ 2 2 , corrects for heterogeneity in the input data density by imposing point-wise entropy constraints. As we do not need such correction for embedding coordinates Z since they must be optimized, we opt for the standard affinity (DS) built as an OT transport plan with global entropy constraint (EOT). This OT plan can be efficiently computed using Sinkhorn's algorithm. More precisely, we propose the optimization problem

where Q ds Z = exp( f Z ⊕ f Z -C Z ) stands for the (DS) affinity computed with cost [ C Z ] ij = ∥ Z i : -Z j : ∥ 2 2 and f Z is the optimal dual variable found by Sinkhorn's algorithm. We set the bandwidth to ν = 1 in Q ds Z similarly to [46] as the bandwidth in the low dimensional space only affects the scales

P

e

Symmetric-SNE

P

se

SNEkhorn

p

1

p

2

2e-04

4e-04

6e-04

8e-04

1e-03

2e-04

4e-04

6e-04

8e-04

1e-03

of the embeddings and not their shape. Keeping only the terms that depend on Z and relying on the double stochasticity of P se , the objective in (SNEkhorn) can be expressed as ⟨ P se , C Z ⟩ -2 ⟨ f Z , 1 ⟩ .

Inference. This new DR objective involves computing a doubly stochastic normalization for each update of Z . Interestingly, to compute the optimal dual variable f Z in Q ds Z , we leverage a wellconditioned Sinkhorn fixed point iteration [19, 13], which converges extremely fast in the symmetric setting:

Heavy-tailed kernel in latent space. Since it is well known that heavy-tailed kernels can be beneficial in DR [21], we propose an extension called t-SNEkhorn that simply amounts to computing a doubly stochastic student-t kernel in the low-dimensional space. With our construction, it corresponds to choosing the cost [ C Z ] ij = log(1 + ∥ Z i : -Z j : ∥ 2 2 ) instead of ∥ Z i : -Z j : ∥ 2 2 .

On the right side of Figure 4, we plot ∥ Q ds Z 1 -1 ∥ ∞ as a function of (Sinkhorn) iterations for a toy example presented in Section 5. In most practical cases, we found that about 10 iterations were enough to reach a sufficiently small error. Z is updated through gradient descent with gradients obtained by performing backpropagation through the Sinkhorn iterations. These iterations can be further accelerated with a warm start strategy by plugging the last f Z to initialize the current one.

Related work. Using doubly stochastic affinities for SNE has been proposed in [29], with two key differences from our work. First, they do not consider EAs and resort to P ds (DS). This affinity, unlike P se , is not adaptive to the data heterogeneous density (as illusrated in Figure 2). Second, they use the affinity ˜ Q Z in the low-dimensional space and illustrate empirically that matching the latter with a doubly stochastic matrix ( e.g. , P ds or P se ) can sometimes impose spherical constraints on the embedding Z . This is detrimental for projections onto a 2 D flat space (typical use case of DR) where embeddings tend to form circles. This can be verified on the left side of Figure 4. In contrast, in SNEkhorn, the latent affinity is also doubly stochastic so that latent coordinates Z are not subject to spherical constraints anymore. The corresponding SNEkhorn embedding is shown in Figure 5 (bottom right).

5 Numerical experiments

This section aims to illustrate the performances of the proposed affinity matrix P se (SEA) and DR method SNEkhorn at faithfully representing dependencies and clusters in low dimensions. First, we showcase the relevance of our approach on a simple synthetic dataset with heteroscedastic noise. Then,

-

2

-

1

0

1

2

-

2

-

1

0

1

2

min

Z

KL(

P

se

|

˜

QZ

)

10

0

10

-

1

10

-

2

10

-

3

10

-

4

10

-

5

tol.

level

1

5

10

15

Iter. needed

‖

Q

ds

Z 1

-

1

tol

we evaluate the spectral clustering performances of symmetric entropic affinities before benchmarking t-SNEkhorn with t-SNE and UMAP [31] on real-world images and genomics datasets. 2

Simulated data. We consider the toy dataset with heteroscedastic noise from [23]. It consists of sampling uniformly two vectors p 1 and p 2 in the 10 4 -dimensional probability simplex. n = 10 3 samples are then generated as x i = ˜ x i / ( ∑ j ˜ x ij ) where

where M stands for the multinomial distribution. The goal of the task is to test the robustness to heteroscedastic noise. Indeed, points generated using p 2 exhibit different levels of noise due to various numbers of multinomial trials to form an estimation of p 2 . This typically occurs in realworld scenarios when the same entity is measured using different experimental setups thus creating heterogeneous technical noise levels ( e.g. , in single-cell sequencing [20]). This phenomenon is known as batch effect [43]. In Figure 5, we show that, unlike P e (Symmetric-SNE), P se (SEA) manages to properly filter the noise (top row) to discriminate between samples generated by p 1 and p 2 , and represent these two clusters separately in the embedding space (bottom row). In contrast, P e and SNE are misled by the batch effect. This shows that P e doesn't fully benefit from the adaptivity of EAs due to poor normalization and symmetrization. This phenomenon partly explains the superiority of SNEkhorn and t-SNEkhorn over current approaches on real-world datasets as illustrated below.

Real-world datasets. We then experiment with various labeled classification datasets including images and genomic data. For images, we use COIL 20 [34], OLIVETTI faces [12], UMNIST [15] and CIFAR 10 [22]. For CIFAR, we experiment with features obtained from the last hidden layer of a pre-trained ResNet [38] while for the other three datasets, we take as input the raw pixel data. Regarding genomics data, we consider the Curated Microarray Database (CuMiDa) [11] made of microarray datasets for various types of cancer, as well as the preprocessed SNAREseq (chromatin accessibility) and scGEM (gene expression)

datasets used in [9]. For CuMiDa, we retain the datasets with most samples. For all the datasets, when the data dimension exceeds 50 we apply a pre-processing step of PCA in dimension 50 , as usually done in practice [46]. In the following experiments, when not specified the hyperparameters are set to the value leading to the best average score on five different seeds with grid-search. For perplexity parameters, we test all multiples of 10 in the interval [10 , min( n, 300)] where n is the number of samples in the dataset. We use the same grid for the k of the self-tuning affinity P st [53] and for the n_neighbors parameter of UMAP. For scalar bandwidths, we consider powers of 10 such that the corresponding affinities' average perplexity belongs to the perplexity range.

Spectral Clustering. Building on the strong connections between spectral clustering mechanisms and t-SNE [44, 27] we first consider spectral clustering tasks to evaluate the affinity matrix P se (SEA) and compare it against P e (Symmetric-SNE). We also consider two versions of the Gaussian affinity with scalar bandwidth K = exp( -C /ν ) : the symmetrized row-stochastic P rs = Proj ℓ 2 S ( P rs ) where P rs is K normalized by row and P ds (DS). We also consider the adaptive Self-Tuning P st affinity from [53] which relies on an adaptive bandwidth corresponding to the distance from the k -th nearest neighbor of each point. We use the spectral clustering implementation of scikit-learn [36] with default parameters which uses the unnormalized graph Laplacian. We measure the quality of clustering using the Adjusted Rand Index (ARI). Looking at both Table 2 and Figure 6, one can notice that, in general, symmetric entropic affinities yield better results than usual entropic affinities with significant improvements in some datasets ( e.g. , throat microarray and SNAREseq). Overall

0

100

200

300

Perplexity

0

.

50

0

.

55

0

.

60

0

.

65

0

.

70

Adjusted Rand Score

COIL

0

100

200

300

Perplexity

0

.

25

0

.

30

0

.

35

0

.

40

0

.

45

OLIVETTI

0

100

200

300

Perplexity

0

.

32

0

.

34

0

.

36

0

.

38

0

.

40

UMNIST

0

100

200

300

Perplexity

0

.

18

0

.

20

0

.

22

0

.

24

0

.

26

0

.

28

0

.

30

CIFAR

P

e

P

se

P

st

P

rs

P

ds

P se outperforms all the other affinities in 8 out of 12 datasets. This shows that the adaptivity of EAs is crucial. Figure 6 also shows that this superiority is verified for the whole range of perplexities. This can be attributed to the fact that symmetric entropic affinities combine the advantages of doubly stochastic normalization in terms of clustering and of EAs in terms of adaptivity. In the next experiment, we show that these advantages translate into better clustering and neighborhood retrieval at the embedding level when running SNEkhorn.

Dimension Reduction. To guarantee a fair comparison, we implemented not only SNEkhorn, but also t-SNE and UMAP in PyTorch [35]. Note that UMAP also relies on adaptive affinities but sets the degree of each node (related to the hyperparameter n_neighbors which plays a similar role to the perplexity) rather than the entropy. All models were optimized using ADAM [18] with default parameters and the same stopping criterion: the algorithm stops whenever the relative variation of the loss becomes smaller than 10 -5 . For each run, we draw independent

-

40

20

0

20

40

-

40

-

20

0

20

40

t-SNE

25

0

25

50

-

80

-

60

-

40

-

20

0

20

40

60

t-SNEkhorn

-

-

N (0 , 1) coordinates and use this same matrix to initialize all the methods that we wish to compare. To evaluate the embeddings' quality, we make use of the silhouette [40] and trustworthiness [48]

scores from scikit-learn [36] with default parameters. While the former relies on class labels, the latter measures the agreement between the neighborhoods in input and output spaces, thus giving two complementary metrics to properly evaluate the embeddings. The results, presented in Table 3, demonstrate the notable superiority of t-SNEkhorn compared to the commonly used t-SNE and UMAP algorithms. A sensitivity analysis on perplexity can also be found in Appendix B. Across the 16 datasets examined, t-SNEkhorn almost consistently outperformed the others, achieving the highest silhouette score on 15 datasets and the highest trustworthiness score on 12 datasets. To visually assess the quality of the embeddings, we provide SNAREseq embeddings in Figure 7. Notably, one can notice that the use of t-SNEkhorn results in improved class separation compared to t-SNE.

6 Conclusion

We have introduced a new principled and efficient method for constructing symmetric entropic affinities. Unlike the current formulation that enforces symmetry through an orthogonal projection, our approach allows control over the entropy in each point thus achieving entropic affinities' primary goal. Additionally, it produces a DS-normalized affinity and thus benefits from the well-known advantages of this normalization. Our affinity takes as input the same perplexity parameter as EAs and can thus be used with little hassle for practitioners. We demonstrate experimentally that both our affinity and DR algorithm (SNEkhorn), leveraging a doubly stochastic kernel in the latent space, achieve substantial improvements over existing approaches.

Note that in the present work, we do not address the issue of large-scale dependencies that are not faithfully represented in the low-dimensional space [44]. The latter shall be treated in future works. Among other promising research directions, one could focus on building multi-scale versions of symmetric entropic affinities [24] as well as fast approximations for SNEkhorn forces by adapting e.g. , Barnes-Hut [45] or interpolation-based methods [26] to the doubly stochastic setting. It could also be interesting to use SEAs in order to study the training dynamics of transformers [54].

Acknowledgments

The authors are grateful to Mathurin Massias, Jean Feydy and Aurélien Garivier for insightful discussions. This project was supported in part by the ANR projects AllegroAssai ANR-19-CHIA0009, SingleStatOmics ANR-18-CE45-0023 and OTTOPIA ANR-20-CHIA-0030. This work was also supported by the ACADEMICS grant of the IDEXLYON, project of the Université de Lyon, PIA operated by ANR-16-IDEX-0005.

References

Mario Beauchemin. On affinity matrix normalization for graph cuts and spectral clustering. Pattern Recognition Letters , 68:90-96, 2015.

Mikhail Belkin and Partha Niyogi. Laplacian eigenmaps for dimensionality reduction and data representation. Neural computation , 15(6):1373-1396, 2003.

Jean-David Benamou, Guillaume Carlier, Marco Cuturi, Luca Nenna, and Gabriel Peyré. Iterative bregman projections for regularized transportation problems. SIAM Journal on Scientific Computing , 37(2):A1111-A1138, 2015.

Dimitri P Bertsekas. Nonlinear programming. Journal of the Operational Research Society , 48(3):334-334, 1997.

T. Tony Cai and Rong Ma. Theoretical foundations of t-sne for visualizing high-dimensional clustered data. Journal of Machine Learning Research (JMLR) , 23(301):1-54, 2022.

Miguel A Carreira-Perpinán. The elastic embedding algorithm for dimensionality reduction. In International Conference on Machine Learning (ICML) , volume 10, pages 167-174, 2010.

Fan RK Chung. Spectral graph theory , volume 92. American Mathematical Soc., 1997.

Marco Cuturi. Sinkhorn distances: Lightspeed computation of optimal transport. Neural Information Processing Systems (NeurIPS) , 26, 2013.

Pinar Demetci, Rebecca Santorella, Björn Sandstede, William Stafford Noble, and Ritambhara Singh. Gromov-wasserstein optimal transport to align single-cell multi-omics data. bioRxiv , 2020.

Tianjiao Ding, Derek Lim, Rene Vidal, and Benjamin D Haeffele. Understanding doubly stochastic clustering. In International Conference on Machine Learning (ICML) , 2022.

Bruno César Feltes, Eduardo Bassani Chandelier, Bruno Iochins Grisci, and Márcio Dorn. Cumida: An extensively curated microarray database for benchmarking and testing of machine learning approaches in cancer research. Journal of Computational Biology , 26(4):376-386, 2019. PMID: 30789283.

Samaria Ferdinando and Harter Andy. Parameterisation of a stochastic model for human face identification, 1994.

Jean Feydy, Thibault Séjourné, François-Xavier Vialard, Shun-ichi Amari, Alain Trouvé, and Gabriel Peyré. Interpolating between optimal transport and mmd using sinkhorn divergences. In International Conference on Artificial Intelligence and Statistics (AISTATS) , pages 2681-2690. PMLR, 2019.

Rémi Flamary, Cédric Févotte, Nicolas Courty, and Valentin Emiya. Optimal spectral transportation with application to music transcription. Neural Information Processing Systems (NeurIPS) , 29, 2016.

Daniel B Graham and Nigel M Allinson. Characterising virtual eigensignatures for general purpose face recognition. Face recognition: from theory to applications , pages 446-456, 1998.

Geoffrey E Hinton and Sam Roweis. Stochastic neighbor embedding. Neural Information Processing Systems (NeurIPS) , 15, 2002.

Martin Idel. A review of matrix scaling and sinkhorn's normal form for matrices and positive maps. arXiv preprint arXiv:1609.06349 , 2016.

Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980 , 2014.

Philip A Knight, Daniel Ruiz, and Bora Uçar. A symmetry preserving algorithm for matrix scaling. SIAM journal on Matrix Analysis and Applications , 35(3):931-955, 2014.

Dmitry Kobak and Philipp Berens. The art of using t-sne for single-cell transcriptomics. Nature communications , 10(1):1-14, 2019.

Dmitry Kobak, George Linderman, Stefan Steinerberger, Yuval Kluger, and Philipp Berens. Heavy-tailed kernels reveal a finer cluster structure in t-sne visualisations. In Joint European Conference on Machine Learning and Knowledge Discovery in Databases , pages 124-139. Springer, 2020.

Alex Krizhevsky, Geoffrey Hinton, et al. Learning multiple layers of features from tiny images. 2009.

Boris Landa, Ronald R Coifman, and Yuval Kluger. Doubly stochastic normalization of the gaussian kernel is robust to heteroskedastic noise. SIAM journal on mathematics of data science , 3(1):388-413, 2021.

John A Lee, Diego H Peluffo-Ordóñez, and Michel Verleysen. Multi-scale similarities in stochastic neighbour embedding: Reducing dimensionality while preserving both local and global structure. Neurocomputing , 169:246-261, 2015.

Derek Lim, René Vidal, and Benjamin D Haeffele. Doubly stochastic subspace clustering. arXiv preprint arXiv:2011.14859 , 2020.

George C Linderman, Manas Rachh, Jeremy G Hoskins, Stefan Steinerberger, and Yuval Kluger. Fast interpolation-based t-sne for improved visualization of single-cell rna-seq data. Nature methods , 16(3):243-245, 2019.

George C Linderman and Stefan Steinerberger. Clustering with t-sne, provably. SIAM Journal on Mathematics of Data Science , 1(2):313-332, 2019.

Dong C Liu and Jorge Nocedal. On the limited memory bfgs method for large scale optimization. Mathematical programming , 45(1-3):503-528, 1989.

Yao Lu, Jukka Corander, and Zhirong Yang. Doubly stochastic neighbor embedding on spheres. Pattern Recognition Letters , 128:100-106, 2019.

Nicholas F Marshall and Ronald R Coifman. Manifold learning with bi-stochastic kernels. IMA Journal of Applied Mathematics , 84(3):455-482, 2019.

Leland McInnes, John Healy, and James Melville. Umap: Uniform manifold approximation and projection for dimension reduction. arXiv preprint arXiv:1802.03426 , 2018.

Binu Melit Devassy, Sony George, and Peter Nussbaum. Unsupervised clustering of hyperspectral paper data using t-sne. Journal of Imaging , 6(5):29, 2020.

Peyman Milanfar. Symmetrizing smoothing filters. SIAM Journal on Imaging Sciences , 6(1):263-284, 2013.

Sameer A Nene, Shree K Nayar, Hiroshi Murase, et al. Columbia object image library (coil-20). 1996.

Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer. Automatic differentiation in pytorch. 2017.

F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion, O. Grisel, M. Blondel, P. Prettenhofer, R. Weiss, V. Dubourg, J. Vanderplas, A. Passos, D. Cournapeau, M. Brucher, M. Perrot, and E. Duchesnay. Scikit-learn: Machine learning in Python. Journal of Machine Learning Research , 12:2825-2830, 2011.

Gabriel Peyré, Marco Cuturi, et al. Computational optimal transport: With applications to data science. Foundations and Trends® in Machine Learning , 11(5-6):355-607, 2019.

Huy Phan. Pytorch models trained on cifar-10 dataset. https://github.com/huyvnphan/ PyTorch_CIFAR10 , 2021.

Julien Rabin, Sira Ferradans, and Nicolas Papadakis. Adaptive color transfer with relaxed optimal transport. In 2014 IEEE international conference on image processing (ICIP) , pages 4852-4856. IEEE, 2014.

Peter J Rousseeuw. Silhouettes: a graphical aid to the interpretation and validation of cluster analysis. Journal of computational and applied mathematics , 20:53-65, 1987.

Michael E Sander, Pierre Ablin, Mathieu Blondel, and Gabriel Peyré. Sinkformers: Transformers with doubly stochastic attention. In International Conference on Artificial Intelligence and Statistics , pages 3515-3530. PMLR, 2022.

Richard Sinkhorn. A relationship between arbitrary positive matrices and doubly stochastic matrices. The annals of mathematical statistics , 35(2):876-879, 1964.

Hoa Thi Nhu Tran, Kok Siong Ang, Marion Chevrier, Xiaomeng Zhang, Nicole Yee Shin Lee, Michelle Goh, and Jinmiao Chen. A benchmark of batch-effect correction methods for single-cell rna sequencing data. Genome biology , 21:1-32, 2020.

Hugues Van Assel, Thibault Espinasse, Julien Chiquet, and Franck Picard. A probabilistic graph coupling view of dimension reduction. Neural Information Processing Systems (NeurIPS) , 2022.

Laurens Van Der Maaten. Barnes-hut-sne. arXiv preprint arXiv:1301.3342 , 2013.

Laurens Van der Maaten and Geoffrey Hinton. Visualizing data using t-sne. Journal of Machine Learning Research (JMLR) , 9(11), 2008.

David Van Dijk, Roshan Sharma, Juozas Nainys, Kristina Yim, Pooja Kathail, Ambrose J Carr, Cassandra Burdziak, Kevin R Moon, Christine L Chaffer, Diwakar Pattabiraman, et al. Recovering gene interactions from single-cell data using data diffusion. Cell , 174(3):716-729, 2018.

Jarkko Venna and Samuel Kaski. Neighborhood preservation in nonlinear projection methods: An experimental study. In Artificial Neural Networks-ICANN 2001: International Conference Vienna, Austria, August 21-25, 2001 Proceedings 11 , pages 485-491. Springer, 2001.

Max Vladymyrov and Miguel Carreira-Perpinan. Entropic affinities: Properties and efficient numerical computation. In International Conference on Machine Learning (ICML) , pages 477-485. PMLR, 2013.

Ulrike Von Luxburg. A tutorial on spectral clustering. Statistics and computing , 17(4):395-416, 2007.

Ron Zass and Amnon Shashua. A unifying approach to hard and probabilistic clustering. In Tenth IEEE International Conference on Computer Vision (ICCV'05) Volume 1 , volume 1, pages 294-301. IEEE, 2005.

Ron Zass and Amnon Shashua. Doubly stochastic normalization for spectral clustering. In B. Schölkopf, J. Platt, and T. Hoffman, editors, Neural Information Processing Systems (NeurIPS) . MIT Press, 2006.

Lihi Zelnik-Manor and Pietro Perona. Self-tuning spectral clustering. Advances in neural information processing systems , 17, 2004.

Shuangfei Zhai, Tatiana Likhomanenko, Etai Littwin, Jason Ramapuram, Dan Busbridge, Yizhe Zhang, Jiatao Gu, and Joshua M. Susskind. $\sigma$reparam: Stable transformer training with spectral reparametrization. 2023.

Dengyong Zhou, Olivier Bousquet, Thomas Lal, Jason Weston, and Bernhard Schölkopf. Learning with local and global consistency. Neural Information Processing Systems (NeurIPS) , 16, 2003.

A Proofs

A.1 Euclidean Projection onto S

For the problem arg min P ∈S ∥ P -K ∥ 2 2 , the Lagrangian takes the form, with W ∈ R n × n ,

Cancelling the gradient of L with respect to P gives 2( P ⋆ -K ) + W -W ⊤ = 0 . Thus P ⋆ = K + 1 2 ( W ⊤ -W ) . Using the symmetry constraint on P ⋆ yields P ⋆ = 1 2 ( K + K ⊤ ) . Hence we have:

A.2 From Symmetric Entropy-Constrained OT to Sinkhorn Iterations

In this section, we derive Sinkhorn iterations from the problem (EOT). Let C ∈ D . We start by making the constraints explicit.

For the above convex problem the Lagrangian writes, where ν ∈ R + , f ∈ R n and Γ ∈ R n × n :

Strong duality holds and the first order KKT condition gives for the optimal primal P ⋆ and dual ( ν ⋆ , f ⋆ , Γ ⋆ ) variables:

̸

Since P ⋆ , C ∈ S we have Γ ⋆ -Γ ⋆ ⊤ = f ⋆ 1 ⊤ -1f ⋆ ⊤ . Hence C + ν ⋆ log P ⋆ -f ⋆ ⊕ f ⋆ = 0 . Suppose that ν ⋆ = 0 then the previous reasoning implies that ∀ ( i, j ) , C ij = f ⋆ i + f ⋆ j . Using that C ∈ D we have C ii = C jj = 0 thus ∀ i, f ⋆ i = 0 and thus this would imply that C = 0 which is not allowed by hypothesis. Therefore ν ⋆ = 0 and the entropy constraint is saturated at the optimum by complementary slackness. Isolating P ⋆ then yields:

P ⋆ must be primal feasible in particular P ⋆ 1 = 1 . This constraint gives us the Sinkhorn fixed point relation for f ⋆ :

where for a vector α , we use the notation LSE( α ) = log ∑ k exp( α k ) .

A.3 Proof of Proposition 1

We recall the result

Proposition 1. Let C ∈ R n × n without constant rows. Then P e solves the entropic affinity problem (EA) with cost C if and only if P e is the unique solution of the convex problem

Proof. We begin by rewriting the above problem to make the constraints more explicit.

By concavity of entropy, one has that the entropy constraint is convex thus the above primal problem is a convex optimization problem. Moreover, the latter is strictly feasible for any ξ ∈ [ [ n -1] ] . Therefore Slater's condition is satisfied and strong duality holds.

Introducing the dual variables λ ∈ R n and ε ∈ R n + , the Lagrangian of the above problem writes:

where we recall that H r ( P ) = (H( P i : )) i . Note that we will deal with the constraint P ∈ R n × n + directly, hence there is no associated dual variable. Since strong duality holds, for any solution P ⋆ to the primal problem and any solution ( ε ⋆ , λ ⋆ ) to the dual problem, the pair P ⋆ , ( ε ⋆ , λ ⋆ ) must satisfy the Karush-Kuhn-Tucker (KKT) conditions. The first-order optimality condition gives:

Assume that there exists ℓ ∈ [ [ n ] ] such that ε ⋆ ℓ = 0 . Then (first-order) gives that the ℓ th row of C is constant which is not allowed by hypothesis. Therefore ε ⋆ > 0 ( i.e. , ε ⋆ has positive entries). Thus isolating P ⋆ in the first order condition results in:

where u = exp( λ ⋆ ⊘ ε ⋆ ) . This matrix must satisfy the stochasticity constraint P1 = 1 . Hence one has u = 1 ⊘ (exp (diag( ε ⋆ ) -1 C ) 1 ) and P ⋆ has the form

As a consequence of ε ⋆ > 0 , complementary slackness in the KKT conditions gives us that for all i , the entropy constraint is saturated i.e. , H( P ⋆ i : ) = log ξ +1 . Therefore P ⋆ solves the problem (EA). Conversely any solution of (EA) P ⋆ ij = exp ( -C ij /ε ⋆ i ) ∑ ℓ exp ( -C iℓ /ε ⋆ i ) with ( ε ⋆ i ) such that H( P ⋆ i : ) = log ξ +1 gives an admissible matrix for min P ∈H ξ ⟨ P , C ⟩ and the associated variables satisfy the KKT conditions which are sufficient conditions for optimality since the problem is convex.

A.4 Proof of Proposition 4 and Proposition 5

The goal of this section is to prove the following results:

Proposition 4 (Saturation of the entropies) . Let C ∈ S with zero diagonal, then (SEA) with cost C has a unique solution that we denote by P se . If moreover C ∈ D , then for at least n -1 indices i ∈ [ [ n ] ] the solution satisfies H( P se i : ) = log ξ +1 .

Proposition 5 (Solving for SEA) . Let C ∈ D , L ( P , γ , λ ) = ⟨ P , C ⟩ + ⟨ γ , (log ξ +1) 1 -H r ( P ) ⟩ + ⟨ λ , 1 -P1 ⟩ and q ( γ , λ ) = min P ∈ R n × n + ∩S L ( P , γ , λ ) . Strong duality holds for (SEA) . Moreover, let γ ⋆ , λ ⋆ ∈ argmax γ ≥ 0 , λ q ( γ , λ ) be the optimal dual variables respectively associated with the entropy and marginal constraints. Then, for at least n -1 indices i ∈ [ [ n ] ] , γ ⋆ i > 0 . When ∀ i ∈ [ [ n ] ] , γ ⋆ i > 0 then H r ( P se ) = (log ξ +1) 1 and P se has the form

The unicity of the solution in Proposition 4 is a consequence of the following lemma

̸

Lemma 7. Let C = 0 ∈ S with zero diagonal. Then the problem min P ∈H ξ ∩S ⟨ P , C ⟩ has a unique solution.

Proof. Making the constraints explicit, the primal problem of symmetric entropic affinity takes the following form

Suppose that the solution is not unique i.e. , there exists a couple of optimal solutions ( P 1 , P 2 ) that satisfy the constraints of (SEA) and such that ⟨ P 1 , C ⟩ = ⟨ P 2 , C ⟩ . For i ∈ [ [ n ] ] , we denote the

function f i : P → (log ξ + 1) -H( P i : ) . Then f i is continuous, strictly convex and the entropy conditions of (SEA) can be written as ∀ i ∈ [ [ n ] ] , f i ( P ) ≤ 0 .

Now consider Q = 1 2 ( P 1 + P 2 ) . Then clearly Q1 = 1 , Q = Q ⊤ . Since f i is strictly convex we have f i ( Q ) = f i ( 1 2 P 1 + 1 2 P 2 ) < 1 2 f i ( P 1 ) + 1 2 f ( P 2 ) ≤ 0 . Thus f i ( Q ) < 0 for any i ∈ [ [ n ] ] . Take any ε > 0 and i ∈ [ [ n ] ] . By continuity of f i there exists δ i > 0 such that, for any H with ∥ H ∥ F ≤ δ i , we have f i ( Q + H ) < f i ( Q ) + ε . Take ε > 0 such that ∀ i ∈ [ [ n ] ] , 0 < ε < -1 2 f i ( Q ) (this is possible since for any i ∈ [ [ n ] ] , f i ( Q ) < 0 ) and H with ∥ H ∥ F ≤ min i ∈ [ [ n ] ] δ i . Then for any i ∈ [ [ n ] ] , f i ( Q + H ) < 0 . In other words, we have proven that there exists η > 0 such that for any H such that ∥ H ∥ F ≤ η , it holds: ∀ i ∈ [ [ n ] ] , f i ( Q + H ) < 0 .

̸

Now let us take H as the Laplacian matrix associated to C i.e. , for any ( i, j ) ∈ [ [ n ] ] 2 , H ij = -C ij if i = j and ∑ l C il otherwise. Then we have ⟨ H , C ⟩ = -∑ i = j C 2 ij +0 = -∑ i = j C 2 ij < 0 since C has zero diagonal (and is nonzero). Moreover, H = H ⊤ since C is symmetric and H1 = 0 by construction. Consider for 0 < β ≤ η ∥ H ∥ F , the matrix H β := β H . Then ∥ H β ∥ F = β ∥ H ∥ F ≤ η . By the previous reasoning one has: ∀ i ∈ [ [ n ] ] , f i ( Q + H β ) < 0 . Moreover, ( Q + H β ) ⊤ = Q + H β and ( Q + H β ) 1 = 1 . For β small enough we have Q + H β ∈ R n × n + and thus there is a β (that depends on P 1 and P 2 ) such that Q + H β is admissible i.e. , satisfies the constraints of (SEA). Then, for such β ,

̸

̸

Thus ⟨ C , Q + H β ⟩ < ⟨ C , P 1 ⟩ which leads to a contradiction.

We can now prove the rest of the claims of Proposition 4 and Proposition 5.

Proof. Let C ∈ D . We first prove Proposition 4. The unicity is a consequence of Lemma 7. For the saturation of the entropies we consider the Lagrangian of the problem (SEA) that writes

for dual variables γ ∈ R n + , λ ∈ R n and Γ ∈ R n × n . Strong duality holds by Slater's conditions because 1 n 11 ⊤ is stricly feasible for ξ ≤ n -1 . Since strong duality holds, for any solution P ⋆ to the primal problem and any solution ( γ ⋆ , λ ⋆ , Γ ⋆ ) to the dual problem, the pair P ⋆ , ( γ ⋆ , λ ⋆ , Γ ⋆ ) must satisfy the KKT conditions. They can be stated as follows:

̸

̸

Let us denote I = { ℓ ∈ [ [ n ] ] s.t. γ ⋆ ℓ = 0 } . For ℓ ∈ I , using the first-order condition, one has for i ∈ [ [ n ] ] , C ℓi = λ ⋆ ℓ -Γ ⋆ ℓi +Γ ⋆ iℓ . Since C ∈ D , we have C ℓℓ = 0 thus λ ⋆ ℓ = 0 and C ℓi = Γ ⋆ iℓ -Γ ⋆ ℓi . For ( ℓ, ℓ ′ ) ∈ I 2 , one has C ℓℓ ′ = Γ ⋆ ℓ ′ ℓ -Γ ⋆ ℓℓ ′ = -(Γ ⋆ ℓℓ ′ -Γ ⋆ ℓ ′ ℓ ) = -C ℓ ′ ℓ . C is symmetric thus C ℓℓ ′ = 0 . Since C only has null entries on the diagonal, this shows that ℓ = ℓ ′ and therefore I has at most one element. By complementary slackness condition (last row of the KKT-SEA conditions) it holds that ∀ i = ℓ, H( P ⋆ i : ) = log ξ +1 . Since the solution of (SEA) is unique P ⋆ = P se and thus ∀ i = ℓ, H( P se i : ) = log ξ +1 which proves Proposition 4 but also that for at least n -1 indices γ ⋆ i > 0 . Moreover, from the KKT conditions we have

Now take ( i, j ) ∈ [ [ n ] ] 2 fixed. From the previous equality Γ ⋆ ji -Γ ⋆ ij = C ij + γ ⋆ i log P ⋆ ij -λ ⋆ i but also Γ ⋆ ij -Γ ⋆ ji = C ji + γ ⋆ j log P ⋆ ji -λ ⋆ j . Using that P ⋆ = ( P ⋆ ) ⊤ and C ∈ S we get Γ ⋆ ij -Γ ⋆ ji = C ij + γ ⋆ j log P ⋆ ij -λ ⋆ j . But Γ ⋆ ij -Γ ⋆ ji = -(Γ ⋆ ji -Γ ⋆ ij ) which gives

This implies

Consequently, if γ ⋆ > 0 we have the desired form from the above equation and by complementary slackness H r ( P se ) = (log ξ +1) 1 which proves Proposition 5. Note that otherwise, it holds

̸

A.5 EA and SEA as a KL projection

We prove the characterization as a projection of (EA) in Lemma 8 and of (SEA) in Lemma 9. Lemma 8. Let C ∈ D , σ > 0 and K σ = exp( -C /σ ) . Then for any σ ≤ min i ε ⋆ i , it holds P e = Proj KL H ξ ( K σ ) = arg min P ∈H ξ KL( P | K σ ) .

Proof. The KL projection of K onto H ξ reads

Introducing the dual variables λ ∈ R n and κ ∈ R n + , the Lagrangian of this problem reads:

Strong duality holds hence for any solution P ⋆ to the above primal problem and any solution ( κ ⋆ , λ ⋆ ) to the dual problem, the pair P ⋆ , ( κ ⋆ , λ ⋆ ) must satisfy the KKT conditions. The first-order optimality condition gives:

Solving for λ ⋆ given the stochasticity constraint and isolating P ⋆ gives

We now consider P ⋆ as a function of κ . Plugging this expression back in L yields the dual function κ ↦→G ( κ ) . The latter is concave as any dual function and its gradient reads:

Denoting by ρ = 1 + κ and taking the dual feasibility constraint κ ≥ 0 into account gives the solution: for any i , ρ ⋆ i = max( ε ⋆ i , 1) where ε ⋆ solves (EA) with cost C = -log K . Moreover we have that σ ≤ min( ε ⋆ ) where ε ⋆ ∈ ( R ∗ + ) n solves (EA). Therefore for any i ∈ [ [ n ] ] , one has ε ⋆ i /σ ≥ 1 . Thus there exists κ ⋆ i ∈ R + such that σ (1 + κ ⋆ i ) = ε ⋆ i .

This κ ⋆ cancels the above gradient i.e. , (log ξ +1) 1 = H( P ⋆ ( κ ⋆ )) thus solves the dual problem. Therefore given the expression of P ⋆ we have that Proj KL H ξ ( K ) = P e .

Lemma 9. Let C ∈ D , σ > 0 and K σ = exp( -C /σ ) . Suppose that the optimal dual variable γ ⋆ associated with the entropy constraint of (SEA) is positive. Then for any σ ≤ min i γ ⋆ i , it holds P se = Proj KL H ξ ∩S ( K σ ) .

Proof. Let σ > 0 . The KL projection of K onto H ξ ∩ S boils down to the following optimization problem.

By strong convexity of P → KL( P | K σ ) and convexity of the constraints the problem (SEA-Proj) admits a unique solution. Moreover, the Lagrangian of this problem takes the following form, where ω ∈ R n + , µ ∈ R n and Γ ∈ R n × n :

Strong duality holds by Slater's conditions thus the KKT conditions are necessary and sufficient. In particular if P ⋆ and ( ω ⋆ , µ ⋆ , β ⋆ ) satisfy

then P ⋆ is a solution to (SEA-Proj) and ( ω ⋆ , µ ⋆ , β ⋆ ) are optimal dual variables. The first condition rewrites

which is equivalent to

Now take P se the optimal solution of (SEA). As written in the proof Proposition 5 of P se and the optimal dual variables ( γ ⋆ , λ ⋆ , Γ ⋆ ) satisfy the KKT conditions:

By hypothesis γ ⋆ > 0 which gives ∀ i, H( P se i : ) -(log ξ + 1) = 0 . Now take 0 < σ ≤ min i γ ⋆ i and define ∀ i, ω ⋆ i = γ ⋆ i σ -1 . Using the hypothesis on σ we have ∀ i, ω ⋆ i ≥ 0 and ω ⋆ satisfies ∀ i, σ (1 + ω ⋆ i ) = γ ⋆ i . Moreover for any i ∈ [ [ n ] ]

Define also ∀ i, µ ⋆ i = λ ⋆ i /σ and ∀ ( i, j ) , β ⋆ ij = Γ ⋆ ij /σ . Since P se , ( γ ⋆ , λ ⋆ , Γ ⋆ ) satisfies the KKT conditions (KKT-SEA) then by the previous reasoning P se , ( ω ⋆ , µ ⋆ , β ⋆ ) satisfy the KKT conditions (KKT-Proj) and in particular P se is an optimal solution of (SEA-Proj) since KKT conditions are sufficient. Thus we have proven that P se ∈ arg min P ∈H ξ ∩S KL( P | K σ ) and by the uniqueness of the solution this is in fact an equality.

B Sensitivity Analysis for Dimensionality Reduction Experiments

In Figure 8, we extend the sensitivity analysis performed for spectral clustering (Figure 5) to DR scores. One can notice that tSNEkhorn outperforms tSNE on a wide range of perplexity values.

20

40

60

80

Perplexity

-

0

.

2

-

0

.

1

0

.

0

0

.

1

0

.

2

0

.

3

0

.

4

0

.

5

Silhouette on COIL

t-SNE

t-SNEkhorn

20

40

60

80

Perplexity

0

.

965

0

.

970

0

.

975

0

.

980

0

.

985

0

.

990

0

.

995

1

.

000

Trustworthiness on COIL

20

40

60

80

Perplexity

-

0

.

1

0

.

0

0

.

1

0

.

2

0

.

3

Silhouette on UMNIST

20

40

60

80

Perplexity

0

.

95

0

.

96

0

.

97

0

.

98

0

.

99

1

.

00

Trustworthiness on UMNIST

Peer reviews:
{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper presents a new dimensionality reduction algorithm, named SNEkhorn. By uncovering the novel links between Entropic affinities (EAs) and Optimal Transport (OT), the authors derive EAs with symmetric doubly stochastic normalization and the fixed row-wise entropy, which is the key to SNEkhorn. Besides, the authors show a dual ascent algorithm to compute this new affinity efficiently. Beyond this theoretical contribution, the authors showcase the benefits of SNEkhorn through numerical experiments on simulated data and real data.\n\nSTRENGTHS:\n- Entropic affinities (EAs) needs to be symmetrized when used in popular Dimensionality Reduction (DR) algorithm t-SNE, but the symmetrization destroys the row-wise constant entropy and stochasticity properties of EAs. To derive EAs that can maintain both symmetry and its own properties is a very natural. The proposed method is novel and simple to describe.\n- The authors discover novel connections between EAs and OT, and show a dual ascent algorithm to compute EAs from OT. The proposed algorithm provides a new perspective on EAs.\n- For conventional DR algorithm, the latent affinity is not doubly stochastic, which imposes spherical constraints on the embedding space. The proposed methods avoid this problem.\n- The simulation study and real data analysis are very sufficient. The authors illustrate the effectiveness from many aspects.\n\nWEAKNESSES:\n- There is not any discussion about the computational complexity of proposed method. Although the proposed algorithm performs better than t-SNE and UMAP, how does the computational complexity of proposed method compare with t-SNE or UMAP. Since the computational cost is also important in practice. \n- Some of the formulas and references in the article are incorrectly hyperlinked.\n\nQUESTIONS:\n- How does the computational complexity for the proposed method compare to t-SNE? Does the proposed method spend the same amount of time as t-SNE while achieve better results?\n- How to choose the dimensionality of PCA? In the reference the authors mentioned, the dimensionality of PCA is usually set to be 30 instead of 50. Does the dimensionality affects the performance of the algorithm?\n\nLIMITATIONS:\nYes", "TITLE": "Official Review", "RECOMMENDATION": 6, "REVIEWER_CONFIDENCE": 3, "SOUNDNESS_CORRECTNESS": 4, "DATE": "2023-07-06"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis is a very interesting paper about an application of the Sinkhorn algorithm to symmetrize the matrix of entropic affinities in methods of DR like SNE, t-SNE, etc.\nStrong theoretical contribution.\nSome experiments to illustrate.\n\nSTRENGTHS:\nThe paper is very interesting for its vision, state of the art across multiple domains, strong theoretical contribution, revisiting of existing methods and proposal of a new method.\nThe paper is very well written, not rushed.\nThe symmetrization with Sinkhorn is well done and this a nice \"tour de force\" like only Brittons can do.\nThe experiments include a grid search on the perplexity, and multiple runs for each perplexity.\n\nWEAKNESSES:\nThe paper is well written but it is also very/too dense: much information is packed, that is nice, but it takes quite some time to digest and to decode.\nThe notation is sometimes unconventional and difficult to follow, probably to keep it as compact as possible.\nWhile the theoretical part is very convincing and interesting for itself, it will only appeal to a very restricted audience of people specialised in the methodological design of advanced methods of DR. Also, the experiments are not sufficient to convince practitioners that the Sinkhorn symmetrization is from now on something necessary to get the best results. The experiments lack broader comparisons with other methods that are in the state of the art (here it looks like the authors have reimplemented t-SNE and UMAP; also, there are methods that do not look for symmetry at all, although this can be detrimental in the presence of many isolated outliers). The quantitative assessment might be partly questionable: the trustworthiness is not the best DR QA indicator; what was the neighbourhood size, by the way?\nThe lack of accelerated version is a possible weakness for dissemination, while NeurIPS would be precisely the ideal launching pad.\n\nQUESTIONS:\nThe \"crowding effect\" is just an intuitive explanation found in LvdM t-SNE paper; would it not be better to refer to something more conventional (empty space phenomenon, norm concentration, or just the reduction in volume from HD to LD?)?\nIn Figure 1, SNEkhorn or t-SNEkhorn ?\n\nLIMITATIONS:\nNo possible negative societal impact here.", "TITLE": "Official Review", "RECOMMENDATION": 8, "REVIEWER_CONFIDENCE": 5, "SOUNDNESS_CORRECTNESS": 4, "DATE": "2023-07-07"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThe paper presents a novel approach to dealing with entropic affinities (EAs) used in machine learning for dimensionality reduction tasks, specifically in the popular t-SNE algorithm. It addresses the limitations of current symmetrization methods applied to EAs, which can compromise the entropy and stochasticity properties of the affinity matrix. The proposed method uses optimal transport to achieve a natural symmetrization, leading to a new affinity matrix. This new matrix is then leveraged in a new dimensionality reduction algorithm called SNEkhorn, which is demonstrated to outperform state-of-the-art methods on both synthetic and real-world datasets.\n\nSTRENGTHS:\n1. The paper introduces a novel approach to symmetrizing entropic affinities by formulating them as an optimal transport problem. This brings a fresh perspective to the problem and could open up new avenues for research and application in machine learning.\n2. The proposed symmetrization method claims to maintain the constant entropy and stochasticity properties of the affinity matrix while being computationally efficient through dual ascent. This combination of robustness and efficiency is essential for practical applications.\n3. The development of the SNEkhorn algorithm based on the new affinity matrix offers a practical implementation of the proposed approach. The demonstrated superiority of SNEkhorn over other baseline methods on various datasets further strengthens the paper's claims.\n4. The paper evaluates the proposed SNEkhorn algorithm on both synthetic and real-world datasets, providing a comprehensive assessment of its performance and general applicability.\n\nWEAKNESSES:\nClarity of Presentation: While the abstract provides a high-level overview, some concepts, such as entropic affinities, optimal transport, and dual ascent, might be challenging for readers not already familiar with the domain. The paper should provide a clear and concise introduction to these concepts, ideally with intuitive explanations and illustrative examples. For example, what is P and C on paper 3 \"Symmetric Entropy-Constrained Optimal Transport\"\n\nRobustness Analysis: Since the proposed method claims to be robust to varying noise levels, it would be valuable to include a thorough analysis of its performance under different levels of noise in the datasets instead of two level. This could strengthen the claim of robustness and highlight the algorithm's practicality in real-world scenarios.\n\nQUESTIONS:\n1. What sensitivity analysis was performed on the hyperparameters introduced by the new symmetrization approach? How robust is the SNEkhorn algorithm to changes in these parameters?\n\n2. Can you provide additional insights into the interpretability of the reduced representations obtained by SNEkhorn? How well does it preserve meaningful structure in the data compared to other methods? Is the visualization in Figure 6 a special case?\n\n3.Could you elaborate on the limitations or potential failure cases of the proposed approach? What are the scenarios where SNEkhorn might not perform as well or could face challenges?\n\nLIMITATIONS:\nWhile the paper proposes a novel approach to symmetrizing entropic affinities and introduces the SNEkhorn algorithm with promising results, it is essential to consider the potential limitations and shortcomings of the work. Some possible limitations include:\n\nScalability: Dimensionality reduction algorithms often face challenges with scalability when dealing with large datasets. The paper should address the computational efficiency and scalability of the proposed SNEkhorn algorithm, especially when applied to high-dimensional and massive datasets commonly encountered in real-world applications.\n\nParameter Sensitivity: It is essential to investigate the sensitivity of hyper parameters and assess how they impact the performance of the SNEkhorn algorithm, e.g. perplexity.", "TITLE": "Official Review", "RECOMMENDATION": 7, "REVIEWER_CONFIDENCE": 3, "SOUNDNESS_CORRECTNESS": 4, "DATE": "2023-07-27"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nExisting DR approaches employ EAs after heuristic symmetrisation (symmetric-SNE). This leads to less faithful embeddings with low silhouette scores. This paper avoids such heuristic symmetrisation by enforcing symmetrisation in a related, new OT based formulation.\n\nTowards this goal, firstly, the EA problem is equivalently written as a (semi-relaxed) OT problem, where the transport plan recovers the EAs. Then symmetrisation is explicitly enforced as constraints on the transport map in this OT problem. Using optimality conditions it is shown that such EAs, maintain the crucial row-wise entropic equalities (prop4). As a result EAs are symmetric, doubly stochastic, and satisfy the entropic equalities, making the organically superior to the existing heuristics.\n\nUsing the proposed EAs, a DR formulation is proposed (leading to so-called SNEkhorn). Details of solving this problem are presented. The proposed embeddings are empirically compared to the state-of-the-art wrt. spectral clustering and dimension reduction. The improvements are significant.\n\nSTRENGTHS:\n1. The organisation and write-up are well polished and makes it an easy read.\n2. Connections made between EAs and OT are interesting, especially in the light of the symmetrisation issue with existing DR approach.\n3. Empirical improvements over baselines are impressive.\n\nWEAKNESSES:\n..\n\nQUESTIONS:\n1. It seems a primary reason for having Q_Z^{ds} in SNEkhorn is to enable fast objective-gradient computation via sinkhorn. Is this true?\n2. Will it be more appropriate to consider other affinities like \\tilde{Q}_Z etc. in place of Q_Z^{ds} ? If \\tilde{Q}_Z leads to spherical embeddings, can there be applications where this is desirable? Any discussion on this and alternatives may help the reader.\n\nLIMITATIONS:\nLimitations were discussed in the concluding section.", "TITLE": "Official Review", "RECOMMENDATION": 6, "REVIEWER_CONFIDENCE": 4, "SOUNDNESS_CORRECTNESS": 3, "DATE": "2023-08-03"}