---
title: Expression-Distance Metric Overview
url: https://www.emergentmind.com/topics/expression-distance-metric
type: topic
---

# Expression-Distance Metric Overview

Searching arXiv for the supplied topics and papers to ground the article in current records.
Across the cited literature, “Expression-Distance Metric” can be interpreted as a family of constructions in which similarity, dependence, or classification confidence is written explicitly as a function of distances, ratios of distances, or expectations of distances, rather than through unconstrained logits or purely coordinate-based summaries. In this sense, the term covers correlation-derived metrics for expression profiles, distance-ratio objectives in metric learning, metrics on sets and probability measures built from pairwise distances, point-to-set distances such as Scott distance, and lifted distances on symbolic transformations such as finite-state transductions [2201.08676] [1106.5758] [2404.16518].

## 1. Conceptual scope

The unifying feature is that the primary object is an explicit distance expression. In metric learning, this appears as a probability model written directly in terms of distances to class representatives; in dependence testing, as expectations of centered distance kernels; in set and distribution comparison, as averages or norms built from pairwise distances; and in transduction comparison, as the supremum of output distances over all inputs [2201.08676] [1106.5758] [1103.1049] [2404.16518].

This suggests a broad but technically coherent interpretation: an expression-distance metric is not a single canonical metric, but a design principle in which the comparison rule is itself an algebraic expression over a base metric or similarity. Some constructions yield genuine metrics; others yield metric-like quantities, losses, or probabilistic scores whose geometric meaning is explicit.

| Setting | Distance expression | Key property |
|---|---|---|
| Correlation profiles | $\sqrt{1-\rho_{xy}}$, $\sqrt{1-\rho_{xy}^2}$ | True metrics |
| Metric learning | $\dfrac{d_{x',c}^{-\rho}}{\sum_y d_{x',y}^{-\rho}}$ | Scale-invariant probabilities |
| Finite sets | $f(A,B)$ from averaged pairwise distances | Metric on non-empty finite subsets |
| Probability measures | $\sqrt{-\tfrac{1}{2}D(\mu_1-\mu_2)}$ | Genuine metric in strong-negative-type spaces |
| PDFs in $L^2$ | $\sqrt{2-2K_{NCP}(p,q)}$ | Metric with Gaussian-mixture closed form |
| Transductions | $\sup_w d(T(w),S(w))$ | Metric on partial functions |

A recurring consequence is interpretability of geometry. Distances become the primary quantities, and relative position, scaling behavior, or transport structure can often be read directly from the defining expression.

## 2. Correlation-derived metrics for expression profiles

In expression analysis, a profile is represented as a vector \(x=(x_1,\dots,x_n)\), and the Pearson correlation coefficient is
\[
\rho_{xy} =
\frac{\sum_{k=1}^n (x_k-\bar x)(y_k-\bar y)}
{\sqrt{\sum_{k=1}^n (x_k-\bar x)^2}\sqrt{\sum_{k=1}^n (y_k-\bar y)^2}}.
\]
A central distinction in this literature is between a dissimilarity and a metric. The widely used Pearson dissimilarity \(d_P(x,y)=1-\rho_{xy}\) is not a metric, because the triangle inequality can fail. The same is true for the sign-invariant form \(1-|\rho_{xy}|\). By contrast, the paper proves that
\[
d_v(x,y)=\sqrt{1-\rho_{xy}}
\]
is a metric, and that the sign-invariant
\[
d_{P^2}(x,y)=\sqrt{1-\rho_{xy}^2}
\]
is also a metric [1908.06029].

A second line of work systematizes these constructions through angular distance and metric-preserving transforms. For cosine similarity, Pearson correlation, or Spearman correlation \(A(x,y)\in[-1,1]\), the angular distance
\[
\theta(x,y)=\arccos(A(x,y))
\]
is a metric. Applying increasing, concave transforms yields further metrics. This produces two classes. In the first, anti-correlated objects are maximally far apart, with examples
\[
\arccos(P(x,y)), \qquad \sqrt{1-P(x,y)}.
\]
In the second, correlated and anti-correlated objects are collated, with examples
\[
\pi-|\pi-\arccos(P(x,y))|, \qquad \sqrt{1-P(x,y)^2}.
\]
The same formulas apply to Spearman correlation by replacing \(P\) with \(S\) [1208.3145].

