HyperLogLog Cardinality Estimation with Poisson Maximum Likelihood

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current HyperLogLog (HLL) algorithms face biased estimation errors in extreme cardinality ranges and lack direct support for calculating set operations like intersections or relative complements, leading to inaccurate results and increased CPU and memory requirements.

Innovation Solution

The creation of histogram data from HLL structures to calculate correction terms for low and high cardinality ranges, combined with a maximum likelihood approach using a Poisson approximation model, enables accurate cardinality estimation for set operations by generating differential histogram data for set operations like intersections or relative complements.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Quantity of substance

If HyperLogLog algorithm is used for cardinality estimation, then memory consumption is reduced, but estimation accuracy deteriorates in extreme cardinality ranges

Engineering Contradiction:
Improvememory consumptionVSAvoidcardinality estimation accuracy
Core Design Contradiction:
Quantity of substanceVSMeasurement precision

Solution Approach 1:

The patent applies parameter changes by modifying the HyperLogLog estimation parameters (α, β, γ) based on the observed cardinality range. When the estimated cardinality falls into extreme ranges (very small or very large), the algorithm dynamically adjusts these parameters to correct the biased error behavior, thereby maintaining measurement precision without increasing memory consumption.

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The patent introduces dynamic adaptation by making the correction factors and estimation parameters variable rather than fixed. The algorithm dynamically selects different correction strategies based on the current cardinality estimate, transitioning between different error correction models depending on whether the cardinality is in extreme or moderate ranges.

Inventive Principle:
Principle #15Dynamics

2Measurement precision

If combined estimator approach is used to correct extreme range errors, then estimation accuracy in extreme ranges is improved, but CPU requirements increase

Engineering Contradiction:
Improvecardinality estimation accuracyVSAvoidprocessing speed
Core Design Contradiction:
Measurement precisionVSProductivity

Solution Approach 1:

The patent applies partial action by not always using the full combined estimator approach. Instead, it selectively applies correction factors only when the cardinality estimate falls into extreme ranges, avoiding the computational overhead of complex combined estimation when simple HLL estimation is sufficient.

Inventive Principle:
Principle #16Partial or excessive action

Solution Approach 2:

The patent segments the cardinality estimation process into different ranges (extreme low, extreme high, and moderate). Each segment uses an optimized estimation strategy appropriate for that range, avoiding the application of complex correction methods when they are not needed.

Inventive Principle:
Principle #1Segmentation

3Measurement precision

If heuristic correction factors are applied, then estimation error in extreme ranges is reduced, but reliability of correction factors deteriorates

Engineering Contradiction:
Improvecardinality estimation accuracyVSAvoidcorrection factor quality
Core Design Contradiction:
Measurement precisionVSReliability

Solution Approach 1:

The patent incorporates feedback mechanisms where the algorithm monitors the performance of correction factors and adapts them based on observed estimation errors. This feedback loop allows the system to verify and adjust correction factors, improving their reliability over time rather than relying on static heuristic values.

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS11561954B2Method and system to estimate the cardinality of sets and set operation results from single and multiple HyperLogLog sketches
Publication Date: 2023.01.24 DYNATRACE LLC
  • US11561954B2 patent drawing
  • US11561954B2 patent drawing
  • US11561954B2 patent drawing

AI summary

A system and method for the estimation of the cardinality of large sets of transaction trace data is disclosed. The estimation is based on HyperLogLog data sketches that are capable to store cardinality relevant data of large sets with low and fixed memory requirements. The disclosure contains improvements to the known analysis methods for HyperLogLog data sketches that provide improved relative error behavior by eliminating a cardinality range dependent bias of the relative error. A new analysis method for HyperLogLog data structures is shown that uses maximum likelihood analysis methods on a Poisson based approximated probability model. In addition, a variant of the new analysis model is disclosed that uses multiple HyperLogLog data structured to directly provide estimation results for set operations like intersections or relative complement directly from the HyperLogLog input data.