Neural image compression replaces hand-designed codecs like JPEG with an encoder–decoder network trained end-to-end to trade file size against reconstruction fidelity. That flexibility has a security cost: an adversary who adds a tiny, invisible pixel perturbation before the image is compressed can make the decoded output collapse into garbage or make the compressed file bloat many times over, exhausting storage and bandwidth. Known defenses sit at two uncomfortable extremes. Adversarial training — the standard recipe of fine-tuning the model on its own worst-case inputs — is expensive, because generating those inputs requires many extra forward and backward passes through the codec at every training step, and it can quietly degrade compression quality on clean images. Training-free wrappers avoid retraining but double the encoding work per image and have only been tested against non-adaptive attacks. Meanwhile, the field has ignored the most realistic threat model: an attacker attacking a cloud codec will not have white-box access to it. They will download some other published codec, craft perturbations offline against that surrogate, and rely on transferability — the well-documented phenomenon that adversarial perturbations built on one model often fool other models trained on similar data.
This proposal makes two connected claims. First, pure rate–distortion sabotage (bitrate inflation and reconstruction collapse, as opposed to downstream classifier fooling) transfers across codec architectures at full resolution — a question on which no reported result found on Lacuna exists, since the only cross-codec transfer study in compression tested 32×32 CIFAR-10 images through a downstream ResNet-20 Transferable Learned Image Compression-Resistant Adversarial Perturbations. Second, this threat can be answered cheaply: freeze the codec entirely and train a handful of small adapter modules on perturbations precomputed on surrogate codecs, never running the attack inner loop on the defended model at all. The result should be a defense that costs roughly as much as ordinary fine-tuning, leaves clean compression untouched because the backbone is frozen, and — unlike every existing robust-compression method — is explicitly validated against black-box surrogate attacks.
Core Claim
The argument rests on three findings in the literature that have not been connected. Chenhao Wu et al. located the failure modules of learned codecs with two diagnostic tools: Entropy Causal Intervention, which shows the hyperprior (the side network that predicts each latent symbol's probability for entropy coding) drives bitrate inflation, and the Layer-wise Distance Magnify Ratio, which shows the inverse normalization layers in the decoder amplify small input shifts into large output distortion. Sanghyun Hong et al. showed in classification that transferability between a public surrogate and a private target is governed by the cosine similarity of their input gradients, and that publishing efficient on-device models can inflate an attacker's power by up to 100× while collapsing their query budget from roughly 3,000 to fewer than 15 — a mechanism nobody has yet tested when the published artifact is a neural codec and the victim is a cloud compression service. And Brian Pulfer et al. showed that robustness can be injected into a frozen model by tuning only ten small learnable vectors with a dual objective (stay invariant on clean inputs, correct adversarial ones), converging in 200 steps while keeping clean accuracy nearly intact (85.2% vs. 85.6% on ImageNet-1k) — but their method exists only for transformer models that consume token sequences, which convolutional codecs are not.
Our claim is that the right synthesis is adapters, not tokens: small zero-initialized convolutional modules inserted exactly at the two failure modules Wu identified (the hyperprior interfaces and the decoder blocks around the normalization layers), trained with a dual objective, but fed by adversarial examples generated offline on other codecs rather than on the defended model. Because the perturbation pool is computed once, ahead of time, on cheap surrogate architectures, we never backpropagate an attack through the defended codec's autoregressive entropy model — the single most crippling cost in compression adversarial training, since those models decode latent symbols one at a time. The training loss is
$$\mathcal{L}(\phi) = \mathbb{E}_{x}\big[\,|R_\phi(x)-R_0(x)| + \lambda\,|D_\phi(x)-D_0(x)|\,\big] \;+\; \mathbb{E}_{\tilde{x}\in\mathcal{P}}\big[\,R_\phi(\tilde{x}) + \lambda\,D_\phi(\tilde{x})\,\big],$$
where $\phi$ are the adapter parameters, $R$ and $D$ are the bitrate and distortion of the codec with ($\phi$) and without ($0$) adapters, $\lambda$ is the codec's own rate–distortion weight, and $\mathcal{P}$ is the cached pool of surrogate-crafted perturbed images. The first term keeps clean behavior pinned to the frozen codec; the second teaches the adapters to resist the perturbation pool. The design borrows Pulfer et al.'s dual invariance-plus-correction objective but ports it to convolutional latent spaces, and unlike their method it does not depend on keeping a secret key: we evaluate it under full white-box adaptive attack.
Research Program
Phase one is a threat measurement that fills the open gap directly. We will build a transfer matrix: craft pure rate–distortion attacks — SRDA and ARDA from Chenhao Wu et al., FTDA from Toward Robust Neural Image Compression, and iterative PGD from Attack and Defense Analysis of Learned Image Compression — on each of at least five codecs (Ballé2018, Cheng2020, and the Cai2022/Zou2022 family from Wu's eight-model benchmark) and fire them at every other codec, on Kodak and CLIC2020 at native resolution. Success is measured in $\Delta$PSNR (decibels of induced reconstruction damage) and $\Delta$bpp (fractional bitrate inflation), not downstream classifier accuracy, which is what distinguishes this from Sui et al., whose transferability evidence is limited to CIFAR-10 classification through cheng2020-to-hyper pipelines. Following Hong et al., we will additionally measure input-gradient similarity between codec pairs and test whether it predicts the transfer matrix — if it does, a codec provider can audit its exposure to any published surrogate without running attacks.
Phase two builds the defense. Adapters are one-bottleneck convolutional residuals, initialized to identity so the defended codec is bit-exact with the frozen original at the start of training. The perturbation pool $\mathcal{P}$ is generated on surrogate codecs spanning multiple rate operating points, selected with the saliency-score sampling of Sui et al., which improved average transfer attack success by 6.46–8.63% over random surrogate ensembles in their setting; surrogates are deliberately chosen among non-autoregressive architectures so the one-time generation cost is modest. Training the adapters then requires a single forward and backward pass per image per step, versus the ten-plus inner-loop passes of standard adversarial training, which the literature places at a 10×–30× overhead over ordinary training. We will log wall-clock and GPU-hour costs for every method so the comparison is empirical, not assumed.
Phase three is evaluation under honest attack models: white-box adaptive PGD against the full defended system (attacker knows the adapters), black-box surrogate-ensemble transfer, ARDA-style rate-agnostic transfer, and expectation-over-transformation attacks that average the perturbation over random flips and shifts to defeat transform-based defenses — the exact adaptive scenario the training-free defense concedes it has not faced.
A secondary contribution falls out for free: the literature contradicts itself on the clean cost of compression adversarial training. Wu et al. report that adversarial training noticeably degrades the clean rate–distortion curve, while Toward Robust Neural Image Compression reports that fine-tuning at a very small perturbation bound ($\epsilon=10^{-4}$) "fully preserved" clean efficiency, cutting FTDA damage on Ballé2018 from 13.80 dB to 8.27 dB. Nobody has reconciled this. Our matched-budget measurements across perturbation bounds and attack objectives will map that Pareto frontier explicitly.
Baselines
The naive reference point is the undefended codec. On it, the cited attacks are devastating: FTDA induced $\Delta$PSNR frequently exceeding 10–20 dB on Ballé2018 and Cheng2020, with bitrate inflation up to +113% on Cheng2020 Toward Robust Neural Image Compression, and PGD produced a 61.55% PSNR decrease or a 19.15× bpp increase in the worst case Attack and Defense Analysis of Learned Image Compression. These numbers define the attack severity our defense must absorb.
The strongest existing robustness method is the distillation framework of Zhi Cao et al.: a teacher trained with a gradient-smoothing regularizer, then a student trained adversarially with the teacher's predicted bitrate as an anchor, yielding roughly 9 dB better reconstruction under PSNR attacks than an undefended baseline, 5 dB over Ma2023 at high bitrates, and up to 23% better bitrate resilience. We run it under an equal total GPU-hour cap (teacher plus student within the cap), on the same training images as our adapters, with the same attack suite. Beating it means matching its distortion and bitrate recovery within about 1 dB while using a small fraction of the compute and remaining effective under surrogate-ensemble black-box attacks, for which no reported result found on Lacuna exists for their method. We will also measure its clean BD-rate penalty, which its paper does not quantify — BD-rate being the standard summary of how much a codec's rate–distortion curve has shifted, where negative is better.
Standard white-box adversarial training is the method-family baseline. Attack and Defense Analysis fine-tuned on 1,633 PGD-polluted CLIC2020 images and achieved a 95.52% reduction in rate–distortion cost under attack; Toward Robust Neural Image Compression achieved its 13.80-to-8.27 dB mitigation at $\epsilon=10^{-4}$. We re-run it with the same images, epochs, and hardware budget as adapter training, so the comparison isolates our two ingredients: frozen backbone plus surrogate-sourced perturbations. Beating it means comparable white-box robustness at a tenth of the GPU-hours, no measurable clean loss, and clearly better survival under black-box transfer.
The strongest competitor on clean preservation is the training-free two-way compression defense A Training-Free Defense Framework for Robust Learned Image Compression, which encodes both the original and a randomly transformed copy, keeps whichever path has lower rate–distortion cost, and reports bitrates held near-normal where undefended models spike 10× or more, with zero clean degradation and zero training. It is the bar for the "do almost nothing" corner of the cost–robustness plane. We run it on identical codec checkpoints and attacks, and additionally measure its doubled encoding latency. Beating it means surviving expectation-over-transformation and surrogate-ensemble attacks that it has not been tested against, at single-path encoding latency, while matching its zero clean loss.
Finally, two ablations isolate the key ingredient. The same adapters trained on white-box PGD perturbations generated on the defended model itself test whether the architecture or the surrogate-sourced data does the work (this variant pays the inner-loop cost, so it also cleanly separates the compute story from the robustness story). Adapters trained on clean data only test whether the dual objective's invariance term alone — essentially a no-op — explains anything.
Why not just…?
Why not just use the training-free two-way compression defense? If it worked against every attack, it would win outright, and we will say so if our experiments show that. The evidence against it is its own stated limitation: it assumes the attacker tuned the perturbation to one specific pixel arrangement, and explicitly leaves open whether expectation-over-transformation or surrogate-ensemble attacks survive the random transforms. It also doubles encoding latency and protects nothing on the decoder side. Our phase-three evaluation attacks it directly with EOT and saliency-sampled surrogate ensembles; if it holds, that result alone is worth reporting and would reframe our contribution around adaptive robustness rather than cost.
Why not just do standard adversarial training, or its distillation refinement? Standard training faces three documented problems: the clean rate–distortion degradation reported by Wu et al., the 10×–30× compute overhead of the inner maximization (crippling specifically for codecs whose entropy model decodes sequentially), and a threat-model mismatch — every published compression defense is validated only white-box, while the realistic attacker is black-box with a surrogate. The distillation variant of Cao et al. stabilizes training but increases total cost by requiring a teacher plus a student. The honest caveat is that white-box-trained models often resist transfer attacks somewhat for free, so the matched-budget comparison in our baselines is the decisive test: if full adversarial training matches our robustness under surrogate-ensemble attack at a clean loss and cost the provider accepts, our method loses its main advantage and we will report that.
Why not just port Robustness Tokens to the codec? Pulfer et al. prepend learnable vectors to a transformer's input sequence, which has no analogue in a convolutional autoencoder with continuous latents and an entropy coder; the tokens also derive part of their security from being a secret, which degrades under white-box access — a limitation their own paper concedes. Our adapters are the architecture-appropriate translation of their dual objective, and we evaluate only under the stronger assumption that the attacker sees everything, including the adapter weights.
Proposed Experiments and Decisive Checks
All experiments use Kodak and CLIC2020 for evaluation and Vimeo-90K or DIV2K crops for training, matching the data choices of Toward Robust Neural Image Compression and Cao et al.. Metrics are $\Delta$PSNR and $\Delta$bpp under attack, clean BD-rate on uncorrupted images, GPU-hours and encoding latency, and Hong-style input-gradient similarity for the transfer matrix. Four checks decide the proposal. First, the transfer matrix: if pure rate–distortion attacks do not transfer across codecs at high resolution — contradicting the premise that motivates the whole threat model — the measurement study stands as the contribution, the defense question reverts to cheap white-box robustness, and the self-PGD ablation becomes the primary method; we consider this a publishable outcome either way, since no reported result found on Lacuna covers this setting. Second, the cost–robustness Pareto: adapters must recover a large fraction of the roughly 9 dB distortion improvement and 23% bitrate resilience that distillation achieves, at a tenth of its training cost. Third, clean preservation: clean BD-rate loss within half a percent, matching the training-free defense's zero. Fourth, adaptive survival: robustness must degrade gracefully, not collapse, when the attacker knows the adapters and uses expectation-over-transformation — the regime where every cheap defense in the current literature is untested. As a bonus check following Toward Robust Neural Image Compression, which showed adversarial training eliminates visible artifacts across 50 consecutive recompression cycles, we will test whether frozen-backbone adapters confer the same generation-loss immunity.
References
- Transferable Learned Image Compression-Resistant Adversarial Perturbations
- On the Adversarial Robustness of Learning-based Image Compression Against Rate-Distortion Attacks
- Publishing Efficient On-device Models Increases Adversarial Vulnerability
- Robustness Tokens: Towards Adversarial Robustness of Transformers
- Toward Robust Neural Image Compression: Adversarial Attack and Model Finetuning
- Attack and Defense Analysis of Learned Image Compression
- Enhancing Adversarial Training with Prior Knowledge Distillation for Robust Image Compression
- A Training-Free Defense Framework for Robust Learned Image Compression