Practical Lossless Volumetric Medical Image Compression via Tri-plane Context Tree Learning
Authors: Yuanchao Bai, Yifan Zhao, Kai Wang, Yuanbo Du, Jie Cheng, Teng Fang, Xianming Liu, Wen Gao
Organizations: Faculty of Computing, Harbin Institute of Technology, Harbin, 150001, China · Huawei Tech. Company, Ltd. · School of Electronics Engineering and Computer Science, Peking University, Beijing, 100871, China, and Pengcheng Laboratory, Shenzhen, 518055, China
Lossless compression of volumetric medical images is of paramount importance for clinical and research applications where data fidelity is essential. Traditional compression methods are often limited in efficiency due to rigid, handcrafted models. Conversely, deep neural network (DNN)-based compression methods, while effective, demand substantial computational resources, hindering deployment in resource-constrained settings. To address these challenges, we propose a novel tri-plane context tree (TCT)-based method for lossless volumetric medical image compression that delivers high performance without relying on DNNs or external training data. To exploit intra-slice and inter-slice redundancies, we introduce a compact tri-plane context representation that decomposes complex 3D context modeling into efficient 2D modeling on three orthogonal planes. By integrating this representation with a context tree framework, we develop an input-specific TCT model employing an adaptive binary tree structure. At each tree node, the model dynamically selects from a suite of tri-plane based predictors and contextual feature extractors, enabling data-adaptive context modeling tailored to local structural characteristics. Instead of offline training, we sample a subset of the input volume to learn the TCT model by optimizing the minimum description length (MDL) through iterative construction and pruning. With the learned TCT model, each pixel retrieves its corresponding context, computes the prediction residual using the predictor dictated by the context, and performs entropy encoding based on the associated histograms. Experimental results demonstrate that the proposed method achieves compression performance on par with recent DNN-based methods on multiple datasets, while maintaining low computational cost and fast coding speeds, making it highly applicable in practice.
Figures & tables
Notation
Description
I
volumetric medical image
Iidx
pixel set at index idx∈{<i,S,P,…}
Iidx
pixel at index idx∈{i,L[0],L[1],…}
C , Cj
context set C={C1,…,CM} , context Cj∈C
pred , predj
predictor and predictor assigned to Cj
ridx
residual set at index idx
TABLE I: Notations for TCT model and TCT-based compression method.
Fig. 1: Example of a volumetric medical image and its tri-plane representation, including x-y, y-z, x-z planes.
Fig. 2: Illustration of tri-plane context representation for encoding pixel Ii . (a) all previously encoded pixels I<i . (b) x-y context plane. (c) y-z context plane. (c) x-z context plane. Red: the pixel Ii . Blue: the previously encoded pixels. Orange: the pixels in each context plane.
Fig. 3: Diagram of the tri-plane context tree (TCT) model. Each internal node is assigned a feature index k corresponding to the k -th feature fik ’s, which are derived from a combination of pixels (marked with orange) residing on the three context planes. The internal node is also associated with a threshold t for binary partitioning. Each leaf node represents a distinct context. For each pixel, the TCT model is traversed from the root to the leaf based on the pixel’s features, retrieving the corresponding context.
Fig. 4: Block diagram of the TCT-based volumetric medical image compression. The TCT-based compression method requires no offline training. Instead, it learns a customized, input-specific context model T by performing TCT learning on a sample set S of the input 3D volume. During compression, each pixel retrieves its corresponding context from the learned model T to enable adaptive prediction and entropy coding. Finally, both the learned TCT model and the compressed image data are stored into the bitstream to ensure decodablity.
Fig. 5: Labeling of neighboring pixels used in prediction and contextual feature extraction on three context planes. The x-y, y-z and x-z context planes enjoy the same context pattern. The △ denotes the current pixel. The L denotes the left pixel of △ . The LL denotes the left-left pixel of △ . The T denotes the top pixel of △ . The TT denotes the top-top pixel of △ . The LT denotes the left-top pixel of △ . The LLT denotes the left-left-top pixel of △ . The RT denotes the right-top pixel of △ .
Predictor
Sub-predictor
Median-2D
median(IL[0],IL[0]+IT[0]−ILT[0],IT[0])
Median-3D
median(IL[0],IL[0]+IT[0]−ILT[0],IT[0])
median(IL[1],IL[1]+IT[1]−ILT[1],IT[1])
median(IL[2],IL[2]+IT[2]−ILT[2],IT[2])
Blending-3D
IL[0]−IT[0]+IRT[0]
IL[0]+IT[0]−ILT[0]
TABLE II: Tri-plane based predictors and the corresponding sub-predictors
Fig. 6: Quadruple representation (zbit,sbit,msb,lsb) of prediction residual.
Type
Feature Value
Gradient-2D
IL[0]−ILT[0]
ILT[0]−IT[0]
IT[0]−IRT[0]
IT[0]−ITT[0]
IL[0]−ILL[0]
ILL[0]+ILT[0]−ILLT[0]−IL[0]
TABLE III: Tri-plane based features and the corresponding values
Fig. 7: Illustration of the proposed two-step TCT learning algorithm.
Chaos
MosMedData
Trabit
MRNet
Type
Abdomen CT
Lung CT
Brain MRI
Knee MRI
Training Set †
20
125
70
1130
Test Set
20
45
30
120
Bit Depth
16
16
16
8
Slice Count
78 ∼ 294
32 ∼ 72
176
17 ∼ 61
Resolution
512 × 512
512 × 512
176 × 208
256 × 256
TABLE IV: Overview of volumetric medical image datasets in experiments. † Training sets are for DNN-based methods.
Codec
Chaos
MosMedData
Trabit
MRNet
BPP ↓
Compression Ratio ↑
BPP ↓
Compression Ratio ↑
BPP ↓
Compression Ratio ↑
BPP ↓
Compression Ratio ↑
Traditional
PNG
7.09
2.256
7.09
2.257
3.08
5.190
4.56
1.755
JPEG-LS [ 51 ]
5.08
3.148
5.02
3.188
2.22
7.194
4.06
1.971
CALIC [ 54 ]
-
-
-
-
-
-
3.93
2.036
JPEG2000 [ 42 ]
5.05
3.169
5.32
3.009
2.58
6.204
4.17
1.920
TABLE V: Lossless image compression performance of our TCT-based volumetric medical image compression method, compared with other lossless compression methods on Chaos, MosMedData, Trabit and MRNet datasets. The best performance is marked in bold , the second-best is marked with an underline , and the third-best is marked with a double-underline . † Using the released CT compression model trained on MosMedData dataset.
Codec
GPU Max Usage
Chaos
MosMedData
Enc.T.
Dec.T.
Enc.T.
Dec.T.
Traditional (CPU)
JPEG-LS
-
0.02s
0.02s
0.03s
0.03s
JPEG-XL
-
2.18s
0.05s
4.08s
0.07s
JP3D
-
0.04s
0.04s
0.07s
0.07s
HEVC-RExt
-
4.01s
0.02s
5.61s
0.03s
TABLE VI: Average coding time per slice of volumetric medical image compression methods. The DNN-based methods run on GPU with maximum GPU usage reported.
M-2D
M-3D
B-3D
Chaos
MosMedData
Trabit
MRNet
✓
×
×
4.64
4.72
2.00
3.83
✓
✓
×
4.44
4.71
1.97
3.83
✓
✓
✓
4.27
4.64
1.91
3.79
TABLE VII: Effects of Predictors on the compression performance. M-2D, M-3D, B-3D denote Median-2D, Median-3D and Blending-3D.
Fig. 8: The percentage of predictor and feature selections in our TCT-based compression method on the Chaos dataset. (a) predictor selection. (b) feature selection. The M-2D, M-3D and B-3D denote the Median-2D, Median-3D and Blending-3D respectively.
Fig. 9: Visualization of the predictor selection map generated by our TCT-based compression method for a 2D slice of a 3D CT scan. (a) 16-bit CT slice mapped to 8-bit for visualization. (b) predictor selection map. Red: Median-2D. Yellow: Median-3D. Blue: Blending-3D.
G-2D
G-3D
Pred
Chaos
MosMedData
Trabit
MRNet
✓
×
×
4.36
4.67
1.93
3.86
✓
✓
×
4.30
4.66
1.93
3.85
✓
✓
✓
4.27
4.64
1.91
3.79
TABLE VIII: Effects of features on compression performance. G-2D, G-3D, Pred denote Gradient-2D, Gradient-3D and Prediction.
Percentage
Chaos
MosMedData
Trabit
MRNet
Model
0.04%
0.08%
0.11%
0.14%
Image Data
99.96%
99.92%
99.89%
99.86%
TABLE IX: Average proportions of TCT model and compressed image data.
TCT Pruning
Histogram Num.
Comp. Performance
×
✓
×
✓
Chaos
4048
224
4.28
4.27
MosMedData
2552
198
4.67
4.64
Trabit
691
106
1.93
1.91
MRNet
587
111
3.82
3.79
TABLE X: Effects of TCT pruning on average number of histograms and compression performance.
Fig. 10: Effects of (λ,u) on average lossless compression performance (bpp) on random samples from Chaos, MosMedData, Trabit and MRNet datasets. The (50, 224) is selected for all four datasets.
While specialized Medical Vision-Language Models (VLMs) have achieved remarkable success in interpreting 2D and 3D medical modalities, their deployment for 3D volumetric data remains constrained by significant computational inefficiencies. Current architectures typically suffer from massive anatomical redundancy due to the direct concatenation of consecutive 2D slices and lack the flexibility to handle heterogeneous information densities across different slices using fixed pruning ratios. To address these challenges, we propose MedPruner, a training-free and model-agnostic hierarchical token pruning framework specifically designed for efficient 3D medical image understanding. MedPruner introduces a two-stage mechanism: an Inter-slice Anchor-based Filtering module to eliminate slice-level temporal redundancy, followed by a Dynamic Information Nucleus Selection strategy that achieves adaptive token-level compression by quantifying cumulative attention weights. Extensive experiments on three 3D medical benchmarks and across three diverse medical VLMs reveal massive token redundancy in existing architectures. Notably, MedPruner enables models such as MedGemma-1.5 to maintain or even exceed their original performance while retaining fewer than 5% of visual tokens, thereby reducing visual-token overhead and validating the necessity of dynamic token selection for practical clinical deployment. Our code is available at https://github.com/CUHK-AIM-Group/MedPruner.
Shengyuan Liu, Zanting Ye, Yunrui Lin +6
Chinese University of Hong Kong · Westlake University · Southern Medical University +4
The deployment of artificial intelligence in medical imaging is hindered by high computational complexity and resource-intensive processing of volumetric data. Although chest computed tomography (CT) volumes offer richer diagnostic information than projection radiography, their use in AI-based diagnosis remains limited due to the computational burden of processing uncompressed volumetric images (typically stored in NIfTI or DICOM format). Addressing the growing need for low-resource deployment and efficient electronic data transfer, we investigate the utilization of JPEG-compressed chest CT volumes for thoracic abnormality detection. We propose Feature Attention Style Transfer (FAST), a novel distillation framework that transfers both activation patterns and structural relationships from high-fidelity CT representations to a spatiotemporal visual encoder operating on compressed inputs. By combining Gram-matrix-based attention style preservation with dual-attention feature alignment, FAST enables robust feature extraction from degraded volumes. Furthermore, we introduce Structured Factorized Projection (SFP), leveraging Block Tensor Train decomposition as a parameter-efficient alternative to dense projection layers, reducing projection-head parameters by almost half. Our contrastive learning pipeline, CT-Lite, integrates these components with a SigLIP-based multimodal alignment objective. Experiments on CT-RATE, NIDCH, and Rad-ChestCT demonstrate that CT-Lite achieves AUROC within 5-7% of the uncompressed-input baseline across all three datasets, despite operating on compressed inputs with significantly fewer parameters, paving the way for AI-based clinical evaluation under resource constraints.
Shadid Yousuf, S. M. Mahbubur Rahman, Mohammed Imamul Hassan Bhuiyan
Department of Electrical and Electronic Engineering, Bangladesh University of Engineering and Technology
Integrating 3D medical images with vision-language models (VLMs) holds substantial promise for computer-aided diagnosis. However, volumetric images generate prohibitively long visual-token sequences with considerable spatial and inter-slice redundancy. Existing token compression methods typically apply uniform reduction or rely on a single importance signal, increasing the risk of removing regions that are clinically relevant to the query or structurally distinctive. To address this limitation, we propose MedARC, a unified, training-free framework for Adaptive Redundancy Compression of visual tokens in 3D medical VLMs. MedARC estimates token importance by integrating three complementary cues: self-attention from the VLM vision encoder, which reflects the model's intrinsic visual focus; similarity between projected visual tokens and text embeddings, which identifies query-relevant regions; and deviations of local visual foundation model features from the volume-level feature center, which highlight structurally distinctive anatomy. The resulting importance distribution guides a saliency-aware merging strategy that preserves informative tokens while consolidating redundant ones rather than simply discarding them. Experiments on CT-RATE and MR-RATE show that MedARC reduces visual-token overhead and inference time while preserving or improving diagnostic performance. Its multi-cue scoring cost is outweighed by the savings from processing fewer tokens, with greater benefits expected for larger language models.
Yitao Zhu, Mengjun Liu, Yingji Fu +2
Department of Health Technology and Informatics, The Hong Kong Polytechnic University, Hong Kong · School of Integrated Circuits and Electronics, Beijing Institute of Technology, China · 3Mental Health Research Center, The Hong Kong Polytechnic University, Hong Kong +1