Manuscript Offprint
arXiv:2608.28840Unsupervised Latent Space Alignment with Hyperspherical Geodesic Matching
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
Independently trained neural networks tend to encode the same data with similar latent geometries. These latent geometries are not directly compatible, yet they can be nearly the same up to some class of transformations. While there exists many methods for alignment between different latent spaces, it is typically done using a set of shared sample correspondences, known as anchors. This leaves a fundamental question: are the geometric signatures of different latent spaces representing similar data sufficient to recover an alignment between them? To that end, we introduce HGA (Hyperspherical Gaussian Alignment), a method that directly optimizes a transformation between two latent spaces by maximizing a geometric measure of “fit” between them. Since it is driven by the geometry of the latent spaces rather than paired data, HGA can operate in both an unsupervised and weakly supervised regime. On tasks such as model stitching or multilingual word embedding correspondence recovery, HGA manages to match supervised results with minimal or no supervision.
1 Introduction
Artificial neural networks often condense extremely high dimensional data points into much lower dimensional latent spaces. The structure and geometry of datasets embedded in these latent spaces is central to how models are used, compared, or reused. A principle for why latent spaces are able to represent data is the manifold hypothesis, which states that most natural high dimensional data lies on a manifold with a much lower intrinsic dimension [1, 2]. In this view, a trained model implicitly captures the geometry of the data manifold in its latent space.
Evidence suggests that models trained independently on similar data often learn the same representations up to certain transformations such as isometries and rescaling [3, 4, 5]. The Platonic Representation Hypothesis [6] posits that, as models scale and train on larger datasets, their representations converge toward a statistical structure of the underlying world. Moreover, much work has investigated translation between latent spaces, often using supervision in the form of sample pairs called anchors. These act like a “Rosetta Stone”, providing known correspondences between two latent spaces [3, 7]. It has been clearly demonstrated that using anchors, effective latent space alignment is possible, and that often latent spaces are the same up to an affine or orthogonal transformation. The central question that motivates this work is whether compatible latent spaces can be aligned by relying on their geometric signatures alone? Answering this question requires methods to align spaces by exploiting their intrinsic geometric structure rather than using paired data.
*Northeastern University, Boston, MA 02115. Work performed during a summer internship at Lawrence Livermore National Laboratory
†Lawrence Livermore National Laboratory, Livermore, CA 94551-0808.
Preprint.
We address this challenge with Hyperspherical Geodesic Alignment (HGA), which attempts to align latent spaces by fitting an orthogonal transformation that maximizes similarity between the mapped space and the target space. HGA is motivated by the assumption that in separate latent spaces representing similar data, the relative angles between corresponding points are approximately the same [3]. We find that in many cases, supervision is not necessary and the intrinsic geometry of the latent spaces alone is enough to determine an alignment between them. Our key contributions are summarized as follows:
-
Propose HGA, a method for latent space alignment in both the unsupervised and weakly supervised regimes, demonstrating that in many cases, their intrinsic geometry is sufficient to align them.
-
Empirically compare HGA to Latent Functional Maps [7] and fully supervised Orthogonal Procrustes fitting across several datasets and data modalities, showing that it improves alignment quality with no or significantly less supervision.
Weak-supervision latent space communication. There exists a line of work that seeks to translate between latent spaces using minimal supervision, typically in the form of a set of shared samples called anchors. Relative Representations [3] propose representing points in each latent space as their similarities to a fixed set of anchors. Therefore this method is invariant to latent isometries that otherwise separate independently trained models, and thus enables zero-shot communication between latent spaces. Subsequent work [12] brings this further by directly estimating a transformation between the two spaces so that encoders and decoders can be combined. Latent Functional Maps [7] introduces a method for latent space communication based on spectral geometry, notably the Functional Maps framework [13]. This method aligns graph Laplacian eigenvectors to preserve the spectral features of indicator functions of anchor points. Latent Functional Maps also introduces a method of unsupervised latent space communication, by optimizing a map between the spectral spaces of two latent space such that it preserves the Heat Kernel Signature. Our approach is within this weakly supervised or unsupervised regime. We optimize a transformation between two latent spaces that will maximize a geometric "fit" between the mapped space and the target space.
Optimal Transport. Optimal transport (OT) compares probability measures by discovering a minimum cost coupling between them [14, 15], and has been used to compare and align embedding spaces [16]. Classic OT requires a cost defined between two embedding spaces which is unavailable when embeddings are related up to an unknown transformation. Gromov Wasserstein (GW) distance [17] overcomes this by instead comparing intra-space pairwise distances. This yields a coupling which preserves the relational structure between points. Prior work has used GW to find alignments between word embedding spaces for different languages without anchors [18, 19]. These approaches are highly related to this work, as both seek to find an optimal way to align high dimensional spaces by preserving their internal geometry. Our work differs slightly because rather than a point-wise coupling, we optimize an orthogonal transformation (therefore automatically preserving intra-space structure) which maximizes the alignment of dense regions to other dense regions.
3 Method
Setup. Consider two sets of points sampled from two latent spaces: , and . An important result of [3] is demonstrating that different neural networks will typically represent data points so that their angles between each other are nearly the same. Our method seeks to take advantage of this by deliberately rotating/reflecting these samples in order to find the best possible “fit” between them.
Hyperspherical Geodesic Alignment (HGA). Consider these datasets normalized to the unit sphere and . Let be an orthonormal matrix. Our goal is to optimize such that we maximize the “fit” between and . We calculate the cosine similarity between each point in after being operated on by , and each point in :
We can then calculate the geodesic distance between each point in and each point in :
Using geodesic distances on the unit sphere, we calculate the unnormalized Gaussian Kernel between each point:
We then average the sum over all pairs of points between the two spaces. This total affinity is our objective function:
The goal of our optimization algorithm is find . Intuitively, we imagine this as slowly rotating the points of until they “fit” together with the points of . We find an ideal matrix by starting from a random orthogonal matrix, and progressively updating it with gradient ascent. Details are elaborated in the Appendix.
Supervision. Methods for latent space alignment typically use a set of anchor points and optimize a transformation to satisfy . These points are often considered to be a “Rosetta Stone” between latent spaces [12, 20]. In our experiments, we investigated two methods for implementing anchor supervision in HGA. These two methods are often combined.
Starting From a Least Squares Fit. The orthogonal Procrustes problem has been well understood and studied [21]. Since our optimization algorithm requires an initialization of , we find the best fit at the anchor points: . We use this estimated as the initialization for the optimization algorithm.
Anchor Weighting. The anchor relationships can also be enforced by giving them higher weights in the objective function sum. If we know that and correspond to the same anchor in the two respective latent spaces, then we can weight their relationship higher. Thus, the objective function becomes:
An important consideration in experiments is the choice of the weight hyperparameter w. A value of w that is too small will not effectively change the objective landscape, while a value that is too large can make it unstable. Our experiments show that it is often helpful to set so that it is larger than the total number of connections.
Table 1: Stitching accuracy (%) of fully supervised and unsupervised methods on test sets for each dataset. HGA optimization is done with 50 restarts for each dataset, and the rotation matrix with the highest objective function score is used for model stitching. Results show mean and standard deviation for 3 runs of Latent Functional Maps and HGA with different random seeds.
| Dataset | Supervised Ortho | Unsupervised Latent Functional Maps | Unsupervised HGA |
|---|---|---|---|
| MNIST | 96.79% | ||
| CIFAR10 | 73.48% | ||
| CIFAR100 | 34.51% |
4 Experiments
Model Stitching. A common challenge in latent communication tasks is combining components of two different neural networks to create a stitched model [10, 11, 22]. Consider neural networks , and . In order to stitch layer in to layer in , we search for a transformation so that is sufficiently good at the downstream task which is used for. Previous work [12, 3, 23] has shown that often orthogonal or affine transformations are sufficient to map between the latent spaces of the corresponding layers in a neural network. For simplicity, in this work we focus on orthogonal transformations between the latent spaces of the corresponding layers.
Stitching methods often use a set of anchor points , which are used to direct the transformation to preserve similarities between how the points are represented, so that . Our model stitching experiments focus primarily on image classification for the [24], CIFAR-10, and CIFAR-100 [25] datasets. We train pairs of identical models on each dataset, and perform the optimization procedure using a subset of 1024 samples to find an alignment between their respective latent spaces. We find that in many cases, the usage of anchor supervision is unnecessary for model stitching. By observing Table 1, we see that with unsupervised alignment, we manage to achieve stitching accuracies that are similar to those achieved by using all 1024 points as anchors and computing an orthogonal Procrustes fit (the fully supervised baseline approach). We hypothesize that this shows for each dataset, the geometry of samples embedded in latent space contains sufficient information to recover an alignment between them.
FastText Word Embedding Translation: In order to test HGA in the domain of word embeddings, we used FastText's pretrained vectors from the Common Crawl corpus [26, 27]. Given two sets of common words from English and French, we manually created a small set of corresponding word pairs from both languages. Using these word correspondences as anchors, we tested multiple methods of alignment between the two embedding spaces. The accuracy of each method was calculated using known correspondences from the MUSE dictionaries [28]. We find that in the setting of extremely few anchors, HGA manages much better at finding word correspondences, as seen in Figure 1. Qualitatively, we can see how this works in Figure 6. While
other methods can effectively align the latent space for particular words, HGA manages to use anchor labels as well as geometric information about the two latent spaces in order to translate words that are not anchored.

