Compression-based distance matches or exceeds other metrics with tiny client-side data
Normalized compression distance performs as well as or better than standard metrics and kernels despite not being a metric
AI/ML arXiv 6 Mar 2026 Method Prototype evidence
Published as “Tiny, Hardware-Independent, Compression-based Classification”
Why it matters
Enables privacy-preserving, client-side classifiers that can be trained on a single user’s data with modest hardware, opening possibilities for on-device spam, intrusion, or malware detection.
Summary
Kernelised normalised compression distance (NCD) achieves accuracy comparable to or better than traditional string metrics and kernels while running on client-side hardware; the proposed symmetrisation tricks cut the per-sample compression time by roughly 50% with little loss in accuracy. Evidence comes from 5-fold cross-validation on four real-world datasets where kernel methods consistently outperformed distance-only methods and NCD outperformed baseline metrics.
What they found 4
- Kernel methods using NCD outperform distance-based methods
“kernel methods (blue) tend to outperform distance-based methods when using NCD with various compressors (orange).”
- NCD is more accurate than baseline string metrics
“NCD is significantly more accurate than any of the baseline string metrics since compressors encode more semantic and string frequency data that metrics alone.”
- Symmetrisation methods reduce runtime by about half
“taking roughly half as long per sample as the “Vanilla” version.”
- Kernelised NCD models are often more accurate than the original NCD-KNN
“kernelized NCD models are often more accurate than NCD-KNN.”
Caveats 4
- To further improve run-time performance, compression algorithms optimised for graphics processing units (GPUs) have been developed [52]. These are likely to outperform the CPU-based implementations used in this paper when applied to large-scale datasets.
- This work focused on a specific set of compression algorithms. Although other compressors exist-including those optimised for specific data types [53, 54]-they were considered out of scope for this study.
- the data preprocessing step used for heterogeneous tabular data was intentionally kept simple each row was cast to a Python list then cast again as a string. While effective for our purposes (see Figure 1), this approach is crude and may obscure structural or semantic relationships within the data by including extraneous characters like white spaces, commas, and brackets (used to delineate and denote a list in Python, respectively).
- More sophisticated encoding methods-such as schema-aware parsing or embedding techniques-could improve performance, particularly on more complex or high-dimensional datasets, in particular for the “Truthseeker” dataset [55].
What’s new here 4
- Extends NCD from distance-based KNN to kernel methods, enabling use with logistic regression and SVMs.
- Introduces several symmetrisation techniques that halve the compression-time per sample.
- Demonstrates that NCD is not a true metric and provides mitigations to make it behave more like one.
- Applies NCD to heterogeneous tabular data (strings, numbers, categories) beyond prior work on text or images.