b

DiscoverSearch
About
My stuff
Geometric Losses for Distributional Learning
2019·arXiv
Abstract
Abstract

Building upon recent advances in entropy-regularized optimal transport, and upon Fenchel duality between measures and continuous functions, we propose a generalization of the logistic loss that incorporates a metric or cost between classes. Unlike previous attempts to use optimal transport distances for learning, our loss results in unconstrained convex objective functions, supports infinite (or very large) class spaces, and naturally defines a geometric generalization of the softmax operator. The geometric properties of this loss make it suitable for predicting sparse and singular distributions, for instance supported on curves or hyper-surfaces. We study the theoretical properties of our loss and showcase its effectiveness on two applications: ordinal regression and drawing generation.

For probabilistic classification, the most popular loss is arguably the (multinomial) logistic loss. It is smooth, enabling fast convergence rates, and the softmax operator provides a consistent mapping to probability distributions. In many applications, different costs are associated to mis-classification errors between classes. While a cost-aware generalization of the logistic loss exists (Gimpel & Smith, 2010), it does not provide a cost-aware counterpart of the softmax. The softmax is pointwise by nature: it is oblivious to misclassification costs or to the geometry of classes.

Optimal transport (Wasserstein) losses have recently gained popularity in machine learning, for their ability to compare probability distributions in a geometrically faithful manner, with applications such as classification (Kusner et al., 2015), clustering (Cuturi & Doucet, 2014), domain adaptation (Courty et al., 2017), dictionary learning (Ro- let et al., 2016) and generative models training (Montavon et al., 2016; Arjovsky et al., 2017). For probabilistic clas-sification, Frogner et al. (2015) proposes to use entropy-regularized optimal transport (Cuturi, 2013) in the multi-label setting. Although this approach successfully leverages a cost between classes, it results in a non-convex loss, when combined with a softmax. A similar regularized Wasserstein loss is used by Luise et al. (2018) in conjunction with a kernel ridge regression procedure (Ciliberto et al., 2016) in order to obtain a consistency result.

The relation between the logistic loss and the maximum entropy principle is well-known. Building upon a generalization of the Shannon entropy originating from entropy regularized optimal transport (Feydy et al., 2019) and Fenchel duality between measures and continuous functions, we propose a generalization of the logistic loss that takes into account a metric or cost between classes. Unlike previous attempts to use optimal transport distances for learning, our loss is convex, and naturally defines a geometric generalization of the softmax operator. Besides providing novel insights in the logistic loss, our loss is theoretically sound, even when learning and predicting continuous probability distributions over a potentially infinite number of classes. To sum up, our contributions are as follows.

Organization and contributions.

We introduce the distribution learning setting, review existings losses leveraging a cost between classes and point out their shortcomings (§2).

Building upon entropy-regularized optimal transport, we present a novel cost-sensitive distributional learning loss and its corresponding softmax operator. Our proposal is theoretically sound even in continuous measure spaces (§3).

We study the theoretical properties of our loss, such as its Fisher consistency (§4). We derive tractable methods to compute and minimize it in the discrete distribution setting. We propose an abstract Frank-Wolfe scheme for computations in the continuous setting.

Finally, we demonstrate its effectiveness on two discrete prediction tasks involving a geometric cost: ordinal regression and drawing generation using VAEs (§5).

Notation. We denote X a finite or infinite input space, and Y a compact potentially infinite output space. When Y is a finite set of d classes, we write  Y = [d] ≜ {1, . . . , d}. We denote  C(Y), M(Y), M+(Y)and  M+1 (Y)the sets of continuous (bounded) functions, Radon (positive) measures and probability measures on Y. Note that in finite dimensions,  M+1 ([d]) = △dis the probability simplex and  C([d]) = Rd. We write vectors in  Rdand continuous functions in C(Y) with small normal letters, e.g., f, g. In the finite setting, where  Y = {y1, . . . , yd}, we define fi ≜ f(yi). We write elements of  △dand measures in M(Y) with greek letters  α, β. We write matrices and operators with capital letters, e.g., C. We denote by  ⊗and  ⊕the tensor product and sum, and  ⟨·, ·⟩the scalar product.

In this section, after introducing distributional learning in a discrete setting, we review two lines of work for taking into account a cost C between classes: cost-augmented losses, and geometric losses based on Wasserstein and energy distances. Their shortcomings motivate the introduction of a new geometric loss in  §3.

2.1. Discrete distribution prediction and learning

We consider a general predictive setting in which an input vector  x ∈ Xis fed to a parametrized model  gθ : X → Rd(e.g., a neural network), that predicts a score vector f = gθ(x) ∈ Rd. At test time, that vector is used to predict the most likely class  ˆy = argmaxy∈[d] fy. In order to predict a probability distribution  α ∈ △d, it is common to compose  gθwith a link function  ψ(f), where  ψ: Rd → △d. A typical example of link function is the softmax.

To learn the model parameters  θ, it is necessary to de-fine a loss  ℓ(α, f)between a ground-truth  α ∈ △dand the score vector  f ∈ Rd. Composite losses (Reid & Williamson, 2010; Williamson et al., 2016) decompose that loss into a loss  ℓ△(α, β), where  ℓ△ : △d × △d → Rand ψ: ℓ(α, f) ≜ ℓ△(α, ψ(f)). Note that depending on  ℓ△and ψ, ℓis not necessarily convex in f. More recently, Blon- del et al. (2018; 2019) introduced Fenchel-Young losses, a generic way to directly construct a loss  ℓand a corresponding link  ψ. We will revisit and generalize that framework to the continuous output setting in the sequel of this paper. Given a loss  ℓand a training set of input-distribution pairs, (xi, αi), where  xi ∈ Xand  αi ∈ △d, we then minimize �i ℓ(αi, gθ(xi)), potentially with regularization on  θ.

2.2. Cost-augmented losses

Before introducing a new geometric cost-sensitive loss in §3, let us now review classical existing cost-sensitive loss functions. Let C be a  d × dmatrix, such that  cy,y′ ≥ 0is the cost of misclassifying class  y ∈ [d]as class  y′ ∈ [d]. We assume  cy,y = 0for all  y ∈ [d]. To take into account the cost C, in the single label setting, it is natural to define a loss  L: [d] × Rd → Ras follows

image

To obtain a loss  ℓ: △d × Rd → R, we simply define ℓ(δy, f) ≜ L(y, f), where  δyis the one-hot representation of  y ∈ [d]. Note that choosing  cy,y′ = 1when  y ̸= y′and cy,y′ = 0otherwise (i.e.,  C = 1 − Id×d) reduces to the zero-one loss. To obtain a convex upper-bound, (1) is typically replaced with a cost-augmented hinge loss (Crammer & Singer, 2001; Tsochantaridis et al., 2005):

image

