Class-Balanced Affinity Loss for Highly Imbalanced Tissue Classification in Computational Pathology

Taslim Mahbub, Ahmad Obeid, Sajid Javed, Jorge Dias, Naoufel Werghi

    Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

    1 Scopus citations


    Early detection of cancer, and breast cancer in particular, can have a positive impact on the survival rate of cancer patients. However, visual inspection by expert pathologists of whole-slide-images is subjective and error-prone given the lack of skilled pathologists. To overcome this limitation, many researchers have proposed deep learning driven approaches to detect breast cancer from histopathology images. However, these datasets are often highly imbalanced as patches belonging to the cancerous category is minor in comparison to the healthy cells. Therefore, when trained, the classification performance of the conventional Convolutional Neural Network (CNN) models drastically decreases, particularly for the minor class, which is often the main target of detection. This paper proposes a class balanced affinity loss function which can be injected at the output layer to any deep learning classifier model to address the imbalance learning. In addition to treating the imbalance, the proposal also builds uniformly spread class prototypes to address the fine-grained classification challenge in histopathology datasets, which conventional softmax loss cannot address. We validate our loss function performance by using two publicly available datasets with different levels of imbalance, namely the Invasive Ductal Carcinoma (IDC) and Colorectal cancer (CRC) datasets. In both cases, our method results in better performance, especially for the minority. We also observe a better 2D feature projection in multi-class classification with the proposed loss function, making it more apt to handle imbalanced fine-grained classification challenges.

    Original languageBritish English
    Title of host publicationPattern Recognition, Computer Vision, and Image Processing. ICPR 2022 International Workshops and Challenges - Proceedings
    EditorsJean-Jacques Rousseau, Bill Kapralos
    PublisherSpringer Science and Business Media Deutschland GmbH
    Number of pages15
    ISBN (Print)9783031376597
    StatePublished - 2023
    Event26th International Conference on Pattern Recognition, ICPR 2022 - Montréal, Canada
    Duration: 21 Aug 202225 Aug 2022

    Publication series

    NameLecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
    Volume13643 LNCS
    ISSN (Print)0302-9743
    ISSN (Electronic)1611-3349


    Conference26th International Conference on Pattern Recognition, ICPR 2022


    • Class-Balanced Affinity Loss
    • Cluster-based Feature Learning
    • Histopathology Cancer Diagnosis
    • Imbalanced Classification


    Dive into the research topics of 'Class-Balanced Affinity Loss for Highly Imbalanced Tissue Classification in Computational Pathology'. Together they form a unique fingerprint.

    Cite this