Introduction
Deep learning models typically represent data in a high-dimensional "latent space." While these spaces capture semantic relationships, they are notoriously unstable. Training the same architecture twice on identical data with different random seeds results in "incoherent" latent spaces—one might be rotated, scaled, or reflected relative to the other. This incoherence prevents the direct reuse or "stitching" of components (e.g., using Encoder A with Decoder B) without costly retraining of alignment layers.
The Problem of Incoherent Latent Spaces
The instability of absolute coordinate systems in neural networks is a fundamental barrier to modularity. As shown in the figure below, independent training runs produce distinct geometric arrangements of the same data classes, even when the underlying semantic structure is identical.
Methods: Relative Representations via Anchor Projection
To overcome this, the authors propose shifting from absolute coordinates to relative representations. Instead of defining a point $x$ by its raw vector output, it is defined by its relationship to a set of fixed "anchors" ($a_1, a_2, ..., a_k$).
- Anchor Selection: A subset of data points is chosen to serve as reference anchors. These can be from the training set or even out-of-distribution data.
- Similarity Projection: Each sample is represented as a vector of cosine similarities to these anchors: $r(x) = [sim(x, a_1), ..., sim(x, a_k)]$.
- Invariance: Because cosine similarity is invariant to rotations, reflections, and isotropic scaling, the resulting representation $r(x)$ remains stable across different models that have learned the same underlying semantic structure.
Experimental Validation
The authors validated their approach across a massive variety of modalities, including images (MNIST, CIFAR, ImageNet), text (Amazon Reviews, WikiMatrix), and graphs (Cora, PubMed).
Zero-Shot Model Stitching
The primary breakthrough is the ability to perform zero-shot model stitching. By using relative representations, an encoder from one model can be plugged directly into the decoder of another without any additional training or fine-tuning.
- Word Embeddings: Aligning FastText and Word2Vec achieved a Mean Reciprocal Rank (MRR) of 0.94 to 0.98, compared to zero overlap using absolute coordinates.
- Image Reconstruction: In Autoencoder stitching, relative representations reduced Mean Squared Error (MSE) by up to two orders of magnitude. Stitched models produced recognizable images, while absolute ones produced noise.
- Cross-Architecture: The method even allowed stitching a RexNet-100 decoder to Vision Transformer (ViT) encoders on ImageNet, maintaining an F1 score of ~72% despite the radical difference in architectures.
Key Insights and Limitations
The core finding is that neural networks naturally converge to a similar "semantic manifold" regardless of initialization. Relative representations provide a "universal language" for these manifolds, enabling communication between models "out of the box."
However, the method has limitations:
- Anchor Selection: Performance depends on the number and quality of anchors; the authors found that 300–700 anchors usually suffice, but optimal selection remains an open question.
- Computational Cost: Calculating similarities against anchors adds computational overhead to every forward pass.
- Non-Linear Warping: While invariant to linear transformations, the method may struggle with complex non-linear distortions between latent spaces. Future work may explore geodesic distances to handle these cases.
Summary updated