Figure 1: Word correspondence accuracy vs number of anchors for various alignment methods on word embeddings from FastText
5 Discussion and Conclusion
HGA aligns independently trained latent spaces by fitting an orthogonal transformation that maximizes a geodesic-kernel measure of geometric fit, matching supervised alignment methods with little or no supervision. The primary challenge of the proposed method is that the optimization can be unstable due to the large initial bandwidth creating incorrect distribution matches that lead to false alignment. Fortunately, this problem can be partially addressed by adapting a restart heuristic during the optimization process, as our experiments (see appendix Figure 4) have shown that high objective function scores correspond to desirable alignment. Therefore while it may not always be possible to quickly find an alignment between spaces, it is possible to verify whether an alignment is desirable, and if not keep trying until a desirable one is found. As the latent spaces that it is applied to become increasingly complex, it becomes more difficult to find useful maxima of the objective function . For model stitching on simple datasets such as MNIST or CIFAR10 we can easily find an optimal transformation between them with stitching accuracy similar to fully supervised approaches. For more complex latent spaces such as the CLIP embedding space, or FastText word embeddings, anchors are often still needed obtain useful results. Overall, we find that HGA is an effective method for latent space alignment. We hypothesize that the geometries of different latent spaces possess signatures that are unique up to the data they represent, and their usefulness for alignment depends on how little symmetry is present.
Future work will be organized as follows: (1) Improving the algorithm for optimization by leveraging more geometric understanding of latent spaces. Currently it requires about an hour to find a decent alignment between two spaces. Further work could parallelize restarts and further develop the early stop heuristic to improve computation time. We wish to maximize the chances of finding a desirable objective function maxima, and quantify how difficult this will be for various latent spaces. (2) Characterizing latent spaces based on concrete geometric information. We seek to find a distinct way to describe latent spaces that is invariant to certain basic transformations. This could be used to quantify the ability of latent spaces to be aligned.
Acknowledgments and Disclosure of Funding
This work was performed under the auspices of the U.S. Department of Energy (DOE) by Lawrence Livermore National Laboratory under Contract No. DE-AC52-07NA27344. This work was supported by DOE ECRP 51917/SCW1885. This work is reviewed and released under LLNL-PROC-2023638.
References
[1] Charles Fefferman, Sanjoy Mitter, and Hariharan Narayanan. Testing the manifold hypothesis, 2013.
[2] Yoshua Bengio, Aaron Courville, and Pascal Vincent. Representation learning: A review and new perspectives, 2014.
[3] Luca Moschella, Valentino Maiorca, Marco Fumero, Antonio Norelli, Francesco Locatello, and Emanuele Rodolà. Relative representations enable zero-shot latent space communication. In The Eleventh International Conference on Learning Representations, 2023.
[4] Samuel Ainsworth, Jonathan Hayase, and Siddhartha Srinivasa. Git re-basin: Merging models modulo permutation symmetries. In The Eleventh International Conference on Learning Representations, 2023.
[5] Alexander Theus, Alessandro Cabodi, Sotiris Anagnostidis, Antonio Orvieto, Sidak Pal Singh, and Valentina Boeva. Generalized linear mode connectivity for transformers. In The Thirty-ninth Annual Conference on Neural Information Processing Systems, 2025.
[6] Minyoung Huh, Brian Cheung, Tongzhou Wang, and Phillip Isola. Position: The platonic representation hypothesis. In Ruslan Salakhutdinov, Zico Kolter, Katherine Heller, Adrian Weller, Nuria Oliver, Jonathan Scarlett, and Felix Berkenkamp, editors, Proceedings of the 41st International Conference on Machine Learning, volume 235 of Proceedings of Machine Learning Research, pages 20617–20642. PMLR, 21–27 Jul 2024.
[7] Marco Fumero, Marco Pegoraro, Valentino Maiorca, Francesco Locatello, and Emanuele Rodolà. Latent functional maps: a spectral framework for representation alignment. In The Thirty-eighth Annual Conference on Neural Information Processing Systems, 2024.
[8] Maithra Raghu, Justin Gilmer, Jason Yosinski, and Jascha Sohl-Dickstein. Svcca: Singular vector canonical correlation analysis for deep learning dynamics and interpretability, 2017.
[9] Simon Kornblith, Mohammad Norouzi, Honglak Lee, and Geoffrey Hinton. Similarity of neural network representations revisited. In Kamalika Chaudhuri and Ruslan Salakhutdinov, editors, Proceedings of the 36th International Conference on Machine Learning, volume 97 of Proceedings of Machine Learning Research, pages 3519–3529. PMLR, 09–15 Jun 2019.
[10] Karel Lenc and Andrea Vedaldi. Understanding image representations by measuring their equivariance and equivalence, 2015.
[11] Yamini Bansal, Preetum Nakkiran, and Boaz Barak. Revisiting model stitching to compare neural representations, 2021.
[12] Valentino Maiorca, Luca Moschella, Antonio Norelli, Marco Fumero, Francesco Locatello, and Emanuele Rodolà. Latent space translation via semantic alignment, 2024.
[13] Maks Ovsjanikov, Mirela Ben-Chen, Justin Solomon, Adrian Butscher, and Leonidas Guibas. Functional maps: a flexible representation of maps between shapes. ACM Trans. Graph., 31(4), July 2012.
[14] Marco Cuturi. Sinkhorn distances: Lightspeed computation of optimal transportation distances, 2013.
[15] Gabriel Peyré and Marco Cuturi. Computational optimal transport. Foundations and Trends in Machine Learning, 11(5-6):1–257, January 2019. Publisher Copyright: © 2019 Now Publishers Inc. All Rights Reserved.
[16] Matt Kusner, Yu Sun, Nicholas Kolkin, and Kilian Weinberger. From word embeddings to document distances. In Francis Bach and David Blei, editors, Proceedings of the 32nd International Conference on Machine Learning, volume 37 of Proceedings of Machine Learning Research, pages 957–966, Lille, France, 07–09 Jul 2015. PMLR.
[17] Facundo Mémoli. Gromov–wasserstein distances and the metric approach to object matching. Found. Comput. Math., 11(4):417–487, August 2011.
[18] David Alvarez-Melis and Tommi S. Jaakkola. Gromov-wasserstein alignment of word embedding spaces. CoRR, abs/1809.00013, 2018.
[19] Meng Zhang, Yang Liu, Huanbo Luan, and Maosong Sun. Earth mover's distance minimization for unsupervised bilingual lexicon induction. In Martha Palmer, Rebecca Hwa, and Sebastian Riedel, editors, Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pages 1934–1945, Copenhagen, Denmark, September 2017. Association for Computational Linguistics.
[20] Antonio Norelli, Marco Fumero, Valentino Maiorca, Luca Moschella, Emanuele Rodolà, and Francesco Locatello. Asif: Coupled data turns unimodal models to multimodal without training, 2023.
[21] Peter H. Schönemann. A generalized solution of the orthogonal procrustes problem. Psychometrika, 31(1):1–10, 1966.
[22] Adrián Csiszárik, Péter Kőrosi-Szabó, Ákos K. Matszangosz, Gergely Papp, and Dániel Varga. Similarity and matching of neural network representations. In A. Beygelzimer, Y. Dauphin, P. Liang, and J. Wortman Vaughan, editors, Advances in Neural Information Processing Systems, 2021.
[23] Mazda Moayeri, Keivan Rezaei, Maziar Sanjabi, and Soheil Feizi. Text-to-concept (and back) via cross-model alignment, 2023.
[24] Y. Lecun, L. Bottou, Y. Bengio, and P. Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998.
[25] Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. Technical Report 0, University of Toronto, Toronto, Ontario, 2009.
[26] Piotr Bojanowski, Edouard Grave, Armand Joulin, and Tomas Mikolov. Enriching word vectors with subword information. Transactions of the Association for Computational Linguistics, 5:135–146, 06 2017.
[27] Edouard Grave, Piotr Bojanowski, Prakhar Gupta, Armand Joulin, and Tomas Mikolov. Learning word vectors for 157 languages, 2018.
[28] Alexis Conneau, Guillaume Lample, Marc'Aurelio Ranzato, Ludovic Denoyer, and Hervé Jégou. Word translation without parallel data, 2018.
[29] Diederik P. Kingma and Jimmy Ba. Adam: A Method for Stochastic Optimization. In International Conference on Learning Representations, 12 2014.
[30] Maxime Oquab, Timothée Darcet, Théo Moutakanni, Huy Vo, Marc Szafraniec, Vasil Khalidov, Pierre Fernandez, Daniel Haziza, Francisco Massa, Alaaeldin El-Nouby, Mahmoud Assran, Nicolas Ballas, Wojciech Galuba, Russell Howes, Po-Yao Huang, Shang-Wen Li, Ishan Misra, Michael Rabbat, Vasu Sharma, Gabriel Synnaeve, Hu Xu, Hervé Jegou, Julien Mairal, Patrick Labatut, Armand Joulin, and Piotr Bojanowski. Dinov2: Learning robust visual features without supervision, 2023.
[31] Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, Gretchen Krueger, and Ilya Sutskever. Learning transferable visual models from natural language supervision, 2021.
[32] Martin N. Hebart, Adam H. Dickter, Alexis Kidder, Wan Y. Kwok, Anna Corriveau, Caitlin Van Wicklin, and Chris I. Baker. THINGS: A database of 1,854 object concepts and more than 26,000 naturalistic object images. PLOS ONE, 14(10):e0223792, 2019.
A Optimization Method
A.1 Overview
Optimization is performed by starting from a random orthogonal matrix, and iteratively improving it using gradient ascent. We calculate gradients by projecting the Euclidean gradient into the tangent space of . Then an update is performed using the Adam optimizer [29] and the resulting is mapped back into using Singular Value Decomposition. We also explored updating according to the Euclidean gradient and mapping the result back into , however this was found to be much less effective. We use a continuation strategy during the optimization process by starting with a large , and progressively decreasing it.
The process is typically restarted with different random initializations until an matrix satisfying a specified threshold for is found. Alternatively, a fixed number of restarts can be used, retaining the solution with the highest score. Our experiments indicate that multiple restarts improve the likelihood of finding a desirable maximum of the objective function.
A.2 Riemannian Gradient
The Euclidean gradient can, and often will point away from the constraint set:
Therefore, for the best optimization on , we project it into the tangent space of :
Where:
Then, in order to move towards optimizing our objective, we take a positive gradient step, and retract on to the orthonormal group:
A.3 Bandwidth Continuation
Instead of optimizing a single kernel, we lower the hyperparameter, solving a sequence:
And at each stage, we initialize from the previous solution. Intuitively, at large , the objective function will be highly smooth, considering many pairs and will be nearly concave. At smaller , it will only consider local nearby pairs and therefore be highly nonconcave. We can think of this process as a continuation from global distribution alignment, to cluster alignment, to local point alignment.
A.4 Learning Rate Scheduling
Our optimization algorithm uses a cosine annealing decay. Given hyperparameters and we decay according to:
A.5 Early Stop Heuristic
Due to the nature of the problem, many restarts are needed to obtain useful results, because many runs will converge to undesirable local minima. This is because when the kernel bandwidth is large at the beginning of the optimization, many potential symmetries exist, however they often lead to an incorrect alignment. As the kernel bandwidth is decreased, the symmetries which existed at a high bandwidth may cease to be present, causing the optimization to be stuck at an undesirable local maxima. Therefore we find it necessary to restart the optimization algorithm many times to increase the chances of finding a desirable objective function maxima.
Due to the computational resources required to perform this across many restarts, we investigated the possibility of doing early stops during the optimization process in order to end runs with lower chances of finding a desirable maxima. By observing Figure 2, we see that in by the mid stage, it is not possible to know exactly which run will be the maximum, however it is for later stages. In some experiments, we determined an threshold for the final stage, and stopped restarts below the threshold at the beginning of the final stage.
B Hyperparameter Experiment
While we have found useful results from HGA, it is still highly unstable. Often, small tweaks to hyperparameters have inexplicably large effects on the outcome of the alignment task (eg. model stitching accuracy). We performed a study on the hyperparameters of HGA for performing model stitching on every layer of a model trained on CIFAR10. For each of the following hyperparameters, we tried tweaking them in several variations and viewing the impact that this had on the model stitching accuracy. After this experiment was performed, we record the hyperparameter configurations with the best stitching accuracies in Table 2. While the experiment was unable to find a way to make HGA stable, it did reveal an ideal configuration of hyperparameters, and yielded stitching accuracy comparable to their fully supervised counterparts for each layer. We find that it is optimal to start with a large of around 4, and work down to a smaller of around 0.1.
B.1 Anchor Corruption Test
An interesting experiment to showcase the properties of the HGA method is observing how robust alignment methods are to corrupted anchors. Given latent space samples from two neural networks, we progressively swapped out anchors with correspondences to points from incorrect classes. For each alignment method, we observe how this effects the stitching accuracy. We find that in the latent spaces of two neural networks trained on the MNIST dataset, HGA is able to have a nearly unchanged stitching accuracy, even with up to 85% of its anchors corrupted.
Optimization objective history: cifar10_convmlp_1 vs cifar10_convmlp_2, layer 7