Replacing the max above with a log-sum-exp leads to a cost-augmented version of the logistic (or conditional random field) loss (Gimpel & Smith, 2010). Another convex relaxation is the cost-sensitive pairwise hinge loss (Weston & Watkins, 1999; Duchi et al., 2018). Remarkably, all these losses use only one row of C, the one corresponding to the ground truth y. Because of this dependency on y, it is not clear how to define a probabilistic mapping at test time. In this paper, we propose a loss which comes with a geometric generalization of the softmax operator. That operator uses the entire cost matrix C.

2.3. Wasserstein and energy distance losses

Wasserstein or optimal transport distances recently gained popularity as a loss in machine learning for their ability to compare probability distributions in a geometrically faithful manner. As a representative application, Frogner et al. (2015) proposed to use entropy-regularized optimal transport (Cuturi, 2013) for cost-sensitive multi-label classifica-tion. Effectively, optimal transport lifts a distance or cost C : Y × Y → R+to a distance between probability distributions over Y. Following Genevay et al. (2016), given a ground-truth probability distribution  α ∈ △dand a predicted probability distribution  β ∈ △d, we define

image

where U is the transportation polytope, a subset of  △d×dwhose elements  πhave constrained marginals:  π1 = αand  π⊤1 = β. KL is the Kullback–Leibler divergence (a.k.a. relative entropy). Because  βneeds to be a valid probability distribution, Frogner et al. (2015) propose to use  β = ψ(f) =softmax(f), where  f ∈ Rdis a vector of prediction scores. Unfortunately, the resulting composite loss,  ℓ(α, f) =OTC,ϵ(α,softmax(f)), is not convex w.r.t. f. Another class of divergences between measures  αand  βstems from energy distances (Sz´ekely & Rizzo, 2013) and maximum mean discrepancies. However, composing these divergences with a softmax again breaks convexity in f. In contrast, our proposal is convex in f and defines a natural geometric softmax.

In this section, we construct a loss between probability measures and score functions, canonically associated with a link function. Our construction takes into account a cost function  C : Y × Y → Rbetween classes. Unlike existing methods reviewed in  §2.2, our loss is well defined and convex on compact, possibly infinite spaces Y. We start by extending the setting of  §2.1 to predicting arbitrary probabilities, for instance having continuous densities with respect to the Lebesgue measure or singular distributions supported on curves or surfaces.

3.1. Continuous probabilities and score functions

We consider a compact metric space of outputs Y, endowed with a symmetric cost function  C : Y × Y → R. We wish to predict probabilities over Y, that is, learn to predict distributions  α ∈ M+1 (Y). The space of probability mea- sures forms a closed subset of the space of Radon measures M(Y), i.e.,  M+1 (Y) ⊆ M(Y). From the Riesz represen- tation theorem, M(Y) is the topological dual of the space of continuous measures C(Y), endowed with the uniform convergence norm  ∥ · ∥∞. The topological duality between the primal M(Y) and the dual C(Y) defines a pairing, similar to a “scalar product”, between these spaces:

image

for all  α ∈ M(Y)and  f ∈ C(Y), where Y is a random variable with law  α. This pairing also defines the natural topology to compare measures and to differentiate functionals depending on measures. This is the so-called weak⋆topology, which corresponds to the convergence in law of random variables. A sequence  αnis said to converge weak⋆to some  αif for all functions  f ∈ C(Y), ⟨αn, f⟩ →⟨α, f⟩. Note that when endowing M(Y) with this weak⋆topology, the dual of M(Y) is C(Y), which is the key to be able to use duality (and in particular Legendre-Fenchel transform) from convex optimization. Using this topology is fundamental to define geometric losses that can cope with arbitrary, possibly highly localized or even singular distributions (for instance sparse sums of Diracs or measures concentrated on thin sets such as 2-D curves or 3-D surfaces).

Similarly to the discrete setting reviewed in  §2.1, in the continuous setting, we now wish to predict a distribution α ∈ M+1 (Y)by setting  α = ψ(f), where  f = gθ(x) ∈C(Y), gθ : X → C(Y)(i.e.,  gθis unconstrained), and ψ: C(Y) → M+1 (Y)is a link function. We propose to use maps between the primal  M+1 (Y)and the dual score space C(Y) as link functions. As we shall see, such mirror maps are naturally defined by continuous convex function on the primal space, through Fenchel-Legendre duality. Our framework recovers the discrete case Y = [d] as a particular case, with  △dcorresponding to  M+1 ([d])and  Rdto C([d]), though the isomorphisms  α → �di=1 αiδiand for all  i ∈ [d], f(i) = fi.

Regularization of optimal transport is our key tool to construct entropy functions which are continuous with respect to the weak⋆topology, and that can be conjugated to define a  C(Y) → M+1 (Y)link function. It allows us to naturally leverage a cost  C : Y × Y → Rbetween classes.

3.2. An entropy function for continuous probabilities

The regularized optimal transport cost (2) remains well de-fined when  αand  βbelong to a continuous measure space M+1 (Y), with U now being a subset of  M+1 (Y × Y)with marginal constraints. It induces the self-transport functional (Feydy et al., 2019), that we reuse for our purpose:

image

We will omit the dependency of  Ωon C when clear from context. It is shown by Feydy et al. (2019) that  Ωis continuous and convex on M(Y), and strictly convex on M+1 (Y), where continuity is taken w.r.t. the weak⋆topol- ogy. We call  Ω, the Sinkhorn negentropy. As a negative entropy function, it can be used to measure the uncertainty in a probability distribution (lower is more uncertain), as illustrated in Figure 2. It will prove crucial in our loss construction. In the above, we have set w.l.o.g.  ε = 2to recover simple asymptotical behavior of  Ω, as will be clear in Prop. 1.

We first recall some known results from Feydy et al. (2019). Using Fenchel-Rockafellar duality theorem (Rock- afellar, 1966), the function  Ωrewrites as the solution to a Kantorovich-type dual problem (see e.g., Villani, 2008). For all  α ∈ M+1 (Y), we have that

image

where we use the homogeneous dual (i.e. with a log in the maximization), as explained in Cuturi & Peyr´e (2018).

Gradient and extrapolation. Ωis differentiable in the sense of measures (Santambrogio, 2015), meaning that there exists a continuous function  ∇Ω(α)such that, for all

ξ1, ξ2 ∈ M+1 (Y), t > 0,

image

As shown in Feydy et al. (2019), this function  f = ∇Ω(α), that we call the symmetric Sinkhorn potential, is a particular solution of the dual problem. It is the only function in C(Y) such that  −f = T(−f, α), where the soft C-transform operator (Cuturi & Peyr´e, 2018) is defined as

image

This operator can be understood as the log-convolution of the measure  αef2with the Sinkhorn kernel  e− C2. The Sinkhorn potential f has the remarkable property of being defined on all Y, even though the support of  αmay be smaller. Given any dual solution g to (4), which is defined α-almost everywhere, we have  f = −T(−g, α), i.e. f extrapolates the values of g on the support of  α, using the Sinkhorn kernel.

