Backdoor Attacks under Lossy Compression: From Failure to Reactivation and Adaptation

Qian Li, Yunuo Chen, Yuntian ChenNeurIPS 2026

TL;DR

In the lab, invisible backdoor triggers easily fool deep learning models—but in the real world, saving those poisoned images as standard JPEG or BPG files often scrubs the malicious triggers right out. This paper reveals why lossy image compression accidentally neutralizes state-of-the-art backdoor attacks, and shows how adversaries can hijack standard image encoder settings to sneak triggers cleanly through the compression pipeline.

What Problem Does This Paper Address?

To poison a machine learning model, an attacker slips hidden visual patterns ("triggers") into a subset of training images so the trained model learns a secret, attacker-controlled behavior. Most researchers design and test these invisible triggers on raw, uncompressed RGB pixel arrays.

Real-world data pipelines, however, don't ship terabytes of raw bitmaps around the internet. Datasets are compressed into binary bitstreams (like JPEG), stored, transmitted, and later decompressed by the user. Because lossy compression works by throwing away subtle, high-frequency visual details that human eyes barely notice—the exact hiding spot invisible triggers rely on for stealth—the trigger often gets destroyed in transit.

Figure 1: Ineffectiveness of backdoor attacks under lossy compression. Left: Higher compression rates introduce stronger distortion and substantially hinder backdoor injection, indicating that lossy compression can severely damage invisible triggers. Right: Re- moving high-frequency components from poisoned test samples via Fourier Transform significantly re- duces the ASR, suggesting that high-frequency infor- mation is critical for many invisible triggers.

Furthermore, previous "compression-aware" attacks simply used compression artifacts themselves as the trigger, assuming benign images remained uncompressed. When all data passes through a shared lossy storage-and-transmission pipeline, that distinction vanishes and those attacks fail too. The authors ask: how can a backdoor survive inevitable lossy compression when the attacker only releases a standard-compliant dataset and cannot touch the victim's decoder or training code?

Methods

To control what survives compression without breaking compatibility with standard decoders, the authors exploit Region of Interest (ROI) coding—a built-in feature in many traditional codecs (like JPEG 2000 and BPG) and Learned Image Compression (LIC) neural models. ROI coding takes an encoder-side spatial mask that tells the compressor where to spend more bits (preserving fine detail) and where to spend fewer bits (allowing heavier distortion).

Figure 2: Overview of backdoor attacks under lossy compression. Red borders denote poisoned samples, and green borders denote benign samples. Column 1 shows the real-world dataset-only poisoning pipeline, where data are stored and transmitted as compressed bitstreams before victim- side training. Column 2 illustrates that previous invisible attacks may fail after lossy compression because trigger information is destroyed. Columns 3-4 present our two ROI-based strategies: Universal Attack Reactivation, which reactivates ineffective invisible attacks by preserving trigger- relevant information, and Compression-Adapted Attack, which encodes malicious information into bitstreams to construct compression-adapted triggers for both traditional codecs and LICs.

Building on this standard interface, the authors propose two strategies:

  • Universal Attack Reactivation (UAR): Designed for neural LIC models with pixel-level ROI control, UAR rescues existing fragile attacks. The attacker extracts the high-frequency components of a poisoned image via a Fast Fourier Transform to build a sample-specific ROI mask, forcing the encoder to allocate bits to preserve the trigger. Crucially, to ensure the model doesn't just learn ROI distortion as a shortcut, benign images are also compressed using randomly sampled trigger masks.
  • Compression-Adapted Attack (CAA): Instead of adding pixel noise beforehand and hoping it survives, CAA turns the compressor itself into the trigger generator (working on both traditional codecs and LICs). Benign images are compressed normally with a uniform mask, while poisoned images are compressed using a patterned ROI mask—like an $8\times8$ checkerboard. White squares retain sharp high-frequency details while black squares lose them, inducing an invisible, target-correlated frequency pattern upon standard decompression.

Datasets

The authors evaluate their methods using existing standard benchmarks—CIFAR-10, GTSRB (traffic signs), and CelebA (using an eight-class subset)—with all images resized to $64\times64$. No new datasets are introduced.

