通过哈达玛变换重分布张量,提升图像编码模型的量化性能。
Hadamard-Domain Model Quantization for Learned Image Coding

- 用正交哈达玛变换重构权重和激活,使其更适合统一INT8量化
- 在多个图像编码模型上实现一致性能提升,优于混合精度方法
- 支持整数仅执行,适合实际部署,适用于模型压缩场景
统一INT8量化在部署学习型图像编码(LIC)时具有吸引力,但其率失真(R-D)性能常受限于长尾张量和大通道间差异。现有方法主要通过混合精度或非均匀码本调整量化器。本文提出哈达玛变换域量化(HaTQ),在量化前利用正交哈达玛重参数化,将原始域中的权重和激活响应跨通道重新分布。该重参数化保持每个线性算子的原函数映射,同时使权重和激活更适配统一INT8量化。HaTQ提供两种互补形式:双哈达玛量化同时变换输入激活和权重,权重仅哈达玛量化仅变换权重。这一区别很重要,因为恒定哈达玛基可相干积累非零通道均值并扩大敏感层的激活范围。通过离线分析识别敏感层,并为每层分配合适形式,无需依赖输入分支。HaTQ支持后训练量化(PTQ)与量化感知训练(QAT),使用统一INT8量化器,兼容整数仅执行。在代表性LIC架构和数据集上的实验表明,在不同量化设置下均取得一致改进。最终的QAT模型进一步超越竞争性的混合精度与非均匀量化方法。TensorRT部署结果验证了实际的INT8推理效率。源代码将公开发布。
原文摘要 · Abstract (English)
Uniform INT8 quantization is attractive for deploying learned image coding (LIC), but its rate--distortion (R--D) performance is often limited by heavy-tailed tensors and large inter-channel variations. Existing methods mainly adapt the quantizer through mixed precision or non-uniform codebooks. We propose Hadamard-Transform-domain Quantization (HaTQ), which uses orthogonal Hadamard reparameterization before quantization to redistribute weight and activation responses in the original domain across channels. The reparameterization preserves the original function mapping of each linear operator, while making its weights and activations more amenable to uniform INT8 quantization. HaTQ provides two complementary forms. Double-Hadamard quantization transforms both the input activations and weights, whereas weight-only Hadamard quantization transforms only the weights. This distinction is important because the constant Hadamard basis can coherently accumulate a nonzero channel mean and enlarge the activation range in sensitive layers. We identify these sensitive layers through offline profiling and assign the appropriate form to each layer without input-dependent branching. HaTQ supports both post-training quantization (PTQ) and quantization-aware training (QAT), uses uniform INT8 quantizers, and is compatible with integer-only execution. Experiments on representative LIC architectures and datasets demonstrate consistent improvements across different quantization settings. The resulting QAT models further outperform competing mixed-precision and non-uniform quantization methods. TensorRT deployment results demonstrate practical INT8 inference efficiency. The source code will be publicly released.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。