Introduction
Relative representations provide a framework for neural networks to communicate by describing data points through their similarities to a set of reference "anchors." While effective, the utility of these representations is often limited by the requirement for a large set of manually aligned parallel anchors across different models or modalities. This paper introduces Anchor Optimization (AO), a bootstrapping method designed to expand a minimal initial seed into a robust set of anchors, significantly reducing supervision requirements by an order of magnitude.
The Challenge of Latent Space Alignment
Deep learning models typically develop idiosyncratic latent spaces—internal coordinate systems—even when trained on identical datasets. This divergence complicates model stitching and direct comparison. Relative representations address this by mapping data points to a space defined by cosine similarities to fixed anchors. If two models share "parallel anchors" (e.g., semantic equivalents like "dog" in English and "perro" in Spanish), their latent spaces can be aligned. However, obtaining hundreds of such pairs is often impractical for niche domains. AO addresses this by asking: Can we discover a full set of anchors starting from just a handful?
Anchor Optimization (AO) Methodology
The proposed AO method is an iterative process that leverages the underlying geometric consistency of latent spaces:
- Initialization: A small set of known parallel anchors (the seed) is used, with remaining anchor slots filled with random noise.
- Relative Mapping: Data in both domains are projected into relative representations based on current anchors.
- Correspondence Estimation: The Sinkhorn algorithm is employed to find a soft mapping between spaces, utilizing optimal transport to guess correspondences based on geometric structure.
- Optimization: The process minimizes the Mean Squared Error (MSE) between aligned relative representations, constraining optimized anchors to the unit hypersphere to preserve valid cosine similarities.
- Discretization: Optimized "synthetic" anchors are replaced with the nearest actual data embeddings in the target domain.
Experimental Evaluation
The researchers evaluated AO across three distinct domains:
- NLP: Aligning English embeddings from FastText and Word2Vec (~20k words).
- Cross-lingual NLP: Aligning English and Spanish latent spaces using the Multilingual Amazon Reviews dataset for zero-shot sentiment classification.
- Computer Vision: Aligning different Vision Transformer (ViT) architectures (base vs. small) on CIFAR-10.
Results and Analysis
The AO method consistently outperformed seed-only approaches and approached the performance of ground truth (GT) sets containing 300 anchors.
Key findings include:
- Retrieval Performance: In the Word2Vec to FastText alignment task, the seed-only approach yielded a negligible Jaccard similarity of 0.06. AO improved this to 0.52, notably exceeding the Ground Truth (0.34) in certain metrics by identifying more task-optimal anchors.
- Geometric Recovery: Visualizations demonstrate that AO-optimized latent spaces successfully recover the cluster structures of the Ground Truth, whereas seed-based spaces remain disorganized.
- Zero-Shot Stitching: On the Amazon Reviews task, AO achieved an F-score of 0.48 for English-to-Spanish classification, nearly matching the 0.51 achieved with 300 manually aligned anchors.
Conclusion
Anchor Optimization demonstrates that the deep geometric structure shared by models trained on similar data allows for significant reductions in supervision. By bootstrapping anchors, AO enables efficient cross-model communication and zero-shot stitching with an order of magnitude less manual alignment, paving the way for more flexible and interoperable deep learning systems.
Summary updated