Nanjing University's HaTQ makes INT8 quantization work for learned image coding
New Hadamard-transform trick cuts model size without sacrificing compression quality.
Deploying learned image coding (LIC) models on real-world devices often requires quantizing them to INT8 to save memory and accelerate inference. But uniform INT8 quantization typically degrades rate-distortion performance because of heavy-tailed weight distributions and large variations across channels. Existing fixes rely on mixed-precision or non-uniform codebooks, which complicate deployment. Now, researchers at Nanjing University have introduced HaTQ (Hadamard-Transform-domain Quantization), a simple yet effective approach that reparameterizes each linear layer using an orthogonal Hadamard transform before quantizing. This redistributes weight and activation responses across channels, making uniform INT8 quantization much more accurate.
HaTQ comes in two flavors: double-Hadamard (transforms both inputs and weights) and weight-only (transforms just weights). The choice matters because the constant Hadamard basis can accumulate a nonzero channel mean and inflate activation ranges in sensitive layers. By offline profiling, HaTQ identifies those sensitive layers and assigns the right form per layer, without any input-dependent branching. It supports both post-training quantization (PTQ) and quantization-aware training (QAT), and is compatible with integer-only execution. Experimentally, QAT models using HaTQ outperform competing mixed-precision and non-uniform quantization methods on representative LIC architectures and datasets. TensorRT deployment results confirm practical INT8 inference efficiency. The team will release source code, making it easy for others to adopt.
- HaTQ uses orthogonal Hadamard reparameterization to redistribute weight/activation responses for uniform INT8 quantization of LIC models.
- Supports both post-training quantization (PTQ) and quantization-aware training (QAT), with a dual-form design (double-Hadamard vs. weight-only) chosen via offline profiling.
- QAT models surpass mixed-precision and non-uniform methods, and TensorRT deployment confirms real-world INT8 inference gains.
Why It Matters
HaTQ could make learned image compression practical on edge devices, slashing memory and latency while keeping quality.