
Introduction
Skin ailments are among the most frequent health problems affecting individuals from all age groups. According to a study conducted on Global Burden of Disease (GBD), skin diseases were ranked 18th when evaluated using Disability Adjusted Life Years (DALY) , making it 4th leading cause of disability.
Sustainable Development Goals (SDGs) by the United Nations aiming for a better globe by 2030 also promote health (SDG-3) and sustainability (SDG-8). Timely diagnosis plays a crucial role in stopping the progression of skin disease and helps reduce the disease burden towards social economy.
Traditional skin disease diagnostics begin with tissue extraction with a biopsy, followed by a series of chemical reactions on the mounted slide to enhance the structural patterns of the tissue and highlight disease-associated biomarkers. The resultant stained slide is then captured as a whole slide image using a microscope, which pathologists further analyze. Various chemical stains can be utilized to highlight tissue patterns and their underlying structures, which informs diagnosis. Haematoxylin and Eosion, Masson’s trichrome, orcein, Sudan black, periodic acid Schiff, and immunohistochemistry are among the most frequently employed staining techniques.
Periodic Acid Schiff (PAS) stains are widely utilized to highlight glycogen, thus helping enhance membranes, Muc substances, and the presence of fungi on skin and nails. The resultant stain assigns a blue color to nuclei, whereas glycogen and fungi are colored deep magenta, distinguishing them from background tissue. A PAS-stained slide is used to analyze glycogen storage diseases, sarcomas, carcinomas, and skin fungal infections. Research has shown that PAS staining is critical for accurate diagnosis. A 2003 study found that only 57% of inflammatory disease cases, such as tinea, were accurately diagnosed using H&E-stained samples, with the remaining cases going undiagnosed. This highlights the importance of using PAS stains for a more accurate diagnosis.
Derma-Pruned Model
Derma-Pruned [Figure 1] is an enhanced SegFormer architecture designed to enhance the detection of Skin layers from PAS-stained skin whole slide image samples, including the epidermis, dermis, dermo-epidermal junction, keratin/stratum corneum, and slide background. This model utilizes self-sufficient attention matrices, Gaussian positional embedding, and adaptive pruning to learn relevant features and reduce redundant feature representations.

The Derma-Pruned model was trained and tested on whole slide images [Figure 2] acquired in collaboration with Non-Invasive Diagnostics in Skin NIDI Skin USA. The dataset included both unstained and chemically PAS-stained images, which were then used to generate virtually stained samples. The ground truth for the dataset was prepared by two pathologists, who annotated the stained images for five classes: Dermal-Epidermal Junction (DEJ), Dermis (DRM), Epidermis (EPI), Keratin (KER), and Background (BKG).

The researchers compared the performance of models trained on unstained, virtually stained, and chemically stained images. The models trained on stained images performed significantly better than those trained on unstained images. Furthermore, a high cross-correlation score was observed between images segmented from models trained with virtually stained and chemically stained images, emphasizing the accuracy of using virtually stained images for skin disease diagnosis. The Derma-Pruned model achieved a segmentation accuracy of 94.4% when trained on the stained whole slide images.
To evaluate and interpret the Derma-Pruned model’s behavior, the researchers used Class Activation Maps (CAMs), also known as heat maps. These maps visually represent the regions of an image that the model focuses on when making a classification decision. The heat maps generated by the Derma-Pruned model show that it accurately focuses on the relevant regions for each skin layer. For example, the map for the Dermis class highlights the dermal layer, and the map for the Epidermis class highlights the epidermal layer. This visual evidence further proves the reliability and robustness of the proposed framework, confirming that the model is learning from the correct features rather than making random classifications.

References
Salam, A. A., Asaf, M. Z., Akram, M. U., Ali, A., Mashallah, M. I., Rao, B., … & Yousaf, M. H. (2025). Skin whole slide image segmentation using lightweight-pruned transformer. Biomedical Signal Processing and Control, 106, 107624.
The author Ms. Anum Abdul Salam, Lecturer, at College of Electrical and Mechanical Engineering, National University of Sciences and Technology (NUST), Islamabad, Pakistan. She can be reached at [email protected].
Research Profile: http://bit.ly/3UR6LWO
The co-author Dr. Muhammad Usman Akram is a Tenured Professor at the College of Electrical and Mechanical Engineering, National University of Sciences and Technology (NUST), Islamabad, Pakistan. He can be reached at [email protected].
Research Profile: http://bit.ly/3JRvFmM


![]()
