Abstract
The Compressed Vector Set (CVS) framework allows data mining algorithms to run directly on compressed data without ever decompressing it. By combining run-length encoding with clever dimension reordering and data discretization, CVS achieves significant speedups and memory savings across both sparse and dense datasets.
Introduction
Data mining on edge devices, such as sensors and mobile phones, is often hamstrung by limited memory and low computational power. Traditionally, researchers use sparse matrix representations to save space, but these only work well when data is mostly zeros. If the data is dense, sparse formats can actually perform worse than raw arrays.
The Compressed Vector Set (CVS) framework addresses this gap by providing a unified approach that handles both sparse and dense data efficiently. Crucially, CVS enables "in-situ" calculations—performing mathematical operations while the data remains compressed—thereby removing the computational bottleneck of decompression.
Methodology
The CVS framework relies on three main pillars:
1. Compression via RLE and PackBits
Instead of storing every value, CVS uses Run-Length Encoding (RLE) to store a value and its repetition count. It specifically employs PackBits, a variant that efficiently handles sequences where values do not repeat by storing them as raw data.
2. Math Without Decompression
This is the core innovation of CVS. The authors developed algorithms for primitive operations, such as the dot product and p-norm, that operate directly on compressed blocks. For example, a dot product between two compressed vectors is calculated by merging the blocks, similar to a sort-merge join in a database.
3. Optimization Techniques
- Dimension Reordering: Since RLE efficiency depends on long "runs" of the same value, CVS reorders vector dimensions. The authors propose a polynomial-time heuristic called Scored-lex-sort to find an ordering that maximizes compression without affecting the mathematical results of operations like Euclidean distance.
- Discretization: For real-valued data, CVS uses k-means clustering to bin values into centroids. This increases the likelihood of repeating values and thus improves compression, often acting as a noise filter.
Experimental Evaluation
The authors evaluated CVS using sparse datasets (NIPS, KOS, Enron) and dense, high-dimensional datasets (Madelon, Arcene, Gisette).
Space and Speed Efficiency
CVS successfully compressed dense datasets where traditional sparse formats failed. For the Arcene dataset, while the sparse format was 162% the size of the original, CVS reduced it to just 24.85%.
Speedups were equally significant:
- On the Enron (sparse) dataset, k-NN was 202x faster using CVS with dimension reordering compared to raw data.
- On the Gisette (dense) dataset, CVS provided a 3x to 9x speedup for k-NN and Logistic Regression compared to standard sparse representations.
Impact of Discretization on Accuracy
While discretization is technically lossy, the authors found it often acts as a noise filter, sometimes improving classifier performance by reducing the impact of outliers.
Discussion and Limitations
CVS exploits the "hidden freedom" of dimension-order insensitivity in many machine learning operations. By rearranging data into a more compressible format, it turns mathematical operations into efficient block-merging tasks.
However, some limitations remain. Dimension reordering is an NP-hard problem, and while "Scored-lex-sort" is effective, it is a heuristic. Furthermore, the discretization step is lossy and may not be suitable for tasks requiring extreme numerical precision. Future work may explore applying these techniques to deep neural network compression and bitmap-index reordering.
Summary updated