\section{Introduction}
\label{sec:introduction}

Deep learning techniques have revolutionized medical image analysis by providing powerful tools for tasks such as diagnosis, prognosis, and treatment planning~\cite{litjensSurveyDeepLearning2017,orenArtificialIntelligenceMedical2020,pinto-coelhoHowArtificialIntelligence2023}.
However, one significant challenge that persists in training deep learning models for medical image analysis is the presence of imbalanced data~\cite{mazurowskiTrainingNeuralNetwork2008,budaSystematicStudyClass2018, johnsonSurveyDeepLearning2019}.
In many medical datasets, the distribution of classes is often skewed, with certain classes representing the minority while others dominate. This class imbalance poses a substantial hurdle for conventional deep learning pipelines, as they tend to prioritize learning the majority classes at the expense of the minority ones. Consequently, models trained on imbalanced data may exhibit biased predictions, leading to suboptimal performance, particularly for the underrepresented classes critical for accurate diagnosis or prognosis.~\cite{cluceruImprovingNoninvasiveClassification2022,foltyn-dumitruImpactSignalIntensity2023}.
The resulting bias against minority classes can have potentially grave consequences for patients when utilizing detection and diagnosis systems based on such biased deep-learning classifiers.
This problem is further aggravated since commonly used metrics, such as unbalanced accuracy, convey overly optimistic results in imbalanced classification settings~\cite{haixiangLearningClassimbalancedData2017}.
More appropriate metrics for evaluating classification performance in imbalanced data settings, such as the Matthews correlation coefficient~(MCC)\cite{matthewsComparisonPredictedObserved1975, gorodkinComparingTwoKcategory2004} and F1 score, have been proposed.

Addressing class imbalance is crucial for developing robust and reliable deep learning models that can generalize well across diverse medical imaging datasets and yield clinically relevant insights. In this study, we focus on mitigating the effects of class imbalance in medical image classification tasks using novel approaches derived from imbalance-aware loss functions, aiming to improve the overall performance and equity across all classes. To this end, we comprehensively compare and analyze class-imbalance-aware loss functions in combination with and against established loss functions in two challenging datasets with imbalanced class distributions.
In summary, our contributions are as follows:
% my solution
\begin{enumerate}
    \item We investigate different loss formulations and introduce \textbf{new combinations of class-imbalance-aware losses} by integrating the MCC and F1 score with a cross-entropy loss.
    \item To this end, we \textbf{comprehensively compare} different strategies to address class imbalance, namely, class-imbalance-aware loss functions in combination with oversampling and per-sample weighting, and established loss functions.
    %, such as cross-entropy, and focal loss, and combinations of all these methods.
    \item We experimentally show that \textbf{class-imbalance-aware loss functions increase the performance} of challenging classification tasks on diverse medical imaging datasets, as well as the \textbf{discernability of class representations}.
\end{enumerate}
