Introduction
Neural networks are often characterized as "black boxes" with internal latent spaces—mathematical representations of data—that are unique to their specific training conditions. Even when trained on identical datasets, variations in initialization, hyperparameters, or architecture lead to disparate organizational structures in these spaces. This lack of alignment poses a significant challenge for latent space communication, hindering the ability to merge models, reuse pre-trained modules, or perform "stitching" (e.g., connecting a vision encoder to a text decoder) without intensive re-training or complex alignment procedures.
Methodology: The Product of Invariances
This work builds upon Relative Representations (RR), which represent data points not by absolute coordinates but by their relationships (similarities) to a set of fixed "anchor" points. While previous research suggested latent spaces are related by simple geometric transformations like rotations, this paper argues that real-world transformations are far more complex.
The core innovation is the Product of Invariances. Instead of relying on a single similarity measure, the framework utilizes a set of diverse distance metrics simultaneously:
- Cosine Similarity: Invariant to isotropic scaling.
- Euclidean Distance ($L_2$): Invariant to orthogonal transformations (rotations/reflections).
- Manhattan Distance ($L_1$): Invariant to permutations.
- Chebyshev Distance ($L_\infty$): Captures distinct structural properties.
These individual relative spaces are combined via an Aggregation Function ($\phi$). Among various strategies tested, Aggregation by Sum (MLP+Sum)—where each space is non-linearly projected and then summed—proved most robust, creating a flexible "bridge" capable of capturing non-trivial transformations between models.
Empirical Findings: The Need for Flexibility
A primary finding of this research is that no single geometric invariance connects all latent spaces universally. As demonstrated across various architectures and modalities, a metric that aligns two vision models may fail entirely for text models.
By employing a product of invariances, the model avoids the need to select the "correct" transformation a priori. The resulting product space is sufficiently flexible to automatically capture the specific relationship between any two models. Furthermore, when using self-attention for aggregation, the system effectively learns which invariance is most critical for a given task.
Results and Applications
The most significant application of this framework is zero-shot stitching. This allows an encoder from one model to be plugged into the decoder of another with immediate functionality. In zero-shot stitching tasks on CIFAR-100, the "Product of Invariances" approach achieved an accuracy of 0.81, surpassing the 0.79 achieved by Cosine similarity alone.
The authors also introduced a Stitching Index to quantify performance loss during module swapping. Their method frequently achieved an index near 1.0, indicating that the stitched model performs nearly as well as the original end-to-end architecture. This success was consistent across vision, text (using models like BERT and RoBERTa), and graph data (CORA dataset).
Conclusion
The "Product of Invariances" framework provides a robust "universal translator" for neural network latent spaces. By combining multiple geometric perspectives, it enables efficient, zero-shot communication between disparate models. Future work may explore learning these similarity functions directly from data to capture even more complex transformations and optimizing anchor selection for high-dimensional efficiency.
Summary updated