Figure 2: Objective function score at vs optimization step for 10 random orthogonal matrix initializations. Color denotes the final objective function score reached. Noticeable jumps are due to a decrease in for the objective function being used to compute optimization gradient.
| Layer | LR | LR final | Stitching Acc. (HGA unsupervised) | Stitching Acc. (Ortho Supervised) | ||
|---|---|---|---|---|---|---|
| 4 | 0.1 | 4 | 0.1 | 0.0005 | 70% | 70% |
| 5 | 0.1 | 4 | 0.1 | 0.0005 | 62% | 71% |
| 6 | 0.1 | 4 | 0.1 | 0.001 | 75% | 73% |
| 7 | 0.2 | 4 | 0.01 | 0.0005 | 75% | 76% |
| 8 | 0.1 | 4 | 0.01 | 0.0005 | 76% | 77% |
Table 2: CIFAR10 best unsupervised stitching accuracies and corresponding hyperparameters for each model layer. Results from an experiment running the optimization algorithm with a single restart and different hyperparameters for each run. Far right column shows stitching accuracy for orthogonal least squares solution with 1024 anchor points.
C Verifying the Usefulness of the Objective Function for Unsupervised Alignment
Since the algorithm can often be unstable, it is necessary to know whether the objective function maxima that it has discovered is useful in applications which involve unsupervised latent space communication. Therefore, we wish to validate how well the value of the objective function corresponds to a “correct fit” between latent spaces being discovered. We do this by looking at the correlation between the best objective function value, and model stitching accuracy for CIFAR10 and CIFAR100. We performed the optimization for various hyperparameters, and then for each resulting matrix, computed the objective function at different values of . The results of this experiment are shown in Figure 4. Upon examining the results from this figure, we make two important observations:
-
For a value of , there is a strong correlation between objective function value and stitching accuracy in the regime of high objective function value.
-
For larger values of we see that a high objective function value is necessary but not sufficient for high stitching accuracy.

