# Fisher Discriminant Triplet and Contrastive Losses for Training Siamese Networks

arXiv: https://arxiv.org/abs/2004.04674 · HTML: https://mlsanity.com/paper/2004.04674/

## Key facts

- Cited by 15 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 5 Apr 2020.

## Built on by (most cited first, 15 of 15)

- [Deep Gait Recognition: A Survey](https://mlsanity.com/paper/2102.09546/) (2021)
- [Uniform Manifold Approximation and Projection (UMAP) and its Variants: Tutorial and Survey](https://mlsanity.com/paper/2109.02508/) (2021)
- [Spectral, Probabilistic, and Deep Metric Learning: Tutorial and Survey](https://mlsanity.com/paper/2201.09267/) (2022)
- [Generalized Inter-class Loss for Gait Recognition](https://mlsanity.com/paper/2210.06779/) (2022)
- [GaitMPL: Gait Recognition with Memory-Augmented Progressive Learning](https://mlsanity.com/paper/2306.04650/) (2023)
- [Magnification Generalization for Histopathology Image Embedding](https://mlsanity.com/paper/2101.07757/) (2021)
- [What can we Learn by Predicting Accuracy?](https://mlsanity.com/paper/2208.01358/) (2022)
- [Siamese Content-based Search Engine for a More Transparent Skin and Breast Cancer Diagnosis through Histological Imaging](https://mlsanity.com/paper/2401.08272/) (2024)
- [Vector Transport Free Riemannian LBFGS for Optimization on Symmetric Positive Definite Matrix Manifolds](https://mlsanity.com/paper/2108.11019/) (2021)
- [Learning Physics Properties of Fabrics and Garments with a Physics Similarity Neural Network](https://mlsanity.com/paper/2112.10727/) (2021)
- [VISHIEN-MAAT: Scrollytelling visualization design for explaining Siamese Neural Network concept to non-technical users](https://mlsanity.com/paper/2304.03288/) (2023)
- [Comparing Contrastive and Triplet Loss: Variance Analysis and Optimization Behavior](https://mlsanity.com/paper/2510.02161/) (2025)
- [About Explicit Variance Minimization: Training Neural Networks for Medical Imaging With Limited Data Annotations](https://mlsanity.com/paper/2105.14117/) (2021)
- [Enhancing Binary Encoded Crime Linkage Analysis Using Siamese Network](https://mlsanity.com/paper/2511.07651/) (2025)
- [Variance & Greediness: A comparative study of metric-learning losses](https://mlsanity.com/paper/2601.21450/) (2026)

## Abstract (arXiv)

Siamese neural network is a very powerful architecture for both feature extraction and metric learning. It usually consists of several networks that share weights. The Siamese concept is topology-agnostic and can use any neural network as its backbone. The two most popular loss functions for training these networks are the triplet and contrastive loss functions. In this paper, we propose two novel loss functions, named Fisher Discriminant Triplet (FDT) and Fisher Discriminant Contrastive (FDC). The former uses anchor-neighbor-distant triplets while the latter utilizes pairs of anchor-neighbor and anchor-distant samples. The FDT and FDC loss functions are designed based on the statistical formulation of the Fisher Discriminant Analysis (FDA), which is a linear subspace learning method. Our experiments on the MNIST and two challenging and publicly available histopathology datasets show the effectiveness of the proposed loss functions.
