  With the emergence of deep learning, metric learning has gained significant
popularity in numerous machine learning tasks dealing with complex and
large-scale datasets, such as information retrieval, object recognition and
recommendation systems. Metric learning aims to maximize and minimize inter-
and intra-class similarities. However, existing models mainly rely on distance
measures to obtain a separable embedding space and implicitly maximize the
intra-class similarity while neglecting the inter-class relationship. We argue
that to enable metric learning as a service for high-performance deep learning
applications, we should also wisely deal with inter-class relationships to
obtain a more advanced and meaningful embedding space representation. In this
paper, a novel metric learning is presented as a service methodology that
incorporates covariance to signify the direction of the linear relationship
between data points in an embedding space. Unlike conventional metric learning,
our covariance-embedding-enhanced approach enables metric learning as a service
to be more expressive for computing similar or dissimilar measures and can
capture positive, negative, or neutral relationships. Extensive experiments
conducted using various benchmark datasets, including natural, biomedical, and
facial images, demonstrate that the proposed model as a service with
covariance-embedding optimizations can obtain higher-quality, more separable,
and more expressive embedding representations than existing models.