Special cases. The following proposition, which is an original contribution, shows that the Sinkhorn negentropy asymptotically recovers the negative Shannon entropy and Gini index (Gini, 1912) when rescaling the cost. The Sinkhorn negentropy therefore defines a parametric family of negentropies, recovering these important special cases. Note however that on continuous spaces Y, the Shannon entropy is not weak⋆continuous and thus cannot be used to define geometric loss and link functions, the softmax link function being geometry-oblivious. Similarly, the Gini index is not defined on  M+1 (Y), as it involves the squared values of  αin a discrete setting.

Proposition 1 (Asymptotics of Sinkhorn negentropies). For Y compact, the rescaled Sinkhorn negentropy converges to a kernel norm for high regularization  ε. Namely, for all  α ∈ M+1 (Y), we have

image

Let Y = [d] be discrete and choose  C = 1 − Id×d. The Sinkhorn negentropy converges to the Shannon negentropy for low-regularization, and into the negative Gini index for high regularization:

image

Proof is provided in  §A.1. The first part of the proposition shows that the Sinkhorn negentropies converge to a kernel norm (see e.g., Sriperumbudur et al., 2011). This is similar to the regularized Sinkhorn divergences converging to an Energy Distance (Sz´ekely & Rizzo, 2013) for  ε → ∞(Genevay et al., 2018; Feydy et al., 2019).

image

Figure 1. The symmetric Sinkhorn potentials form a distance field to a weighted measure. The link function  ψ = ∇Ω⋆(f) allows togo back from this field in C(Y) to a measure  α ∈ M+1 (Y).

From probabilities to potentials. The symmetric Sinkhorn potential  f = ∇Ω(α)is a continuous function, or a vector in the discrete setting. It can be interpreted as a distance field to the distribution  α. We visualize this field on a 2D space in Figure 1, where Y is the set of  h × wpixels of an image, and we wish to predict a 2-dimensional probability distribution in  M+1 (Y) = △h×w. Predicting a distance field  f ∈ C(Y)to a measure is more convenient than predicting a distribution directly, as it has unconstrained values and is therefore easier to optimize against. For this reason, we propose to learn parametric models that predict a “distance field”  f = gθ(x)given an input  x ∈ X. In the following section, we construct a link function ψ : C(Y) → M+1 (Y), for general probability measure and function spaces  M+1 (Y)and C(Y), so to obtain a distributional estimator  αθ = ψ ◦ gθ : X → M+1 (Y).

3.3. Fenchel-Young losses in continuous setting

To that end, we generalize in this section the recentlyproposed Fenchel-Young (FY) loss framework (Blondel et al., 2018; 2019), originally limited to discrete costoblivious measure spaces, to infinite measure spaces. Inspired by that line of work, we use Legendre-Fenchel duality to define loss and link functions from Sinkhorn negative entropies, in a principled manner. We define the LegendreFenchel conjugate  Ω⋆ : C(Y) → Rof  Ωas

image

Rigorously,  Ω⋆(f)is a pre-conjugate, as  Ωis defined on M(Y), the topological dual of continuous functions C(Y). For a comprehensive and rigorous treatment of the theory of conjugation in infinite spaces, and in particular Banach spaces as is the case of C(Y), see Mitter (2008).

As  Ωis strictly convex,  Ω⋆is differentiable everywhere and we have, from a Danskin theorem (Danskin, 1966) with left Banach space and right compact space (Bernhard & Rapaport, 1995, Theorem C.1):

image

That gradient can be used as a link  ψfrom  f ∈ C(Y)to α ∈ M+1 (Y). It can also be interpreted as a regularized

prediction function (Blondel et al., 2018; Mensch & Blon- del, 2018). Following the FY loss framework, we define the loss associated with  ∇Ω⋆by

image

In the discrete single-label setting, that loss is also related to the construction of Duchi et al. (2018, Proposition 3). From the Fenchel-Young theorem (Rockafellar, 1970), ℓΩ(α, f) ≥ 0, with equality if and only if  α = ∇Ω⋆(f). The loss  ℓΩis thus positive, convex and differentiable in its second argument, and minimizing it amounts to find the pre-image  f ⋆of the target distribution  αwith respect to the link (mapping)  ∇Ω⋆.

Our construction is a generalization of the Fenchel-Young loss framework (Blondel et al., 2018; 2019), in the sense that it relies on topological duality between C(Y) and M+1 (Y), instead of the Hilbertian structure of  Rdand  △d, to construct the loss  ℓΩand link function  ∇Ω⋆. We now instantiate the Fenchel-Young loss (6) with Sinkhorn negentropies in order to obtain a novel cost-sensitive loss.

3.4. A new geometrical loss and softmax

The key ingredients to derive a Fenchel-Young loss  ℓΩand a link  ∇Ω⋆are the conjugate  Ω⋆and its gradient. Remarkably, they enjoy a simple form with Sinkhorn negentropies, as shown in the following proposition.

Proposition 2 (Conjugate of the Sinkhorn negentropy). For all  f ∈ C(Y), the Legendre-Fenchel conjugate  Ω⋆of Ωdefined in (3) and its gradient read

image

and where g stands for geometric and LSE for log-sum-exp.

The proof can be found in  §A.2. ∇Ω⋆(f)is the usual Fr´echet derivative of  Ω⋆, that lies a priori in the topological dual space of C(Y), i.e. M(Y). From a Danskin theorem (Bernhard & Rapaport, 1995), it is in fact a probability measure. The probability distribution  α = ∇Ω⋆(f)is typically sparse, as the minimizer of a quadratic on a convex subspace of M(Y). We call the loss  ℓΩgenerated by the Sinkhorn negentropy g-logistic loss.

Special cases. Let Y = [d] and  C = 1 − Id×d (0-1cost matrix). From Prop. 1,  Ωasymptotically recovers the negative Shannon entropy when  Ω = Ω Cεas  ε → 0and the neg- ative Gini index when  Ω = εΩ Cε, as  ε → ∞. ∇Ω∗is then

image

argminα∈△d ∥α − f∥2(Martins & Astudillo, 2016), respectively. Likewise,  ℓΩrecovers the logistic and sparsemax losses. When  ε → 0, because  ( Cε )y,y′ = ∞if  y ̸= y′and 0 otherwise, we see that the logistic loss infinitely penalizes inter-class errors. That is, to obtain zero logistic loss, the model must assign probability 1 to the correct class. The limit case  ε → 0is the only case for which g-softmax always outputs completely dense distributions. In the continuous case,  εΩ⋆C/ε(f/ε)degenerates into a posi- tive deconvolution objective with simplex constraint:

image

