FedSkinQ: federated skin lesion classification with quantum-inspired token pruning in vision transformers
摘要
Skin cancer is a prevalent worldwide disease, and effective treatment planning depends heavily on early and accurate diagnosis. Federated Learning (FL) has emerged as a privacy-preserving distributed paradigm that enables collaborative training of Artificial Intelligence (AI) models across geographically dispersed medical institutions. However, deploying advanced deep learning (DL) architectures such as Vision Transformers (ViTs) in federated settings presents significant challenges. In particular, the quadratic computational complexity of the self-attention mechanism with respect to token sequence length limits scalability and increases computational cost in distributed environments. To address this challenge, we propose FedSkinQ, a novel FL framework that improves the efficiency of ViTs through quantum-inspired adaptive patch-token pruning. FedSkinQ employs a customized Quantum-Inspired Evolutionary Algorithm (QIEA) to perform optimization-driven token selection at each client during each FL round. The client-side QIEA dynamically identifies and retains the most diagnostically salient image tokens in a manner analogous to a dermatologist’s focused examination. This targeted selection substantially reduces local computational cost while preserving the model’s ability to capture global contextual information. The proposed framework is evaluated on Human Against Machine with 10000 training images (HAM10000) and International Skin Imaging Collaboration 2019 Challenge (ISIC2019) datasets under realistic non-IID data distributions with varying federation sizes and heterogeneity levels. Experimental results demonstrate stable convergence behavior, efficient knowledge aggregation, and consistent diagnostic discrimination across distributed clients. Although increasing federation size introduces stronger statistical heterogeneity and modest performance degradation due to intensified data fragmentation, the global model maintains robust predictive capability and structured class-wise behavior across all evaluated settings. Complexity analysis further confirms reduced attention cost and efficient training dynamics, supporting the feasibility of optimization-driven token pruning for scalable deployment of transformer-based models in federated AI environments.