<?xml-model href='http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng' schematypens='http://relaxng.org/ns/structure/1.0'?><TEI xmlns="http://www.tei-c.org/ns/1.0">
	<teiHeader>
		<fileDesc>
			<titleStmt><title level='a'>Embedding Empirical Distributions for Computing Optimal Transport Maps</title></titleStmt>
			<publicationStmt>
				<publisher>IEEE International Symposium on Information Theory (ISIT)</publisher>
				<date>06/22/2025</date>
			</publicationStmt>
			<sourceDesc>
				<bibl> 
					<idno type="par_id">10621411</idno>
					<idno type="doi"></idno>
					
					<author>Mingchen Jiang</author><author>Peng Xu</author><author>Xichen Ye</author><author>Xiaohui Chen</author><author>Yun Yang</author><author>Yifan Chen</author>
				</bibl>
			</sourceDesc>
		</fileDesc>
		<profileDesc>
			<abstract><ab><![CDATA[Distributional data have become increasingly prominent in modern signal processing, highlighting the necessity of computing optimal transport (OT) maps across multiple probability distributions. Nevertheless, recent studies on neural OT methods predominantly focused on the efficient computation of a single map between two distributions. To address this challenge, we introduce a novel approach to learning transport maps for new empirical distributions. Specifically, we employ the transformer architecture to produce embeddings from distributional data of varying length; these embeddings are then fed into a hypernetwork to generate neural OT maps. Various numerical experiments were conducted to validate the embeddings and the generated OT maps.]]></ab></abstract>
		</profileDesc>
	</teiHeader>
	<text><body xmlns="http://www.tei-c.org/ns/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink">
