Adaptive Encoding Strategies for Erasing-Based Lossless Floating-Point Compression

Ruiyuan Li, Zheng Li, Yi Wu, Chao Chen, Tong Liu, Yu ZhengarXiv 2023 · DOI

Abstract

Floating-point time series data generated by IoT and sensing devices presents a significant storage and transmission challenge. While recent "erasing-based" compressors like Elf have improved efficiency by removing insignificant trailing bits, they rely on static encoding rules that fail to account for varying data distributions. This paper introduces Elf* and SElf*, a family of algorithms that utilize dynamic programming to find mathematically optimal encoding rules for leading and trailing zeros. By replacing fixed bit-mapping with adaptive strategies, Elf* achieves a ~9.2% improvement in compression ratios over state-of-the-art streaming compressors while maintaining high computational efficiency.

Introduction

Modern industrial systems, such as aviation and IoT networks, generate massive volumes of floating-point data. Storing this data in raw IEEE 754 format is costly, yet standard compression algorithms often struggle with the complex bit-level structure of floats. Recent advancements introduced "erasing-based" compression, which erases trailing bits that do not affect decimal precision, thereby creating more bit-level redundancy. However, existing methods like the original Elf algorithm use "one-size-fits-all" rules to encode these zeros, leaving significant potential for optimization untapped.

The Erasing-Based Approach

The core of the Elf family of compressors is the "erasing" technique. By identifying the decimal precision ($\alpha$) of a value, the algorithm can determine how many trailing bits in the mantissa are effectively "noise" and can be set to zero without losing information.

The Elf erasing mechanism removes insignificant trailing bits to increase redundancy.

As shown in Figure 2, erasing these bits significantly increases the number of trailing zeros, which can then be compressed. However, the distribution of these zeros—and the leading zeros resulting from XORing consecutive values—varies dramatically across different datasets.

Adaptive Encoding via Dynamic Programming

The primary innovation of Elf* is the move from static to adaptive encoding. The authors observed that the distribution of leading zeros acts as a "fingerprint" for a dataset, requiring a flexible approach to maximize compression.

Distribution of leading zeros across 22 diverse datasets, highlighting the need for adaptive encoding.

To exploit these distributions, Elf* employs several key strategies:

  1. Adaptive Leading Zero Encoding: Uses Dynamic Programming (DP) to find the globally optimal bit-mapping rule for a specific dataset, balancing the cost of storing the rule against the bits saved.
  2. Trailing Zero Encoding: Instead of storing "center bits," Elf* encodes the count of trailing zeros using the same DP strategy, which is more efficient for skewed distributions.
  3. Adaptive Sharing: The algorithm dynamically decides whether to reuse zero-count information from previous values based on a cost-benefit analysis of flag bits.

To ensure these optimizations remain practical, the authors implemented "Zero Pruning" and "Front-Rear Pruning" to reduce the DP search complexity from $O(N^4)$ to a manageable level for real-time applications.

Streaming Implementation: SElf*

For real-time IoT streams where the full data distribution is unknown, the authors developed SElf*. This streaming variant uses a sliding window approach. It monitors compression performance and triggers a recalculation of the optimal encoding rules whenever a performance dip is detected, ensuring the algorithm remains tuned to shifting data characteristics.

Results and Conclusion

Evaluated across 22 diverse datasets, SElf* demonstrated an average improvement of 9.1% to 10.27% in compression ratio over Elf+, the previous state-of-the-art. While batch compressors like Xz can achieve higher ratios on very large blocks, Elf* is 20x faster and outperforms Xz by 10.1% on the smaller block sizes typical of streaming data. By combining precision-aware erasing with data-driven adaptive encoding, Elf* provides a robust solution for high-efficiency floating-point data management in modern sensing environments.

Summary updated

BibTeX
@misc{li2023adaptive,
  author = {Ruiyuan Li and Zheng Li and Yi Wu and Chao Chen and Tong Liu and Yu Zheng},
  title = {{Adaptive Encoding Strategies for Erasing-Based Lossless Floating-Point Compression}},
  year = {2023},
  eprint = {2308.11915},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2308.11915},
}
Figure