Skip to content

Latchan-Ch/SafeMed-SSL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SafeMed-SSL: Uncertainty-Guided Semi-Supervised Learning for Safe Medical Image Classification

Framework License

An official PyTorch implementation for robust and safe medical image classification in low-resource settings.


Problem Statement

In resource-constrained healthcare environments, expert medical image annotation is expensive and time-consuming. While Semi-Supervised Learning (SSL) reduces this burden, standard SSL methods (like FixMatch) suffer from Silent Failures—classifying ambiguous images incorrectly but with high confidence.

Our Solution: We introduce an Uncertainty-Guided Safety Filter that leverages Monte Carlo Dropout. By rejecting ambiguous pseudo-labels based on both confidence and uncertainty, we significantly reduce overconfident clinical errors.


Key Contributions

  • ** Dual-Path Architecture:** Seamlessly integrates standard Supervised Learning (20% data) with an Uncertainty-Guided SSL teacher-student model (80% unlabeled data).
  • ** Two-Layer Safety Mechanism:** Filters unreliable predictions using a strict criteria.
  • ** Low-Resource Optimized:** Built on a lightweight ResNet-18 backbone, making it highly suitable for edge deployment in rural clinics.
SafeMed-SSL Architecture Diagram
Figure 1: The SafeMed-SSL Framework. Unlabeled data passes through a safety filter before pseudo-labels are generated.

Results & Clinical Impact

We evaluated our framework on the task of Malaria Cell Classification. Our method outperforms standard SSL baselines by specifically targeting dangerous "silent failures."

Method Accuracy AUC Silent Failure Rate (SFR)
Supervised Baseline (20% Labels) 96.7% 0.989 2.01%
FixMatch (Standard SSL, τ=0.80) 96.4% 0.991 2.50%
Ours (SafeMed-SSL) 96.6% 0.991 1.77%

Impact: We achieved a statistically significant 29.2% reduction in silent failures ($p=0.0137$), directly preventing dangerous misdiagnoses.

Clinical Robustness Graph
Figure 2: Clinical Robustness. SafeMed-SSL (blue) maintains a consistently low failure rate across varying thresholds compared to standard methods (red).

Dataset

This project uses the NIH Malaria Cell Images Dataset.

Data Structure:

data/
└── malaria/
    ├── Parasitized/
    └── Uninfected/

Quick Start:

  1. Installation Clone the repository and install the required dependencies:
git clone [https://github.com/Latchan-Ch/SafeMed-SSL.git](https://github.com/Latchan-Ch/SafeMed-SSL.git)
cd SafeMed-SSL
  1. Training the Model
  2. Evaluate and Use

Authors:

Latchan Chhetri - Dept. of AI & DS, Sikkim Manipal Institute of Technology (SMIT)

Aman Kumar - Dept. of AI & DS, SMIT

Hrishikesh Das - Dept. of CSE, SMIT

Citation:

If you find this code or our methodology useful in your research, please consider citing our paper:

Code snippet
@inproceedings{chhetri2026safemed,
  title={Uncertainty-Guided Semi-Supervised Learning for Safe Medical Image Classification in Low-Resource Settings},
  author={Chhetri, Latchan and Kumar, Aman and Das, Hrishikesh},
  booktitle={2026 International Conference on Sustainable AI for Social Impact and Global Development (SASIGD)},
  year={2026},
  organization={IEEE}
}