Jong Chan Yeom, Eun Jin Han, Ah Young Kim, Young Jae Kim, Mona Choi, Kwang Gi Kim
Accurate classification of pressure injuries from clinical images remains challenging because clinical datasets are often small and class-imbalanced. We propose bidirectional weighted cross-entropy (BWCE), a conditional prediction-dependent cost-sensitive loss that assigns higher costs to minority-to-majority misclassification. BWCE combines a true-label weight for underrepresented classes with a predicted class weight for majority predicted classes and applies the joint factor only to misclassified samples. We evaluated BWCE on 853 pressure-injury images using 3 × 10 repeated stratified cross-validation. BWCE-log was compared with CE, WCE, focal loss, class-balanced cross-entropy (CB-CE), LDAM, and BWCE ablation/mapping variants under aligned splits, initialization, architecture, and training settings. In the primary comparison using standard metrics, BWCE-log showed competitive recall, F1-score, and AUC and improved recall relative to CE. Minority-focused analyses showed that BWCE-log reduced minority-to-majority errors relative to CE and focal loss, whereas CB-CE and LDAM showed stronger performance on selected minority-focused endpoints. Ablation analyses suggested that prediction-dependent information contributed to the BWCE performance profile, although most variant differences were not statistically significant after correction. These findings support BWCE as a direction-aware cost-sensitive alternative for modeling clinically undesirable error directions at the loss-design level, rather than as a uniformly superior replacement for existing imbalance-aware objectives.