Joint Lossless Compression and Steganography for Medical Images via Large Language Models

Pengcheng Zheng, Xiaorong Pu, Kecheng Chen, Jiaxin Huang, Meng Yang, Bai Feng, Yazhou Ren, Jianan Jiang, Chaoning Zhang, Heng Tao ShenarXiv 2025

TL;DR

This paper introduces a novel joint framework that simultaneously achieves lossless medical image compression and secure data hiding (steganography) by leveraging Large Language Models (LLMs). By splitting images into global and local components, the method uses a fast traditional model for global structure and an LLM for complex local details, safely embedding patient metadata in the process. The approach achieves state-of-the-art compression ratios while drastically reducing the computational runtime typically associated with LLM-based compressors.

What Problem Does This Paper Address?

In medical imaging, lossy compression (like standard JPEG) is a non-starter; even minor blurring or artifacts can lead to misdiagnoses. However, lossless compression algorithms yield much smaller file size reductions. Recently, researchers found that LLMs make incredible lossless compressors because their ability to predict the "next token" translates perfectly to predicting pixel distributions for entropy coding. Unfortunately, running an LLM autoregressively over an entire image is painfully slow.

Furthermore, medical images are bound to sensitive patient metadata (names, IDs, diagnoses). Standard formats like DICOM often store this text separately or in plaintext headers, leaving it vulnerable to interception or tampering during network transmission. Existing compression methods fail to secure this data during the compression pipeline itself.

Methods

The authors propose a dual-path pipeline that balances efficiency, compression performance, and security:

  1. Adaptive Modalities Decomposition: Using Bit Plane Slicing (BPS), the image is decomposed into binary layers. Based on mutual information metrics, these layers are split into a global modality (significant bit planes containing high-level structure) and a local modality (lower-order bit planes containing fine details).
  2. Dual-Path Compression:
  3. Global Path: Compressed using a Variational Autoencoder (VAE) combined with an efficient bits-back coding scheme to keep processing fast.
  4. Local Path: Compressed using an LLM (specifically Qwen2.5-7B) to model complex local textures.
  5. Segmented Message Steganography: Instead of replacing just the Least Significant Bit (LSB) with a secret message, the framework splits patient metadata into segments and distributes them across multiple lower-order bit planes in the local path. It generates an image-specific auxiliary recovery bitmap ($B$) to ensure both the original image and the hidden message can be perfectly, losslessly recovered by authorized receivers.
  6. Anatomical Priors-based Fine-Tuning (A-LoRA): Rather than initializing LoRA weights randomly, the authors use a pretrained MobileNetV3 to extract anatomical features from medical datasets to initialize the weights, bridging the gap between textual priors and visual tasks.
Fig. 2. Overview of the proposed framework. In the encoding process, the image is firstly decomposed into global and local modalities via adaptive modalities decomposition strategy. Then, the global modalities are compressed using VAE with bits-back coding scheme. The local modalities are compressed by leveraging the unprecedented intelligence of LLM. The final bitstream is concatenated from the dual-path outputs. The decoding order is the reverse of the encoding process.

Datasets

  • Training: Flickr2k (Natural image dataset, center-cropped to $128 \times 128$ patches).
  • Evaluation (Medical Modalities):
  • C-19-R (Chest X-rays)
  • C-19-C & Lung CT (Lung Computed Tomography)
  • Head CT (Head Computed Tomography)
  • L-Spine (Spine Computed Tomography)
  • B-Ultra (Breast Ultrasound)
  • Brain Tumor (Brain MRI)

Key Insights and Ideas

  • Divide and Conquer for LLM Efficiency: LLMs shouldn't process entire images. Restricting the LLM to the local modality (lower bit planes) allows the framework to exploit the model's high "intelligence" for complex textures while avoiding the massive latency of full-image autoregression.
  • The Information Gradient of Bit Planes: Information density increases from the least significant plane to the most significant plane. Modifying lower planes introduces negligible visual distortion, making them ideal hosts for steganography.
  • Security via Distribution: Traditional LSB steganography concentrates modifications on a single bit plane, creating statistical anomalies that deep-learning steganalyzers easily detect. Spreading the payload across multiple lower bit planes minimizes this statistical signature, rendering the hidden data highly secure.
Fig. 4. An example of the encryption and decryption process. We send L1, L2, Ls, and Bitmap B to the receiver to ensure image x and message M can be losslessly recovered.

Key Results

  • Compression Performance: The method achieves new state-of-the-art lossless compression ratios across all seven medical datasets. For instance, on Chest X-rays (C-19-R), it achieves a bitrate of 2.25 bits per pixel (bpp), outperforming classical codecs like JPEG-XL (2.42 bpp) and learned SOTA models like DLPR (2.34 bpp).
  • Drastic Speedups: Compared to fully autoregressive LLM compressors, this dual-path approach reduces decoding time on the C-19-R dataset from 287.30 seconds down to 39.91 seconds (using a 1.5B parameter variant).
  • Steganographic Security: Even with a high payload (0.2 bpp), the stego-images maintain excellent imperceptibility with a PSNR above 59 dB and a structural similarity (SSIM) of 0.999998. Against deep steganalyzers (SR-Net), the method consistently achieved the lowest detection rates (AUC) compared to vanilla LSB baselines.

Limitations and Future Work

While the framework is significantly faster than pure LLM compressors, its absolute decoding latency (e.g., ~24.68 seconds for a single sample on a single GPU) is still noticeably slower than highly optimized traditional codecs like JPEG-XL (~0.13 seconds). Consequently, this method is currently best suited for centralized server-side medical archiving and secure transmission rather than real-time bedside deployment. The authors note that future work will focus on developing more lightweight, compression-specific LLMs to mitigate this latency.

Summary updated

Abstract

Recently, large language models (LLMs) have driven promising progress in lossless image compression. However, directly adopting existing paradigms for medical images suffers from an unsatisfactory trade-off between compression performance and efficiency. Moreover, existing LLM-based compressors often overlook the security of the compression process, which is critical in modern medical scenarios. To this end, we propose a novel joint lossless compression and steganography framework. Inspired by bit plane slicing (BPS), we find it feasible to securely embed privacy messages into medical images in an invisible manner. Based on this insight, an adaptive modalities decomposition strategy is first devised to partition the entire image into two segments, providing global and local modalities for subsequent dual-path lossless compression. During this dual-path stage, we innovatively propose a segmented message steganography algorithm within the local modality path to ensure the security of the compression process. Coupled with the proposed anatomical priors-based low-rank adaptation (A-LoRA) fine-tuning strategy, extensive experimental results demonstrate the superiority of our proposed method in terms of compression ratios, efficiency, and security. The source code will be made publicly available.
BibTeX
@misc{zheng2025joint,
  author = {Pengcheng Zheng and Xiaorong Pu and Kecheng Chen and Jiaxin Huang and Meng Yang and Bai Feng and Yazhou Ren and Jianan Jiang and Chaoning Zhang and Yang Yang and Heng Tao Shen},
  title = {{Joint Lossless Compression and Steganography for Medical Images via Large Language Models}},
  year = {2025},
  eprint = {2508.01782},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2508.01782},
}
Figure