Manuscript Offprint

arXiv:2610.33520

Promise and Limits of Cross-Architecture Knowledge Distillation for Lightweight Medical Vision Transformers (LiteMed-ViT)

Shuaibu Shehu, Elijah M. Flomo, Mohammad Safiya, Anurodh Kumar, Subodh Kumar

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Shuaibu Shehu

School of CS & AI, SR University

Warangal, India-506371

shuaibushehukalifa@gmail.com

Elijah M. Flomo

School of CS & AI, SR University

Warangal, India-506371

elijahmflomo@gmail.com

Mohammad Safiya

Dept. of Computer Science, GITAM University

Visakhapatnam, India-530045

mohammadsafiya1431@gmail.com

Anurodh Kumar

School of CS & AI, SR University

Warangal, India-506371

anurodh.kumar@sru.edu.in

Subodh Kumar

Dept. of Biochemistry

Dr. KNS Memorial Institute of Medical Sciences

Barabanki, India-225001

somya2011.dsk@gmail.com

Abstract—Running deep models for medical image analysis at the point of care is challenging with standard architectures: convolutional neural networks (CNNs) are often too heavy for edge devices, while Vision Transformers (ViTs) require massive training datasets to compensate for missing inductive biases. This study investigates how far the dual-token distillation used to train data-efficient ViTs can be pushed when applied across architectures, from a CNN-based teacher into a lightweight ViT student. LiteMed-ViT is introduced as a dual-token ViT featuring a convolutional stem and a class-balanced distillation objective; at 0.234M parameters, LiteMed-ViT carries 47.8×47.8\times fewer parameters than its ResNet18 teacher at a memory footprint of just 0.89 MB. Evaluated against three compact CNN baselines on three MedMNIST subsets of varying modality and class balance, LiteMed-ViT attains higher accuracy than all three baselines on BloodMNIST (95.05%) and two on PathMNIST (89.15%). Under MedMNIST-C corruptions, it is at least as robust as every compact CNN across all subsets, outperforming them on BloodMNIST and PathMNIST without declining in relative standing as severity increases. Particular attention is devoted to identifying the exact conditions where performance plateaus. On DermaMNIST, LiteMed-ViT's balanced accuracy remains up to 1.9 points below the strongest compact CNNs and does not benefit from higher input resolutions up to 224 pixels, where ResNet18 gains 12.6 points. Stronger teachers do not yield a more accurate student, and overconfident ones lower its DermaMNIST balanced accuracy unless calibrated.

Index Terms—Knowledge Distillation, Vision Transformers, Edge AI, Medical Imaging, Model Compression.

I. INTRODUCTION

Convolutional neural networks (CNNs) have driven much of the progress in medical image analysis in the past decade [1], but the point of care often lacks the memory and compute a standard CNN expects, and sending images to a server moves patient data off the device, adds latency and needs a reliable connection. The target is a model accurate enough to be useful and small enough to run locally [2].

Vision Transformers (ViTs) capture global context [3] but lack convolutional locality and overfit small medical datasets. Knowledge distillation mitigates this by transferring a stronger model's softened predictions [4], where a CNN teacher's inductive bias is partially imparted to the student via DeiT's distillation token [5].

This Study examines how far cross-architecture distillation can compress a ViT for medical image classification, and where its performance plateaus. The model, LiteMed-ViT, has 0.234M parameters and is distilled from ResNet18; it is evaluated on three MedMNIST v2 subsets [6] that differ in modality and class balance. Because differences between small models on these benchmarks are close to run-to-run variation, every model is trained with four seeds and compared under a pre-set significance rule and a matched decision rule (Section III-D). The primary contributions are:

• LiteMed-ViT: a 0.234M-parameter dual-token ViT with a convolutional stem and a class-balanced distillation objective, the smallest model, though not the fastest.

• A four-seed benchmark against compact CNNs under matched decision rules: LiteMed-ViT is more accurate than all three on BloodMNIST and two on PathMNIST, and up to 1.9 points below two on DermaMNIST.

• Studies of the recipe’s limits: stronger teachers do not yield better students, overconfident teachers need calibration on imbalanced data, T and α\alpha have little effect, and higher resolution does not help on DermaMNIST.

• Robustness on MedMNIST-C: LiteMed-ViT is at least as robust as every compact CNN on all subsets, and its relative standing does not decline with severity.

References (38)