Introduction
Identifying the most frequent value, or the mode, of a discrete distribution is a fundamental task in statistics and computer science, with applications ranging from election forecasting to blockchain verification. In the "Probably Approximately Correct" (PAC) framework, the goal is to identify the mode with a high probability $1-\delta$ using as few samples as possible. This paper introduces PPR-1v1, an algorithm that leverages anytime martingale confidence sequences to achieve state-of-the-art sample efficiency and theoretical optimality.
The Challenge of Mode Estimation
Traditional mode estimation methods often rely on fixed-sample bounds like Chernoff inequalities. However, these methods typically require pre-specifying the number of samples or tuning parameters that depend on the unknown distribution. A more desirable approach is a "parameter-free" stopping rule that adapts to the difficulty of the instance—requiring more samples when the top candidates are close and fewer when one is dominant.
The PPR-1v1 Algorithm
The authors build their approach on Prior-Posterior-Ratio (PPR) martingales. Unlike standard confidence intervals, PPR sequences provide "anytime" guarantees, meaning they remain valid even if the stopping time is data-dependent.
A key innovation in this work is the one-versus-one (1v1) principle. While many algorithms compare the current leader to the "rest" of the distribution (1-versus-rest), the authors prove that comparing the leader specifically against the runner-up is more efficient. The resulting PPR-1v1 algorithm uses a simple stopping rule based on the Beta distribution: it tracks the counts of the two most frequent values and terminates when the evidence (calculated via the Beta CDF) exceeds a threshold determined by $\delta$.
Theoretical Guarantees
The authors provide a rigorous proof that PPR-1v1 is asymptotically optimal. This means that as the allowed error probability $\delta$ approaches zero, the sample complexity of PPR-1v1 matches the theoretical lower bound for this problem.
Experimental Evaluation
The researchers compared PPR-1v1 against several baselines, including $A_1$ (Shah et al., 2020) and KL-SN (Garivier, 2013), across various synthetic distributions ($\mathcal{P}_1$ to $\mathcal{P}_6$).
As shown in the results, PPR-1v1 significantly outperforms existing methods. For instance, on distribution $\mathcal{P}_3$ (a 9-category distribution), PPR-1v1 required approximately 789 samples, whereas the previous state-of-the-art $A_1$ required over 3,300. Furthermore, the 1v1 strategy proved consistently superior to the 1vr alternative across all tested distributions.
Real-World Applications
Beyond synthetic tests, the paper demonstrates the practical utility of PPR-1v1 in two domains:
- Election Forecasting: Using data from the 2014 Indian Parliamentary elections, the authors show that embedding PPR-1v1 into a sampling strategy can reduce the number of votes queried by a factor of 2 to 3 compared to standard polling methods.
- Blockchain Verification: In permissionless blockchains, verifying smart contracts probabilistically is essential for scalability. PPR-1v1 provides a robust mechanism for this verification, maintaining accuracy even in the presence of malicious (Byzantine) nodes.
Conclusion
PPR-1v1 represents a significant advancement in PAC mode estimation. By combining the anytime validity of PPR martingales with the efficiency of the 1v1 comparison principle, the authors have developed an algorithm that is both theoretically optimal and practically superior to existing baselines. Its simplicity and lack of required tuning make it an ideal candidate for a wide range of real-world sampling problems.
Summary updated