Abstract
We study representations of data from an arbitrary metric space $\mathcal{X}$ in the space of univariate Gaussian mixtures with a transport metric. We derive embedding guarantees for feature maps implemented by small neural networks called probabilistic transformers. Our guarantees are of memorization type: we prove that a probabilistic transformer of depth about $n\log(n)$ and width about $n^2$ can bi-Hölder embed any $n$-point dataset from $\mathcal{X}$ with low metric distortion, thus avoiding the curse of dimensionality. We further derive probabilistic bi-Lipschitz guarantees, which trade off the amount of distortion and the probability that a randomly chosen pair of points embeds with that distortion. If $\mathcal{X}$'s geometry is sufficiently regular, we obtain stronger, bi-Lipschitz guarantees for all points in the dataset. As applications, we derive neural embedding guarantees for datasets from Riemannian manifolds, metric trees, and certain types of combinatorial graphs. When instead embedding into multivariate Gaussian mixtures, we show that probabilistic transformers can compute bi-Hölder embeddings with arbitrarily small distortion.
Introduction
In modern machine learning, representing complex data—such as hierarchical structures, graphs, or manifolds—within continuous spaces is a fundamental challenge. Traditional approaches often rely on Euclidean spaces ($\mathbb{R}^d$), which frequently fail to capture the intrinsic geometry of non-flat data. While hyperbolic embeddings have emerged as a powerful alternative for tree-like structures, they remain limited when faced with more diverse or mixed geometries.
This work introduces a "universal representation space": the space of univariate Gaussian mixtures equipped with a transport metric. The authors demonstrate that a specialized neural architecture, the Probabilistic Transformer (PT), can faithfully embed any $n$-point dataset into this space with low distortion. Crucially, this approach avoids the "curse of dimensionality," as the network size scales polynomially with the number of points rather than exponentially with the ambient dimension.
The Probabilistic Transformer Architecture
The core of this approach is the Probabilistic Transformer, a feature map designed to translate raw data points into parameters of a probability distribution.
The PT operates through a multi-stage process:
- Landmark Encoding: The network computes distances between an input point and a fixed set of $L$ "landmarks" within the dataset, creating an intrinsic coordinate system.
- Parallel Processing: These distances are processed through parallel ReLU feedforward networks (MLPs).
- Probabilistic Attention (P-Attn): A specialized attention mechanism synthesizes the MLP outputs into the weights ($w_k$), means ($\mu_k$), and variances ($\Sigma_k$) of a Gaussian mixture.
By embedding into 1D Gaussian mixtures, the model leverages the computational efficiency of the 1D Wasserstein distance while benefiting from the infinite-dimensional, geometrically rich nature of the distribution space.
Theoretical Guarantees and Geometric Priors
The authors provide rigorous "memorization-type" guarantees, proving that a PT of depth $\mathcal{O}(n \log n)$ and width $\mathcal{O}(n^2)$ can achieve bi-Hölder embeddings for any $n$-point metric space. This result is significant because the required network complexity is independent of the data's original ambient dimension.
Furthermore, the theory accounts for the inherent structure of the data. If the dataset originates from a structured space—such as a Riemannian manifold with bounded curvature or a metric tree—the required network size shrinks significantly. In these cases, the embedding's effective dimension depends on the latent geometry rather than the total number of points $n$. The authors also explore a trade-off between distortion and probability: while deterministic bi-Hölder embeddings are always possible, strict bi-Lipschitz (unwarped) distance preservation can be achieved probabilistically for randomly selected pairs of points.
Empirical Validation
To validate these theoretical insights, the authors benchmarked PTs against standard Euclidean and hyperbolic embedding methods across several synthetic datasets.
Key findings include: * Tree Embeddings: On regular binary trees, PTs achieved a mean relative error of 0.03, matching the performance of 15-dimensional hyperbolic embeddings while using only 1D mixtures. * Manifold Robustness: When embedding points from high-dimensional spheres (up to 45D), the PT's distortion remained stable (under 0.10 relative error). In contrast, standard feedforward networks mapping to Euclidean or hyperbolic spaces saw errors exceed 0.30 as the manifold's dimension increased.
Conclusion and Future Directions
This research establishes univariate Gaussian mixtures as a universally expressive representation space. By combining metric embedding theory with deep learning, the authors show that small transformers can efficiently capture complex data geometries.
However, several open questions remain. While empirical results suggest strong generalization to unseen data, the current theoretical guarantees focus primarily on the memorization of fixed datasets. Additionally, the theoretical proofs often rely on degenerate mixtures (point masses), whereas practical performance is driven by "proper" Gaussian mixtures with learned variances. Future work will aim to bridge this gap and extend the theoretical framework to out-of-sample generalization.
Summary updated