Key Insights and Ideas

  • Stealthy triggers and lossy codecs fight over the same turf: Invisible triggers hide in high-frequency bands to evade human perception, which is precisely what lossy codecs are engineered to discard. Ignoring storage compression yields overly optimistic security evaluations.
  • Compression artifacts fail as triggers in shared pipelines: Prior JPEG-based attacks fail when benign images are also compressed, dropping below ~31% success because the distributional gap between compressed and uncompressed images disappears.
  • Zero file-size penalty: Because CAA spatially redistributes bits (more to white checkerboard squares, fewer to black ones) rather than cranking up overall quality, poisoned files have virtually the exact same file size and bitrate as normal files.

Key Results

  • Reactivating dead attacks (UAR): Under lossy LIC compression (Mbt-2018) with ResNet18 on CIFAR-10, FTrojan's Attack Success Rate (ASR) plunges to 12.53% and BppAttack drops to 44.17%. Applying UAR rebounds their ASRs to 94.91% and 96.23%, respectively, while keeping Benign Accuracy (BA) within ~1-3% of clean models. UAR also revives clean-label and prior compression-based attacks.
  • Near-perfect adaptation (CAA): Across CIFAR-10, GTSRB, and CelebA, CAA achieves 99.9%+ ASR in all-to-one settings across multiple classifiers, and 99.56%–100% ASR across JPEG 2000, BPG, Cheng-2020, and ELIC codecs.
  • Surviving re-compression and defenses: When subjected to secondary JPEG re-compression (default quality 75), reactivated FTrojan collapses to 17.87% ASR, whereas CAA (with a $2\times2$ mask) holds strong at 95.65% ASR. CAA also bypasses standard backdoor defenses including Fine-Pruning, STRIP, and Gaussian blur/noise, while achieving high visual stealth (37.4 PSNR, 0.965 SSIM, and a 52.4% score on human inspection tests).

Limitations and Future Work

The authors focus exclusively on exposing and constructing compression-adapted threats rather than building dedicated defenses against them. Notably, their own experiments reveal an important catch: visual stealth does not equal statistical invisibility. When the authors trained a simple linear detector on log-magnitude FFT features matched to a known CAA mask pattern, it distinguished poisoned samples from benign ones with 86.9% balanced accuracy on $2\times2$ masks and 71.0% on $8\times8$ masks (though detector transfer across different patterns was limited, dropping to 52.5%–60.5%). Developing adaptive frequency-domain detectors and mitigation pipelines for compressed bitstreams remains a key open challenge.

Summary updated

Abstract

Real-world backdoor attacks often require poisoned datasets to be stored and transmitted before they are used to compromise deep learning systems. In the era of big data, however, the inevitable use of lossy compression poses a fundamental challenge to invisible backdoor attacks. We observe that triggers embedded in RGB images can become ineffective once the images are lossily compressed into binary bitstreams, such as JPEG files, for storage and transmission. Consequently, poisoned data may lose their malicious functionality after compression, causing backdoor injection to fail. Prior compression-based attacks typically exploit compression artifacts as certain triggers to distinguish poisoned RGB samples from uncompressed benign ones, rather than addressing whether malicious information can survive a shared lossy storage-and-transmission pipeline. In this paper, we highlight the necessity of explicitly accounting for lossy compression in backdoor attacks. This requires attackers to ensure that transmitted binary bitstreams preserve malicious trigger information, such that effective triggers can be induced after decompression. Building on the region-of-interest (ROI) coding mechanism in image compression, we propose two poisoning strategies tailored to inevitable lossy compression. First, we introduce \textbf{Universal Attack Reactivation}, a general method that uses sample-specific ROI masks to reactivate trigger information in bitstreams for learned image compression (LIC). Second, we present \textbf{Compression-Adapted Attack}, a new attack strategy that employs customized ROI masks to encode trigger information into bitstreams and applies to both traditional codecs and LIC. Extensive experiments demonstrate the effectiveness of both strategies.
BibTeX
@inproceedings{li2026backdoor,
  author = {Qian Li and Yunuo Chen and Yuntian Chen},
  title = {{Backdoor Attacks under Lossy Compression: From Failure to Reactivation and Adaptation}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=8Zds0GA3mw},
}
Figure