Learned image compression (LIC) has achieved promising rate-distortion performance, but most methods lack scalability for diverse platforms with varying computational and storage constraints. Existing slimmable LIC methods achieve flexible complexity via consecutive-channel activation but suffer from two limitations: forced consecutive-channel selection degrades narrow-model performance at low bitrates, and the lack of stable variable-rate control limits adaptability to varying bandwidth. We propose a channel-level mask-guided slimmable image compression method. A learnable channel-wise mask with sparsity-promoting regularization enables non-contiguous top-w channel selection, letting narrow models use the most informative channels. After training, mask merging and channel reordering convert the model into a standard slimmable network via Mask-to-Slimmable (M2S) conversion, enabling efficient inference without architectural changes. For variable-rate control, we combine lambda- and width-conditioned modulation with quantization-step scaling and a progressive training pipeline stabilized by a freeze-then-fine-tune strategy. Experiments on Kodak across E2E, Hyperprior, and Checkerboard backbones show superior rate-distortion performance across widths and bitrates, with large gains for narrow models at low bitrates. At w=48, it achieves up to 19.22%, 24.11%, and 22.76% BD-rate savings over the same-width Slimmable baseline on E2E, Hyperprior, and CKBD, respectively. A single VBR model replaces 40 independent models, reducing storage by 14.8x to 15.9x. Code: https://github.com/sjtu-tcloud/MGSIC.
Figures & tables
Fig. 1: Three typical styles of Elastic LIC methods. (a) Down-Up Sampling Style. (b) Scalable Style. (c) Slimmable Style. Quantization and entropy coding are omitted. Element-wise addition could also be replaced by channel-wise concatenation.
Fig. 2: Overview of typical LIC model with context model. ga and gs consist of Convolution (CONV) / Transposed Convolution (TPCV) with Generalized Divisive Normalization (GDN) / Inverse GDN (IGDN), respectively. “AE/AD” denote arithmetic en-/de-coding. “Concat” denotes channel-wise tensor concatenation. “Q” denotes quantization. The numbers ①–④ denote the four positions for variable-rate methods summarized in Table I : ① feature maps, ② latent y , ③ side information z , and ④ the quantizer.
Fig. 3: Channel importance and its effect on reconstruction ( λ=0.18,w=192 ). (a) Channel-wise ℓ2 normalization of the latent y , where each row represents 48 consecutive channels. (b) Joint reconstructions using only the top- K channels ranked by ℓ2 norm, with K∈{5,25,50,100,192} . PSNR and bpp are annotated on each reconstruction.
Pos. a
Training settings b
AG-VAE [ 30 ]
②
Random training
DCVC [ 31 ]
②
Sequential training
CAE [ 27 ]
①④
Sequential training with bin size=1; random bin size
QVRF [ 25 ]
②
Train with λmax , then sequential training with other λ s
DCT-RES [ 32 ]
①
Random training, biased toward larger λ
MAE [ 26 ]
①
Sequential training with total loss of all λ s
TABLE I: Summary of variable bitrate research.
Fig. 4: Overview of the proposed method. (Top) Training stage of the Mask model with learnable masks and sliced operators. (Bottom) Training and inference stage of the Slimmable model with variable-rate control, where λ - and width-conditioned modulation networks generate combined variables via Hadamard product, applied to ga/gs features and quantization step sizes for y/z , and channel shuffling aligns (Φ,Ψ) across widths. The M2S conversion between the two stages is detailed in Fig. 8 . Operator configurations are in the supplementary material.
Fig. 5: Three channel selection strategies. (a) Traditional slimmable operator with a fixed prefix ( win/out=3/2 ). (b) Mask layer selecting top- w channels ( w=3 ) via a learnable mask. (c) Sliced operator with index sets Iin=[0,2,3] , Iout=[0,1] , decoupling selection from execution. Gray borders in y indicate zero-padded data.
Fig. 6: Channel index propagation from y^ to hs and gep . The selected channels Iy map to Iouths=⋃i∈Iy{2i,2i+1} in hs and to Iinep=⋃i∈Iy{4i,4i+1,4i+2,4i+3} in gep . Unselected channels are zero-padded (gray).
Fig. 7: Checkerboard model for predicting (μ,σ) of y^ , and its slimmable adaptation. (top) Original two-pass prediction: Pass 1 uses only Ψ ; Pass 2 uses Ψ and Φ from decoded anchors. (bottom) Slimmable Model with contiguous active channels and channel shuffling. In Mask Model, channels may be non-contiguous and are handled by sliced operators with set Iy .
Fig. 8: M2S conversion from the trained Mask model (top-left) to the Slimmable model (top-right) via ❶ mask merging and ❷ channel reordering. Mask merging absorbs the scaling factors of Mask l into the preceding CONV l (lower-left/middle). Channel reordering permutes the output channels of CONV l , the input/output channels of GDN l , and the input channels of the next CONV l+1 using the index set Idxl derived from Mask l (lower-right). The middle panel shows the intermediate state; Idx0/Idx1 are derived from Mask 0/1, and C0/C1 denote the output channel counts of the first two CONVs.
Variant
λ -mod.
Q-step scaling
w -mod.
Freeze
Stage
VBR
✓
2
VBR-Q
✓
✓
2
VBR-QF
✓
✓
✓
2
VBR-QW
✓
✓
✓
3
VBR-QFW
✓
✓
✓
✓
3
TABLE II: Comparison of variable-rate training variants.
Fig. 9: RD performance comparison of Slimmable, Mask, and M2S on Kodak across five widths (48–192) for E2E, Hyperprior and CKBD backbones. M2S consistently outperforms both baselines at narrow widths (48, 72), while eliminating the regularization overhead of Mask at wide width (144, 192).
Width
Mask (vs Slim)
M2S (vs Slim)
M2S (vs Mask)
E2E
48
-10.60
-19.22
-10.54
72
-5.73
-14.44
-9.67
96
+0.26
-8.33
-8.93
144
+5.71
-2.77
-8.01
192
+6.73
-1.29
-7.54
Hyper
48
-11.23
-24.11
-16.24
TABLE III: BD-rate savings (%) compared to the same-width Slimmable baseline on Kodak.
Fig. 10: PSNR gain (dB) of M2S over Slimmable across all widths and λ values on Kodak. Each cell is obtained by cubic-spline interpolation of the RD curves at the minimum bpp for the given λ and width.
Fig. 11: RD performance comparison across five widths (48–192) on Kodak for (a) E2E, (b) Hyperprior, and (c) CKBD backbones. VBR-QW achieves the best performance on E2E and CKBD, while VBR-QFW remains the best on Hyperprior.
Width
48
72
96
144
192
E2E
VBR
21.57
27.64
28.36
31.28
36.92
VBR-Q
15.86
16.58
14.75
14.18
16.47
VBR-QW
4.85
7.30
6.92
7.82
9.68
VBR-QF
10.79
17.61
16.51
14.54
16.17
VBR-QFW
10.37
17.36
16.70
14.53
14.84
Hyper
VBR
30.25
24.79
20.43
18.59
19.00
TABLE IV: BD-rate increase (%) over the M2S upper bound on Kodak. Best results per backbone are in bold.
Params
Model
Width
ga
gs
ha
hs
FEM
gcm
gep
ModNet
Total
Total (8 λ s)
48
183.65 K
183.60 K
136.08 K
255.98 K
2.93 K
115.30 K
78.77 K
956.36 K
72
410.26 K
410.19 K
306.07 K
575.78 K
4.39 K
259.34 K
176.90 K
2.14 M
96
726.72 K
726.63 K
544.03 K
1.02 M
5.86 K
460.99 K
314.21 K
3.80 M
144
1.63 M
1.63 M
1.224 M
2.30 M
8.78 K
1.037 M
706.32 K
8.54 M
CKBD
192
2.89 M
2.89 M
2.18 M
4.09 M
11.71 K
1.84 M
1.26 M
0
15.16 M
244.80 M
TABLE V: Parameter comparison of the CKBD backbone across different widths. The CKBD row reports single- λ single-width models; the M2S row reports one model covering all five widths at a fixed λ ; the VBR variants cover 5 widths × 8 λ values with a single model. “Total (8 λ s)” reports the total storage required if all eight λ values were deployed, i.e., 8× the per-model total for single- λ models, and a single model’s total for the VBR variants.
Width
ga
ha
hs
gs
gcm
gep
Enc ent_z
Enc ent_y
Dec ent_z
Dec ent_y
CDF (startup)
48
1.52
0.52
0.58
1.94
0.31
0.65
1.31
20.80
1.55
24.77
10.57–10.74
72
2.28
0.54
0.59
2.89
0.31
0.68
1.79
23.65
2.18
29.50
14.66–15.59
96
2.71
0.65
0.71
3.20
0.40
0.83
2.63
26.94
3.20
34.51
20.74–22.72
144
5.36
0.54
0.68
5.50
0.34
0.66
6.14
33.14
7.32
43.81
38.61–58.60
192
6.84
0.54
0.76
6.94
0.48
0.67
14.04
40.10
17.28
54.37
106.90–290.51
TABLE VI: Per-module latency (ms) of the CKBD (VBR-QW). “Enc/Dec ent_z” and “Enc/Dec ent_y” denote the encoding/decoding latency of the factorized entropy model for z and the Gaussian conditional entropy model for y , respectively. The last column is the one-time CDF construction cost, paid only when λ/w changes.
Fig. 12: Rate-distortion comparison on Kodak. E2E/Hyper/CKBD-192 denote variable-rate models at width 192. For CBANet, ELFIC, and EVC, the highest-quality RD curves among available models are used for reference.
Ours
E2E
Hyper
CKBD
ELFIC (Low Rate)
CBANet-HP
EVC (Scale_SL)
Params (M)
6.34
12.68
15.84
66.99
6.39
17.47
Nλ
8 (Interp.)
4 (Interp.)
4
4 (Interp.)
Rel. Cplx. (%)
25/37.5/50/75/100
7.66/35.82/74.06/100
25/50/100
25/50/75/100
Enc. (ms)
10/14/18/27/36
19/24/28/40/51
28/32/37/51/71
166
36
42/45/50/55
Dec. (ms)
14/20/25/38/50
23/31/36/51/66
32/38/45/62/86
175/193/199/202
54/56/58
32
TABLE VII: Parameter count and en-/de-coding latency on Kodak. Rel. Cplx. (%) is method-specific: w/192×100% (ours), the decoder-computation ratio (ELFIC, CBANet), and Nenc/4×100% (EVC). Nλ is the number of default variable-rate configurations; “Interp.”: extra RD points via interpolation, not applicable to CBANet (independent bitrate-control modules).
Codec
BPP
PSNR (dB)
Enc. (ms)
Dec. (ms)
JPEG
0.17–2.12
21.48–37.33
2.22
2.28
JPEG2000
0.12–2.00
26.30–38.69
230.19
237.77
BPG
0.10–2.12
27.14–42.12
470.27
168.11
VTM-intra
0.11–2.11
28.43–41.17
140985.54
269.41
TABLE VIII: Summary of traditional codecs on Kodak. BPP and PSNR ranges are computed over all evaluated quality points. Enc./Dec. denote the average en-/de-coding time.
Department of Electronic Engineering, Tsinghua University · Department of Automation, Tsinghua University · State Key Laboratory of Space Network and Communications +1