What Overall Accuracy Hides: Reproducing MedNet at 28×28 and Evaluating Its Proposed Class-Imbalance Remedies on MedMNIST
MedNet is a lightweight attention-augmented convolutional network that combines depthwise separable convolutions with the Convolutional Block Attention Module (CBAM), and which its authors report as matching or exceeding much larger baselines on the MedMNIST collection at a fraction of the parameter count. In their concluding discussion the authors identify class imbalance as the principal remaining weakness of the method, noting that Focal Loss alone leaves under-represented classes poorly modelled, and propose under-sampling, weighted sampling, or generative augmentation as future work. This study takes up that proposal directly. We first reproduce MedNet independently at the 28×28 resolution reported in the original resolution ablation, on CPU-only commodity hardware, and confirm the architecture at the parameter level (3,269,581 with CBAM and 3,092,386 without, matching the published 3.27 M and 3.09 M). Trained for the paper's full 70-epoch budget, our DermaMNIST reproduction reaches 77.46 % accuracy against the 77.7 % ± 0.7 reported, and exceeds the ResNet-18 and ResNet-50 baselines at the same resolution using roughly a quarter and an eighth of their parameters. We then implement two of the three remedies the authors propose, inverse-frequency Focal-Loss weighting and inverse-frequency weighted sampling, and evaluate them against a matched control with imbalance-aware metrics. Two findings follow. First, the early stopping used in the released implementation is itself costly for rare classes: stopping at epoch 26 rather than 70 lowers accuracy by 1.95 points, balanced accuracy by 9.25 points and macro F1 from 0.570 to 0.481, because a validation-accuracy criterion is satisfied long before the minority classes are learned. Second, rebalancing is a genuine trade rather than a free improvement: inverse-frequency weighting raises balanced accuracy from 53.98 % to 59.26 % and melanoma recall from 0.372 to 0.619, but lowers overall accuracy from 77.46 % to 66.93 % and macro F1 from 0.570 to 0.514, because recall on rare classes is bought with precision. We conclude that overall accuracy is a poor primary metric on DermaMNIST, where constant prediction of the majority class already scores 66.88 %, but that the remedies the authors propose should be presented as an operating-point choice governed by the clinical cost of a missed malignancy, not as an unqualified gain.
Authors
- Mudassir Iftikhar (ORCID: https://orcid.org/0009-0002-2760-7163)
- Tannu Kajal
- Keshav Gupta
Institutions
- National Research University Higher School of Economics (RU)
- University of Turin (IT)
Publication Details
- Journal
- International Journal of Latest Technology in Engineering Management & Applied Science
- Published
- 2026-11-26
- DOI
- https://doi.org/10.51583/ijltemas.2026.151100056
- Primary Topic
- Imbalanced Data Classification Techniques
- Type
- article
- Field-Weighted Citation Impact
- 0.00