Abstract
As global data volumes expand exponentially, traditional integer compression algorithms are approaching their performance limits. This paper explores the paradigm of "learned" data compression, which utilizes simple machine learning models to approximate data distributions. By storing only the residuals—the errors between model predictions and actual values—these systems achieve lossless reconstruction. We highlight the development of lc-simd, a SIMD-optimized learned compressor that significantly outperforms industry standards like P4Delta and BIC, providing a high-performance foundation for future data-intensive systems.
Introduction
The cost of digital storage is failing to keep pace with the explosion of global data, creating a critical bottleneck for search engines, key-value stores, and vector databases. While integer compression is a mature field with established "gold standard" algorithms such as Variable Byte and P4Delta, these methods are reaching their performance ceilings.
Inspired by the "learned index" revolution, where ML models replace traditional structures like B-trees, this research investigates whether similar logic can be applied to compression. The primary challenge lies in designing a model that is sufficiently compact to save space while remaining fast enough to decompress at hardware-saturating speeds.
Methods: Piecewise Linear Approximation
The core of the proposed approach is Learned Sorted Integer Compression using $ε$-PLA (Piecewise Linear Approximation). This method operates through three distinct phases:
- Modeling: The system fits a series of linear segments ($f(i) = αi + β$) to the data. Each segment approximates a range of keys with a maximum error bound of $ε$.
- Residual Storage: To ensure the compression is lossless, the system stores a "residual" array representing the difference between the model's prediction and the actual value. Because the error is bounded by $ε$, these residuals can be stored using a minimal, fixed number of bits.
- Decompression: Reconstructing a key is a simple, computationally inexpensive addition: $Key = \text{Model Prediction} + \text{Residual}$.
To overcome the computational overhead typically associated with learned models, the authors introduced lc-simd. This implementation leverages Single Instruction, Multiple Data (SIMD) instructions, using task decomposition and operator fusion to allow the CPU to process multiple keys within a single clock cycle.
Key Insights and Hardware Alignment
Learned compression represents a duality with learned indexing. While indexing models the Cumulative Distribution Function (CDF) to map keys to positions, compression models the inverse CDF (the quantile function) to map positions back to keys.
One significant advantage of PLA-based compression is "natural pruning." In search engines, compressed lists usually require extra metadata called "skip pointers" for fast searching. PLA segments provide this functionality inherently; because each segment defines a specific range, the system can skip entire segments during a search without additional overhead.
Furthermore, the performance of learned compression is highly dependent on the error bound $ε$. A larger $ε$ reduces the number of segments (saving model space) but increases the size of residuals. Finding the optimal balance is a complex optimization problem, often addressed as a shortest-path graph problem.
Key Results
The lc-simd implementation was evaluated on the CCNews dataset, a web-scale document inverted index benchmark (53 GiB). It was compared against eight mainstream baselines, including bic, optpfor, vbyte, and qmx.
The results demonstrate that lc-simd achieves a dominant position in the performance landscape:
- Throughput: It reached a decompression speed of 6.535 GiB/s.
- Comparative Speed: This performance is 18.25x faster than Binary Interpolative Coding (BIC) and 1.3x faster than QMX, the previous state-of-the-art for SIMD-based integer compression.
- Efficiency: It maintains a compression ratio competitive with the best CPU-based baselines while delivering significantly higher throughput.
Limitations and Future Directions
Despite its high performance, learned compression faces several hurdles. Like most learned data structures, it struggles with dynamic updates; inserting new data often requires expensive model retraining. Additionally, finding optimal segment boundaries remains computationally intensive ($O(N^2)$ in worst-case scenarios), necessitating the development of faster linear-time heuristics.
Future work may extend these techniques to floating-point data by treating mantissas and exponents as separate integer streams. There is also significant potential in utilizing GPU Tensor Cores to accelerate linear calculations, which could push decompression throughput into the tens of GiB/s range.
Summary updated