Introduction
Relative Similarity Learning (RSL) is a critical component in modern search, retrieval, and recommendation systems. Unlike traditional classification, RSL learns similarity functions from relative constraints (e.g., "A is more similar to B than to C"). However, existing RSL methods face significant scalability challenges. Most are batch-based, requiring all data upfront and involving computationally expensive operations like Positive Semi-Definite (PSD) matrix projections. Furthermore, they typically focus on single-task learning, failing to leverage shared patterns across related tasks or forcing task-specific nuances into a single global model.
This paper introduces OMTRSL (Online Multi-Task Relative Similarity Learning), a framework designed to process triplet constraints sequentially while sharing information across related tasks. By abandoning the PSD constraint and utilizing an active learning strategy, OMTRSL achieves massive speedups and high labeling efficiency.
The OMTRSL Framework
OMTRSL addresses the limitations of batch-based multi-task metric learning (like mtLMNN) through several key innovations:
- Online Passive-Aggressive Updates: The model processes incoming triplets one by one. When a triplet violates the desired similarity margin, the algorithm performs a closed-form update on the similarity matrices, ensuring rapid adaptation to streaming data.
- Task Information Sharing: A predefined task relationship matrix dictates how updates in one task propagate to others. This allows the model to find a middle ground between isolated single-task learning (which may suffer from data sparsity) and global learning (which may ignore task-specific features).
- Computational Efficiency: By removing the requirement for similarity matrices to be PSD, OMTRSL avoids the $O(d^3)$ cost of eigenvalue decomposition, making it highly scalable for high-dimensional data.
Active Learning for Triplet Constraints
Because the number of possible triplets grows cubically with the number of data points, obtaining human labels for every triplet is impractical. The authors propose OMTRSL-Active, which uses a margin-based stochastic sampling strategy. The model queries an annotator only when it is uncertain about a triplet's relative similarity. This focuses human effort on "hard" examples that are most informative for defining the similarity boundary.
Experimental Results
Efficiency and Speed
OMTRSL demonstrates dramatic improvements in training time compared to the batch-based mtLMNN. On the Isolet dataset (alphabet recognition), OMTRSL achieved a 16x speedup (14.7s vs 241.3s). On the higher-dimensional news20 dataset, the speedup reached 42x (126.4s vs 5371.4s).
Retrieval Accuracy
As shown in the performance metrics for the news20 dataset, OMTRSL consistently outperforms both the single-task online baseline (OSTRSL) and the global-task online baseline (OGRSL). It maintains competitive accuracy with the much slower batch-based mtLMNN, proving that the online approach does not sacrifice retrieval quality.
Active Learning Efficacy
The active learning variant proves exceptionally efficient. Experimental results indicate that OMTRSL-Active can reach performance within 5% of a fully supervised model using less than 20% of the total available queries. It matches the full model's performance using only approximately 40% of the training labels.
Conclusion
OMTRSL provides a scalable and effective solution for multi-task similarity learning in streaming environments. By combining online updates with cross-task information sharing and active learning, it overcomes the computational and labeling bottlenecks of traditional RSL. Future research will focus on developing adaptive task relationship matrices to automatically learn correlations between tasks during the training process.
Summary updated