[Paper Review] Clustering by compression
This paper introduces the Normalized Compression Distance (NCD), a universal similarity metric that clusters data without relying on domain-specific features by leveraging compression algorithms. It demonstrates robust, feature-agnostic clustering across diverse domains—genomics, virology, linguistics, music, and astronomy—achieving results consistent with expert classifications using only file compression and hierarchical clustering.
We present a new method for clustering based on compression. The method doesn't use subject-specific features or background knowledge, and works as follows: First, we determine a universal similarity distance, the normalized compression distance or NCD, computed from the lengths of compressed data files (singly and in pairwise concatenation). Second, we apply a hierarchical clustering method. The NCD is universal in that it is not restricted to a specific application area, and works across application area boundaries. A theoretical precursor, the normalized information distance, co-developed by one of the authors, is provably optimal but uses the non-computable notion of Kolmogorov complexity. We propose precise notions of similarity metric, normal compressor, and show that the NCD based on a normal compressor is a similarity metric that approximates universality. To extract a hierarchy of clusters from the distance matrix, we determine a dendrogram (binary tree) by a new quartet method and a fast heuristic to implement it. The method is implemented and available as public software, and is robust under choice of different compressors. To substantiate our claims of universality and robustness, we report evidence of successful application in areas as diverse as genomics, virology, languages, literature, music, handwritten digits, astronomy, and combinations of objects from completely different domains, using statistical, dictionary, and block sorting compressors. In genomics we presented new evidence for major questions in Mammalian evolution, based on whole-mitochondrial genomic analysis: the Eutherian orders and the Marsupionta hypothesis against the Theria hypothesis.
Motivation & Objective
- To develop a universal, feature-agnostic similarity metric applicable across diverse domains without requiring subject-matter expertise.
- To bridge the gap between the theoretically optimal normalized information distance (based on Kolmogorov complexity) and practical, computable clustering by approximating it via real-world compressors.
- To create a robust, universal clustering framework that works across application boundaries using only data compression and hierarchical clustering.
- To validate the method’s universality and robustness through extensive experiments on heterogeneous data types and multiple compressors.
- To enable automatic discovery of dominant similarity features in unknown data, supporting exploratory data analysis and machine learning applications.
Proposed method
- Define the Normalized Compression Distance (NCD) as a normalized, computable approximation of the theoretical normalized information distance using real-world compressors.
- Compute NCD between data objects using the formula: NCD(x,y) = [C(xy) - min(C(x), C(y))] / max(C(x), C(y)), where C is a compressor and C(xy) is the compressed size of the concatenated files.
- Use a normal compressor (e.g., PPMZ, bzip2, gzip) to approximate Kolmogorov complexity, ensuring the NCD remains a valid similarity metric.
- Construct a distance matrix from pairwise NCD values between all data objects.
- Apply a novel fast heuristic for the quartet method to build a hierarchical dendrogram (binary tree) from the distance matrix.
- Visualize and validate the resulting clusters against expert classifications in various domains.

Experimental results
Research questions
- RQ1Can a compression-based similarity metric achieve universality across diverse data domains without relying on domain-specific features?
- RQ2How well does the NCD, derived from real compressors, approximate the theoretically optimal normalized information distance?
- RQ3To what extent is the clustering performance robust across different types of compressors and data types?
- RQ4Can the NCD automatically discover dominant similarity features in data where such features are unknown or complex?
- RQ5Does the NCD-based clustering align with expert classifications in real-world scientific domains such as genomics and astronomy?
Key findings
- The NCD method achieved a dendrogram similarity score of S(T) = 0.994 when clustering 16 X-ray observation intervals of the microquasar GRS 1915+105, closely matching the expert classification into three variability modes.
- The method successfully clustered whole mitochondrial genomes, providing new evidence for the Marsupionta hypothesis over the Theria hypothesis in mammalian evolution.
- The NCD-based clustering of 50+ Euro-Asian languages produced a language tree consistent with historical linguistic classifications, demonstrating cross-linguistic universality.
- The method detected plagiarism in student submissions with high accuracy, showing utility in educational and document analysis applications.
- The NCD-based clustering of handwritten digits and music files achieved high consistency with known categories, even without feature engineering.
- The method’s performance was robust across different compressors (e.g., PPMZ, bzip2, gzip), indicating independence from the choice of compressor.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.