Skip to main content
QUICK REVIEW

[论文解读] Asymmetric numeral systems: entropy coding combining speed of Huffman coding with compression rate of arithmetic coding

Jarek Duda|arXiv (Cornell University)|Nov 11, 2013
Algorithms and Data Compression参考文献 6被引用 131
一句话总结

本文提出了一种新型熵编码方法——非对称数系统(Asymmetric Numeral Systems, ANS),该方法结合了霍夫曼编码的速度与算术编码的压缩效率。通过使用单个自然数作为状态,并根据符号概率重新定义数位的排列方式,ANS 实现了接近理论压缩极限的性能,同时解码速度显著提升——对于 256 个符号的字母表,解码速度比霍夫曼编码快达 50%。此外,通过使用伪随机表生成方法,该方法还实现了内置的数据加密功能。

ABSTRACT

The modern data compression is mainly based on two approaches to entropy coding: Huffman (HC) and arithmetic/range coding (AC). The former is much faster, but approximates probabilities with powers of 2, usually leading to relatively low compression rates. The latter uses nearly exact probabilities - easily approaching theoretical compression rate limit (Shannon entropy), but at cost of much larger computational cost. Asymmetric numeral systems (ANS) is a new approach to accurate entropy coding, which allows to end this trade-off between speed and rate: the recent implementation [1] provides about $50\%$ faster decoding than HC for 256 size alphabet, with compression rate similar to provided by AC. This advantage is due to being simpler than AC: using single natural number as the state, instead of two to represent a range. Beside simplifying renormalization, it allows to put the entire behavior for given probability distribution into a relatively small table: defining entropy coding automaton. The memory cost of such table for 256 size alphabet is a few kilobytes. There is a large freedom while choosing a specific table - using pseudorandom number generator initialized with cryptographic key for this purpose allows to simultaneously encrypt the data. This article also introduces and discusses many other variants of this new entropy coding approach, which can provide direct alternatives for standard AC, for large alphabet range coding, or for approximated quasi arithmetic coding.

研究动机与目标

  • 解决熵编码中长期存在的速度与压缩效率之间的权衡问题。
  • 开发一种实用的算术编码替代方案,避免复杂的归一化处理与状态管理。
  • 通过基于概率状态转移的统一框架,实现数据压缩与加密的同步处理。
  • 探索将 ANS 作为轻量级、非线性构建模块应用于密码系统中的可行性。
  • 为 ANS 作为通用熵编码方法提供理论与实践基础,支持性能与安全性的可调配置。

提出的方法

  • 使用单个自然数作为状态,取代算术编码中使用的双数范围表示法。
  • 定义状态转移规则,使符号 s 将状态 x 映射为 x′ ≈ x/p_s,确保信息增益与 log(1/p_s) 比特相匹配。
  • 重新定义偶数与奇数集合以反映符号概率,从而在不同密度下实现均匀分布。
  • 通过预计算查找表,将状态映射到符号及其下一状态,构建有限状态自动机(tANS)。
  • 使用以密码学密钥初始化的伪随机数生成器,生成唯一编码表,实现密钥依赖的编码与安全加密。
  • 在归一化过程中采用比特块传输,而非复杂的范围算术运算,从而简化实现并提升处理速度。

实验结果

研究问题

  • RQ1单状态熵编码器是否能在接近香农熵极限的同时,保持与霍夫曼编码相当的解码速度?
  • RQ2如何设计状态转移规则,以确保信息论最优性并支持高效实现?
  • RQ3通过密钥依赖的表生成,ANS 在多大程度上可支持内置数据加密功能?
  • RQ4使用伪随机初始化生成编码表时,性能与安全性之间的权衡如何?
  • RQ5如何将 ANS 适配用于自适应、上下文相关或多重字母表的压缩系统?

主要发现

  • ANS 的压缩率几乎与算术编码相同,接近理论上的香农熵极限。
  • 对于 256 个符号的字母表,tANS 的解码速度比霍夫曼编码快达 50%,主要得益于更简单的状态转移与比特块处理机制。
  • 通过用单个自然数状态替代双数范围表示,显著降低了计算复杂度,简化了归一化过程。
  • 利用伪随机数生成器初始化编码表,可实现数据压缩与加密的同步进行,且行为依赖于密钥。
  • 通过使用块索引对伪随机数生成器进行种子初始化,可实现单个密钥下的多个独立编码,增强对暴力破解攻击的抵抗力。
  • 256 个符号字母表的 tANS 表仅需几 KB 内存,具备实际部署的可行性。

更好的研究,从现在开始

从论文设计到论文写作,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。