TLDR: The Relationship Preserving Loss (RPL) is a new framework that uses neural networks to perform dimensionality reduction while preserving critical vector space properties like orthogonality and linear independence. It works by minimizing discrepancies between relationship matrices of high-dimensional data and its low-dimensional embeddings. Supported by matrix perturbation theory, RPL offers provable error bounds and has shown to maintain or improve performance in tasks like cross-modal retrieval, even with significant data compression. The framework is also applicable to other areas like cross-domain alignment and transfer learning.
Dimensionality reduction is a fundamental technique in machine learning, used to compress high-dimensional data for various benefits like computational efficiency, noise reduction, and easier visualization. However, many existing methods, such as PCA, t-SNE, and UMAP, often inadvertently distort crucial structural properties of the data, including orthogonality, angular relationships, and linear independence. These properties are vital for the effective performance of downstream tasks like cross-modal retrieval, clustering, and classification.
A new framework, the Relationship Preserving Loss (RPL), has been proposed to address these challenges. Developed by Eddi Weinwurm and Alexander Kovalenko, RPL is a novel loss function designed to train neural networks for non-linear projections, ensuring that essential vector space properties are maintained during the reduction process. The core idea behind RPL is to minimize the differences between “relationship matrices” of the original high-dimensional data and their corresponding low-dimensional embeddings. These relationship matrices, such as Gram or cosine matrices, capture the inherent structure and relationships within the data.
How RPL Works
At its heart, RPL works by comparing how data points relate to each other in their original high-dimensional space versus their reduced-dimensional representation. It uses a user-defined function, called a relationship function (𝜙), to compute these relationships. Common choices for 𝜙 include the dot product, which helps preserve orthogonality and linear relationships; cosine similarity, which is excellent for maintaining angles; covariance for statistical structure; and RBF kernels for capturing non-linear connections. The discrepancy between these relationship matrices is then measured using various discrepancy functions, such as Mean Squared Error or Absolute Error, which RPL aims to minimize during training.
To handle large datasets efficiently, RPL incorporates scalable techniques like sparse masking and mini-batch sampling. Masking strategies can focus the loss on the most significant relationships, further refining the preservation process. This flexibility allows RPL to be customized for different data types and preservation goals, making it a versatile tool for various applications.
Theoretical Guarantees and Practical Benefits
One of the significant contributions of the RPL framework is its strong theoretical foundation, backed by error bounds derived from matrix perturbation theory. These bounds provide quantifiable guarantees that properties like orthogonality, rank, and subspace structure are preserved up to a measurable distortion. For instance, if two vectors are orthogonal in the high-dimensional space, RPL guarantees that their low-dimensional counterparts will remain nearly orthogonal, with the deviation bounded by a quantifiable error term. This mathematical rigor ensures the reliability of the embeddings produced by RPL.
Initial experiments have demonstrated RPL’s effectiveness. In cross-modal retrieval tasks on the MS COCO 2017 dataset, RPL successfully compressed high-dimensional image embeddings (from 1024-D to 768-D and even 256-D) while maintaining or even slightly improving retrieval performance. This indicates that RPL can achieve substantial dimensionality reduction without sacrificing the quality of downstream tasks. Furthermore, qualitative evaluations on synthetic manifolds showed that RPL-trained projections accurately recover the original geometry and latent ordering, avoiding the common distortions and “foldovers” seen with other methods or randomly initialized networks. While RPL preserves manifold topology and relative relationships, it’s noted that it doesn’t preserve absolute orientation, which is an expected characteristic of its design.
Also Read:
- Balancing Data Privacy and Utility with Curvature-Guided Perturbation
- Data-Driven Surrogate Models for Continuum Mechanics: An Autoencoder Approach
Beyond Dimensionality Reduction
While the paper primarily focuses on dimensionality reduction, the authors highlight that the Relationship Preserving Loss framework has broader applicability. It can be extended to other areas such as cross-domain alignment, transfer learning, knowledge distillation, fairness and invariance, dehubbing, graph and manifold learning, and federated learning, where maintaining geometric consistency across distributed embeddings is crucial. This versatility positions RPL as a foundational tool for various machine learning challenges requiring the preservation of vector space properties.
The RPL framework represents a significant step forward in dimensionality reduction, offering a method that not only compresses data but also rigorously preserves its essential structural properties. Its combination of neural network flexibility, customizable relationship functions, and strong theoretical guarantees makes it a promising approach for creating reliable and high-performing low-dimensional embeddings. For more in-depth technical details, you can refer to the full research paper here.


