Harnessing Geometric Constraints from Auxiliary Labels to Improve Embedding Functions for One-Shot Learning

Anand Ramakrishnan, Minh Pham, Jacob WhitehillarXiv 2021

Abstract

For the task of face verification, we explore the utility of harnessing auxiliary facial emotion labels to impose explicit geometric constraints on the embedding space when training deep embedding models. We introduce several novel loss functions that, in conjunction with a standard Triplet Loss or ArcFace loss, provide geometric constraints on the embedding space; the labels for our loss functions can be provided using either manually annotated or automatically detected auxiliary emotion labels. Our method is implemented purely in terms of the loss function and does not require any changes to the neural network backbone of the embedding function.

Introduction

The primary objective of face verification is to map facial images into a mathematical embedding space where images of the same individual are clustered closely, while images of different individuals are distinctly separated. A significant challenge in this domain is intra-class variance: the same person can look remarkably different due to changes in facial expression, lighting, or pose. These variations often lead to "messy" clusters where identity boundaries overlap, degrading model performance.

While traditional approaches like Multi-Task Learning (MTL) attempt to address this by training models to predict both identity and emotion, MTL provides only implicit regularization. This paper proposes a shift toward explicit geometric constraints, mathematically dictating the organization of auxiliary emotion labels within each identity cluster to ensure a more robust and separable latent space.

Methodology

The authors introduce four novel loss functions designed to be used as modular additions to standard baseline losses like Triplet Loss or ArcFace. These constraints act directly on the embedding space during the training phase.

Conceptual comparison of embedding space constraints: No constraints, Pairwise Distance Minimization (PDM), Pairwise Distance Preservation (PDP), Fixed Basic Vector (FBV), and Compositional Embeddings (CE).

1. Pairwise Distance Minimization (PDM)

PDM functions as a form of hierarchical clustering. It specifically pulls together embeddings of the same person that share the same emotion label. This encourages the formation of distinct emotion "mini-clusters" within the broader identity cluster, reducing the spread caused by expression variance.

2. Pairwise Distance Preservation (PDP)

PDP ensures that the relative distance between specific emotion pairs (e.g., the distance from "Happy" to "Neutral") remains consistent across all identities in the dataset. This forces the network to learn a universal representation of emotional transitions.

3. Fixed Basic Vector Separation (FBV)

FBV is a more rigid iteration of PDP. It mandates that the transition between two emotions aligns with a specific, fixed Euclidean vector. For instance, the vector path from "Neutral" to "Anger" is forced to be mathematically identical for every subject. To accommodate this vector addition, the authors remove standard hypersphere constraints, allowing embeddings to exist in unconstrained Euclidean space.

4. Compositional Embeddings (CE)

CE serves as a non-linear extension of FBV. Rather than using a rigid vector, a secondary 3-layer fully connected neural network is trained to learn the transformation. This sub-network estimates what a person's embedding should look like under a target emotion, given their current embedding and the target label.

Geometric Structuring of the Latent Space

The core innovation lies in the transition from implicit to explicit structure. By mathematically defining the layout of emotions within the latent space, the model prevents extreme expressions from causing identity "bleeding," where a heavily distorted face might otherwise fall into the cluster of a different individual.

PCA visualization of the embedding space showing the organization of identity clusters and emotion sub-clusters under geometric constraints.

As visualized in the PCA plots, these constraints result in highly organized clusters. This structured approach ensures that intra-class variance is not just suppressed, but modeled predictably. Because these methods are implemented entirely through loss functions, they are "plug-and-play," requiring no modifications to the underlying convolutional neural network (CNN) architecture.

Conclusion

By harnessing auxiliary labels to impose explicit geometric constraints, this research provides a modular framework for improving face verification. The proposed loss functions—PDM, PDP, FBV, and CE—offer varying degrees of rigidity to tame intra-class variance, resulting in a more disciplined and effective embedding space for one-shot learning tasks.

Summary updated

Abstract

For the task of face verification, we explore the utility of harnessing auxiliary facial emotion labels to impose explicit geometric constraints on the embedding space when training deep embedding models. We introduce several novel loss functions that, in conjunction with a standard Triplet Loss [43], or ArcFace loss [10], provide geometric constraints on the embedding space; the labels for our loss functions can be provided using either manually annotated or automatically detected auxiliary emotion labels. Our method is implemented purely in terms of the loss function and does not require any changes to the neural network backbone of the embedding function.
BibTeX
@misc{ramakrishnan2021harnessing,
  author = {Anand Ramakrishnan and Minh Pham and Jacob Whitehill},
  title = {{Harnessing Geometric Constraints from Auxiliary Labels to Improve Embedding Functions for One-Shot Learning}},
  year = {2021},
  eprint = {2103.03862},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2103.03862},
}
Figure