HMSViT: A Hierarchical Masked Self-Supervised Vision Transformer for Corneal Nerve Segmentation and Diabetic Neuropathy Diagnosis
Xin Zhang, Liangxiu Han*, Yue Shi, Yanlin Zheng, Uazman Alam, Maryam Ferdousi, Rayaz Malik · 2025
Read HMSViT: A Hierarchical Masked Self-Supervised Vision Transformer for Corneal Nerve Segmentation and Diabetic Neuropathy Diagnosis by Xin Zhang, Liangxiu Han*, Yue Shi, Yanlin Zheng, Uazman Alam, Maryam Ferdousi, Rayaz Malik (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2506-19474.txt.
Introduction
Xin Zhang and co-authors present HMSViT, a vision transformer that outlines corneal nerves and flags diabetic nerve damage from microscope images of the eye, in a paper from 2025. Nearly half of diabetes patients develop peripheral neuropathy, and the cornea's nerves offer a painless window on it. Automated reading has been held back by weak feature extraction and scarce labeled data.
The model stacks attention in a hierarchy, catching fine local detail early and global context deeper, at modest cost. A block-masked self-supervised stage learns from unlabeled images first, easing the label shortage. On clinical datasets it reached 61.34 percent overlap on nerve segmentation and 70.40 percent diagnostic accuracy, beating leading rivals with fewer parameters. Ablations confirmed both design pieces matter.
Catalog record
| CREATOR | Xin Zhang, Liangxiu Han*, Yue Shi, Yanlin Zheng, Uazman Alam, Maryam Ferdousi, Rayaz Malik |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 44 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2506-19474
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
HMSViT: A Hierarchical Masked Self-Supervised Vision Transformer for Corneal Nerve Segmentation and Diabetic Neuropathy Diagnosis Xin Zhang, Liangxiu Han*, Yue Shi, Yanlin Zheng, Uazman Alam, Maryam Ferdousi, Rayaz Malik Abstract Diabetic Peripheral Neuropathy (DPN) affects nearly half of diabetes patients, requiring early detection. Corneal Confocal Microscopy (CCM) enables non-invasive diagnosis, but automated methods suffer from inefficient feature extraction, reliance on handcrafted priors, and data limitations. We propose HMSViT, a novel Hierarchical Masked Self-Supervised Vision Transformer (HMSViT) designed for corneal nerve segmentation and DPN diagnosis. Unlike existing methods, HMSViT employs pooling-based hierarchical and dual attention mechanisms with absolute positional encoding, enabling efficient multi-scale feature extraction by capturing fine-grained local details in early layers and integrating global context in deeper layers, all at a lower computational cost. A block-masked self supervised learning framework is designed for the HMSViT that reduces reliance on labelled data, enhancing feature robustness, while a multi-scale decoder is used for segmentation and classification by fusing hierarchical features. Experiments on clinical CCM datasets showed HMSViT achieves state-of-the-art performance, with 61.34% mIoU for nerve segmentation and 70.40% diagnostic accuracy, outperforming leading hierarchical models like the Swin Transformer and HiViT by margins of up to 6.39% in segmentation accuracy—while using fewer parameters. Detailed ablation studies further reveal that integrating block-masked SSL with hierarchical multi-scale feature extraction substantially enhances performance compared to conventional supervised training. Overall, these comprehensive experiments confirm that HMSViT delivers excellent, robust, and clinically viable results, demonstrating its potential for scalable deployment in real-world diagnostic applications. I Introduction Diabetic Peripheral Neuropathy (DPN) is a debilitating complication of diabetes, affecting nearly 50% of individuals with diabetes worldwide and significantly increasing the risk of foot ulcers, infections, and lower-limb amputations [ 1 ] . This progressive neurodegenerative condition is characterized by nerve damage, primarily in the peripheral nervous system, leading to symptoms such as pain, numbness, and loss of sensation in the extremities. Early diagnosis and continuous monitoring are essential to mitigate its impact and prevent irreversible nerve damage. However, traditional diagnostic methods, including nerve conduction studies and skin biopsies, are invasive, costly, and often unsuitable for routine screening [ 2 ] . In recent years, Corneal Confocal Microscopy (CCM) has emerged as a non-invasive and highly sensitive imaging modality for early DPN detection [ 3 ] . CCM enables high-resolution imaging of corneal nerve fibres, which serve as quantifiable biomarkers for neuropathy progression. Despite its potential, the manual analysis of CCM images is time-consuming, prone to inter-observer variability, and requires expert interpretation, making it impractical for large-scale screening [ 4 , 5 ] . These challenges underscore the need for automated, AI-driven solutions that can efficiently analyse CCM images for both corneal nerve segmentation and DPN severity classification. The advent of deep learning has significantly advanced medical image analysis, with Convolutional Neural Networks (CNNs) being widely adopted for automated segmentation and classification [ 6 , 7 ] . While CNNs are exceptional at extracting hierarchical feature representations, their fixed local receptive fields can hinder the capture of long-range dependencies and global structural variations—an essential factor in accurately interpreting complex nerve fibre morphology [ 7 ] . To overcome these constraints, Vision Transformers (ViTs) [ 8 ] have emerged as a potent alternative, employing self-attention mechanisms to harness global contextual information, which is particularly advantageous for medical imaging tasks requiring fine-grained structural recognition [ 9 ] . Nonetheless, standard ViTs face notable challenges in medical imaging, especially for tasks demanding high-resolution representations, such as organ segmentation or nerve fibre analysis [ 9 , 10 ] . Firtstly, ViTs require extensive annotated datasets, which are often unavailable in medical contexts, and their patch-based processing reduces spatial resolution and lacks inductive bias for spatial reasoning - the ability to understand structure and relationships within an image. These limitations call for innovative solutions to harness ViTs’ strengths while addressing their shortcomings. Prior studies have explored hierarchical Vision Transformer architectures, such as the Swin Transformer [ 11 ] and HiViT [ 12 ] that progressively merge patches to extract multi-scale features, thereby capturing both local detail and global context. However, these methods often depend on handcrafted modules (e.g., shifted windows or convolutional enhancements) that increase computational complexity. In parallel, self-supervised learning (SSL) techniques, notably masked autoencoders, have been applied to alleviate the dependency on large labelled datasets, although integrating SSL with hierarchical models remains challenging. To address these issues, we propose HMSViT—a Hierarchical Masked Self-Supervised Vision Transformer. HMSViT employs a pooling-based hierarchical design with dual attention mechanisms, where early layers capture fine-grained local details and deeper layers integrate global contextual information using absolute positional encodings. A novel block-masked SSL approach is introduced to learn robust spatial relationships from unlabelled CCM images, reducing reliance on extensive annotations. A multi-scale decoder further fuses these features for both accurate corneal nerve segmentation and DPN diagnosis. In summary, our contributions are threefold: 1. Efficient Multi-Scale Feature Extraction: A pooling-based hierarchical design with dual attention effectively captures both local and global features without heavy reliance on handcrafted modules. 2. Innovative Self-Supervised Learning: A block-masked SSL approach tailored for hierarchical architectures improves spatial reasoning while minimizing computational overhead. 3. State-of-the-Art Clinical Performance: HMSViT demonstrates superior segmentation accuracy and diagnostic classification on clinical CCM datasets, offering a scalable, non-invasive solution for early DPN screening. II Related work II-A Epidemiological Context and Clinical Need Diabetes affects 463 million people worldwide, projected to reach 700 million by 2045 [ 13 ] . Diabetic Peripheral Neuropathy (DPN), impacting up to 50% of patients, causes 50–75% of non-traumatic lower-limb amputations [ 14 ] . Defined as peripheral nerve dysfunction in diabetes after excluding other causes [ 15 ] , DPN highlights the urgent need for early detection to prevent irreversible damage. Corneal Confocal Microscopy (CCM) is a non-invasive tool for early DPN detection, allowing quantitative analysis of the corneal sub-basal nerve plexus, which is highly sensitive to metabolic damage [ 16 ] . Manual annotation of CCM images is time-consuming, expertise-dependent, and subject to variability due to noise and interpretation bias [ 5 ] . These limitations have led to the development of automated methods to extract key diagnostic metrics, including corneal nerve fibre length (CNFL), density (CNFD), and branch density (CNBD). II-B Deep Learning Methods for Corneal Nerve Segmentation and DPN Diagnosis Recent advancements in deep learning have significantly improved automated CCM image analysis, particularly in the areas of corneal nerve segmentation and DPN classification. The most prominent approaches include Convolutional Neural Networks (CNNs) and Vision Transformers (ViTs), both of which have demonstrated success in various medical imaging applications. II-B 1 CNN-Based Approaches CNNs have been extensively used for DPN classification and corneal nerve segmentation, leveraging their ability to capture hierarchical spatial features. Several CNN-based approaches have been explored in recent years. [ 17 ] developed a CNN-based classifier for DPN detection using CCM images, incorporating data augmentation techniques to improve model generalisation. Similarly, [ 18 ] applied ResNet architectures, achieving high classification accuracy in identifying neuropathic changes. For segmentation, [ 19 ] employed U2Net to precisely quantify corneal nerve fibre parameters, significantly enhancing the sensitivity of DPN detection. [ 7 ] further demonstrated that CNN-based segmentation approaches could outperform traditional corneal nerve analysis software (e.g., ACC Metrics), providing more accurate and reliable quantification of