Differentiable JPEG: The Devil is in the Details
Not on the map. Why?
Abstract (arXiv)
JPEG remains one of the most widespread lossy image coding methods. However, the non-differentiable nature of JPEG restricts the application in deep learning pipelines. Several differentiable approximations of JPEG have recently been proposed to address this issue. This paper conducts a comprehensive review of existing diff. JPEG approaches and identifies critical details that have been missed by previous methods. To this end, we propose a novel diff. JPEG approach, overcoming previous limitations. Our approach is differentiable w.r.t. the input image, the JPEG quality, the quantization tables, and the color conversion parameters. We evaluate the forward and backward performance of our diff. JPEG approach against existing methods. Additionally, extensive ablations are performed to evaluate crucial design choices. Our proposed diff. JPEG resembles the (non-diff.) reference implementation best, significantly surpassing the recent-best diff. approach by 3.47dB (PSNR) on average. For strong compression rates, we can even improve PSNR by 9.51dB. Strong adversarial attack results are yielded by our diff. JPEG, demonstrating the effective gradient approximation. Our code is available at https://github.com/necla-ml/Diff-JPEG.
Key facts. Cited by 13 papers in the map (data through 7 Oct 2026). Builds on 24 of its 36 references that are in the map. First posted on arXiv 13 Sep 2023.
Builds on
24 of 36 references.
References · 24
- 2015Deep Residual Learning for Image Recognitioncited by 51,809
- 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,160
- 2014ImageNet Large Scale Visual Recognition Challengecited by 8,441
- 2014Explaining and Harnessing Adversarial Examplescited by 7,287
- 2017Neural Discrete Representation Learningcited by 4,650
- 2020Taming Transformers for High-Resolution Image Synthesiscited by 3,229
- 2016Categorical Reparameterization with Gumbel-Softmaxcited by 2,708
- 2013Estimating or Propagating Gradients Through Stochastic Neurons for Conditional Computationcited by 2,031
- 2016Adversarial examples in the physical worldcited by 1,762
- 2019Normalizing Flows for Probabilistic Modeling and Inferencecited by 1,315
- 2020Training Generative Adversarial Networks with Limited Datacited by 1,184
- 2016Adversarial Machine Learning at Scalecited by 934
12 more
- 2017Countering Adversarial Images using Input Transformationscited by 517
- 2018HiDDeN: Hiding Data With Deep Networkscited by 384
- 2020Differentiable Augmentation for Data-Efficient GAN Trainingcited by 361
- 2017Lossy Image Compression with Compressive Autoencoderscited by 289
- 2019Kornia: an Open Source Differentiable Computer Vision Library for PyTorchcited by 231
- 2019Faster AutoAugment: Learning Augmentation Strategies using Backpropagationcited by 96
- 2021Invertible Image Signal Processingcited by 94
- 2020The Rate-Distortion-Accuracy Tradeoff: JPEG Case Studycited by 22
- 2021FaceGuard: Proactive Deepfake Detectioncited by 16
- 2020Learning to Improve Image Compression without Changing the Standard Decodercited by 7
- 2020Differentiable Data Augmentation with Korniacited by 4
- 2020Towards Robust Data Hiding Against (JPEG) Compression: A Pseudo-Differentiable Deep Learning Approachcited by 4
Built on by
Citing papers per year: 2023: 1; 2024: 4; 2025: 6; 2026: 2.
13 papers.
Sort:
By area:
- 2024Agent Smith: A Single Image Can Jailbreak One Million Multimodal LLM Agents Exponentially Fastcited by 149
- 2024GuardSplat: Efficient and Robust Watermarking for 3D Gaussian Splattingcited by 18
- 2025Transferable Adversarial Attacks on Black-Box Vision-Language Modelscited by 10
- 2025MIRA: Towards Mitigating Reward Hacking in Inference-Time Alignment of T2I Diffusion Modelscited by 7
- 2024Guardians of Image Quality: Benchmarking Defenses Against Adversarial Attacks on Image Quality Metricscited by 5
- 2023VMAF Re-implementation on PyTorch: Some Experimental Resultscited by 4
- 2025PnP-CM: Consistency Models as Plug-and-Play Priors for Inverse Problemscited by 4
- 2025Big Brother is Watching: Proactive Deepfake Detection via Learnable Hidden Facecited by 2
- 2024A Perspective on Deep Vision Performance with Standard Image and Video Codecscited by 1
- 2025On the Feasibility of Poisoning Text-to-Image AI Models via Adversarial Mislabelingcited by 1
- 2026FAST-DIPS: Adjoint-Free Analytic Steps and Hard-Constrained Likelihood Correction for Diffusion-Prior Inverse Problemscited by 1
- 2026MetaCloak-JPEG: JPEG-Robust Adversarial Perturbation for Preventing Unauthorized DreamBooth-Based Deepfake Generationcited by 1
1 more
- 2026MetaCloak-JPEG: JPEG-Robust Adversarial Perturbation for Preventing Unauthorized DreamBooth-Based Deepfake Generation20 Apr 2026
- 2026FAST-DIPS: Adjoint-Free Analytic Steps and Hard-Constrained Likelihood Correction for Diffusion-Prior Inverse Problems2 Mar 2026
- 2025Versatile Recompression-Aware Perceptual Image Super-Resolution22 Nov 2025
- 2025MIRA: Towards Mitigating Reward Hacking in Inference-Time Alignment of T2I Diffusion Models2 Oct 2025
- 2025PnP-CM: Consistency Models as Plug-and-Play Priors for Inverse Problems25 Sep 2025
- 2025On the Feasibility of Poisoning Text-to-Image AI Models via Adversarial Mislabeling27 Jun 2025
- 2025Transferable Adversarial Attacks on Black-Box Vision-Language Models2 May 2025
- 2025Big Brother is Watching: Proactive Deepfake Detection via Learnable Hidden Face15 Apr 2025
- 2024GuardSplat: Efficient and Robust Watermarking for 3D Gaussian Splatting29 Nov 2024
- 2024Guardians of Image Quality: Benchmarking Defenses Against Adversarial Attacks on Image Quality Metrics2 Aug 2024
- 2024A Perspective on Deep Vision Performance with Standard Image and Video Codecs18 Apr 2024
- 2024Agent Smith: A Single Image Can Jailbreak One Million Multimodal LLM Agents Exponentially Fast13 Feb 2024
1 more
- 2023VMAF Re-implementation on PyTorch: Some Experimental Results24 Oct 2023
- 2025MIRA: Towards Mitigating Reward Hacking in Inference-Time Alignment of T2I Diffusion Modelscited by 7
- 2025PnP-CM: Consistency Models as Plug-and-Play Priors for Inverse Problemscited by 4
- 2026FAST-DIPS: Adjoint-Free Analytic Steps and Hard-Constrained Likelihood Correction for Diffusion-Prior Inverse Problemscited by 1
- 2026MetaCloak-JPEG: JPEG-Robust Adversarial Perturbation for Preventing Unauthorized DreamBooth-Based Deepfake Generationcited by 1
- 2026MetaCloak-JPEG: JPEG-Robust Adversarial Perturbation for Preventing Unauthorized DreamBooth-Based Deepfake Generation20 Apr 2026
- 2026FAST-DIPS: Adjoint-Free Analytic Steps and Hard-Constrained Likelihood Correction for Diffusion-Prior Inverse Problems2 Mar 2026
- 2025MIRA: Towards Mitigating Reward Hacking in Inference-Time Alignment of T2I Diffusion Models2 Oct 2025
- 2025PnP-CM: Consistency Models as Plug-and-Play Priors for Inverse Problems25 Sep 2025
- 2024GuardSplat: Efficient and Robust Watermarking for 3D Gaussian Splattingcited by 18
- 2024Guardians of Image Quality: Benchmarking Defenses Against Adversarial Attacks on Image Quality Metricscited by 5
- 2023VMAF Re-implementation on PyTorch: Some Experimental Resultscited by 4
- 2025Big Brother is Watching: Proactive Deepfake Detection via Learnable Hidden Facecited by 2
- 2024A Perspective on Deep Vision Performance with Standard Image and Video Codecscited by 1
- 2025Versatile Recompression-Aware Perceptual Image Super-Resolutioncited by 0
- 2025Versatile Recompression-Aware Perceptual Image Super-Resolution22 Nov 2025
- 2025Big Brother is Watching: Proactive Deepfake Detection via Learnable Hidden Face15 Apr 2025
- 2024GuardSplat: Efficient and Robust Watermarking for 3D Gaussian Splatting29 Nov 2024
- 2024Guardians of Image Quality: Benchmarking Defenses Against Adversarial Attacks on Image Quality Metrics2 Aug 2024
- 2024A Perspective on Deep Vision Performance with Standard Image and Video Codecs18 Apr 2024
- 2023VMAF Re-implementation on PyTorch: Some Experimental Results24 Oct 2023