A Comparative Evaluation of Feature Aggregation Heads for Skin Lesion Classification Using Swin Transformer


Kesimal K., Özcan H.

12th International Conference of Image Processing, Wavelet and Applications on Real World Problems (IWW 2025), İstanbul, Turkey, 3 - 05 November 2025, pp.1-5, (Full Text)

  • Publication Type: Conference Paper / Full Text
  • City: İstanbul
  • Country: Turkey
  • Page Numbers: pp.1-5
  • Kocaeli University Affiliated: Yes

Abstract

This paper presents a comparative analysis of feature aggregation heads for dermoscopic skin-lesion classification using a SwinV2 transformer. A reproducible pipeline is proposed to fine-tune a SwinV2 Tiny backbone on the HAM10000 benchmark, comparing three heads: a token mean baseline, a generalized mean pooling head that learns to emphasize informative tokens, and a stagewise multi-scale gated fusion head. All models were trained under a unified recipe with shared transforms and mild augmentations. Evaluation on a held-out test set, using accuracy, macro F1, macro ROC AUC, and macro average precision, shows the generalized mean head achieves the strongest class-balanced performance. The generalized mean head yielded a macro F1 of 0.779 and a macro ROC AUC of 0.980, while also attaining the highest accuracy of 0.873. The multi-scale head achieved an accuracy of 0.859 with competitive calibration. These results indicate that learned token aggregation, specifically the generalized mean head, improves ranking quality and minority class balance within a transparent and unified setup.