Fig. 1 shows that  ∇Ω⋆has indeed a deconvolutional effect.

3.5. Computation

Before studying the g-logistic loss  ℓΩand link function ∇Ω⋆(f), we now describe practical algorithms for computing  ∇Ω⋆(f)and  Ω⋆(f)in the discrete and continuous cases. The key element in using the g-LSE as a layer in an arbitrary complex model is to minimize the quadratic function  Φf ≜ Φ(·, f), on  M+1 (Y). We can then use the minimum value in the forward pass, and the minimizer in the backward pass, during e.g. SGD training.

Continuous optimisation. In the general case where Y is compact, we cannot represent  α ∈ M+1 (Y)using a finite vector. Yet, we can use a Frank-Wolfe scheme to progressively add spikes, i.e. Diracs to an iterate sequence  αt. For this, we need to compute, at each iteration, the gradient of Φfin the sense of measure (5), i.e. the function in C(Y)

image

that simply requires to compute the C-transform of  −fon the measure  α, similarly to regularized optimal transport. The simplest Frank-Wolfe scheme then updates

image

Indeed, for  h ∈ C(Y), the minimizer of  ⟨h, ·⟩on  M+1 (Y)is the Dirac  δywhere  y ∈ Yminimizes h. This optimization scheme may be refined to ensure a geometric convergence of  Φf(αt). It can be used to identify Diracs from a continuous distance field f, similar to super-resolution approaches proposed in Bredies & Pikkarainen (2013); Boyd et al. (2017). It requires to work with computer-friendly representation of f, so that we can obtain an approximation of  ytefficiently, using e.g. non-convex optimization. Another approach is to rely on a deep parametrization of a particle swarm, as proposed by Boyd et al. (2018). We leave such an application for future work, and focus on an efficient discrete solver for the g-LSE and g-softmax.

image

Figure 2. Left: Geometric softmax and Sinkhorn entropy, for symmetric cost matrices, in the binary case. Predictions from the g-softmax are sparse, as the minimizer of a convex quadratic on the simplex. Right: Level sets of the geometric conjugate. Introducing a cost matrix induces a deformation  △2, the level-set of the log-sum-exp operator, onto the set of symmetric Sinkhorn potentials F. The geometric conjugate defines an extrapolation operator  f → f E that replaces the score function onto the cylinder F + R1.

Discrete optimisation. In the discrete case, we can parametrize  log Φ(f, ·)in logarithmic space, by setting α = exp(l) −LSE(l), with  l ∈ Rd. Ω⋆(f)then reads

image

This objective is non-convex on  Rdbut invariant with translation and convex on  {h ∈ Rd,LSE(l) = 0}. It thus admits a unique solution, that we can find using an unconstrained quasi-Newton solver like L-BFGS (Liu & Nocedal, 1989), that we stop when the iterates are sufficiently stable. For l that maximizes (7), the gradient  ∇Ω⋆(f) =softmax(l) is used for backpropagation and at test time. As  ∇Ω⋆(f)is sparse, we expect some coordinates  lito go to  −∞. In practice,  αithen underflows to 0 after a few iterations.

Two-dimensional convolution. In the discrete case, when dealing with two-dimensional potentials and measures, the objective function (7) can be written with a convolution operator, as  − log⟨el− f2 , e− C2 ⋆ el− f2 ⟩where C ∈ R(h×w)2. It is therefore efficiently computable and differentiable on GPUs, especially when the kernel C is separable in height and width, e.g. for the  ℓ22norm, in which case we perform 2 successive one-dimensional convolutions. We use this computational trick in our variational auto-encoder experiments (§5).

We start by studying the mirror map  ∇Ω⋆, that we expect to invert the mapping  α → ∇Ω(α). This study is necessary as we cannot rely on typical conjugate inversion results (e.g., Rockafellar, 1970, Theorem 26.5), that would stipulate that ∇Ω⋆ = (∇Ω)−1on the domain of  Ω⋆. Indeed, this result is stated in finite dimension, and requires that  Ωand  Ω⋆be Legendre, i.e. be strictly convex and differentiable on their domain of definition, and have diverging derivative on the boundaries of these domains (see also Wainwright & Jordan, 2008). This is not the case of the Sinkhorn negentropy, which requires novel adjustements. With these at hands, we show that parametric models involving a final g-softmax layer can be trained to minimize a certain wellbehaved Bregman divergence on the space of probability measures. Proofs are reported in  §A.3 and  §A.4

4.1. Geometry of the link function

We have constructed the link function  ∇Ω⋆in hope that it would allow to go from a symmetric Sinkhorn potential f = ∇Ω(α)back to the original measure  α. The following lemma states that this is indeed the case, and derives two consequences on the space of symmetric Sinkhorn potentials, defined as  F ≜ {f ∈ C(Y), f = ∇Ω(α)}.

Lemma 1 (Inversion of the Sinkhorn potentials).

image

The computation of the Sinkhorn potential thus inverts the g-LSE operator on the space F, which is included in the 0-level set of  Ω⋆. This is similar to the set  FShannon ={log α, α ∈ △d}being the 0 level set of the log-sum-exp function when using the Shannon negentropy as  Ω.

This corollary is not sufficient for our purpose, as we want to characterize the action of  ∇Ω⋆on all continuous functions  f ∈ C(Y). For this, note that the g-LSE operator  Ω⋆has the same behavior as the log-sum-exp when composed with the addition of a constant  c ∈ R:

image

Therefore, for all  f ∈ C(Y), Ω⋆(f − Ω⋆(f)) = 0, which almost makes  f −Ω⋆(f)a part of the space of potentials F. Yet, in contrast with the Shannon entropy case, the inclusion of  (Ω⋆)−1(0)in F is strict. Indeed, following  §3.2 f ∈ Fimplies that there exists  α ∈ M+1 (Y)such that f = −T(−f, α)is the image of the C-transform operator. The operator  ∇Ω◦∇Ω⋆has therefore an extrapolation effect, as it replaces  f − Ω⋆(f)onto the set of Sinhorn potentials. This is made clear by the following proposition.

Proposition 3 (Extrapolation effect of  ∇Ω◦∇Ω⋆). For all f ∈ C(Y), we define the extrapolation of f to be

image

Then, for all  f ∈ C(Y), ∇Ω ◦ ∇Ω⋆(f) = f E − Ω⋆(f).

The extrapolation operator translates f to  (Ω⋆)−1(0), extrapolates  f − Ω⋆(f)so that it becomes a Sinkhorn potential, then translates back the result so that  Ω⋆(f E) =Ω⋆(f). Its effects clearly appears on Figure 2 (right), where we see that  f Eis a projection of f onto the cylinder F +R.

4.2. Relation to Hausdorff divergence

Recall that the Bregman divergence (Bregman, 1967) generated by a strictly convex  Ωis defined as

image

