{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/fisher-discriminant-triplet-and-contrastive","title":"Fisher Discriminant Triplet and Contrastive Losses for Training Siamese Networks","arxiv_id":"2004.04674","date":"2020-04-05","proceeding":null,"authors":["Benyamin Ghojogh","Milad Sikaroudi","Sobhan Shafiei","H. R. Tizhoosh","Fakhri Karray","Mark Crowley"],"abstract":"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.","url_abs":"https://arxiv.org/abs/2004.04674v1","url_pdf":"https://arxiv.org/pdf/2004.04674v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"fisher-discriminant-triplet-and-contrastive","repo_url":"https://github.com/bghojogh/Fisher-Triplet-Contrastive-Loss","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":null}],"tasks":[{"task_slug":"classification-of-breast-cancer-histology","task_name":"Classification Of Breast Cancer Histology Images"},{"task_slug":"dimensionality-reduction","task_name":"Dimensionality Reduction"},{"task_slug":"domain-generalization","task_name":"Domain Generalization"},{"task_slug":"histopathological-image-classification","task_name":"Histopathological Image Classification"},{"task_slug":"metric-learning","task_name":"Metric Learning"},{"task_slug":null,"task_name":"Triplet"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":null,"mcp":null,"developers":"https://syntology.ai/developers"},"arxiv_metadata":null,"syntology_extracted_results":null}