Abstract
Neural networks trained on similar data often develop disparate internal representations, creating a "Tower of Babel" problem for model integration. We present Inverse Relative Projection (IRP), a zero-shot method for translating latent spaces without retraining. By leveraging a small set of shared anchor points, IRP enables the stitching of encoders and classifiers across different architectures and modalities, facilitating modular AI composition.
The Challenge of Model Stitching
In deep learning, even models trained on identical datasets represent information in unique latent spaces. One model might represent a concept as a vector pointing "up," while another points "left." Traditionally, bridging these spaces—known as model stitching—requires training a dedicated translator layer on large datasets. This process is computationally expensive and necessitates simultaneous access to both models.
Methodology: Inverse Relative Projection (IRP)
IRP addresses this by mapping absolute coordinates into a shared, relative space. The method relies on three core components:
- Relative Representations: Instead of absolute coordinates, data is represented by its relationship (e.g., cosine similarity) to a set of fixed "anchor" points. This relative space is naturally invariant to rotations and translations.
- The Inversion Mechanism: The primary contribution is the mathematical formalization of the "backward" step. Given a representation in the shared relative space, IRP uses the anchors of a target model to project that representation back into the target's specific absolute coordinate system.
- Scale Invariance: Modern classifiers using ReLU and Softmax are largely insensitive to the absolute length of input vectors. IRP exploits this, focusing on preserving relative structure rather than absolute scale.
Ensuring Numerical Stability
Inverting transformations can be numerically unstable if anchor points are too similar. To make IRP robust, the authors introduced two key techniques:
- Anchor Pruning: Using Farthest Point Sampling to select the most distinct anchors, which lowers the "condition number" of the transformation matrices.
- Anchor Subspaces: An ensembling technique that divides anchors into multiple subspaces to improve reconstruction reliability.
Experimental Results
The authors validated IRP across diverse domains, demonstrating its versatility:
- Computer Vision: Achieved 0.92 accuracy on CIFAR-10 in a zero-shot stitching setting.
- Natural Language Processing: Successfully translated encodings between multi-lingual RoBERTa models (English, Spanish, French, Japanese) with ~0.97 cosine similarity.
- Cross-Modal Translation: Demonstrated the ability to encode an image via a Vision Transformer (ViT) and successfully classify it using a text-based RoBERTa classifier.
Key Insights
- Anchors as a Rosetta Stone: A small set of shared data points (e.g., 500 images) is sufficient to align entire latent universes.
- Independence: IRP allows for independent projection. A sample can be encoded into relative space today and decoded into a different model's space later without the two models ever interacting directly.
Limitations and Future Outlook
While effective, IRP requires semantically equivalent anchors across models, which may be difficult to find for models trained on vastly different distributions. Additionally, the intrinsic dimensionality of latent spaces may limit translation fidelity for highly complex manifolds. Future research may focus on automated anchor selection to further enable "modular AI," where specialized components can be swapped like building blocks.
Summary updated