Estimating Renyi Entropy of Discrete Distributions
Jayadev Acharya, Alon Orlitsky, Ananda Theertha Suresh, Himanshu Tyagi
I Introduction
A popular generalization of Shannon entropy is the Rényi entropy of order , defined for by
Motivated by these and other applications, unbiased and heuristic estimators of Rényi entropy have been studied in the physics literature following , and asymptotically consistent and normal estimates were proposed in . However, no systematic study of the complexity of estimating Rényi entropy is available. For example, it was hitherto unknown if the number of samples needed to estimate the Rényi entropy of a given order differs from that required for Shannon entropy, or whether it varies with the order , or how it depends on the alphabet size .
I-B Definitions and results
We show that behaves differently in three ranges of . For ,
namely the sample complexity grows super-linearly in and estimating the Rényi entropy of these orders is even more difficult than estimating the Shannon entropy. In fact, the upper bound follows from a corresponding result on estimation of power sums considered in (see Section III-C for further discussion). For completeness, we show in Theorem 10 that the empirical estimator requires samples and in Theorem 14 prove the improvement by a factor of . The lower bound is proved in Theorem 22.
namely as with Shannon entropy, the sample complexity grows roughly linearly in the alphabet size. The lower bound is proved in Theorem 21. In a conference version of this paper , a weaker upper bound was established using the empirical-frequency estimator. For the sake of completeness, we include this result as Theorem 9. The tighter upper bound reported here uses the best polynomial approximation based estimator of and is proved in Theorem 13. In fact, in the Appendix we show that the empirical estimator can’t attain this improvement and requires and samples for and , respectively.
and in particular, the sample complexity is strictly sublinear in the alphabet size. The upper and lower bounds are shown in Theorems 12 and 16, respectively. Figure 1 illustrates our results for different ranges of .
Of the three ranges, the most frequently used, and coincidentally the one for which the results are most surprising, is the last with . Some elaboration is in order.
It should also be noted that the estimators achieving the upper bounds are simple and run in time linear in the number of samples. Furthermore, the estimators are universal in that they do not require the knowledge of . On the other hand, the lower bounds on hold even if the estimator knows .
I-C The estimators
and is related to the Rényi entropy for via
We construct estimators for the power-sums of distributions with a multiplicative-accuracy of and hence obtain an additive-accuracy of for Rényi entropy estimation. We consider the following three different estimators for different ranges of and with different performance guarantees.
Bias-corrected estimator
Polynomial approximation estimator
where and are both and chosen appropriately.
Theorem 13 and Theorem 14 show that for and , respectively, the sample complexity of is and , resulting in a reduction in sample complexity of over the empirical estimator.
Table I summarizes the performance of these estimators in terms of their sample complexity. The last column denote the lower bounds from Section V.
I-D Organization
The rest of the paper is organized as follows. Section II presents basic properties of power sums of distributions and moments of Poisson random variables, which may be of independent interest. The estimation algorithms are analyzed in Section III, in Section III-A we show results for the empirical or plug-in estimate, in Section III-B we provide optimal results for integral and finally we provide an improved estimator for non-integral . Examples and simulation of the proposed estimators are given in Section IV. Section V contains our lower bounds for the sample complexity of estimating Rényi entropy. Furthermore, in the Appendix we analyze the performance of the empirical estimator for power-sum estimation with an additive-accuracy and also derive lower bounds for its sample complexity.
II Technical preliminaries
Further, for and ,
The first inequality follows upon choosing . For and , we get the second by (4). Note that by the monotonicity of Hölder means, we have
The final inequality follows upon rearranging the terms and using (4). ∎
II-B Bounds on moments of a Poisson random variable
We start with the expected value and the variance of falling powers of a Poisson random variable.
The next result establishes a bound on the moments of a Poisson random variable.
Let and let be a positive real number. Then,
Let .
The first inequality follows from the fact that either or . The equality follows from the fact that the integer moments of Poisson distribution are Touchard polynomials in . The second inequality uses the property that . Multiplying both sides by results in the lemma. ∎
For , for all , hence,
Since is a concave function and is nonnegative, the previous bound yields
where the last-but-one inequality is by Lemma 3. ∎
There is a constant such that for any ,
To obtain an estimator which does not require a knowledge of the support size , we seek a polynomial approximation of with . Such a polynomial can be obtained by a minor modification of the polynomial satisfying the error bound in Lemma 5. Specifically, we use the polynomial for which the approximation error is bounded as
To bound the variance of the proposed polynomial approximation estimator, we require a bound on the absolute values of the coefficients of . The following inequality due to Markov serves this purpose.
Let be a degree- polynomial so that for all . Then for all
Since for , the approximation bound (5) implies for all . It follows from Lemma 6 that
III Upper bounds on sample complexity
In this section, we analyze the performances of the estimators we proposed in Section I-C. Our proofs are based on bounding the bias and the variance of the estimators under Poisson sampling. We first describe our general recipe and then analyze the performance of each estimator separately.
The following reduction to Poisson sampling is well-known.
(Poisson approximation 1) For and ,
It remains to bound the probability on the right-side above, which can be done provided the bias and the variance of the estimator are bounded.
For , let the power sum estimator have bias and variance satisfying
Then, there exists an estimator that uses samples and ensures
In the remainder of the section, we bound the bias and the variance for our estimators when the number of samples are of the appropriate order. Denote by , , and , respectively, the empirical estimator , the bias-corrected estimator , and the polynomial approximation estimator . We begin by analyzing the performances of and and build-up on these steps to analyze .
The empirical estimator was presented in (1). Using the Poisson sampling recipe given above, we derive upper bound for the sample complexity of the empirical estimator by bounding its bias and variance. The resulting bound for is given in Theorem 9 and for in Theorem 10.
For , , and , the estimator satisfies
Similarly, to bound the variance, using independence of multiplicities:
where the equality holds for sufficiently large. The theorem follows by using Lemma 8. ∎
For , , and , the estimator satisfies
For , once again we take a recourse to Lemma 4 to bound the bias as follows:
for every subset . Upon choosing , we get
where the last inequality uses (4). For bounding the variance, note that
Consider the first term on the right-side. For , it is bounded above by since is concave in , and for the bound in (8) and Lemma 1 applies to give
where is from (9) and from the concavity of in . The proof is completed by combining the two bounds above and using Lemma 8. ∎
In fact, we show in the appendix that the dependence on implied by the previous two results are optimal.
Given a sufficiently small , the sample complexity of the empirical estimator is bounded below as
While the performance of the empirical estimator is limited by these bounds, below we exhibit estimators that beat these bounds and thus outperform the empirical estimator.
III-B Performance of bias-corrected estimator for integral α𝛼\alpha
To reduce the sample complexity for integer orders to below , we follow the development of Shannon entropy estimators. Shannon entropy was first estimated via an empirical estimator, analyzed in, for instance, . However, with samples, the bias of the empirical estimator remains high . This bias is reduced by the Miller-Madow correction , but even then, samples are needed for a reliable Shannon-entropy estimation .
The next result provides a bound for the number of samples needed for the bias-corrected estimator.
For an integer , any , and , the estimator satisfies
Since the bias is 0, we only need to bound the variance to use Lemma 8. To that end, we have
where the inequality uses Lemma 2. It follows from Lemma 1 that
which is less than if , for all sufficiently small. Applying Lemma 8 completes the proof. ∎
III-C The polynomial approximation estimator
We first give a brief description of the polynomial estimator of and then in Theorem 13 prove that for the sample complexity of is . For completeness, we also include a proof for the case , which is slightly different from the one in .
Therefore, for a given and the combined estimator is
We derive upper bounds for the sample complexity of the polynomial approximation estimator.
For , , , there exist constants and such that the estimator with and satisfies
Let satisfy the polynomial approximation error bound guaranteed by Lemma 5, ,
For , the bias of empirical part of the power sum is bounded as
For variance, independence of multiplicities under Poisson sampling gives
The two bounds above along with Lemma 1 and (4) yield
For , the last terms in (15) are which gives
Recall from (6) that , and therefore, for some . Using (18) we get
Therefore, the result follows from Lemma 8 for sufficiently large. ∎
We now prove an analogous result for .
For , , , there exist constants and such that the estimator with and satisfies
We proceed as in the previous proof and set to be . The contribution to the bias of the estimator for a symbol with remains bounded as in (14). For a symbol with , the bias contribution of the empirical estimator is bounded as
The first term can be bounded in the manner of (11) as
and, using (17), the following bound for the variance:
Here is the largest squared coefficient of the approximating polynomial and, by (6), is for some . Thus, and the proof follows by Lemma 8. ∎
IV Examples and experiments
The uniform distribution over is given by
Its Rényi entropy for every order , and hence for all , is
The Zipf distribution for and is given by
Its Rényi entropy of order is
Table II summarizes the leading term in the approximationWe say to denote . .
We now illustrate the performance of the proposed estimators for various distributions for in Figures 2 and in Figures 3. For , we compare the performance of bias-corrected and empirical estimators. For , we compare the performance of the polynomial-approximation and the empirical estimator. For the polynomial-approximation estimator, the threshold is chosen as and the approximating polynomial degree is chosen as .
We test the performance of these estimators over six different distributions: the uniform distribution, a step distribution with half of the symbols having probability and the other half have probability , Zipf distribution with parameter (), Zipf distribution with parameter (), a randomly generated distribution using the uniform prior on the probability simplex, and another one generated using the Dirichlet- prior.
In both the figures the true value is shown in black and the estimated values are color-coded, with the solid line representing their mean estimate and the shaded area corresponding to one standard deviation. As expected, bias-corrected estimators outperform empirical estimators for and polynomial-approximation estimators perform better than empirical estimators for .
V Lower bounds on sample complexity
We first prove the lower bound for integers , which matches the upper bound in Theorem 12 up to a constant factor.
where the constant implied by may depend on .
Since for small values of we have ,
Next, we lower bound for noninteger and show that it must be almost linear in . While we still rely on Lemma 15 for our lower bound, we take recourse to Poisson sampling to simplify our calculations.
(Poisson approximation 2) Suppose there exist such that, with , for all estimators we have
(Sufficiency of profiles). Consider an estimator such that
for Poisson sampling with , it holds that
Let . Consider the polynomial
and , where is chosen small enough so that has positive roots. Let be the roots of the polynomial . By Newton-Girard identities, while the sum of th power of roots of a polynomial does depend on the constant term, the sum of first powers of roots of a polynomial do not depend on it. Since and differ only by a constant, it holds that
Furthermore, using a first order Taylor approximation, we have
and so, the left side above is nonzero for all sufficiently small provided
Denoting the right side above by , note that for . Since is a linear combination of exponentials, it cannot have more than zeros (see, for instance, ). Therefore, for all ; in particular, for all sufficiently small. ∎
We are now in a position to prove our converse results.
Given a nonintegral , for any fixed , we have
Finally, we show that must be super-linear in for .
Given , for every , we have
where the vectors and are given by Lemma 20 and satisfies , and
Therefore, for sufficiently large , (20) holds by Lemma 20 since , and for we get (21) by Theorem 19 as
The theorem follows since and are arbitrary. ∎
Acknowledgements
The authors thank Chinmay Hegde and Piotr Indyk for helpful discussions and suggestions.
References
Appendix A: Estimating power sums
namely for an additive accuracy in this range, Rényi entropy requires more samples than power sums.
It follows that the power sum estimation results in and the Rényi-entropy estimation results in this paper complement each other in several ways. For example, for ,
where the first inequality follows from Theorem 22 and the last follows from the upper-bound (22) derived in using a polynomial approximation estimator. Hence, for , estimating power sums to additive and multiplicative accuracy require a comparable number of samples.
On the other hand, for , Theorems 9 and 21 imply that for non integer , while in the Appendix we show that for , is a constant. Hence in this range, power sum estimation to a multiplicative accuracy requires considerably more samples than estimation to an additive accuracy.
The next result shows that the bias and the variance of the empirical estimator are .
For an appropriately chosen constant , the bias and the variance of the empirical estimator are bounded above as
where the last inequality holds by Lemma 4 and Lemma 2since is convex in . Noting , we get
Similarly, proceeding as in the proof of Theorem 9, the variance of the empirical estimator is bounded as
Further, since is convex for , the summation above is maximized when one of the ’s is and the remaining equal which yields
Appendix B: Lower bound for sample complexity of empirical estimator
Given and for a constant depending only on , the sample complexity of the empirical estimator is bounded below as
We prove the lower bound for the uniform distributon over symbols in two steps. We first show that for any constant if then the additive approximation error is at least with probability one, for every . Then, assuming that , we show that the additve approximation error is at least with probability greater than if .
Hence, for any and and any , the additive approximation error is more than with probability one.
Moving to the second claim, suppose now . We first show that with high probability, the multiplicities of a linear fraction of symbols should be at least a factor of standard deviaton higher than the mean. Specifically, let
where denotes the -function, , the tail of the standard normal random variable, and the final inequality uses Slud’s inequality [38, Theorem 2.1].
Note that is a function of i.i.d. random variables , and changing any one changes by at most . Hence, by McDiarmid’s inequality,
where the second inequality is by Bernoulli’s inequality and the third inequality holds for every . Therefore, with probability ,
Given and for a constant depending only on , the sample complexity of the empirical estimator is bounded as
We proceed as in the proof of the previous lemma. However, instead of using the uniform distribution, we use a distribution which has one “heavy element” and is uniform conditioned on the occurance of the remainder. The key observation is that there will be roughly occurances of the “light elements”. Thus, when we account for the error in the estimation of the contribution of light elements to the power sum, we can replace with in our analysis of the previous lemma, which yields the required bound for sample complexity.
Specifically, consider a distribution with one heavy element such that
We begin by analyzing the estimate of the second term in power sum, namely
Let be the total number of occurances of light elements. Since is a binomial random variable, for every constant
In the remainder of the proof, we shall assume that this large probability event holds.
where the last inequality uses . Thus, the empirical estimate is at most with probability close to when (and therefore ) large. It follows from (23) that
holds. Note that conditioned on each value of , the random variables have a multinomial distribution with uniform probabilities, , these random variables behave as if we drew i.i.d. samples from a uniform distribution on elements. Thus, we can follow the proof of the previous lemma mutatis mutandis. We now define as
To lower bound Slud’s inequality is no longer available (since it may not hold for with and that is the regime of interest for the lower tail probability bounds needed here). Instead we take recourse to a combination of Bohman’s inequality and Anderson-Samuel inequality, as suggested in [38, Eqns. (i) and (ii)]. It can be verified that the condition for [38, Eqns. (ii)] holds, and therefore,
Continuing as in the proof of the previous lemma, we get that the following holds with conditional probability greater than given each value of satisfying (24):
where is a sufficiently small constant such that for all and . Thus,
Denoting and choosing and small enough such that , for all sufficiently large we get from (23) that