Quasi-b2-Metric Spaces: A Unified Mathematical Framework for Asymmetric Three-Point Similarity in Computer Science
Keywords:
Quasi-b2 metric spaces, asymmetric similarity, triplet loss, deep metric learning, fixed-point theory, functional analysis, machine learningAbstract
The digital world is fundamentally asymmetric, yet classical metric spaces with their symmetry requirement are ill-suited for modelling directional relationships. While quasi-metrics address asymmetry, they are limited to two-point comparisons, failing to capture the three-point structures essential in modern machine learning, such as triplet-based learning. This paper introduces the quasi-b2-metric framework, a novel mathematical structure that generalizes quasi-metrics to three points while maintaining rigorous properties necessary for algorithmic analysis. We define the quasi-b2-metric axioms, establish a reduction lemma connecting it to classical quasi-b-metrics, and prove a two-sided contraction principle with explicit linear convergence rates. The framework is applied to five fundamental problems: deep metric learning, computer vision feature matching, natural language semantic similarity, bioinformatics sequence alignment, and recommendation systems. We provide complete theoretical proofs, PyTorch implementations, and numerical examples for each application. Experimental results across five diverse datasets demonstrate consistent improvements over symmetric baselines, with a 2.3% accuracy improvement in face recognition and a 31% reduction in convergence iterations for feature matching. The framework offers both rigorous mathematical foundations and practical tools for researchers in machine learning, computer vision, and data science.

