Skip to main content
QUICK REVIEW

[Paper Review] Optimizing JPEG Quantization for Classification Networks

Zhijing Li, Christopher De|arXiv (Cornell University)|Mar 5, 2020
Advanced Data Compression TechniquesComputer Science20 references11 citations
TL;DR

This paper proposes optimizing JPEG quantization tables (Q-tables) specifically for deep learning classification networks, rather than for human visual perception or minimal distortion. By using high-resolution ImageNet data and tuning Q-tables via sorted random search and hyperparameter optimization, the authors achieve up to 2% higher top-1 accuracy at the same compression rate or 10–200% higher compression with fixed accuracy, outperforming standard JPEG and more complex optimization methods.

ABSTRACT

Deep learning for computer vision depends on lossy image compression: it reduces the storage required for training and test data and lowers transfer costs in deployment. Mainstream datasets and imaging pipelines all rely on standard JPEG compression. In JPEG, the degree of quantization of frequency coefficients controls the lossiness: an 8 by 8 quantization table (Q-table) decides both the quality of the encoded image and the compression ratio. While a long history of work has sought better Q-tables, existing work either seeks to minimize image distortion or to optimize for models of the human visual system. This work asks whether JPEG Q-tables exist that are "better" for specific vision networks and can offer better quality--size trade-offs than ones designed for human perception or minimal distortion. We reconstruct an ImageNet test set with higher resolution to explore the effect of JPEG compression under novel Q-tables. We attempt several approaches to tune a Q-table for a vision task. We find that a simple sorted random sampling method can exceed the performance of the standard JPEG Q-table. We also use hyper-parameter tuning techniques including bounded random search, Bayesian optimization, and composite heuristic optimization methods. The new Q-tables we obtained can improve the compression rate by 10% to 200% when the accuracy is fixed, or improve accuracy up to $2\%$ at the same compression rate.

Motivation & Objective

  • To investigate whether JPEG quantization tables can be optimized specifically for deep neural network (DNN) classification performance, rather than for human visual perception or minimal distortion.
  • To explore whether task-specific Q-tables can improve the accuracy-compression trade-off in vision datasets like ImageNet.
  • To evaluate multiple optimization strategies—including random search, bounded random search, Bayesian optimization, and composite heuristic methods—for tuning Q-tables.
  • To determine whether advanced optimization techniques outperform simple baseline methods in finding effective, task-specific Q-tables.
  • To provide a practical, efficient method for generating Q-tables that improve DNN performance when using compressed image data.

Proposed method

  • The authors reconstruct a high-resolution version of the ImageNet validation set to simulate JPEG compression with novel Q-tables, avoiding reliance on already-compressed datasets.
  • They use a sorted random search baseline to generate candidate Q-tables, where coefficients are sampled from a sorted distribution to prioritize meaningful frequency components.
  • They apply bounded random search, Bayesian optimization with local grid search, and composite heuristic optimization to explore the Q-table hyperparameter space.
  • For each candidate Q-table, they measure top-1 accuracy and compression ratio on a ResNet50 model fine-tuned on the compressed data.
  • They perform cross-validation using 100 random samples of 700 classes with 4 images per class to ensure statistical robustness of performance comparisons.
  • They evaluate efficiency by measuring decision time per trial and the number of trials needed to find 10 'good' Q-tables (defined by fitness > -0.001).

Experimental results

Research questions

  • RQ1Can JPEG quantization tables be optimized to improve deep learning model accuracy while maintaining or improving compression efficiency?
  • RQ2Does a simple random search method outperform more sophisticated hyperparameter optimization techniques in finding effective task-specific Q-tables?
  • RQ3Is there a significant performance gap between Q-tables optimized for human visual perception and those optimized for DNN classification?
  • RQ4Can the same Q-table be effective across different DNN architectures, or is it specific to a given model?
  • RQ5What is the trade-off between optimization complexity and performance gain in Q-table tuning for vision models?

Key findings

  • Sorted random search produced Q-tables that improved ResNet50 top-1 accuracy by 0.91% to 1.16% on the MatchedFrequency and ImageNet validation sets, respectively, at the same compression rate as standard JPEG quality 50.
  • The same method achieved a 10% to 200% increase in compression rate while maintaining the same accuracy, significantly outperforming standard JPEG.
  • All optimization methods—including Bayesian optimization and composite heuristic tuning—produced statistically significant accuracy gains over standard JPEG, with p < 10−5 for all comparisons.
  • Despite higher computational cost, Bayesian optimization did not outperform the simpler sorted random search, which was both faster and more efficient in finding good Q-tables.
  • The composite heuristic optimizer required the fewest trials (150) to find 10 good Q-tables, but the performance gain over sorted random search was not substantial enough to justify its complexity.
  • Statistical significance testing confirmed that improvements over standard JPEG were highly significant, with p < 10−11 for the best-performing methods.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.