Bootstrapping Parallel Anchors for Relative Representations

Irene Cannistraci, Luca Moschella, Valentino Maiorca, Marco Fumero, Antonio Norelli, Emanuele Rodolà · Submission to Tiny Papers @ ICLR

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:

  1. Initialization: A small set of known parallel anchors (the seed) is used, with remaining anchor slots filled with random noise.
  2. Relative Mapping: Data in both domains are projected into relative representations based on current anchors.
  3. Correspondence Estimation: The Sinkhorn algorithm is employed to find a soft mapping between spaces, utilizing optimal transport to guess correspondences based on geometric structure.
  4. 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.
  5. 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.

Qualitative and quantitative comparison of latent space alignment between Word2Vec (W2V) and FastText (FT).

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

Abstract

The use of relative representations for latent embeddings has shown potential in enabling latent space communication and zero-shot model stitching across a wide range of applications. Nevertheless, relative representations rely on a certain amount of parallel anchors to be given as input, which can be impractical to obtain in certain scenarios. To overcome this limitation, we propose an optimization-based method to discover new parallel anchors from a limited known set (seed). Our approach can be used to find semantic correspondence between different domains, align their relative spaces, and achieve competitive results in several tasks.
BibTeX
@misc{cannistraci2023bootstrapping,
  author = {Irene Cannistraci and Luca Moschella and Valentino Maiorca and Marco Fumero and Antonio Norelli and Emanuele Rodolà},
  title = {{Bootstrapping Parallel Anchors for Relative Representations}},
  year = {2023},
  eprint = {2303.00721},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2303.00721},
}
Figure