When  Ωis the classical negative Shannon entropy  Ω(α) =⟨α, log α⟩, it is well-known that  DΩequals the KullbackLeibler divergence and it is easy to check that

image

The equivalence between Fenchel-Young loss  ℓΩ(α, f)and composite Bregman divergence  DΩ(α, ∇Ω⋆(f)), however, no longer holds true when  Ωis the Sinkhorn negentropy de-fined in (3). In that case,  DΩcan be interpreted as an asymmetric Hausdorff divergence (Aspert et al., 2002; Feydy et al., 2019). It forms a geometric divergence akin to OT distances, and estimates the distance between distribution supports. As we now show,  ℓΩprovides an upper-bound on the composition of that divergence with  ∇Ω⋆.

Proposition 4 (ℓΩupper-bounds Hausdorff divergence).

image

with equality if supp  ∇Ω⋆(f) =supp  α.

In contrast with the KL divergence, the asymmetric Hausdorff divergence is finite even when  supp α ̸= supp β, a geometrical property that it shares with optimal transport divergences. We now use Prop. 4 to derive a new consistency result justifying our loss. Let us assume that input features and output distributions follow a distribution D ∈ M+1 (X × M+1 (Y)). We define the Hausdorff diver- gence risk and the Fenchel-Young loss risk as

image

where the expectation is taken w.r.t.  (x, α) ∼ D. We define their associated Bayes estimators as

image

The next proposition guarantees calibration of  ℓΩwith respect to the asymmetric Hausdorff divergence  DΩ.

Proposition 5 (Calibration of the g-logistic loss). The g-logistic loss  ℓΩwhere  Ωis defined in (3) is Fisher consistent with the Hausdorff divergence  DΩfor the same  Ω. That is,

image

The excess of risk in the Hausdorff divergence is controlled by the excess of risk in the g-logistic loss. For all  g : X →C(Y), we have

image

This result, that follows the terminology of Tewari & Bartlett (2005), shows that  ℓΩis suitable for learning predictors that minimize  DΩ.

We present two experiments that demonstrate the validity and usability of the geometric softmax in practical usecases. We provide a PyTorch package for reusing the discrete geometric softmax layer1.

5.1. Ordinal regression

We first demonstrate the g-softmax for ordinal regression. In this setting, we wish to predict an ordered category among d categories, and we assume that the cost of predicting  ˆyinstead of y is symmetric and depends on the difference between  ˆyand y. For instance, when predicting ratings, we may have three categories bad  ≺average  ≺good. This is typically modeled by a cost-function C(ˆy, y) = φ(|ˆy − y|), where  φis the  ℓ22or  ℓ1cost. We use the real-world ordinal datasets provided by Gutierrez et al. (2016), using their predefined 30 cross-validation folds.

Experiment and results. We study the performance of the geometric softmax in this discrete setting, where the score function is assumed to be a linear function of the input features  x ∈ Rk, i.e,  gW,b(x) = Wx + b, with  b ∈ Rd, x ∈ Rkand  W ∈ Rd×k. We compare its performance to multinomial regression, and to immediate threshold and all-threshold logistic regression (Rennie & Srebro, 2005), using a reference implementation provided by Pedregosa et al. (2017). We use a cross-validated  ℓ2penalty term on the linear score model  gθ. To compute the Hausdorff divergence at test time and the geometric loss during training, we set  C(ˆy, y) = (ˆy − y)2/2.

The results, aggregated over datasets and cross-validation folds, are reported in Table 1. We observe that the g-logistic regression performs better than the others for the Hausdorff divergence on average. It performs slightly worse than a simple logistic regression in term of accuracy, but

Table 1. Performance of geometric loss as a drop-in replacement in linear models for ordinal regression. Our method performs better w.r.t. its natural metric, the Hausdorff divergence.

image

slightly better in term of mean absolute error (MAE, the reference metric in ordinal regression). It thus provides a viable alternative to thresholding techniques, that performs worse in accuracy but better in MAE. It has the further advantage of naturally providing a distribution of output given an input x. We simply have, for all  y ∈ [d], p(Y = y| X = x) = (g-softmax(gW,b(x)))y.

Calibration of the geometric loss. We validate Prop. 5 experimentally on the ordinal regression dataset car. During training, we measure the geometric cross-entropy loss and the Hausdorff divergence on the train and validation set. Figure 3 shows that  ℓΩis indeed an upper bound of DΩ, and that the difference between both terms reduces to almost 0 on the train set. Prop. 5 ensures this finding provided that the set of scoring function is large enough, which appears to be approximately the case here.

Figure 3. Training curves for ordinal regression on dataset car. The difference between the g-logistic loss and the Hausdorff divergence vanishes on the train set.

5.2. Drawing generation with variational auto-encoders

The proposed geometric loss and softmax are suitable to estimate distributions from inputs. As a proof-of-concept experiment, we therefore focus on a setting in which distributional output is natural: generation of hand-drawn doodles and digits, using the Google QuickDraw (Ha & Eck, 2018) and MNIST dataset. We train variational autoencoders on these datasets using, as output layers, (1) the KL divergence with normalized output and (2) our geometric loss with normalized output. These approaches output an image prediction using a softmax/g-softmax over all pixels, which is justified when we seek to output a concentrated distributional output. This is the case for doodles and digits, which can be seen as 1D distributions in a 2D space. It differs from the more common approach that uses a binary cross-entropy loss for every pixel and enables to capture interactions between pixels at the feature extraction level. We use standard KL penalty on the latent space distribution.

Using the g-softmax takes into account a cost between pix-

image

Figure 4. The g-softmax layer permits to generate and reconstruct drawing in a more concentrated manner. For a same level of variational penalty, the g-softmax better and faster minimizes the asymmetric Hausdorff divergence. See also Figure 6.

els (i, j) and (k, l), that we set to be the Euclidean cost C/σ, where C is the  ℓ22cost and  σis the typical distance of interaction—we choose  σ = 2in our experiments. We therefore made the hypothesis that it would help in reconstructing the input distributions, forming a non-linear layer that captures interaction between inputs in a nonparametric way.

Results. We fit a simple MLP VAE on 28x28 images from the QuickDraw Cat dataset. Experimental details are reported in Appendix B (see Figure 6). We also present an experiment with 64x64 images and a DCGAN architecture, as well as visualization of a VAE fitted on MNIST. In Fig- ure 4, we compare the reconstruction and the samples after training our model with the g-softmax and simple softmax loss. Using the g-softmax, which has a deconvolutional effect, yields images that are concentrated near the edges we want to reconstruct. We compare the training curves for both the softmax and g-softmax version: using the g-softmax link function and its associated loss better minimizes the asymmetric Hausdorff divergence. The cost of computation is again increased by a factor 10.

