TL;DR
Current columnar storage formats like Apache Parquet hit a compression plateau because they compress each column in isolation. This paper introduces Virtual, a plug-in framework that automatically discovers cross-column correlations using sparse cluster-wise linear regression to “virtualize” redundant columns, achieving up to 40% file size reduction over Parquet+Snappy while maintaining fast scan speeds.
What Problem Does This Paper Address?
Modern data lakes rely on open columnar formats (such as Apache Parquet) that use lightweight encoding schemes (e.g., RLE, Delta) coupled with general-purpose compressors (e.g., Snappy). However, single-column compression techniques have largely reached a plateau.
Real-world tables frequently contain cross-column correlations (for example, a total_amount column that is merely the sum of fares, tips, and taxes). While correlation-aware compression can exploit these patterns, prior attempts suffer from major drawbacks:
- Deep learning approaches (like DeepSqueeze’s autoencoders) require decompressing the entire latent space just to query a single column, destroying column-scan performance.
- Rule-based approaches require manual user specification of relationships.
- Other automated tools either only look at simple 1-to-1 linear relations or do not optimize for the query-time I/O penalty of loading multiple reference columns.
Methods
Virtual operates as an automatic, lightweight three-step pipeline designed as a plug-in for open columnar storage:
- FUNCTIONDRILLER (Sparse $K$-Regression):
- Discovers relationships between a target column $y$ and reference columns $X$ by fitting a cluster-wise linear regression (partitioning data into $K$ clusters, each with its own linear model).
- Solves the scan-overhead problem by penalizing the number of active reference columns via $L_0$ sparsity regularization: $$\arg \min_{w, \beta} \sum_{k=1}^K \sum_{i \in C_k} (y_i - X_i^\top w_k - \beta_k)^2 + \lambda \|w\|_0$$
- Optimizes assignments iteratively over a small sample ($10^4$ rows) to maintain low compression overhead.
- OPTIMIZER (Resolving Cyclic Dependencies):
- If column $A$ can be computed from $B+C$, then $B$ can also be computed from $A-C$. Virtual uses a greedy optimizer to estimate space savings and select a cycle-free subset of virtualization functions.
- COMPRESSOR (Lossless Reconstruction & Missing Value Handling):
- Stores auxiliary columns: an
offset(residual error to closest regressor) and aswitch($\lceil \log_2 K \rceil$ bits indicating the active cluster). - Unlike lossy schemes that drop NaNs, Virtual guarantees strictly lossless recovery by storing an
outliercolumn (for rows where reference features are NaN) and anis_nanindicator.
Datasets
The authors evaluated Virtual using real-world tabular data from data.gov:
- An initial crawl of 1,226 popular CSV tables, filtered down to tables where correlations were found (157 tables) and excluding tables with fewer than 1,000 rows, yielding a benchmark of 103 tables (evaluating up to the first $10^6$ rows of each).
- Specific highlighted datasets include BLM ES PLSSPoint (geo-location data), 2018 Yellow Taxi Trip Data, DASH (Global School-based Student Health Survey), and Weekly Counts of Death by Jurisdiction.
Key Insights and Ideas
- Scan latency scales linearly with reference columns: In an analytical database (e.g., DuckDB), querying a virtualized column requires loading all of its reference columns from disk. Minimizing reference column count via an $L_0$ penalty is essential for practical analytical query performance.
- Piecewise linear functions ($K$-regression) capture real-world business logic: Columns often follow different rules depending on row categories (e.g., different fare models in taxi rides). Clustering rows into $K$ distinct linear models captures multi-modal relationships automatically without manual engineering.
- Lossless handling of missing data is feasible: Missing values (NaNs) break mathematical equations. Storing targeted auxiliary markers (
is_nanandoutlier) preserves analytical correctness without ballooning storage size.
Key Results
- Storage Footprint: Across 103 data.gov tables, Virtual achieved up to 40% space savings over standard Parquet+Snappy (e.g., on geo-location data). On 328 virtualized columns, the compressed size dropped significantly compared to Parquet.
- Scan Overhead: Column scan slowdown over default Parquet scaled gracefully and linearly with the number of reference columns, remaining practical (often within $1\times$ to $5\times$ for sparse predictors).
- Comparison to DeepSqueeze: When tested against DeepSqueeze (adapted for lossless storage):
- DASH dataset: Virtual achieved a file size of 9.18 MB vs. DeepSqueeze's 26.92 MB, while executing column scans in 18.43 ms vs. DeepSqueeze's 1,484.66 ms (~$80\times$ faster).
- Taxi trips: File size was 15.65 MB (Virtual) vs. 19.68 MB (DeepSqueeze); scan time was 74.40 ms vs. 515.62 ms (~$7\times$ faster).
Limitations and Future Work
- Linear Function Assumption: Virtual currently relies on piecewise linear functions. The authors suggest extending this to arbitrary sparse non-linear functions (such as tiny, sparse neural networks).
- Correlation Coverage: Meaningful correlations were detected in roughly 13% of the evaluated tables (157 of 1,226), meaning many tables won't benefit from virtualization.
- Storage-Layer Metadata: The authors note that downstream scan performance could be accelerated further by embedding zone maps (min-max bounds) directly into the virtualized columns in the storage layout.
Summary updated