<div xmlns="http://www.tei-c.org/ns/1.0"><head>I. INTRODUCTION</head><p>Optimal transport (OT) theory <ref type="bibr">[1]</ref> is a mathematical framework for finding the most efficient way (in the sense of minimizing a given cost function) to transport one probability distribution to another. When the quadratic cost is used, OT theory induces a metric space for probability measures, and the distance thereof is referred to as the 2-Wasserstein metric <ref type="bibr">[2]</ref>. This notion provides a geometric view of distributions, and therefore makes OT an invaluable tool in information theory <ref type="bibr">[3]</ref>- <ref type="bibr">[6]</ref>. Furthermore, OT has already been used in many applications, such as flow-based diffusion models <ref type="bibr">[7]</ref>, <ref type="bibr">[8]</ref>, GANs <ref type="bibr">[9]</ref>, <ref type="bibr">[10]</ref>, style transfer <ref type="bibr">[11]</ref>, data embedding <ref type="bibr">[12]</ref>, <ref type="bibr">[13]</ref>, multilingual alignment <ref type="bibr">[14]</ref>, <ref type="bibr">[15]</ref>, domain adaptation <ref type="bibr">[16]</ref>, <ref type="bibr">[17]</ref>, and model compression <ref type="bibr">[18]</ref>- <ref type="bibr">[20]</ref>.</p><p>Challenges. In many applications, transport maps between n source distributions and a single target distribution are desired. For instance, in the Wasserstein embedding <ref type="bibr">[12]</ref> scheme, input distributions are represented by the OT maps that link them to a reference distribution. Another example is the color transfer technique, where the color histogram of a reference image is transformed to match that of other images. To obtain OT maps in these settings, conventional approaches require the use of 2n neural networks to model the dual variables in the OT problem. If a new OT map is needed between a different source measure and the target measure, it must be computed from scratch. Computation of a single OT map is already challenging, and the difficulty increases considerably when seeking transport maps between numerous new source distributions and a single target distribution.</p><p>Overview. To make the computation of multiple OT maps more efficient and generalizable, we propose a new paradigm (illustrated in the right panel of Figure <ref type="figure">1</ref>) to learn the OT maps between multiple source distributions &#181; 1 , . . . , &#181; n and a single target distribution &#957;. In short, samples from the source distributions are passed to a transformer-based module E to produce embeddings in R d . These embeddings are then feed into hypernetworks F and G to generate parameters for the potential networks, whose gradients approximate the OT maps. During training, samples from &#957; are passed to the potential networks for loss computation, which propagates &#957;'s information into F and G. Notably, no explicit embedding of &#957; is required after the training is complete.</p><p>We refer to the whole framework as the Hypernetworks for Optimal Transport with Embedding Transformers (HOTET). One notable strength of HOTET is that the embeddings of the input distributions in R d are directly obtained, which can then be used in downstream learning tasks.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>A. Related Works</head><p>There are some works that use transformers to deal with OT problems, such as embedding empirical distributions into a latent space wherein Euclidean distances approximate OT distances <ref type="bibr">[21]</ref>, regularizing the training process <ref type="bibr">[22]</ref>, and neural network fusion <ref type="bibr">[23]</ref>. And our focus is on generating transport maps without engaging in direct computation by using transformers.</p><p>Generally speaking, the idea of generating transport maps without direct computation is not new, as it is closely related to distributional regression <ref type="bibr">[24]</ref>, <ref type="bibr">[25]</ref>. Recent computational developments along this line include CONDOT <ref type="bibr">[26]</ref>, Meta OT <ref type="bibr">[27]</ref>, and GeONet <ref type="bibr">[28]</ref>.</p><p>Fig. <ref type="figure">1</ref>: The network architectures for direct computation of OT maps (left), and for our proposed method of generating OT maps through hypernetworks (right).</p><p>In more detail, CONDOT <ref type="bibr">[26]</ref> proposed to estimate a family of OT maps conditioned on a context variable, which can then be generalized given new context; in Meta OT <ref type="bibr">[27]</ref>, amortized optimization was used to predict OT maps from the input measure. Unlike the previous two, GeONet <ref type="bibr">[28]</ref> learned neural operators to generate the Wasserstein geodesics connecting the pair of input measures, which can be regarded as an extension to the aforementioned methods in the context of dynamic OT problem. However, this method falls out of the scope of neural OT learning, the focus of our project.</p><p>We defer a more comprehensive comparison with existing methods to Appendix B-E.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B. Our Contributions</head><p>We summarize the contributions of this work as follows:</p><p>&#8226; We proposed a new paradigm for learning neural OT maps and distribution embeddings for multiple distributions.</p><p>&#8226; We employed existing benchmarks <ref type="bibr">[29]</ref> and conducted various tasks to demonstrate the effectiveness of our design.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>II. PRELIMINARIES</head><p>We start the review with the necessary notations for OT in Section II-A. We then introduce ICNN, hypernetwork, and Transformer, in Section II-B. Moreover, a more comprehensive review, and the connection between attention and kernel estimators, are provided in Appendix B; building on these we propose to embed an empirical distribution (observation points with arbitrary sample weights) through a transformer in Section III-B, so as to generate embeddings for hypernetworks. Notations in this work are collected in Appendix C-A.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>A. Optimal Transport</head><p>Optimal transport, as the name suggests, is an optimization problem. We will review its properties in this subsection. Monge's problem. Let P 2 (R d ) denote the set of probability measures over R d with finite second moments. Given &#181;, &#957; &#8712; P 2 (R d ), Monge seeks a map T that push forwards &#181; to &#957; while minimizing the transportation cost. With cost c(x, y) = &#8741;x-y&#8741; 2  2 , a metric W 2 on the space P 2 (&#8486;) is induced as</p><p>where</p><p>Kantorovich's relaxation. The constraint in (MP) is highly nonlinear, which makes the solution difficult to obtain. Thus, a linear programming relaxation of (MP), introduced by Kantorovich, is more commonly used in computation:</p><p>The constraint set &#928;(&#181;, &#957;) in (KR) is the set of couplings between &#181; and &#957;, i.e., probability measures</p><p>Dual Formulation. The relaxation (KR) admits a dual problem [1, Thm. 1.3], which reads</p><p>The optimal solution for the dual exists <ref type="bibr">[30,</ref><ref type="bibr">Prop. 1.11]</ref> and is known as Kantorovich potentials.</p><p>The formulation (DP) and its extensions are adopted in multiple computational methods for their convenience. The conjugacy in the dual variables is typically enforced through regularization, cf. <ref type="bibr">[29]</ref> for a comprehensive review. Once the optimal dual potentials &#966; * , &#968; * are obtained, the OT map (whenever exists) can be recovered as T * (x) = &#8711; &#966;(x), where &#966;(x) := &#8741;x&#8741; 2  2 /2 -&#966; * (x) is a convex function. It follows that (T * ) -1 (y) = y -&#8711;&#968; * (y).</p><p>In other words, the OT map and its inverse can be obtained by differentiating the solutions of (DP).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B. Neural Architectures</head><p>We then introduce the neural components in learning.</p><p>Input Convex Neural Networks <ref type="bibr">[31,</ref><ref type="bibr">ICNN]</ref> are utilized for modeling the convex potential function &#966;(&#8226;) in many neural OT implementations <ref type="bibr">[29]</ref>. More details are deferred to Appendix B-A.</p><p>Hypernetwork <ref type="bibr">[32]</ref> is another component in our paradigm. Broadly speaking, hypernetwork refers to the neural network architecture designed to generate parameters for another neural network. Given a target network f &#952; , instead of directly learning parameters &#952; from data as traditional learning, hypernetworks generate &#952; as an output mapped from a certain context variable. This allows for more flexible and efficient learning, particularly in tasks with complex or varying structures. Hypernetworks have been used in tasks such as neural architecture search, meta-learning, and conditional generation <ref type="bibr">[33]</ref>.</p><p>Transformers <ref type="bibr">[34]</ref>, equipped with the attention modules, are primarily used in natural language processing (NLP) tasks. The attention modules in transformers follow the spirit of nonparametric methods and can address sequences of indefinite length. After removing the positional encoding for addressing sequences, transformers are proven universal approximators for set-to-set maps <ref type="bibr">[35,</ref><ref type="bibr">Theorem 2]</ref>, thus appropriate to handle empirical distributional data (a set of samples). A complete introduction to transformers are deferred to Appendix B-B.</p><p>While the complexity of attention is quadratic, efficient GPU implementations, such as FlashAttention <ref type="bibr">[36]</ref>, <ref type="bibr">[37]</ref>, have dramatically accelerated the computation while maintaining a linear space complexity. Our proposed method has incorporated the open-shelf efficient implementations as well.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>III. HYPERNETWORKS FOR OPTIMAL TRANSPORT WITH EMBEDDING TRANSFORMERS</head><p>In this section, we discuss several crucial aspects of HOTET, our proposed training paradigm. Due to space limit, implementation details are deferred to Appendix A-A.</p><p>TABLE I: Performance of the constructed forward (fwd) and inverse (inv) transport maps (L 2 -UVP (%) as the metric). Lower implies the fitted map approximates the true OT map better. The standard deviation is calculated over 10 runs. DIM HOTET (fwd) MetaOT (fwd) MM-B (fwd) HOTET (inv) MetaOT (inv) MM-B (inv) 2 5.03 &#177;0.33 11.71 &#177;0.49 0.54 &#177;0.06 0.66 &#177;0.03 15.52 &#177;0.56 0.81 &#177;0.03 4 10.06 &#177;0.39 11.63 &#177;0.46 1.91 &#177;0.10 2.01 &#177;0.04 9.27 &#177;0.42 0.48 &#177;0.07 8 11.38 &#177;0.41 23.18 &#177;0.42 5.51 &#177;0.15 3.80 &#177;0.23 20.50 &#177;0.87 2.22 &#177;0.05 16 16.91 &#177;0.58 47.61 &#177;1.03 13.17 &#177;0.08 4.64 &#177;0.18 34.16 &#177;0.47 6.27 &#177;0.32 32 20.87 &#177;0.56 59.99 &#177;0.67 25.87 &#177;0.59 17.03 &#177;0.47 44.60 &#177;0.78 10.20 &#177;0.26 64 37.62 &#177;0.84 74.02 &#177;0.80 23.63 &#177;0.25 15.07 &#177;0.37 30.88 &#177;0.89 13.95 &#177;0.52</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>A. Base OT solvers in HOTET</head><p>Training the hypernetworks in HOTET requires a base OT solver to learn to generate neural networks that approximate true OT maps (though in principle the HOTET framework is agnostic to the choice of the base solver, provided it delivers accurate approximations). Mainstream OT solvers are mainly maximization-minimization-based, which are subject to divergence in training; for the numerical experiments in this work, we selected the base solver in use from two instances for numerical stability, referred to as MM-B and MMv2 in <ref type="bibr">[29]</ref>. Both solvers utilize the dual OT formulation and ICNNs to approach the convex potentials &#966; and &#968;, whose gradients serve as approximations of the OT maps. Usage of the solvers is discussed in Section IV-A, and detailed formulations / implementations for these solvers are provided in Appendix A-B.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B. Embedding empirical distributions</head><p>The key step in our training paradigm is to generate context embeddings from the input empirical distributions. We employ transformers in this task for several reasons: 1) With the positional encoding removed, transformers are universal approximators for set-to-set maps <ref type="bibr">[35,</ref><ref type="bibr">Thm. 2]</ref> and permutation invariant functions [38, Prop. 2], which match the characteristics of an empirical distribution. 2) Transformers are suitable for inputs with variable sizes, which is not well handled by previous methods <ref type="bibr">[26]</ref>, <ref type="bibr">[27]</ref>.</p><p>3) The architecture of the transformer allows it to take the weights from the empirical distribution into consideration. This aspect is explored in Appendices B-C and B-D. A simplified process for HOTET to embed empirical distributions can be described as follows: a design matrix X (the input empirical distribution) is passed to the L blocks in our transformer embedding module; the first L -1 blocks follow a regular design in <ref type="bibr">[34]</ref>, which keeps the input sample dimension hd (h is the number of heads, see Appendix B-B); the MLP sub-layer in the last block lifts the hidden dimension to the one of the context vector. A mean-pooling of the output matrix produces the context vector, which is then fed into the hypernetworks to generate model parameters.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>C. HOTET for computing individual OT maps.</head><p>To demonstrate the work flow of HOTET, we first discuss the computation of individual maps between two distributions with HOTET (though HOTET is suboptimal in this case).</p><p>HOTET consists of three modules: the embedding network E and two hypernetworks F , G. Given a pair of empirical distributions &#181;, &#957;, the embedding network E is applied to generate context vectors E(&#181;), E(&#957;) as specified in Section III-B. The two hypernetworks F , G will then respectively take the context E(&#181;), E(&#957;) as inputs, and produce parameters</p><p>for the two ICNNs f &#952; (&#8226;) and g &#969; (&#8226;) approximating the convex potentials. Afterwards, the potential networks are provided to the base OT solver, which concludes the entire forward pass. The resulting gradients of the forward pass are then used to update the three modules (E and F , G) with backpropagation.</p><p>As the parameter space for &#952;, &#969; in HOTET is strictly smaller than in the original solver, there will be natural concerns about the representation power of HOTET. Shortly in Section IV-B, we compare HOTET with the MMv2 solver as a sanity check, under the same setting taken by <ref type="bibr">[29]</ref>; we note the proposed framework still achieves a comparable performance in unfavorable settings. The details are provided in Appendix A-C.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>D. HOTET for computing multiple OT maps</head><p>We then illustrate the desired scenario for HOTET where the source measures &#181; 1 , . . . , &#181; n (training set) and the reference measure &#957; are already given and one aims to efficiently obtain the corresponding OT maps between a new &#181; and the reference &#957;.</p><p>In training, instead of computing OT maps individually for the n distribution pairs, HOTET generates the 2n sets of parameters for ICNNs together via F and G. To train the hypernetworks, loss from the base OT solver is computed for each (&#181; i , &#957;) and subsequently aggregated together.</p><p>TABLE II: Cosine similarity between T and T * . The standard deviation is calculated over 10 runs. Best viewed zoom in. DIM HOTET (fwd) MetaOT (fwd) MM-B (fwd) HOTET (inv) MetaOT (inv) MM-B (inv) 2 0.93 &#177;0.01 0.81 &#177;0.01 0.99 &#177;0.01 0.97 &#177;0.01 0.74 &#177;0.01 0.99 &#177;0.01 4 0.87 &#177;0.01 0.84 &#177;0.01 0.96 &#177;0.01 0.96 &#177;0.01 0.88 &#177;0.01 0.97 &#177;0.01 8 0.89 &#177;0.01 0.80 &#177;0.01 0.94 &#177;0.01 0.97&#177;0.01 0.82 &#177;0.01 0.97 &#177;0.01 16 0.90 &#177;0.01 0.74 &#177;0.01 0.92 &#177;0.01 0.97 &#177;0.01 0.78 &#177;0.01 0.96 &#177;0.01 32 0.91 &#177;0.01 0.76 &#177;0.01 0.90 &#177;0.01 0.91 &#177;0.01 0.80 &#177;0.01 0.97 &#177;0.01 64 0.84 &#177;0.01 0.71 &#177;0.01 0.90 &#177;0.01 0.91 &#177;0.01 0.87 &#177;0.01 0.94 &#177;0.01</p><p>TABLE III: Performance of the constructed transport forward (fwd) and inverse (inv) maps in predicting OT maps (L 2 -UVP (%) as the metric). The standard deviation is calculated over 10 runs. DIM Train Predict HOTET (fwd) MetaOT (fwd) HOTET (inv) MetaOT (inv) HOTET (fwd) MetaOT (fwd) HOTET (inv) MetaOT (inv) 2 3.25 &#177;0.56 2.66 &#177;0.41 3.01 &#177;0.49 2.71 &#177;0.43 3.13 &#177;0.47 2.63 &#177;0.45 3.07 &#177;0.45 2.69 &#177;0.47 4 3.40 &#177;0.29 20.27 &#177;2.12 3.44 &#177;0.30 23.37 &#177;2.43 3.37 &#177;0.27 20.27 &#177;2.11 3.43 &#177;0.29 23.48 &#177;2.46 8 6.59 &#177;0.28 50.34 &#177;0.81 6.48 &#177;0.27 54.26 &#177;1.45 6.54 &#177;0.31 50.35 &#177;0.82 6.45 &#177;0.28 54.29 &#177;1.48 16 10.72 &#177;0.26 73.76 &#177;0.82 11.19 &#177;0.27 74.02 &#177;1.15 10.59 &#177;0.25 73.70 &#177;0.82 11.05 &#177;0.25 73.98 &#177;1.16 32 18.00 &#177;0.47 86.93 &#177;0.37 18.96 &#177;0.54 88.27 &#177;0.35 18.03 &#177;0.44 86.92 &#177;0.37 19.00 &#177;0.53 88.27 &#177;0.33 64 29.18 &#177;0.46 93.13 &#177;0.25 26.44 &#177;0.36 94.13 &#177;0.40 28.29 &#177;0.83 93.14 &#177;0.25 26.49 &#177;0.35 94.11 &#177;0.41</p><p>Since the reference measure &#957; is fixed in the training and testing process, we take &#181; i as input to model both the forward map and the inverse map between &#181; i and &#957;. That is, the parameters for the ICNNs f &#952;i (resp. g &#969;i ) are generated as</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>IV. NUMERICAL EXPERIMENTS</head><p>We conducted various experiments to evaluate the performance of HOTET. The detailed experimental setups are discussed in Section IV-A. In particular, we perform a sanity check (Section IV-B) based on the benchmarks from <ref type="bibr">[29]</ref> to exhibit the capability of our paradigm to generate quality transport map. This particular setting will be referred to as W2B hereinafter. Furthermore, we evaluated the prediction performance of our proposed training paradigm in Section IV-C, where we demonstrated that HOTET is capable of generating transport maps for unseen distributions after being trained on similar sample distributions (c.f. Section III-D). Lastly, we tested our model on images data through various applications in Section IV-D, and performed an ablation study on the embedding module in Section IV-E.</p><p>A. Experiment Settings 1) Choice of base OT solvers: While the theory foundation for OT is solid, the choice of a better solver for a specific task is an engineering problem. It is typical that in some cases the solvers will be hard to optimize: for example, the MMv2 solver tends to produce forward and inverse maps with large performance discrepancy, due to its asymmetric nature (detailed in Appendix A-B). When applicable, we compare the performance of the MM-B and MMv2 solver (see Appendix A-F), and report the results of the more stable one in the main text.</p><p>2) W2B benchmark: The performance of numerous OT solvers are evaluated in <ref type="bibr">[29]</ref> on Gaussian mixture distributions. The performance of an estimated transport map T with respect to the ground truth T * is evaluated with the L 2 -Unexplained Variance Percentage (UVP) and Cosine Similarity (CS):</p><p>.</p><p>We inherited these settings for our own comparisons.</p><p>3) Predicting OT maps with HOTET: In this experiment, multiple Gaussian mixture distributions are generated with random means and covariance matrices. One distribution is designated as the reference, while the rest are divided into training and test sets. Distributions in the test set are used to assess the quality of the OT maps predicted by HOTET.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>4) Color transfer:</head><p>To further explore the capabilities of HOTET, we conducted color transfer experiments on paintings from WikiArt. The experiments include transferring colors from one image to another, as well as transferring colors from multiple images to a single target image. </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B. W2B Benchmark</head><p>We trained HOTET with the MM-B solver using the high-dimensional distribution dataset from W2B For the estimated forward and inverse transport maps, we examine the divergence between &#957; and T# &#181;, as well as the one between &#181; and, T -1 # &#957;, which are visualized in Figure <ref type="figure">2</ref>. To make the comparison fair, the architectures of the ICNNs used in all the methods are identical.</p><p>The results are reported in Tables I and II, indicating that the transport maps generated by HOTET are comparable to those trained directly. This evidence validates that HOTET is able to generate quality transport maps.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>C. Predict OT Maps with HOTET</head><p>We then evaluated the prediction performance of HOTET. In this experiment, Gaussian mixtures with three components, across multiple dimensions are generated, and each with different mean and covariance. One mixture &#957; was chosen as the reference, while 500 others formed the training set. After fitting 500 OT maps under HOTET, we then predicted the OT maps between &#957; and 100 new Gaussian mixtures (we found that MMv2 performed better in this setting than MM-B). For comparison, Meta OT was also trained in the setting above.</p><p>The results are summarized in Table <ref type="table">III</ref>. The prediction performance of HOTET quickly exceeds baselines as the dimension increases, exhibiting the capability of HOTET to capture distribution embeddings. Due to space limit, evaluation on time efficiency is deferred to Appendix A-D.</p><p>Key note: removal of the pretraining stage. <ref type="bibr">[29]</ref> suggested a pre-training stage to turn the ICNN into an identity map, before the regular training procedure. This process is time-consuming and unnecessary given the recent advance in transfer learning; we followed <ref type="bibr">[39]</ref> and initialized the weights W h &#8764; N (0, 0.1) in hypernetworks with a small variance. This way, we utilized the residual connection within ICNNs (with the tiny initial weights the ICNN already approaches an identity map) and thus can skip the pre-training stage.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>D. Color Transfer</head><p>In this experiment, we used the OT map to transform the color histogram of an image to match that of another. The transport maps were constructed by interpreting the input RGB images as samples from their respective color distributions over the support [0, 1] 3 . As before, we considered both one-to-one and many-to-one settings, employing the MM-B solver.</p><p>One-to-one color transfer. Given two color histograms, x and y, we trained HOTET to generate OT maps T , T -1 . To obtain new images, we replaced the colors of individual pixels so that the resulting color histograms became x trans = T# x and</p><p># y, respectively. The results are shown in Figure <ref type="figure">3</ref>. Multiple-to-one color transfer. Given a collection of color histograms X = {x 1 , x 2 , . . . , x n } and a reference histogram y, we trained HOTET to generate simultaneously the forward transport maps { T1 , T2 , . . . , Tn } and inverse maps  The images with new color histograms, shown in the left panel of Figure <ref type="figure">4</ref>, were generated in the same way as in the one-to-one setting.</p><p>In-context learning. To further evaluate the generalization capacity of a trained HOTET, we followed the in-context learning setting in <ref type="bibr">[27]</ref> and reused the trained HOTET model from the multiple-to-one setting to generate OT maps for previously unseen color histograms x new . Instead of a full training run (5000 iterations), we fine-tuned the HOTET on new images through only 50 warm-up steps. The results are presented in the right panel of Figure <ref type="figure">4</ref>, demonstrating that the OT maps produced by short-term fine-tuning are visually comparable to those generated through complete training.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>E. Ablation Studies on the Distribution Embedding Module</head><p>In this experiment, we removed the embedding module to investigate whether the overall performance would be impacted. We followed the setting in Section IV-C and the dimension is set at 64; the results are provided in Table <ref type="table">IV</ref>. As expected,</p><p>TABLE IV: L 2 -UVP (%) results of the two different methods for obtaining the forward and inverse transport maps. Method Train Predict Fowrad Map Inverse Map Fowrad Map Inverse Map HOTET 29.18 &#177;0.46 26.44 &#177;0.36 28.29 &#177;0.83 26.49 &#177;0.35 No Emb. 82.75 &#177;0.55 69.42 &#177;0.47 83.71 &#177;0.51 69.54 &#177;0.64</p><p>HOTET significantly outperforms the version without embedding, highlighting the importance of the embedding module in effectively capturing signals from empirical distributions.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>V. CONCLUSIONS AND LIMITATIONS</head><p>In this paper, we recognize the increasing needs for computation of OT maps in modern signal processing, and propose a training paradigm HOTET to learn the OT maps between an unseen empirical distribution and a reference measure. In HOTET, information from the input distributions is extracted by a transformer, and then passed to a hypernetwork to generate the desired OT maps. Extensive experiments were conducted to demonstrate the efficacy of our new paradigm, showing that it is capable of producing quality OT maps.</p><p>Limitations: Despite the efficacy of HOTET, it faces challenges in the many-to-many setting, where data are multiple i.i.d. distribution pairs (&#181; i , &#957; i ). Further exploration is needed to address this complex scenario.</p><p>where g &#969; is an ICNN that approximates the conjugate of f &#952; .</p><p>b) MMv2 Solver: The MMv2 solver, on the other hand, is based on the reformulation <ref type="bibr">[41,</ref><ref type="bibr">Thm. 3.3]</ref> </p><p>To compute the OT map, potentials &#966; and &#968; are approximated by ICNNs f &#952; and g &#969; , respectively. The parameters &#952; and &#969; are updated in an alternating fashion. For the inner problem, &#969; is updated through maximizing</p><p>via SGD, with multiple iterations performed to ensure convergence. Afterward, &#952; is updated by minimizing</p><p>This procedure is repeated until both &#952; and &#969; converge to near-optimal values.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>C. Pseudocode for Network Training</head><p>Algorithm 1 outlines the training process for HOTET using the MM-B solver. Here, X := {X i } n i=0 represents the set of distributions, and Y is the reference distribution. In the case where X contains only a single distribution, it reduces to a classical one-to-one OT problem. For scenarios where n &gt; 1 (e.g. OT maps prediction), a batch of distributions, with size B &#8804; n, is sampled from X . Then, from each sampled distribution and the reference y, batches of size b are drawn for evaluating the individual OT losses. The networks f &#952; and g &#969; are ICNNs that parameterize the convex dual potentials. The hypernetworks F and G generate the parameters for these potential networks, while E serving as the embedding module. The variable K denotes the total number of training iterations.</p><p>TABLE V: Time cost (sec) of training different models. The batch sizes in the 32/64 dimensional settings are 256, and in other settings are 1024. The GPU is a single Nvidia RTX 4090. Model 2 4 8 16 32 64 MetaOT 1161 1183 1214 1248 1405 4198 HOTET-MMB 1228 1239 1339 1405 1223 2324 HOTET-MMv2 30972 31762 29106 30541 28150 20120 MM-B 20695 21848 24099 24615 19618 52633 MMv2 409284 365529 418475 411523 401511 395583 D. Runtime analysis We further assessed the time efficiency of HOTET, MetaOT, and repeating MMv2 solver in an 8-dimensional setting. The results in Table V showed that HOTET performs similarly to MetaOT. However, training networks with MMv2 solver directly is more time-consuming, as it requires training each distribution pair individually 500 times in this setting. Meanwhile, a direct MMv2 solver does not have prediction capabilities, as the potentials of the trained networks only represents the transport maps between the two input distributions. E. Additional Experiment Results Figures 5 and 6 present OT maps learned in the W2B experiment (Section IV-B) with d = 4 and d = 8. The results are projected onto the first 2 principal directions for visualization. Algorithm 1 Training Procedure of HOTET with MM-B Solver 1: procedure TRAINMODEL(X , Y, f &#952; , g &#969; , F , G, E) 2:</p><p>Initialize the parameters of each module 3:</p><p>for t = 1, . . . , K do 4:</p><p>Sample batch X batch of size B from X . embedding_x &#8592; E(x)</p><p>embedding_y &#8592; E(y)</p><p>10:</p><p>L xy &#8592; COMPUTELOSSFORWARD(x, y, F , embedding_x)</p><p>11:</p><p>L yx &#8592; COMPUTELOSSINVERSE(y, x, G, embedding_y)</p><p>12:</p><p>end for 14:</p><p>Update model E, F , G according to L 15:</p><p>end for 16: end procedure TABLE VI: Performance of the constructed forward (fwd) and inverse (inv) transport maps by MM-B and MMv2 solvers in W2B benchmark (L 2 -UVP (%) as the metric). Lower implies the fitted map approximates the true OT map better. DIM HOTET-MMB (fwd) HOTET-MMv2 (fwd) HOTET-MMB (inv) HOTET-MMv2 (inv) 2 5.03 &#177; 0.33 13.34 &#177; 0.46 10.49 &#177; 0.52 5.31 &#177; 0.58 4 10.06 &#177; 0.39 30.74 &#177; 0.55 15.54 &#177; 0.46 23.84 &#177; 0.67 8 11.38 &#177; 0.41 33.90 &#177; 0.61 18.79 &#177; 0.45 16.92 &#177; 0.52 16 16.91 &#177; 0.58 30.86 &#177; 0.56 25.62 &#177; 0.49 28.72 &#177; 0.39 32 20.87 &#177; 0.56 40.72 &#177; 0.54 23.04 &#177; 0.53 35.71 &#177; 0.47 64 37.62 &#177; 0.84 38.42 &#177; 0.51 22.94 &#177; 0.87 36.06 &#177; 0.62 F. Choosing the Solvers MM-B and MMv2 perform differently in the experiment settings in Section IV-B and Section IV-C, the details are in Table VI and Table VII. Therefore, we choose the better performed one in our main paper.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>G. Validating the Embedding Module with the MNIST Dataset</head><p>In this experiment, we examined the embeddings produced by the embedding module E from a HOTET trained on the MNIST <ref type="bibr">[44]</ref> handwritten digits dataset. We selected 6000 images from the training set (600 per digit), and then trained a  VAE <ref type="bibr">[45]</ref> to map them to 6000 3-dimensional latent distributions. Next, we trained a HOTET with embedding dimension d = 128 to learn OT maps between the latent distributions and the reference measures N (0, I 3 ). Afterwards, we visualized</p><p>TABLE VII: Performance of the constructed forward (fwd) and inverse (inv) transport maps by MM-B and MMv2 solvers in predicting OT maps setting (L 2 -UVP (%) as the metric). Lower implies the fitted map approximates the true OT map better. DIM Train Predict HOTET-MMv2 (fwd) HOTET-MMB (fwd) HOTET-MMv2 (inv) HOTET-MMB (inv) HOTET-MMv2 (fwd) HOTET-MMB (fwd) HOTET-MMv2 (inv) HOTET-MMB (inv) 2 3.25 &#177; 0.56 4.23 &#177; 0.54 3.01 &#177; 0.49 4.03 &#177; 0.52 3.13 &#177; 0.47 4.12 &#177; 0.62 3.07 &#177; 0.45 3.84 &#177; 0.61 4 3.40 &#177; 0.29 4.95 &#177; 0.61 3.44 &#177; 0.30 3.73 &#177; 0.29 3.37 &#177; 0.27 3.57 &#177; 0.33 3.43 &#177; 0.29 3.66 &#177; 0.36 8 6.59 &#177; 0.28 6.95 &#177; 0.28 6.48 &#177; 0.27 7.00 &#177; 0.28 6.54 &#177; 0.31 6.80 &#177; 0.20 6.45 &#177; 0.28 6.94 &#177; 0.22 16 10.72 &#177; 0.26 12.60 &#177; 0.26 11.19 &#177; 0.27 12.64 &#177; 0.31 10.59 &#177; 0.25 12.66 &#177; 0.28 11.05 &#177; 0.25 12.71 &#177; 0.31 32 18.00 &#177; 0.47 20.36 &#177; 0.26 18.96 &#177; 0.54 20.35 &#177; 0.25 18.03 &#177; 0.44 20.00 &#177; 0.22 19.00 &#177; 0.53 19.93 &#177; 0.21 64 29.18 &#177; 0.46 28.69 &#177; 0.18 26.44 &#177; 0.36 28.72 &#177; 0.18 28.29 &#177; 0.83 28.74 &#177; 0.18 26.49 &#177; 0.35 28.84 &#177; 0.17  APPENDIX B USEFUL FACTS A. ICNN The fully connected ICNN is a feed-forward neural network whose intermittent layer z &#8467; is the activation of the linear transformation of the previous layer, plus the affine transformation of the input z 0 := x. In other words, for &#8467; &#8712; {1, . . . , L}, z &#8467; := &#963; &#8467; (A &#8467;-1 z &#8467;-1 + W &#8467;-1 x + b &#8467;-1 ), (B.1)</p><p>the input query vector q i through {k j } n j=1 , which behaves as a kernel estimator <ref type="bibr">[47]</ref>, <ref type="bibr">[48]</ref>. Specifically, for a single query vector q i , a Nadaraya-Watson kernel estimator <ref type="bibr">[49,</ref><ref type="bibr">Definition 5.39</ref>] models its representation as, f (q i ) = n j=1 &#8467; j (q i )c j , where &#8467; j (q i ) := &#954;(q i , k j ) N j &#8242; =1 &#954;(q i , k j &#8242; ) .</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>(B.6)</head><p>Here, &#954;(&#8226;, &#8226;) is a kernel function, and c j 's are the coefficients (c j can either be a scalar or a vector in different applications) that are learned during training. In this estimator, {k j } n j=1 serve as the supporting points which help construct the representation for an input q i . For kernel function &#954;(x, y) = exp &#10216;x, y&#10217; / &#8730; p , we slightly abuse the notation &#954;(Q, K) to represent an n-by-N empirical kernel matrix, whose element in the i-th row and the j-th column is &#954;(q i , k j ), &#8704;i &#8712; [n], j &#8712; [N ]. With these notations, the representation of the transformed output will be,</p><p>where D is a diagonal matrix for row normalization in Eq. (B.6), and C is an N -by-p matrix whose j-th row is c j .</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>D. Potential Pathways to the Incorporation of Sample Weights into Distribution Embedding</head><p>Considering the correspondence between Equation (B.7) and the standard softmax attention in Equation (B.3), we are indeed able incorporate the sample weights in an empirical distribution to attention (as mentioned in Section III-B). The new character will allow a transformer to embed arbitrary empirical distributions and generate layer embeddings for hypernetworks.</p><p>Originally in transformers, all the tokens are assumed to share the equal weights, while a general empirical distribution allows non-uniform atom masses. To address the issue, we can make an analogy between self-attention and the Nadaraya-Watson kernel estimator in Equation (B.6).</p><p>We first rewrite &#8467; j (q i )'s in Equation (B.6) to highlight the implicitly assumed uniform sample weights:</p><p>, which allows an immediate extension in the weighted case; given the normalized sample weights m = {m 1 , m 2 , . . . , m n } with N j=1 m j = 1, we can modify the coefficients &#8467; j (q i )'s in Equation (B.6) as</p><p>.</p><p>Ultimately, the weighted attention is expressed as follows:</p><p>where the row normalization matrix D is reloaded as diag exp QK T &#8730; p N m .</p><p>For the output H of the whole transformer, we can apply a weighted average pooling to obtain the final embedding:</p><p>The embedding z will then be passed to the hypernetwork for generating the transport map.</p></div></body>
		</text>
</TEI>