We introduced a principled way of learning distributional predictors in potentially continuous output spaces, taking into account a cost function in between inputs. We constructed a geometric softmax layer, that we derived from Fenchel conjugation theory in Banach spaces. The key to our construction is an entropy function derived from regularized optimal transport, convex and weak⋆continuous on probability measures. Beyond the experiments in discrete measure spaces that we presented, our framework opens the doors for new applications that are intrinsically off-the-grid, such as super-resolution.

The work of A. Mensch and G. Peyr´e has been supported by the European Research Council (ERC project NORIA). A. Mensch thanks Jean Feydy and Thibault S´ejourn´e for fruitful discussions.

Arjovsky, M., Chintala, S., and Bottou, L. Wasserstein gen- erative adversarial networks. In Proceedings of the International Conference on Machine Learning, pp. 214–223, 2017.

Aspert, N., Santa-Cruz, D., and Ebrahimi, T. Mesh: Mea- suring errors between surfaces using the hausdorff distance. In Proceedings of the IEEE International Conference on Multimedia and Expo, pp. 705–708, 2002.

Bernhard, P. and Rapaport, A. On a theorem of Danskin with an application to a theorem of Von Neumann-Sion. Nonlinear Analysis: Theory, Methods & Applications, 24(8):1163–1181, 1995.

Blondel, M., Martins, A. F. T., and Niculae, V. Learning classifiers with Fenchel-Young losses: Generalized entropies, margins, and algorithms. In Proceedings of the International Conference on Artificial Intelligence and Statistics, 2018.

Blondel, M., Martins, A. F., and Niculae, V. Learning with Fenchel-Young losses. arXiv:1901.02324, 2019.

Boyd, N., Schiebinger, G., and Recht, B. The alternating descent conditional gradient method for sparse inverse problems. SIAM Journal on Optimization, 27(2):616– 639, 2017.

Boyd, N., Jonas, E., Babcock, H. P., and Recht, B. DeepLoco: Fast 3D localization microscopy using neural networks. BioRxiv, pp. 267096, 2018.

Bredies, K. and Pikkarainen, H. K. Inverse problems in spaces of measures. ESAIM: Control, Optimisation and Calculus of Variations, 19(1):190–218, 2013.

Bregman, L. M. The relaxation method of finding the com- mon point of convex sets and its application to the solution of problems in convex programming. USSR Computational Mathematics and Mathematical Physics, 7(3): 200–217, 1967.

Ciliberto, C., Rosasco, L., and Rudi, A. A consistent reg- ularization approach for structured prediction. In Advances in Neural Information Processing Systems, pp. 4412–4420, 2016.

Courty, N., Flamary, R., Habrard, A., and Rakotomamonjy, A. Joint distribution optimal transportation for domain adaptation. In Advances in Neural Information Processing Systems, pp. 3730–3739, 2017.

Crammer, K. and Singer, Y. On the algorithmic implemen- tation of multiclass kernel-based vector machines. Journal of Machine Learning Research, 2:265–292, 2001.

Cuturi, M. Sinkhorn distances: Lightspeed computation of optimal transport. In Advances in Neural Information Processing Systems, pp. 2292–2300, 2013.

Cuturi, M. and Doucet, A. Fast computation of Wasser- stein barycenters. In International Conference on Machine Learning, pp. 685–693, 2014.

Cuturi, M. and Peyr´e, G. Semi-dual regularized optimal transport. SIAM Review, 60(4):941–965, 2018.

Danskin, J. M. The theory of max-min, with applications. SIAM Journal on Applied Mathematics, 14(4):641–664, 1966.

Duchi, J. C., Khosravi, K., and Ruan, F. Multiclass clas- sification, information, divergence, and surrogate risk. Annals of Statistics, 2018.

Feydy, J. and Trouv´e, A. Global divergences between mea- sures: From Hausdorff distance to optimal transport. In ShapeMI: Shape in Medical Imaging, 2019.

Feydy, J., S´ejourn´e, T., Vialard, F.-X., Amari, S.-i., Trouv´e, A., and Peyr´e, G. Interpolating between optimal transport and MMD using Sinkhorn divergences. In Proceedings of the International Conference on Artifical Intelligence and Statistics, 2019.

Frogner, C., Zhang, C., Mobahi, H., Araya, M., and Pog- gio, T. A. Learning with a Wasserstein loss. In Advances in Neural Information Processing Systems, pp. 2053–2061, 2015.

Genevay, A., Cuturi, M., Peyr´e, G., and Bach, F. Stochas- tic optimization for large-scale optimal transport. In Advances in Neural Information Processing Systems, pp. 3440–3448, 2016.

Genevay, A., Peyr´e, G., and Cuturi, M. Learning generative models with Sinkhorn divergences. In Proceedings of the International Conference on Artificial Intelligence and Statistics, 2018.

Gimpel, K. and Smith, N. A. Softmax-margin CRFs: Train- ing log-linear models with cost functions. In Proceedings of the North American Chapter of the Association for Computational Linguistics, 2010.

Gini, C. Variabilit`a e Mutuabilit`a. C. Cuppini, Bologna, 1912.

Gutierrez, P. A., Perez-Ortiz, M., Sanchez-Monedero, J., Fernandez-Navarro, F., and Hervas-Martinez, C. Ordinal regression methods: Survey and experimental study. IEEE Transactions on Knowledge and Data Engineering, 28(1):127–146, 2016.

Ha, D. and Eck, D. A neural representation of sketch draw- ings. In International Conference on Learning Representations, 2018.

Kusner, M., Sun, Y., Kolkin, N., and Weinberger, K. From word embeddings to document distances. In Proceedings of the International Conference on Machine Learning, pp. 957–966, 2015.

Liu, D. C. and Nocedal, J. On the limited memory BFGS method for large scale optimization. Mathematical Programming, 45(1-3):503–528, 1989.

Luenberger, D. G. Optimization by vector space methods. John Wiley & Sons, 1997.

Luise, G., Rudi, A., Pontil, M., and Ciliberto, C. Differ- ential properties of Sinkhorn approximation for learning with Wasserstein distance. In Advances in Neural Information Processing Systems 31, pp. 5864–5874, 2018.

Martins, A. F. T. and Astudillo, R. F. From Softmax to Sparsemax: A sparse model of attention and multi-label classification. Proceedings of the International Conference on Machine Learning, pp. 1614–1623, 2016.

Mensch, A. and Blondel, M. Differentiable dynamic pro- gramming for structured prediction and attention. In Proceedings of the International Conference on Machine Learning, pp. 3462–3471, 2018.

Mitter, S. K. Convex optimization in infinite dimensional spaces. In Recent Advances in Learning and Control, volume 371, pp. 161–179. Springer, 2008.

Montavon, G., M¨uller, K.-R., and Cuturi, M. Wasserstein training of restricted Boltzmann machines. In Lee, D. D., Sugiyama, M., Luxburg, U. V., Guyon, I., and Garnett, R. (eds.), Advances in Neural Information Processing Systems 29, pp. 3718–3726. Curran Associates, Inc., 2016.