Figure 3: Percent of Anchors Corrupted vs. Model Stitching Accuracy for the latent spaces of two neural networks trained on the MNIST dataset.

(a)
(b)
(c)
(d)
(e)
(f)
Figure 4: Scatter plots show objective function scores vs stitching accuracies for various optimization trials with slightly different optimization hyperparameters on CIFAR10.

(a) MNIST

(b) CIFAR10
(c) CIFAR100

(d) MNIST
(e) CIFAR10
(f) CIFAR100
Figure 5: Implied kernel subsets and model stitching confusion matrices for unsupervised stitching in MNIST, CIFAR10, and CIFAR100
D Model Stitching Supplemental Information
Model stitching is an important task to demonstrate the effectiveness of HGA at unsupervised latent space communication. After using the optimization algorithm to find a desirable matrix, we wish to see how well it can find correspondences between points, and classes between the two latent spaces. In order to compare points between the different latent spaces, we define a kernel function: by:
By examining the top row of Figure 5, we see the kernel values for a random subset from each dataset, organized by class. We can qualitatively observe that the kernel is adept at recovering the correspondences between points from their respective latent space positions.
E Qualitative Results for FastText Alignment
Finding alignment between FastText word embeddings is a useful example to show how HGA can use the anchors that it has been provided, and make new inferences about how the Latent Spaces can be aligned. In figure 6 we can see this demonstrated. In this example, 100 anchor words are given to the HGA and LFM [7] methods. While both are able to effectively represent known correspondences between the same words, we see that HGA is also able to infer correspondences between words which are not in the anchor list.
F Experiments with Distribution Matching
As part of this work, it is relevant to investigate whether or not separate latent spaces match. We performed two small experiments investigating how well we can locate a mismatch between latent
| LFM | HGA | ||||
|---|---|---|---|---|---|
| R | Word | Score | R | Word | Score |
| dog (in anchor list) | |||||
| 1 | chien | 0.050 | 1 | chien | 0.929 |
| 2 | chat | 0.040 | 2 | chiens | 0.692 |
| 3 | animaux | 0.031 | 3 | chat | 0.683 |
| 4 | peau | 0.028 | 4 | animal | 0.609 |
| 5 | espèce | 0.021 | 5 | chats | 0.583 |
| 6 | poisson | 0.021 | 6 | cheval | 0.513 |
| 7 | bébé | 0.021 | 7 | animaux | 0.452 |
| 8 | enfant | 0.018 | 8 | bébé | 0.443 |
| 9 | homme | 0.018 | 9 | enfant | 0.399 |
| 10 | espèces | 0.017 | 10 | maman | 0.389 |
| house (in anchor list) | |||||
| 1 | maison | 0.046 | 1 | maison | 0.795 |
| 2 | maisons | 0.040 | 2 | villa | 0.541 |
| 3 | Maison | 0.035 | 3 | jardin | 0.536 |
| 4 | appartement | 0.030 | 4 | garage | 0.516 |
| 5 | immobilier | 0.027 | 5 | appartement | 0.505 |
| 6 | terrain | 0.023 | 6 | maisons | 0.492 |
| 7 | vente | 0.021 | 7 | Maison | 0.483 |
| 8 | pierre | 0.020 | 8 | chambre | 0.481 |
| 9 | village | 0.020 | 9 | immeuble | 0.468 |
| 10 | jardin | 0.020 | 10 | château | 0.458 |
| bird (not in anchor list) | |||||
| 1 | Posté | 0.041 | 1 | poisson | 0.447 |
| 2 | poisson | 0.030 | 2 | poulet | 0.437 |
| 3 | ciel | 0.030 | 3 | chat | 0.432 |
| 4 | Fichier | 0.027 | 4 | arbre | 0.389 |
| 5 | restaurant | 0.025 | 5 | chien | 0.383 |
| 6 | † | 0.025 | 6 | animal | 0.371 |
| 7 | vitesse | 0.025 | 7 | oiseau | 0.366 |
| 8 | Institut | 0.025 | 8 | pomme | 0.341 |
| 9 | pont | 0.024 | 9 | bateau | 0.332 |
| 10 | Service | 0.023 | 10 | jardin | 0.320 |
| LFM | HGA | ||||
|---|---|---|---|---|---|
| R | Word | Score | R | Word | Score |
| horse (not in anchor list) | |||||
| 1 | chien | 0.037 | 1 | chien | 0.480 |
| 2 | chat | 0.032 | 2 | cheval | 0.416 |
| 3 | voiture | 0.031 | 3 | pied | 0.396 |
| 4 | John | 0.026 | 4 | animal | 0.375 |
| 5 | Livraison | 0.026 | 5 | chat | 0.359 |
| 6 | animaux | 0.026 | 6 | chiens | 0.349 |
| 7 | peau | 0.025 | 7 | homme | 0.342 |
| 8 | compagnie | 0.025 | 8 | poulet | 0.315 |
| 9 | police | 0.025 | 9 | marche | 0.309 |
| 10 | russe | 0.024 | 10 | pieds | 0.309 |
| flower (not in anchor list) | |||||
| 1 | arbre | 0.041 | 1 | jardin | 0.519 |
| 2 | étoile | 0.041 | 2 | arbre | 0.448 |
| 3 | lit | 0.039 | 3 | fleur | 0.407 |
| 4 | TV | 0.035 | 4 | motif | 0.387 |
| 5 | argent | 0.034 | 5 | vert | 0.387 |
| 6 | étoiles | 0.032 | 6 | arbres | 0.377 |
| 7 | or | 0.031 | 7 | thé | 0.374 |
| 8 | importance | 0.031 | 8 | rose | 0.370 |
| 9 | bébé | 0.030 | 9 | plante | 0.370 |
| 10 | amour | 0.029 | 10 | coton | 0.366 |
| forest (not in anchor list) | |||||
| 1 | vert | 0.046 | 1 | forêt | 0.495 |
| 2 | rivière | 0.040 | 2 | arbre | 0.453 |
| 3 | bleu | 0.034 | 3 | forêts | 0.410 |
| 4 | forêt | 0.031 | 4 | montagne | 0.406 |
| 5 | zone | 0.031 | 5 | arbres | 0.392 |
| 6 | Posté | 0.031 | 6 | village | 0.385 |
| 7 | orange | 0.031 | 7 | sauvage | 0.375 |
| 8 | sources | 0.028 | 8 | paysage | 0.374 |
| 9 | Date | 0.027 | 9 | naturel | 0.373 |
| 10 | " | 0.027 | 10 | jardin | 0.363 |
Figure 6: Qualitative comparison of nearest French neighbours retrieved by LFM and HGA for English query words, given 100 anchor words. Correct translations are shown in bold. For anchor words (dog, house) both methods rank the correct translation first, but for words absent from the anchor list (bird, horse, flower, forest) LFM largely returns unrelated or noisy tokens, whereas HGA still recovers the correct translation.
spaces. Formally, suppose that we have two spaces and , a transformation between them and a kernel function . For this experiment, we use the Gaussian Kernel between the transformed target space points, and the source space points:
With some arbitrary . For any point , we quantify how much it is contained in the distribution of by computing the mean similarity between and every other point in :
F.1 Missing Class Detection
The first experiment with this involves detecting points that have trained representations in one neural network, but not the other. We trained a model to perform image classification on the MNIST dataset, however the “0” class was excluded from the dataset. Then we tested various alignment methods between the latent space of the missing class model, and a regular model trained on MNIST with all of the anchors included. By observing Figure 7, we can see that samples from the missing class have very low kernel values. Visibly, samples in the target latent space which correspond to the missing class do not have similarity to any points in the source space. Furthermore, by viewing 8, we can see that for multiple alignment methods, the kernel sum values for the excluded class are much lower than the regular classes. Using this kernel sum metric, we can effectively locate a region of the latent space geometry which is present in the target latent space, but not the source latent space.

