[Paper Review] Count-Min-Log sketch: Approximately counting with approximate counters
This paper introduces Count-Min-Log Sketch, a variant of Count-Min Sketch that replaces linear counters with logarithmic-based approximate counters to reduce average relative error in low-frequency event estimation. By using a logarithmic base and 8–16-bit counters, it achieves up to 12× lower average relative error and 10× better RMSE on Pointwise Mutual Information compared to standard Count-Min Sketch, especially under memory-constrained settings.
Count-Min Sketch is a widely adopted algorithm for approximate event counting in large scale processing. However, the original version of the Count-Min-Sketch (CMS) suffers of some deficiences, especially if one is interested by the low-frequency items, such as in text-mining related tasks. Several variants of CMS have been proposed to compensate for the high relative error for low-frequency events, but the proposed solutions tend to correct the errors instead of preventing them. In this paper, we propose the Count-Min-Log sketch, which uses logarithm-based, approximate counters instead of linear counters to improve the average relative error of CMS at constant memory footprint.
Motivation & Objective
- To address the high relative error in standard Count-Min Sketch when estimating low-frequency events, common in text-mining applications.
- To improve the accuracy of approximate counting for low-frequency terms without increasing memory footprint.
- To reduce error in downstream NLP metrics like Pointwise Mutual Information (PMI) and TF-IDF by enhancing count estimation precision.
- To evaluate whether logarithmic counters can prevent error rather than correct it, as in prior variants.
- To compare performance under high-pressure memory settings where storage is below the ideal perfect count size.
Proposed method
- Replaces linear counters in Count-Min Sketch with logarithmic counters that use a base b > 1 to encode counts in a compressed, logarithmic scale.
- Uses a conservative update rule where an item is only incremented if a probabilistic decision based on the current counter value succeeds with probability b^(-c).
- Employs a two-part query function: PointValue(c) returns b^(c-1) for c > 0, and Value(c) uses a linear interpolation to estimate the true count from the minimum of d hash functions.
- Applies the sketch to unigram and bigram frequency counting in the 20newsgroups corpus, comparing CMS-CU, CMLS16-CU (base 1.00025, 16-bit), and CMLS8-CU (base 1.08, 8-bit).
- Measures performance using Average Relative Error (ARE) on counts and Root Mean Square Error (RMSE) on PMI estimates.
- Uses a fixed memory budget and compares results against the theoretical minimum storage needed for perfect count storage.
Experimental results
Research questions
- RQ1Can replacing linear counters with logarithmic counters in Count-Min Sketch significantly reduce the average relative error for low-frequency events?
- RQ2Does the logarithmic counter design prevent error propagation rather than correct it, as in prior CMS variants?
- RQ3How does the choice of logarithmic base and counter bit-width affect the trade-off between memory efficiency and estimation accuracy?
- RQ4To what extent does the proposed sketch improve downstream NLP metrics like Pointwise Mutual Information (PMI) under memory pressure?
- RQ5Is the performance gain of Count-Min-Log Sketch consistent across different storage budgets, especially below the ideal perfect count size?
Key findings
- Count-Min-Log Sketch with 16-bit counters (CMLS16-CU) reduces average relative error by approximately 2 to 4 times compared to standard Count-Min Sketch (CMS-CU) before the ideal storage size.
- CMLS8-CU with 8-bit counters and base 1.08 reduces average relative error by 7 to 12 times compared to CMS-CU, achieving a minimal ARE of 10^(-1.5).
- On Pointwise Mutual Information (PMI), CMLS16-CU improves RMSE by a factor of about 4 and CMLS8-CU by a factor of 10 compared to CMS-CU under equivalent memory constraints.
- Histograms of PMI values show that CMLS8-CU closely matches the reference distribution, while CMS-CU is significantly distorted on the right (high-interest) side of the distribution.
- The residual error in CMLS8-CU plateaus at around 10^(-1.5), indicating a hard lower bound due to approximate counting, which depends on the logarithmic base used.
- The method maintains performance improvements even under high-pressure memory settings, where storage is less than the ideal perfect count size.
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.