Pedregosa, F., Bach, F., and Gramfort, A. On the consis- tency of ordinal regression methods. Journal of Machine Learning Research, 18(1):1769–1803, 2017.

Radford, A., Metz, L., and Chintala, S. Unsupervised rep- resentation learning with deep convolutional generative adversarial networks. In International Conference on Learning Representations, 2016.

Reid, M. D. and Williamson, R. C. Composite binary losses. Journal of Machine Learning Research, 11: 2387–2422, 2010.

Rennie, J. D. and Srebro, N. Loss functions for preference levels: Regression with discrete ordered labels. In Proceedings of the IJCAI Multidisciplinary Workshop on Advances in Preference Handling, pp. 180–186, 2005.

Rockafellar, R. T. Extension of Fenchel duality theorem for convex functions. Duke Mathematical Journal, 33 (1):81–89, 1966.

Rockafellar, R. T. Convex Analysis. Princeton University Press, 1970.

Rolet, A., Cuturi, M., and Peyr´e, G. Fast dictionary learn- ing with a smoothed Wasserstein loss. In Artificial Intelligence and Statistics, pp. 630–638, 2016.

Santambrogio, F. Optimal transport for applied mathematicians. Birk¨auser, NY, 2015.

Sriperumbudur, B. K., Fukumizu, K., and Lanckriet, G. R. G. Universality, Characteristic Kernels and RKHS Embedding of Measures. Journal of Machine Learning Research, 12:2389–2410, 2011.

Sz´ekely, G. J. and Rizzo, M. L. Energy statistics: A class of statistics based on distances. Journal of Statistical Planning and Inference, 143(8):1249–1272, 2013.

Tewari, A. and Bartlett, P. L. On the consistency of mul- ticlass classification methods. Learning Theory, 3559: 143–157, 2005.

Tsochantaridis, I., Joachims, T., Hofmann, T., and Altun, Y. Large margin methods for structured and interdependent output variables. Journal of Machine Learning Research, 6:1453–1484, 2005.

Villani, C. Optimal transport: Old and new. Springer, 2008.

Wainwright, M. J. and Jordan, M. I. Graphical models, exponential families, and variational inference. Foundations and Trends in Machine Learning, 1(1–2):1–305, 2008.

Weston, J. and Watkins, C. Support vector machines for multi-class pattern recognition. In Proceedings of the European Symposium on Artificial Neural Networks, pp. 219–224, 1999.

Williamson, R. C., Vernet, E., and Reid, M. D. Compos- ite multiclass losses. Journal of Machine Learning Research, 17(223):1–52, 2016.

We prove propositions by order of appearance in the main text.

image

Proof. We start by showing the Shannon entropy limit of the Sinkhorn entropy, in the discrete case. In this case, we use the standard Kantorovich dual (Cuturi, 2013). Let  ε > 0, α ∈ △d, and

image

For f optimal in (9), letting  ε → 0, we have, using element-wise multiplication  ∗,

image

Let us now consider the limit for  ε → ∞of  ΩC/ε(α), for an arbitrary symmetric cost matrix C. We rewrite

image

is then a simple consequence of the asymptotics of Sinkhorn OT distances (Genevay et al., 2018), that we apply in the symmetric case. In the discrete setting, the result for  ε → ∞becomes, if  C = 1 − Id×d,

image

image

Proof. We can rewrite the self transport with the change of variable  µ = αef2 ∈ M+(Y), due to Feydy & Trouv´e (2019). We then have f2 = − log dαdµ, and

Ω(α) ≜ −12OT2(α, α) = −maxf∈C(Y)⟨α, f⟩ −log⟨α ⊗ α,exp(f ⊕ f − C)2 ⟩

= −maxµ∈M+(Y) −2⟨α,log dαdµ⟩ −log  ∥µ∥2k2,

�Xexp(−C(x, y) 2 )dµ(x)dµ(y)

is the kernel norm defined with kernel  k2 ≜ e− C2. Then, the conjugate of  Ω(α)reads, for all  f ∈ C(Y),

image

= max α∈M+1 (Y)µ∈M+(Y)⟨α, f⟩ − 2⟨α,log dαdµ⟩ −log  ∥µ∥2k2

��X 2exp  (f(x)+f(y)2)dµ(x)dµ(y)

��X 2exp(− C(x,y)2)dµ(x)dµ(y),

where we have used the conjugation of the relative entropy over the space of probability measure  M+1 (Y):

max α∈M+1 (Y)⟨α, f⟩ − 2⟨α,log dαdµ⟩ = 2 log�Xexp(f(x)2 )dµ(x).

We now revert the first change of variable, setting  β = µef2 ∈ M+(Y), and  α = β�X dν ∈ M+1 (Y). We have

⋆(f) =max α∈M+1 (Y)−log ��X 2exp(−f(x) + f(y) + C(x, y)2 )dα(x)dα(y),

image

g-LSE(f) = Ω⋆(f) = −minα∈M+1 (Y)⟨α ⊗ α,exp(−f ⊕ f + C2 )⟩.

We have assumed that  exp(− C2 )is positive definite, which ensures that the bivariate function

image

is strictly convex in  αand in f. Let  α⋆ ≜ argminα∈M+1 (Y) Φ(f, α). The gradient of  Φwith respect to f is a measure that reads

∇fΦ(f, α) = −αexp(−f − TC(−f, α)) ∈ M(Y),where we recall

image

From a generalized version of the Danskin theorem (Bernhard & Rapaport, 1995), the function

image

is differentiable everywhere and has for gradient  ∇fΦ(f, α⋆). Composing with the log, we obtain

∇Ω⋆(f) ∈ M+1(Y), and ∇Ω⋆(f) ∝ α⋆exp(−f − TC(−f, α⋆)),

where  ∝indicates proportionality. To conclude, we use Lemma 2, that describes the minimizers of (10), and that we prove in the next section. It ensures that  −f − TC(−f, α⋆) = 0on the support of  α⋆. Therefore

image

We first state and proof Lemma 2 on optimality condition in the minimization of  α → Φ(α, f). We then prove Lemma 1, establish some basic properties of the extrapolation operator and prove Prop. 3.

A.3.1. NECESSARY AND SUFFICIENT CONDITION OF OPTIMALITY IN  ∇Ω⋆(f)

Finding the minimizer  αof  α → Φ(α, f)amounts to finding the distribution for which  −fand its Ctransform  T(−f, α)are the less distant, as it appears in the following lemma.

Lemma 2 (∇Ω⋆from first order optimality condition).  ∇Ω⋆(f)is the only distribution  α ∈ M+1 (Y)such that there exists a constant  A ∈ Rsuch that

image