Figure 7: Subset of kernel between a model trained on MNIST excluding the “0” class, and a regular model trained on MNIST

(a) Ortho

(b) HGA
Figure 8: Kernel sum distributions for each class between a model trained on MNIST excluding the “0” class, and a regular model trained on MNIST
F.2 Image Embedding Model Alignment
An interesting qualitative result is the comparison of the latent spaces for image embedding models. We find that we can qualitatively locate differences in the embedding spaces of different image encoder models. In this setting, we use an image encoder which was trained exclusively on image data (DINO-V2 [30]) as our source space, and an image encoder which was trained with image and text data (CLIP-image [31]) as our target latent space. We generate embeddings for images from the THINGS [32] dataset, and compute the kernel sum score for each image in the target (CLIP-image) space. By observing Table 3, we see that concepts with the lowest kernel sums tend to be the most related to textual information. Intuitively, this makes sense, because the latent space for the multimodal model (CLIP-image) can be expected to have more unique representations for textual data, compared to the model trained entirely on image embeddings.
Table 3: Concepts from the THINGS dataset with the lowest average kernel sums. We show results using three different alignment methods (ranked ascending).
| Rank | Orthogonal Procrustes | Latent Functional Maps | Spherical Alignment |
|---|---|---|---|
| 1 | banner | pennant | banner |
| 2 | pennant | banner | pennant |
| 3 | minivan | tag | scoreboard |
| 4 | scoreboard | jersey | tag |
| 5 | tag | game | jersey |
| 6 | woman | visor | board game |
| 7 | jersey | scoreboard | minivan |
| 8 | board game | tattoo | game |
| 9 | tugboat | board game | visor |
| 10 | football helmet | patch | woman |
| 11 | game | cleat | football helmet |
| 12 | visor | face mask | tattoo |
| 13 | patch | sticker | cleat |
| 14 | cleat | juicer | cassette |
| 15 | tattoo | woman | patch |
| 16 | seaplane | lip gloss | badge |
| 17 | bobsled | football helmet | diskette |
| 18 | van | juicer | tugboat |
| 19 | gravestone | minivan | t-shirt |
| 20 | diskette | spark plug | van |