DOI: 10.3390/electronics15214932 ISSN: 2079-9292

Learned Reconstruction and LLM-Guided Residual Coding for Lossless Compression of Malaria Blood Smear Microscopy Images

Zerin Nusrat, Md Firoz Mahmud, W. David Pan

Existing lossless image compression methods based on large language models (LLMs) rely on backbones with billions of parameters and have not been evaluated on Giemsa-stained thin blood smear microscopy images, whose statistical characteristics differ from those of natural-image benchmarks. This paper presents an LLM-guided residual coding framework for lossless compression of malaria microscopy images. A ResNet-based autoencoder is trained on the NIH Malaria Cell Images dataset to generate domain-native lossy reconstructions, from which integer residuals are modeled autoregressively using a frozen Pythia-160M language model conditioned on global and local visual embeddings. Domain adaptation is achieved through low-rank adaptation (LoRA), with trainable modules comprising only 2.372% of the frozen backbone parameters. The proposed method achieves 2.3206 bits per pixel on the test set, outperforming CALIC, JPEG-LS, and JPEG2000 and achieving performance comparable to JPEG-XL under the experimental conditions considered, although its decoding time remains considerably higher than that of these conventional codecs. Two LLM-based baselines are also evaluated using the same experimental protocol. Joint training on infected and uninfected cell images consistently outperforms single-class training, indicating that greater data diversity produces a more generalizable residual prior. These results demonstrate the feasibility of adapting relatively small LLMs to domain-specific residual statistics for lossless biomedical image compression.

More from our Archive