For centered data, Pearson correlation is the cosine similarity of centered vectors, so the sine transform yields the metric
\[
d(x,y)=\sin(\arccos(P(x,y)))=\sqrt{1-P(x,y)}.
\]
This is important in practice because many clustering and embedding procedures implicitly assume metric structure. The literature therefore separates correlation-based quantities that are merely convenient dissimilarities from those that satisfy the triangle inequality and can support metric-based indexing, clustering, and embedding [1908.06029] [1208.3145].

## 3. Learned distance formulations in embedding spaces

In metric learning, the “expression-distance” idea appears when probabilities and losses are written directly in terms of distances to class representatives. In the prototypical-network setting, if \(\mathbf{p}_c\) is the prototype of class \(c\) and \(d_{x',c}=d(f_\theta(x'),\mathbf{p}_c)\), the distance-ratio formulation defines
\[
\hat p(y=c\mid x')
=
\frac{d_{x',c}^{-\rho}}{\sum_{y\in\mathcal Y_E} d_{x',y}^{-\rho}},
\]
with learnable \(\rho>0\), and optimizes cross-entropy over query points. This formulation is exactly invariant to global scaling of the embedding, because \(d_{x',c}\mapsto \alpha d_{x',c}\) cancels in the ratio. It also has an optimal-confidence property: if prototypes are pairwise separated, then \(\delta_c(x')\to 1\) as \(x'\to \mathbf p_c\), and \(\delta_c(x')\to 0\) as \(x'\to \mathbf p_{c'}\) for \(c'\neq c\). On CUB and mini-ImageNet, the paper reports that this formulation generally enables faster and more stable metric learning than the softmax-based formulation, with improved or comparable generalization performance [2201.08676].

A second formulation keeps the metric explicit in the input space. In generalized Mahalanobis metric learning,
\[
d_{\mathbf M}(\mathbf x_i,\mathbf x_j)
=
\sqrt{(\mathbf x_i-\mathbf x_j)^\top \mathbf M(\mathbf x_i-\mathbf x_j)},
\qquad \mathbf M\succeq 0.
\]
For a triplet \((\mathbf x_i,\mathbf x_j,\mathbf x_\ell)\), the paper defines the adversarial margin as the Euclidean distance from \(\mathbf x_i\) to the nearest decision boundary between the target neighbor \(\mathbf x_j\) and the impostor \(\mathbf x_\ell\). Its squared closed form is
\[
d_{\mathbf E}^2(\mathbf x_i,\mathbf x_{i,\min})
=
\frac{\big(d_{\mathbf M}^2(\mathbf x_i,\mathbf x_\ell)-d_{\mathbf M}^2(\mathbf x_i,\mathbf x_j)\big)^2}
{4\,d_{\mathbf M^2}^2(\mathbf x_j,\mathbf x_\ell)}.
\]
This yields a perturbation loss that can be added to LMNN, SCML, or proxy-based methods, and the resulting enlarged adversarial margin is used to derive certified robustness and generalization guarantees via algorithmic robustness [2006.05945].

Other learned expression-distance metrics make the structural form explicit. Boosted sparse non-linear distance metric learning uses
\[
d_W(\mathbf x_i,\mathbf x_j)
=
\sqrt{(\mathbf x_i-\mathbf x_j)^T W(\mathbf x_i-\mathbf x_j)},
\qquad W\succeq 0,
\]
with \(W\) built as a sum of sparse rank-one updates, so that the final metric is positive semidefinite, low rank, and element-wise sparse. Nonlinearity is introduced through hierarchical expansion of interactions in the feature map [1512.03396]. A different hybrid method combines a weighted Euclidean term with a class-mediated latent term:
\[
d^h_{r,Q}(x,x')
=
\sqrt{d_r^2(x,x') + u(x)^TQ\,u(x')},
\]
where \(u(x)\) is a soft class posterior and \(Q\) models missing-feature effects conditioned on class. This construction is designed for settings where similarity ratings and class labels both inform perceived distance [1206.7112].

## 4. Sets, measures, and distributions

One important strand of the literature defines distances between complex objects by averaging the base metric over their components. For non-empty finite subsets \(A,B\) of a metric space \((X,d)\), the group-average distance
\[
g(A,B)=\frac{1}{|A||B|}\sum_{a\in A}\sum_{b\in B} d(a,b)
\]
is symmetric and satisfies the triangle inequality, but is not a metric because it does not satisfy identity. The corrected quantity
\[
f(A,B)=
\frac{1}{|A\cup B||A|}\sum_{a\in A}\sum_{b\in B\setminus A} d(a,b)
+
\frac{1}{|A\cup B||B|}\sum_{a\in A\setminus B}\sum_{b\in B} d(a,b)
\]
is a metric on the collection of all non-empty finite subsets. Under the discrete metric, it reduces to the Jaccard distance, and the construction extends hierarchically to sets of sets and, by integration, to measurable and fuzzy sets [1103.1049].

For probability measures and dependence structure, the central object is again an expression of distances. In a metric space \((\mathcal X,d_\mathcal X)\), with \(\mu\) a probability measure of finite first moment,
\[
\alpha_\mu(x)=\int d_\mathcal X(x,x')\,d\mu(x'),
\qquad
D(\mu)=\iint d_\mathcal X(x,x')\,d\mu(x)\,d\mu(x'),
\]
and the centered kernel is
\[
d_\mu(x,x')=d_\mathcal X(x,x')-\alpha_\mu(x)-\alpha_\mu(x')+D(\mu).
\]
Distance covariance is then
\[
\mathrm{dcov}(X,Y)=\mathbb E[d_\mu(X,X')\,d_\nu(Y,Y')],
\]
with empirical versions obtained by double-centering distance matrices. In spaces of strong negative type, \( \mathrm{dcov}(X,Y)=0 \) if and only if \(X\) and \(Y\) are independent, and
\[
d_{\exp}(\mu_1,\mu_2)
=
\sqrt{-\tfrac{1}{2}D(\mu_1-\mu_2)}
\]
is a genuine metric on probability measures with finite first moments [1106.5758].

Optimal transport on finite metric spaces provides another explicit expression. For \(\mu,\nu\) on a finite metric space \((X,d)\), the Kantorovich distance equals the Kantorovich–Bernstein or Arens–Eells norm of \(\mu-\nu\). On a weighted tree rooted at \(x_0\),
\[
d_T(\mu,\nu)
=
\sum_{x\in X\setminus\{x_0\}}
d(x,x^+)\,|\Xi(x)|,
\qquad
\Xi(x)=\sum_{y\succeq x}(\mu(y)-\nu(y)),
\]
and for a general weighted graph it is the minimum of the corresponding tree distances over all spanning trees [1905.07547].

For continuous probability densities in \(L^2(\Omega)\), the proposed probabilistic distance metric is built from the normalized cross-information potential
\[
K_{NCP}(p,q)=
\frac{\int_\Omega p(x)q(x)\,dx}
{\sqrt{\int_\Omega p(x)^2\,dx}\sqrt{\int_\Omega q(x)^2\,dx}},
\]
yielding
\[
d_{NCP}(p,q)=\sqrt{2-2K_{NCP}(p,q)}.
\]
This is a true metric on square-integrable PDFs. For Gaussian mixtures \(P\) and \(Q\), the metric has a closed-form expression in terms of pairwise Gaussian product integrals, which enables optimization-based Gaussian mixture reduction [2306.07309].

Finite metric-measure spaces admit yet another higher-order construction. For a cloud \(C\) and an \(h\)-point simplex \(A\subset C\), the Relative Distance Distribution \(RDD(C;A)\) packages the internal distance matrix \(D(A)\) and the lexicographically ordered matrix \(R(C;A)\) of distances from \(A\) to the remaining points, modulo permutations of the simplex. The Simplexwise Distance Distribution
\[
SDD(C;h)=\{RDD(C;A)\mid A\subset C,\ |A|=h\}
\]
is an isometry invariant. Metrics on SDDs are then built via a metric \(M_\infty\) on RDDs together with Linear Assignment Cost or Earth Mover’s Distance. These metrics are Lipschitz continuous under point perturbations, and order \(h=2\) already distinguishes examples that share the same pairwise or pointwise distance distributions [2303.14161].

## 5. Point-to-set distances, generalized metrics, and symbolic transformations

Expression-distance constructions also arise when the second argument is a subset or a transformation rather than another point. On a generalized metric space \((X,d)\), a Scott weight is a weight \(\varphi:X\to[0,\infty]\) that respects forward Cauchy nets and Yoneda limits. The Scott distance is
\[
\sigma(x,A)
=
\sup\{\varphi(x)\mid \varphi \text{ is a Scott weight and } \varphi(a)=0\ \forall a\in A\}.
\]
It turns \((X,d)\) into an approach space and recovers the original metric on singletons:
\[
\sigma(x,\{y\})=d(x,y).
\]
Its topological coreflection, the c-Scott topology, lies between the \(d\)-Scott topology and the generalized Scott topology, and every injective \(T_0\) approach space is a cocomplete and continuous metric space equipped with its Scott distance [1610.06341].

The generalized-metrics literature relaxes Fréchet’s axioms in other directions. Partial metrics and strong partial metrics allow non-zero self-distance and even negative values, while partial \(n\)-\(\mathfrak M\)etrics and strong partial \(n\)-\(\mathfrak M\)etrics compare \(n\)-tuples rather than pairs. A partial metric \(p\) satisfies
\[
p(x,x)\le p(x,y), \qquad
p(x,y)\le p(x,z)+p(z,y)-p(z,z),
\]
and induces the classical metric
\[
d(x,y)=2p(x,y)-p(x,x)-p(y,y).
\]
The thesis further shows that a DNA alignment scoring function can be modeled as a strong partial metric under explicit conditions on match, mismatch, and gap penalties, allowing topological and fixed-point methods to be applied to a comparative function that is not a classical metric [1603.01246].

For symbolic transformations, a word metric can be lifted to a metric on partial transductions. If \(T,S:A^*\to B^*\) are partial functions and \(d\) is a metric on words, then
\[
d(T,S)=
\begin{cases}
\sup\{d(T(w),S(w))\mid w\in\operatorname{dom}(T)\} & \text{if }\operatorname{dom}(T)=\operatorname{dom}(S),\\
\infty & \text{otherwise}.
\end{cases}
\]
This is a metric on partial word-to-word functions. For common integer-valued edit distances, including Hamming, transposition, conjugacy, and Levenshtein-family distances, closeness and \(k\)-closeness are decidable for functional transducers, so the distance is computable. The same quantity is equivalent to the diameter of a rational relation, and both are specific instances of the index problem of rational relations [2404.16518].

## 6. Recurring principles, misconceptions, and limitations

A first recurring principle is that not every useful dissimilarity is a metric. The expression-analysis literature gives the clearest examples: \(1-\rho_{xy}\) and \(1-|\rho_{xy}|\) fail the triangle inequality, whereas \(\sqrt{1-\rho_{xy}}\) and \(\sqrt{1-\rho_{xy}^2}\) satisfy it [1908.06029]. The metric-preserving-function framework sharpens this point: increasing concave transforms preserve metricity, while strictly convex transforms such as \(1-\cos\theta\) do not in general [1208.3145].

A second principle is invariance. The distance-ratio formulation is exactly invariant to global rescaling of embeddings, so its loss depends on relative distances rather than norm inflation [2201.08676]. SDD-based metrics are Lipschitz continuous under perturbations of the underlying points [2303.14161]. The probabilistic metric \(d_{NCP}\) is bounded in \([0,\sqrt{2}]\), which stabilizes comparison of densities [2306.07309]. These constructions suggest that explicit distance expressions are often chosen precisely to control undesirable dependence on scaling, ordering, or noise.

A third principle is that characterization theorems depend on geometric hypotheses. Distance covariance characterizes independence if and only if the underlying metric spaces are of strong negative type [1106.5758]. Scott distance captures approach-theoretic structure because Scott weights are tied to Yoneda continuity [1610.06341]. In finite optimal transport, explicit formulas are available on trees and extend to general graphs through minimization over spanning trees [1905.07547]. These are not merely computational conveniences; they delimit where the distance expression has full structural meaning.

The main limitations are likewise recurrent. Higher-order invariants such as \(SDD(C;h)\) become combinatorially more expensive as \(h\) grows, even though they gain discriminative power [2303.14161]. In transduction spaces, the bounded index problem for rational relations is undecidable in general, even though it becomes decidable for the edit-distance families treated in the paper [2404.16518]. Metric learning formulations that are geometrically cleaner may introduce extra parameters or representative-choice issues, as in the learnable \(\rho\) of the distance-ratio model or the representative dependence of multi-shot few-shot learning [2201.08676]. This suggests that the central trade-off in expression-distance design is between explicit geometry, metric validity, invariance, and tractability.

Taken together, these works present “Expression-Distance Metric” less as a single named object than as a recurring mathematical strategy: define similarity, dependence, or transformation discrepancy directly from distances native to the domain, and then study which expressions preserve metric axioms, which yield useful invariances, and which remain computable at the scale of the intended application.

Source: https://www.emergentmind.com/topics/expression-distance-metric