We then have  A = 2Ω⋆(f). (11) form sufficient optimality conditions for finding  ∇Ω⋆(f) = α.

Proof. We use an infinite version of the KKT condition (Luenberger, 1997, Section 9) to solve the optimality of  φ, as defined in (10). We fix  f ∈ C(Y). The Lagrangian associated to the minimization of  α → φ(f, α)over the space of probability measure M(X) reads

image

A necessary and sufficient condition for  α⋆to be optimal is the existence of a function  µ ∈ C(Y)and a real ν ∈ Rsuch that,

α⋆ ∈ M+1 (Y)(primal feasibility), ∀ y ∈ Y, −∇αΦ(f, α⋆)(y) = µ(y) + ν(stationarity),

∀ y ∈ Y, µ(y) ≤ 0(dual feasibility), ∀ y ∈ supp(α⋆), µ(y) = 0(complementary slackness),

where the derivative  ∇αΦ(f, α⋆)is the displacement derivative (5), computed as

image

f + T(−f, α⋆)2 = − log(−ν2)on the support of  α⋆, and

image

Replacing in the definition  Ω⋆(f) = − log Φ(f, α⋆), and using the equality

image

we obtain −log(−ν2) = Ω⋆(f),

and the first part of the lemma follows. Then, note that  T(f + c, α) = T(f, α) − cfor all  c ∈ R, f ∈ C(Y), α ∈ M+1 (Y). Removing  Ω⋆(f)from both side of inequality (12), we obtain

image

with equality on the support of  ∇Ω⋆(f), which brings the second part of the lemma.

image

Proof. Let  α ∈ M+1 (Y)and  f ≜ ∇Ω(α). From the optimality condition of Sinkhorn dual minimization (4),

image

hence,  αmeets the sufficient conditions for optimality in Lemma 2. Therefore  ∇Ω⋆(f) = α, Ω⋆(f) = 0, and the first part of the lemma follows. To demonstrate the second part, we consider  f ∈ F. There exists α ∈ M+1 (Y)such that  f = ∇Ω(α), and thus

image

A.3.3. EXTRAPOLATION EFFECT OF  ∇Ω⋆—PROOF OF PROP. 3

We start by establishing some basic properties of the extrapolation operator.

Lemma 3 (Properties of  f E). The following properties hold, for all  f ∈ C(Y),

image

ii. The extrapolation operator maintain the following values:

image

i. Note that  T(f + c, α) = T(f, α) − cfor all  c ∈ R, f ∈ C(Y), α ∈ M+1 (Y). Removing  Ω⋆(f)from both side of inequality (12), we obtain

image

ii. We set  α = ∇Ω⋆(f). According to Lemma 2, for all  y ∈ supp α, f E(y) = f(y)and

image

Furthermore, for all  y ∈ Y, −f E(y) ≤ −f(y), and therefore, as the soft C-transform operator is nonincreasing with respect to f,

image

where the left equality stems from the definition of  f E. Therefore

image

on all Y, and we meet the sufficient condition of Lemma 2 for the optimality of  ηin

image

We thus have  Ω⋆(f E) = Ω⋆(f), ∇Ω⋆(f) = ∇Ω⋆(f E). Therefore

image

where we have used on the third line the fact that the value of  T(f, α)depends only on the values of f on the support of  α. In our case, we have  f E| supp ∇Ω⋆(f) = f| supp ∇Ω⋆(f), from Lemma 2. The lemma follows.

With Lemma 1 and Lemma 3 at hand, we are now ready to prove Prop. 3.

Proof. We consider a function  f ∈ C(Y). By construction of the extrapolation  f E,

image

is a negative symmetric Sinkhorn potentials, as  T(−g, ∇Ω⋆(f)) = −g. Therefore, from Lemma 1,

image

where the third equality stems from Lemma 3, property (ii), and the second from (8).

image

We now turn to proving Prop. 4 and Prop. 5, that justifies the validity of the geometric logistic loss for a certain Bregman divergence, dubbed the asymmetric Hausdorff divergence.

image

Proof. Let  α ∈ M+1 (Y)and  f ∈ C(Y). By definition, the Hausdorff divergence  H = DΩbetween  αand ∇Ω⋆(f)rewrites

image

This decomposition is a generic way of decomposing a Bregman divergence into a Fenchel-Young loss plus a perturbation term that depends on the “projection”  ∇Ω ◦ ∇Ω⋆(f). In our case, thanks to Lemma 3, property (iv), this term rewrites

image

The second term is null as a consequence of Lemma 3, while the third is null because  αand  ∇Ω⋆(f)are both probability measures. The first one is null in case  supp ∇Ω⋆(f) ∈ supp α, in accordance to Lemma 3, property (i). The proposition follows from the fact that  f E ≥ fon the space Y, according to the same property.

image

Proof. As a consequence of Prop. 4, for any true and estimated distribution  α, ˆα ∈ M+1 (Y), we have

image

where the last term is null as  T(−∇Ω(α), α) = −∇Ω(α)and  Ω⋆(∇Ω(α)) = 0from Lemma 1. Therefore

image

The equality of risks and the connection between minimizers immediately follows. To establish the Fisher consistency of the g-FY loss with respect to the Hausdorff divergence, note that, from Prop. 4, we have, for all ˆf : X → C(Y), for all  x ∈ X, α ∈ M+1 (Y),

image

Taking the expectation with respect to the data distribution D, we obtain

image

High definition experiment. As a complementary experiment, we generate a dataset of cat doodles from the Google QuickDraw dataset, with a line width of one pixel. We test the g-softmax link function and the geometric Fenchel-Young loss functions to train a VAE with a DC-GAN architecure (Radford et al., 2016). We reuse the architecture of the authors, using the discriminator as an encoder, with a final layer with a size of output twice the size of the latent dimension, to model the mean and variance of the latent encoding, and the generator as a decoder. Similarly to the experiment in the main text, we observe that the generated samples and the reconstructions are more concentrated on thin measures.

MNIST. We display a visualization of generates images and reconstruction of test image in Figure 5. The output distributions are well concentrated, despite the low resolution of the dataset.

Architecture Our multi-layer perceptron is simple: encoder and decoder are two layer MLP with 400 hidden units and ReLU activation.

Hyperparameters. We use a latent size of 100 in the experiment on QuickDraw 28x28, and 256 for the high resolution experiment. We set the KL weight to 1, and rescale the KL loss with a factor  h × w, to make its gradient of the same order as the one computed with separated binary cross entropy. We use  σ = 2as the scaling parameter of the Euclidean cost function.

image

Figure 5. Examples of generated images and reconstruction of test images with an MLP VAE on MNIST dataset.

image

Figure 6. Examples of generated images and reconstruction of test images with a VAE-DC-GAN and a geometric softmax last layer. The generated images are sharper than when using a standard softmax layer and a KL divergence training.


Designed for Accessibility and to further Open Science