Ambati PrakashiniResearch Scholar, Department of Computer Science and Engineering, Bharatiya Engineering Science & Technology Innovation University, Ananthapur, Andhra Pradesh, India. 2022pcse019@bestiu.edu.in0009-0002-3211-3475
Dr. Harikrishna BommalaDepartment of Computer Science and Engineering, KG Reddy College of Engineering and Technology, Hyderabad, Telangana, India. haribommala@gmail.com0000-0002-9932-6152
Problem. Multimodal computational pathology increasingly links tissue morphology with diagnostic language, yet most vision–language systems depend on large slide–report corpora and server-class computation. This dependence limits dependable diagnostic support on resource-constrained edge and mobile nodes of ubiquitous healthcare networks. Methodology. A lightweight contrastive vision–text attention multiple-instance learning (MIL) framework is proposed. Bags of 16 colorectal histology patches from PathMNIST are encoded by a frozen ImageNet-pretrained ResNet-18, aggregated by trainable attention pooling, and aligned with frozen DistilBERT embeddings of class-conditioned microscopic descriptions in a shared 256-dimensional space. A symmetric contrastive loss (temperature 0.07, weight 0.2) regularises nine-class cross-entropy. The text branch operates only during training, so the deployed edge model requires no language encoder. Of 11,575,114 parameters, only 398,602 (3.44%) are trainable, and the deployable decision head holds 70,410 parameters (0.28 MB in FP32). Results. Over ten epochs with 4,000 training bags per epoch, the model correctly classified 793 of 800 validation bags, yielding 0.9913 accuracy (Wilson 95% CI 0.9820–0.9958), 0.9911 macro precision, 0.9918 macro recall, 0.9912 macro F1-score, 0.9989 macro specificity, 0.9901 Cohen’s kappa, 0.9902 Matthews correlation coefficient and 0.9999 macro AUC. Seven classes reached perfect precision and six reached perfect recall; five of the seven errors were smooth muscle predicted as cancer-associated stroma. Analytical deployment profiling gives about 7.76 GMAC per bag and a 100-byte on-device prediction payload against 602 KB for uplinking resized bags. Conclusion. Class-text contrastive supervision regularises a compact attention-MIL classifier whose inference graph suits edge deployment and over-the-air head updates. The evidence is a single-run, bag-level proof of concept; patient-level whole-slide validation, authentic reports, repeated seeds and same-protocol baselines remain necessary before clinical use.