Adaptive Estimation of Shannon Entropy
Yanjun Han, Jiantao Jiao, Tsachy Weissman
I Introduction
is one of the most fundamental quantities of information theory and statistics, which emerged in Shannon’s 1948 masterpiece as the answer to foundational questions of compression and communication.
Consider the problem of estimating Shannon entropy from i.i.d. samples. Classical theory is mainly concerned with the case where the number of samples , while the support size is fixed. In that scenario, the maximum likelihood estimator (MLE), , which plugs in the empirical distribution into the definition of entropy, is asymptotically efficient [2, Thm. 8.11, Lemma 8.14] in the sense of the Hájek convolution theorem and the Hájek–Le Cam local asymptotic minimax theorem . It is therefore not surprising to encounter the following quote from the introduction of Wyner and Foster who considered entropy estimation:
“The plug-in estimate is universal and optimal not only for finite alphabet i.i.d. sources but also for finite alphabet, finite memory sources. On the other hand, practically as well as theoretically, these problems are of little interest. ”
In contrast, various modern data-analytic applications deal with datasets which do not fall into the regime of fixed alphabet and . In fact, in many applications the support size is comparable to, or even larger than the number of samples .
Corpus linguistics: about half of the words in the Shakespearean canon appeared only once .
Network traffic analysis: many customers or website users are seen a small number of times .
Analyzing neural spike trains: natural stimuli generate neural responses of high timing precision resulting in a massive space of meaningful responses .
The problem of entropy estimation in the large alphabet regime (or non-asymptotic analysis) has been investigated extensively in various disciplines, which we refer to for a detailed review. One recent breakthrough in this direction came from Valiant and Valiant , who constructed the first explicit entropy estimator whose sample complexity is samples, which they also proved to be necessary. It was also shown in that the MLE requires samples, implying that MLE is strictly sub-optimal in terms of sample complexity.
However, the aforementioned estimators have not been shown to achieve the minimax rates. In light of this, Wu and Yang and Jiao et al. independently developed schemes based on approximation theory that achieved the minimax convergence rates for the entropy. Furthermore, Jiao et al. proposed a general methodology for estimating functionals, and showed that for a wide class of functionals (including entropy, mutual information, and power sum functionals), their methodology leads to minimax rate-optimal estimators whose performance with samples is essentially that of the MLE with samples. The approximation ideas proved to be very fruitful in Acharya et al. , Wu and Yang , Han, Jiao, and Weissman , Jiao, Han, and Weissman , Bu et al. , Orlitsky, Suresh, and Wu , Wu and Yang .
On the practical side, Jiao et al. showed that the minimax rate-optimal estimators introduced in can lead to consistent and substantial performance boosts in various machine learning algorithms.
I-B Refined minimaxity: adaptive estimation
The primary approach to alleviate the pessimism of minimaxity in statistics is the construction of adaptive procedures, which has gained particular prominence in nonparametric statistics . The goal of adaptive inference is to construct a single procedure that achieves optimality simultaneously over a collection of parameter spaces. Informally, an adaptive procedure automatically adjusts to the unknown parameter, and acts as if it knows the parameter lies in a more restricted subset of the whole parameter space. A common way to evaluate such a procedure is to compare its maximum risk over each subset of the parameter space in the collection with the corresponding minimax risk. If they are nearly equal, then we say such a procedure is adaptive with respect to that collection of subsets of the parameter space.
The primary results of this paper are twofold.
First, we show that the minimax rate-optimal entropy estimator in Jiao et al. is adaptive with respect to the collection of parameter space , where . Moreover, the estimator does not need to know nor , which is an advantage in practice since usually the support size nor an a priori upper bound on the true entropy are known.
Second, we show that the sample size enlargement effect still holds in this adaptive estimation scenario. Table I demonstrates that in estimating various functionals, the performance of the minimax rate-optimal estimator with samples is nearly that of the MLE with samples, which the authors termed “effective sample size enlargement” in . We compute the maximum risk of the MLE over each , and show that for every , the performance of the estimator in with samples is still nearly that of the MLE with samples.
These facts suggest that the estimator in Jiao et al. is near optimal in a very strong sense, for which we refer the readers to for a detailed discussion on methodology behind their estimator, literature survey, and experimental results.
I-C Mathematical framework and estimator construction
Before we discuss the main results, we would like to recall the construction of the entropy estimator in . The approach is to tackle the estimation problem separately for the cases of “small ” and “large ” in estimation, corresponding to treating regions where the functional is “nonsmooth” and “smooth” in different ways. Specifically, after we obtain the empirical distribution , for each coordinate , if , we (i) compute the best polynomial approximation for in the regime , (ii) use the unbiased estimators for integer powers to estimate the corresponding terms in the polynomial approximation for up to order , and (iii) use that polynomial as an estimate for . If , we use the estimator to estimate . Then, we add the estimators corresponding to each coordinate.
We define the minimax risk for Multinomial model with observations on support size for estimating as
which is the quantity we will characterize in this paper. To simplify the analysis, we also utilize the Poisson sampling model, i.e., we first draw a random variable , and then obtain samples from the distribution . It is equivalent to having a -dimensional random vector such that each component in has distribution , and all coordinates of are independent.
The counterpart of minimax risk in the Poissonized model is defined as
The following lemma, which follows from , shows that the minimax risks under the Multinomial model and the Poissonized model are essentially equivalent.
The minimax risks under the Poissonized model and the Multinomial model are related via the following inequalities:
For simplicity, we re-define as , and denote
The estimator in Jiao et al. is constructed as follows.
We explain each equation in detail as follows.
Equation (8): Note that and are i.i.d. random variables such that . We use to determine whether we are operating in the “nonsmooth” regime or not. If , we declare we are in the “nonsmooth” regime, and plug in into function . If , we declare we are in the “smooth” regime, and plug in into .
The coefficients are coefficients of the best polynomial approximation of over $K$, i.e.,
where denotes the set of algebraic polynomials up to order . Note that in general depends on , which we do not make explicit for brevity.
Then we define
Lemma 9 shows that for ,
is a near-best polynomial approximation for on . Thus, we can understand as a random variable whose expectation is nearly Note that we have removed the constant term from the best polynomial approximation. It is to ensure that we assign zero to symbols we do not see. the best approximation of function over .
Any reasonable estimator for should be upper bounded by the value one. We cutoff by upper bound , and define the function , which means “lower part”.
The function (means “upper part”) is nothing but a product of an interpolation function and the bias-corrected MLE. The interpolation function is defined as follows:
The following lemma characterizes the properties of the function appearing in the definition of . In particular, it shows that .
For the function on defined as follows,
The function is depicted in Figure 1. As pointed out in , it is not necessary to use the interpolation function to achieve the minimax rates. Here we keep it in order to be consistent with .
II Main Results
Since , we assume throughout this paper that . Denote by the set of all discrete probability distributions with support size and entropy . We say an estimator is within accuracy , if and only if
For the plug-in estimator , the following theorem presents the non-asymptotic upper and lower bounds for the risk.
If , where is a universal positive constant, then for the plug-in estimator , we have
Note that the only assumption in Theorem 1 is that the upper bound should be no smaller than a constant, which is a reasonable assumption to avoid the subtle case where the naive zero estimator has a satisfactory performance. The minimum sample complexity of the plug-in approach can be immediately obtained from Theorem 1.
If , where is a universal positive constant, the plug-in estimator is within accuracy if and only if
Recall that it requires samples for the MLE to achieve accuracy when there is no constraint on the entropy . Hence, when the upper bound on the entropy is loose, i.e., , the minimum sample complexity in the bounded entropy case is exactly the same, i.e., we cannot essentially improve the estimation performance. On the other hand, when the upper bound is tight, i.e., , the required sample complexity enjoyed a significant reduction.
When it comes to the maximum risk, we conclude from Theorem 1 that the bounded entropy property helps only at the boundary, i.e., when is close to and is small. Moreover, this help vanishes quickly as increases: when , the maximum risk will be at the order , and the naive zero estimator achieves worst case risk .
Is the plug-in estimator optimal in the minimax sense? It has been shown in that when there is no constraint on , i.e., , the answer is negative. What about subsets of , such as ? The following theorem characterizes the minimax rates over .
If , where is a universal positive constant, then
where the infimum is taken over all possible estimators. Moreover, the upper bound is achieved by the estimator in under the Poissonized model without the knowledge of nor , and in particular,
An immediate result on the sample complexity is as follows.
If , where is a universal positive constant, the minimax rate-optimal estimator in is within accuracy if
For the minimum sample complexity, we still distinguish into two cases. Firstly, when , the required sample complexity is , which recovers the minimax results with no constraint on entropy in . Secondly, when , there is a significant improvement.
We conjecture that the minimax rates in Theorem 2 can be refined to
In other words, we conjecture that the exact constant in the minimax rates in the regime is . It is partially justified by the observation that the minimax squared error without any samples is .
We also conclude from Theorem 2 that the bounded entropy constraint again helps only at the boundary, and this help vanishes quickly as increases: when , we do not have sufficient information to make inference, and the naive zero estimator is near-minimax.
If , where is a universal positive constant, then for the hard-thresholding estimator in , the plug-in estimator satisfies
The proof is completed by the proof of the lower bound in Theorem 1 (cf. Section IV). ∎
To sum up, we have obtained the following conclusions.
The minimax rate-optimal entropy estimator in Jiao et al. is adaptive with respect to the collection of parameter space , where . Moreover, the estimator does not need to know nor , which is an advantage in practice since usually the support size nor an a priori upper bound on the true entropy are known.
Second, the sample size enlargement effect still holds in this adaptive estimation scenario. Table I demonstrates that in estimating various functionals, the performance of the minimax rate-optimal estimator with samples is essentially that of the MLE with samples, which the authors termed “sample size enlargement” in . Theorems 1 and 2 show that over every , the performance of the estimator in with samples is still essentially that of the MLE with samples.
III Proof of Upper Bounds in Theorem 1
First we consider the case where . For the bias, it has been shown in that
As for the variance, shows that by the Efron-Stein inequality, we have
For any discrete distribution , we have
where we have used the assumption in the last step.
Hence, when , we have
which completes the proof for the first part. For the second part, we introduce a lemma first.
Given . For and , we have
Define on $\left|\mathsf{Bias}\left(f(\hat{p}_{i})\right)\right|\leq\frac{1}{n}i$ . In light of the previous result and Lemma 4, we have
Now we bound separately. By the concavity of we have
where denotes the inverse of , and we restrict to avoid possible ambiguities. It is straightforward to verify that for any and , we have
We summarize some more properties of in the following lemma.
Combining these properties of yields
where (50) follows from (45), (51) follows from (46), (52) follows from (47) and
by assumption, and the last equality follows from (48).
Now we proceed to bound , which is given by
As for , due to the concavity of , the minimum of is attained when all but one are at the boundary , hence
where the last inequality is obtained by separating two cases and for some constant , say, . The proof is completed by noticing that :
IV Proof of Lower Bounds in Theorem 1
We first derive a lower bound for the bias term. We recall the following result in .
where we have used the assumption and in the last inequality. Hence, we have proved that
For the lower bound in the case where , we consider another distribution
where is the solution to the equation
The lower bounds in Theorem 1 for the bias part can thus be established by combining (68) and (74).
We now turn to the lower bound for variance. We will actually prove a stronger result: a minimax lower bound for all estimators for the risk, which naturally is also a lower bound for the maximum risk of the MLE. We use Le Cam’s two-point method here. Suppose we observe a random vector which has distribution where . Let and be two elements of . Let be an arbitrary estimator of a function based on . We have the following general minimax lower bound.
[28, Sec. 2.4.2] Denoting the Kullback-Leibler divergence between and by
Applying this lemma to the Poissonized model , we know that for ,
then for , Markov’s inequality yields
Fix to be specified later, and let
where is the solution to (70). Direct computation yields
and it can be directly verified that , and . Hence, for small enough we have . By choosing , we have
Hence, by Lemma 7 and we can obtain the following minimax lower bound under the Poissonized model
The corresponding minimax lower bound for the variance in the Multinomial model follows from Lemma 1. The proof of Theorem 1 is complete by combining the lower bounds for the bias and the variance.
V Proof of Upper Bounds in Theorem 2
where , and are independent. We first recall the following lemma from .
Suppose . Then the bias and variance of are given as follows:
where we have used Lemma 3 in the last step. Hence,
When , for small enough, say, , we have
where we have used the assumption that . Hence, the term is negligible when compared with others, and we have reached the end for the case .
For the case where , we need stronger results for the bias and variance in the regime where . The results are summarized in the following lemma.
If , for , we have
where the constant is given in Lemma 15.
Using the Poisson tail bound (cf. Lemma 17) and similar argument to [11, Lemma 8], we have the following lemma.
Suppose . Then for , we have
where is some universal constant which only depends on and .
Now we proceed to bound the total bias and variance. For the bias, we can write
Using similar arguments in the proof of upper bound in Theorem 1, we can show that
Combining the total bias and variance constitutes a complete proof of the upper bounds in Theorem 2.
VI Proof of Lower Bounds in Theorem 2
When , the lower bound for the squared bias, i.e., the term, can be obtained using a similar argument in . Specifically, we can assign two product measures and to the first components in the distribution vector , where
In , . However, in our case, we have an additional constraint that . Since
One can show that the measures are highly concentrated around their expectations . Hence, in order to ensure with overwhelming probability, we can set , and the condition and yield that , and thus . Hence by (120),
The variance bound has been given in (89), and so far we have completed the proof of the first part. As for the second part, the key lemma we will employ is the so-called method of two fuzzy hypotheses presented in Tsybakov . Below we briefly review this general minimax lower bound.
where are the marginal distributions of when the priors are , respectively.
Here is the total variation distance between two probability measures on the measurable space . Concretely, we have
where , and is a dominating measure so that .
First we assume that . In light of Lemma 11, we construct two measures as follows.
For any and positive integer , there exist two probability measures and on such that
, for all ;
,
where is the distance in the uniform norm on from the function to the space spanned by .
The following lemma characterizes the properties of .
If , there exists a universal constant such that
with universal positive constants to be determined later. Without loss of generality we assume that is always a positive integer. Due to , we have , thus Lemma 13 yields
;
, for all ;
.
Let and be product priors which we assign to the length- vector , and we set . With a little abuse of notation, we still denote the overall product measure by and . Note that may not be a probability distribution, we consider the set of approximate probability vectors
with parameter to be specified later, and further define under the Poissonized model,
In light of Lemma 14, it suffices to consider to give a lower bound of . Denote
Denote by the conditional distribution defined as
Now consider as two priors. By setting
we have in Lemma 11. Applying union bound yields that
and the Chebychev inequality tells us that
where we have used our assumption that . For bounding , we first remark that for ,
hence, for sufficiently small, say, , where is defined in and denotes the inverse function of , we have
Denote by the marginal probability under prior and , respectively, for all . In light of (145), (149), (152) and (161), we have
Hence, the total variational distance is then upper bounded by
where we have used the triangle inequality of the total variation distance. The idea of converting approximate priors into priors via conditioning comes from Wu and Yang .
Now it follows from Lemma 11 and Markov’s inequality that
and the desired result follows directly from Lemma 14. Hence we have obtained the desired lower bound in the case .
For , we can change the parameters in (132) into
for some small , say, . Applying the similar analysis yields
VII Future work
This paper studies the adaptive estimation framework to strengthen the optimality properties of the approximation theoretic entropy estimator proposed in Jiao et al. . We remark that the techniques in this paper are by no means constrained to entropy, and we believe analogous results are also true for the estimators of in . Furthermore, we find the fact that the sample size enlargement effect still holds in the adaptive estimation setting very intriguing, and we believe there is a larger picture surrounding this theme to be explored.
VIII Acknowledgments
The authors would like to express their most sincere gratitude to Dany Leviatan for valuable advice on the literature of approximation theory, in particular, for suggesting the result in Lemma 16.
Appendix A Auxiliary Lemmas
The following lemma characterizes the performance of the best uniform approximation polynomial for .
Denote by the -th order best uniform approximation polynomial for , then for , we have the norm bound
where is a universal constant for the norm bound. In fact, the following inequality holds:
where the function is was introduced by Ibragimov as the following limit for positive even integer and positive integer
Furthermore, we also have the pointwise bound: there exists a universal constant such that for any ,
[30, Thm. 8.4.8] There exists some universal constant such that for any order- polynomial in $$, we have
The following lemma gives some tails bounds for Poisson and Binomial random variables.
[31, Exercise 4.7] If , or , then for any , we have
Appendix B Proof of Lemmas
For , the result is obvious, and we assume in the sequel that . Denote by , we construct the Lagrangian:
By taking the derivative with respect to , we obtain that
is a quadratic form of , so the equation has at most two solutions.
Hence, we conclude that components of the maximum achieving distribution can only take two values , and suppose appears times. We distinguish the analysis into two cases.
If , we have for all . Hence,
B-A2 Case II
If or is smaller than , without loss of generality we can assume that and . Then
where we have used the inequalities in (186), and the monotonically increasing property of for in (187). The last inequality follows from and .
B-B Proof of Lemma 4
Define on $n$ Bernstein polynomial
where is the order- forward difference of at with step size :
Since , the mean value theorem for the forward difference shows that , and by (191). Hence is monotonically non-decreasing with respect to , which yields that for ,
The proof is completed by applying (193) and the Taylor’s formula
B-C Proof of Lemma 5
For , we write . It follows from that . By the mean value theorem,
Now we give an upper bound for in terms of . Since , we have
Substituting this result in once more yields a refined inequality
which completes the proof of the first inequality. For the second equality, we write
B-D Proof of Lemma 9
For the bias, it is straightforward to see that for , we have
where is the best approximating polynomial appearing in Lemma 15. Since , Lemma 15 asserts that
The proof for the second part is similar to [11, Lem. 5].
B-E Proof of Lemma 13
we have . Let and define the following modulus of continuity for :
There are an upper bound and a lower bound for :
The upper bound is shown in [15, Lem. 4]. For the lower bound, denote by the solution to the equation , we have the following closed-form formula:
The relationship between and was shown in [33, Thm. 3.13, Thm. 3.14] that there exist two universal constants such that
Applying (223) and (224) and setting the approximation order to be with constant to be specified later, then given , the non-increasing property of with respect to yields
Hence, there exists a sufficiently large constant such that
and this lemma is proved by setting .
B-F Proof of Lemma 14
Fix . Let be a near-minimax estimator of under the Multinomial model. The estimator obtains the number of samples from observation . By definition, we have
where is the minimax risk under the Multinomial model. Note that for any vector ( is not necessarily a probability distribution), we have
where by definition we have . Hence, given , let with and let , (233) suggests to use the estimator to estimate . Note that
the triangle inequality gives (define )
where we have used the fact that conditioned on , , and . Moreover, the last step follows from Lemma 17. The proof is completed by the arbitrariness of and Lemma 1.
B-G Proof of Lemma 15
Hence, it follows from the triangle inequality that
which completes the proof of the norm bound.
For the pointwise bound, [30, Thm. 7.3.1] asserts that there exists a universal positive constant such that
where , and is the second-order Ditzian-Totik modulus of smoothness defined by
According to Lemma 16, since is a polynomial with order , there exists some positive constant such that
hence for any , we have
As a result, we know that for any , and ,
where is the coefficient of the norm bound in (173). Hence, the universal positive constant satisfies