Entropy, Optimization and Counting

Mohit Singh, Nisheeth K. Vishnoi

Introduction

While there is a vast amount of literature concerning the computation of max-entropy distributions (see for example the survey ), previous (partial) results on computing max-entropy distributions required exploiting some special structure of the particular problem at hand. In theoretical computer science, interest in rigorously computing max-entropy distributions derives from their applications to randomized rounding and the design of non-trivial approximation algorithms, notably to problems such as the symmetric and the asymmetric traveling salesman problem (TSP/ATSP). For example, using a very technical argument, give an algorithm to compute the max-entropy distribution over spanning trees of a graph. This algorithm was then used by them to improve the approximation ratio for ATSP, and by to improve the approximation ratio for (graphical) TSP, making progress on two long-standing problems. Subsequently, the ability to compute max-entropy distributions over spanning trees has also been used to design efficient privacy preserving mechanisms for spanning tree auctions by . In another example, show how to compute max-entropy distributions over perfect matchings in a tree and use it to design approximation algorithms for a max-min fair allocation problem. The question of computing max-entropy distributions over perfect matchings in bipartite (and general) graphs, however, has been an important open problem. Recent applications of the ability to compute max-entropy distribution over perfect matchings in bipartite graphs include new approaches for TSP and ATSP, see and Section 4.

For counting problems, it is rare to obtain algorithms that can count exactly, notable exceptions being the problem of counting spanning trees in a graph or counting certain problems restricted to trees using dynamic programming. Most natural counting problems turn out to be #\#P-hard including the problem to count the number of perfect matchings in a bipartite graph . The goal then shifts to finding algorithms that approximately count up to any fixed precision . Here the most successful technique has been the Markov chain Monte Carlo (MCMC) method which, when combined with the equivalence between approximate counting and sampling We note that MCMC methods efficiently sample (and count) given a fixed γ,\gamma, usually for γ=1\gamma={1} corresponding to the uniform distribution. The goal in our problem is to find an γ{\gamma} that maximizes the entropy. In fact, given a γ,{\gamma}, problem specific MCMC methods can be used to generate a random sample from M{\mathcal{M}} according to the product distribution corresponding to γ.\gamma., leads to many approximate counting algorithms. The technique has been applied to many problems including counting perfect matchings in a bipartite graph , counting bases in a balanced matroid , counting solutions to a knapsack problem and counting the number of colorings in restricted graph families . However, the problem of obtaining approximate counting oracles for several problems remains open as well; perhaps a prominent example is that of (approximately) counting the number of perfect matchings in a general graph.

In combinatorics, max-entropy distributions are often referred to as hard-core or Gibbs distributions and have been intensely studied. While it is nice that the hard-core distribution has a product form, i.e., pM∝∏e∈Mγe,p_{M}\propto\prod_{e\in M}\gamma_{e}, the question of interest here is whether one can upper bound the γe\gamma_{e}s. Structurally, such a bound implies that hard-core distributions exhibit a significant amount of approximate stochastic independence. In an important result, proved such a bound for the hard-core distribution over matchings in a graph. This led to resolving several questions involving asymptotic graph and hypergraph problems. For instance results of prove that the fractional chromatic index of a graph asymptotically behaves as its chromatic index. However, the argument of is quite difficult and seems to be specific to the setting of matchings leaving it an interesting problem to understand under what conditions can one obtain upper bounds on γe\gamma_{e}s.

We first show that good enough succinct representations exist for max-entropy distributions. Subsequently, we give an algorithm that computes arbitrarily good approximations to max-entropy distributions given θ{\theta} and access to a suitable counting oracle for M.{\mathcal{M}}. Our algorithm is efficient whenever the corresponding counting oracle is efficient. Moreover, the counting oracle can be approximate and/or randomized. This allows us to leverage a variety of algorithms developed for several #\#P-hard problems to give algorithms to compute max-entropy distributions. Consequently, we obtain several new and old results about concrete algorithms to compute max-entropy distributions. Interesting examples for which we can use pre-existing counting oracles to obtain max-entropy distributions include spanning trees, matchings in general graphs, perfect matchings in bipartite graphs (using the algorithm from ) and subtrees of a rooted tree. The consequence for perfect matchings in bipartite graphs makes the algorithmic strategies for TSP/ATSP mentioned earlier computationally feasible, see Section 4. In the reverse direction we show that if one can solve, even approximately, the convex optimization problem of computing the max-entropy distribution, one can obtain such counting oracles. This establishes an equivalence between counting and computing max-entropy distributions in a general setting. As a corollary, we obtain that the problem of computing max-entropy distributions over perfect matchings in general graphs is equivalent to the, hitherto unrelated, problem of approximately counting perfect matchings in a general graph.

Before we describe our results a bit more technically, we introduce some basic notation. For M⊆{0,1}m,{\mathcal{M}}\subseteq\{0,1\}^{m}, let P(M)P({\mathcal{M}}) denote the convex hull of all M{\mathcal{M}} where each M∈MM\in{\mathcal{M}} is thought of as a 0/10/1 vector of length mm, denoted 1M.1_{M}. Thus, given a θ,{\theta}, for the max-entropy program to have any solution, θ∈P(M).{\theta}\in P({\mathcal{M}}). Since we are concerned with the case when M{\mathcal{M}} is given implicitly and may be of exponential size, we no longer hope to solve the max-entropy convex program directly since that may require exponentially many variables, one for each M∈M.M\in{\mathcal{M}}. Thus, we work with the dual to the max-entropy convex program. The dual has mm variables and, if θ{\theta} is in the relative interior of P(M),P({\mathcal{M}}), the optimal dual solution can be used to describe the optimal solution to the max-entropy convex program, which is a product distribution. In fact, we assume one can put a ball of radius η\eta around θ{\theta} and it still remains in the interior of P(M).P({\mathcal{M}}). Importantly, our algorithm requires access to a generalized counting oracle for M,{\mathcal{M}}, which given γ\gamma can compute ∑M∈M,  M∋e∏e′∈Mγe′\sum_{M\in{\mathcal{M}},\;M\ni e}\prod_{e^{\prime}\in M}\gamma_{e^{\prime}} for all e∈[m]e\in[m] and also the sum ∑M∈M∏e∈Mγe.\sum_{M\in{\mathcal{M}}}\prod_{e\in M}\gamma_{e}. We also consider the case when the oracle is approximate (possibly randomized) and for a given ε,\varepsilon, can output the sums above up to a multiplicative error of 1±ε.1\pm\varepsilon. The following is the first main result of the paper, stated informally here.

There is an algorithm which, given access to a generalized (approximate) counting oracle for M⊆{0,1}m,{\mathcal{M}}\subseteq\{0,1\}^{m}, a θ{\theta} which is promised to be in the η\eta-interior of P(M)P({\mathcal{M}}) and an ε>0,\varepsilon>0, outputs a γ\gamma such that its corresponding product probability distribution pp is such that H(p)≥(1−\nicefracεη)H(p⋆)H(p)\geq(1-\nicefrac{{\varepsilon}}{{\eta}})H(p^{\star}) and for every e∈[m],e\in[m],

Here, p⋆p^{\star} is the max-entropy distribution corresponding to θ.{\theta}. The number of calls the algorithm makes to the oracle is bounded by a polynomial in the input size, ln⁡\nicefrac1η\ln\nicefrac{{1}}{{\eta}} and ln⁡\nicefrac1ε.\ln\nicefrac{{1}}{{\varepsilon}}.

A useful setting for η\eta and ε\varepsilon to keep in mind is \nicefrac1m2\nicefrac{{1}}{{m^{2}}} and \nicefrac1m3\nicefrac{{1}}{{m^{3}}} respectively. The bit-lengths of the inputs to the counting oracle are polynomial in \nicefrac1η\nicefrac{{1}}{{\eta}} and, hence, the running time of our algorithm depends polynomially on \nicefrac1η.\nicefrac{{1}}{{\eta}}. If the generalized counting oracle is ε\varepsilon-approximate, the same guarantee holds. Note that for many approximate counting oracles, the dependence on ε\varepsilon on their running time is a polynomial in \nicefrac1ε.\nicefrac{{1}}{{\varepsilon}}. Hence, in this case the running time depends polynomially on \nicefrac1ε.\nicefrac{{1}}{{\varepsilon}}. Finally, note that this result can be easily generalized to obtain algorithms for the problem of finding the distribution that minimizes the Kullback-Leibler divergence from a given product distribution subject to the marginal constraints, see Remark 2.12.

At a very high level, the algorithm in this theorem is obtained by applying the framework of the ellipsoid algorithm to the dual of the max-entropy convex program. While it is more convenient to work with the dual since it has mm variables two issues arise: The domain of optimization becomes unconstrained and the separation oracle requires the ability to compute (possibly exponential sums) over subsets of M.{\mathcal{M}}. While the counting oracles can be adapted to compute exponential sums, the unboundedness of the domain of optimization is an important problem.

Given that counting algorithms for many problems are still elusive, one may ask if they are really necessary to compute max-entropy distributions. The final result of this paper answers this question in the affirmative and establishes a converse to Theorem 1.1.

There is an algorithm, which given oracle access to an algorithm to compute an ε\varepsilon-approximation to the max-entropy convex program for an η\eta-interior point of P(M),P({\mathcal{M}}), and a separation oracle for P(M),P({\mathcal{M}}), can compute a number ZZ such that

The number of calls made to the max-entropy oracle is polynomial in the input size and \nicefrac1ε.\nicefrac{{1}}{{\varepsilon}}.

This result can be extended to obtain generalized counting oracles, see Remark 2.12. For all polytopes of interest in this paper, separation oracles are known, see Section 3. Moreover, this result continues to hold even when the separation oracle is approximate, or weak. As a corollary, using a separation oracle for the perfect matching polytope for general graphs , we obtain that an algorithm to compute a good-enough approximation to the max-entropy distribution for any θ{\theta} in the perfect matching polytope of a graph GG implies an FPRAS to count the number of perfect matchings in the same graph.

2 Technical Overview

The starting point for our results is the following dual to the max-entropy convex program:

where 1M1_{M} is the indicator vector for M.M. When θ{\theta} lies in the relative interior of P(M),P({\mathcal{M}}), then strong duality holds between the primal and the dual. When θ\theta lies on the boundary of P(M),P({\mathcal{M}}), the infimum in the dual is not attained for any finite λ.\lambda. Hence, it follows from the first order conditions on the optimal solution pair (p⋆,λ⋆)(p^{\star},{\lambda}^{\star}) that pM⋆∝e−⟨λ⋆,1M⟩p^{\star}_{M}\propto e^{-{\langle{{\lambda}^{\star}},{1_{M}}\rangle}} for each M∈MM\in{\mathcal{M}}. Suppose we know that

λ⋆{\lambda}^{\star} is bounded, i.e., ∥λ⋆∥≤R\|{\lambda}^{\star}\|\leq R for some R,R, and

there is a generalized counting oracle that allows us to compute the gradient of the objective function f(λ)=def⟨λ,θ⟩+ln⁡∑M∈Me−⟨λ,1M⟩f({\lambda})\stackrel{{\scriptstyle\textup{def}}}{{=}}{\langle{{\lambda}},{{\theta}}\rangle}+\ln\sum_{M\in{\mathcal{M}}}e^{-{\langle{{\lambda}},{1_{M}}\rangle}} at a specified λ.{\lambda}. The gradient at λ,{\lambda}, denoted ∇f(λ),\nabla f({\lambda}), turns out to be a vector whose coordinate corresponding to e∈[m]e\in[m] is

Then, using the machinery of the ellipsoid method, it follows relatively straight-forwardly that, for any ε,\varepsilon, we can compute a point λ∘{\lambda}^{\circ} such that f(λ∘)≤f(λ⋆)+εf({\lambda}^{\circ})\leq f({\lambda}^{\star})+\varepsilon with at most a poly(m,ln⁡\nicefrac1ε,ln⁡R)(m,\ln\nicefrac{{1}}{{\varepsilon}},\ln R) calls to the counting oracle. Note that since the numbers fed into the counting oracle are of the form e−λe,e^{-\lambda_{e}}, for each e∈[m],e\in[m], the running time of the counting oracle depends polynomially on RR rather than ln⁡R.\ln R. Thus, we need RR to be polynomially bounded. Hence, the question is:

Using this, the η\eta-interiority of θ,{\theta}, and the fact that the diameter of P(M)P({\mathcal{M}}) is at most m,\sqrt{m}, it can then be shown that

Let us show how this immediately implies a bound on RR when M{\mathcal{M}} corresponds to all the spanning trees of a graph with no bridge. Suppose TT and T′T^{\prime} are two trees such that T′T^{\prime} is obtained from TT by deleting an edge ee and adding an edge f,f, then,

Thus, unless the graph has a bridge, this implies ∣λe⋆−λf⋆∣≤m2mη|\lambda^{\star}_{e}-\lambda^{\star}_{f}|\leq\frac{m^{2}\sqrt{m}}{\eta} for all e,f∈G.e,f\in G. However, attempting a similar combinatorial argument for perfect matchings in a bipartite graph, where we do not have this exchange property, the bound is worse by a factor of 2m.2^{m}.

Thus, the ellipsoid method can be used to obtain a solution λ∘{\lambda}^{\circ} such that f(λ∘)≤f(λ⋆)+ε.f({\lambda}^{\circ})\leq f({\lambda}^{\star})+\varepsilon. Why should this approximate bound imply that the product distribution obtained using λ{\lambda} is close in the marginals to θ{\theta}? The observation here is that f(λ∘)−f(λ⋆)f({\lambda}^{\circ})-f({\lambda}^{\star}) is the Kullback-Leibler (KL) divergence between the two distributions. This implies a bound of ε\sqrt{\varepsilon} on the marginals using a standard upper bound on the total variation distance in terms of the KL-divergence.

In the case when we have access only to an approximate counting oracle for M,{\mathcal{M}}, things are more complicated. Roughly, the approximate counting oracle translates to having access to an approximate gradient oracle for the function f(⋅)f(\cdot) and one has to ensure that λ⋆{\lambda}^{\star} is not cut-off during an iteration. Technically, we show that this does not happen and, hence, approximate counting oracles are equally useful for obtaining good approximations to max-entropy distributions.

Finally, note that the (projected-)gradient descent approach (see ) can also be shown to converge in polynomial time and, possibly, can result in practical algorithms for computing max-entropy distributions. In the case when the counting oracle is approximate, one has to deal with a noisy gradient and the solution turns out to be similar to the one in the ellipsoid method-based algorithm in the presence of an approximate counting oracle. In addition to a bound on ∥λ⋆∥,\|\lambda^{\star}\|, one needs to bound the 2→22\rightarrow 2 norm of the gradient of f.f. While we omit the details of the gradient descent based-algorithm, we show that ∥∇f∥2→2\|\nabla f\|_{2\rightarrow 2} is polynomially bounded, see Remark 2.9 and Theorem C.1 in Appendix C. This bound may be of independent interest.

We now give an overview of the reverse direction: How to count approximately given the ability to solve the max-entropy convex program for any point θ{\theta} in the η\eta-interior of P(M).P({\mathcal{M}}). We start by noting that if we consider θ⋆=def1∣M∣∑M∈M1M,{\theta}^{\star}\stackrel{{\scriptstyle\textup{def}}}{{=}}\frac{1}{|{\mathcal{M}}|}\sum_{M\in{\mathcal{M}}}1_{M}, then the optimal value of the convex program is ln⁡∣M∣.\ln|{\mathcal{M}}|. Thus, given access to this vertex-centroid of P(M)P({\mathcal{M}}) one can get an estimate of ∣M∣.|{\mathcal{M}}|. However, computing θ⋆\theta^{\star} can be shown to be as hard as counting ∣M∣,|{\mathcal{M}}|, for instance, when M{\mathcal{M}} consists of perfect matchings in a bipartite graph, see . We bypass this obstacle and apply the ellipsoid algorithm on the following (convex-programming) problem

where fθ(λ)f_{{\theta}}({\lambda}) is the function in (1) and where we have chosen to highlight the dependence on θ.{\theta}. The ellipsoid algorithm proposes a θ\theta and expects the max-entropy oracle to output an approximate value for inf⁡λfθ(λ).\inf_{{\lambda}}f_{{\theta}}({\lambda}). This raises a few issues: First, given our result on optimization via counting, it is unfair to assume that we have such an oracle that works for all θ,{\theta}, irrespective of the interiority of θ\theta in P(M).P({\mathcal{M}}). Thus, we allow queries to the oracle only when θ{\theta} is sufficiently in the interior of P(M).P({\mathcal{M}}). Note that our algorithm for computing the max-entropy distribution in our first theorem works under these guarantees. This requires, in addition, a separation oracle for checking whether a point is in the η\eta-interior of P(M).P({\mathcal{M}}). We construct such an η\eta-separation oracle from a separation oracle for P(M).P({\mathcal{M}}). The latter, given a point, either says it is in P(M)P({\mathcal{M}}) or returns an inequality valid for P(M)P({\mathcal{M}}) but violated by this point.

The second issue is that θ⋆,\theta^{\star}, our target point, may not be in the η\eta-interior of P(M).P({\mathcal{M}}). In fact, there may not be any point in the η\eta-interior of P(M)P({\mathcal{M}}) when η\eta is \nicefrac1poly(m).\nicefrac{{1}}{{{\rm poly}(m)}}. However, under reasonable conditions on P(M),P({\mathcal{M}}), which are satisfied for all polytopes we are interested in, we can show that there is a point θ∙\theta^{\bullet} in the η\eta-interior of P(M).P({\mathcal{M}}). This allows us to recover a good enough estimate of ∣M∣.|{\mathcal{M}}|. Thus (the way we apply the framework of ellipsoid algorithm), we are able to recover a point close enough to θ∙\theta^{\bullet} by doing a binary search on the target value of ∣M∣.|{\mathcal{M}}|. As in the forward direction, because we assume that the max-entropy algorithm is approximate, we must argue that θ∙\theta^{\bullet} is not cut-off during any iteration of the ellipsoid algorithm.

We conclude this overview with a couple of remarks. First, unlike our results in the forward direction, we cannot replace the ellipsoid method based algorithm by a gradient descent approach. The reason is that we only have a separation oracle to detect whether a point is in P(M)P({\mathcal{M}}) or not. Second, we can extend our result to show that, using a max-entropy oracle, one can obtain generalized approximate counting oracles, see Remark 2.12.

3 Organization of the Rest of the Paper

The rest of the paper is organized as follows. In Section 2, we formally define the objects of interest in our paper including the convex program for optimizing the max-entropy distribution and its dual. We also define counting oracles that are needed for solving the convex program. We then formally state our results and give a few lemmas stating properties about the optimal and near-optimal solution to the dual of the max-entropy convex program. In Section 3 we provide examples of some combinatorial polytopes to which our results apply. In Section 4, we show how certain algorithmic approaches for approximating the symmetric and the asymmetric traveling salesman problem are feasible as a result of one of the main results of this paper. In Section 5, we prove that there is an optimal solution to the dual of the max-entropy convex program that is contained in a ball of small radius around the origin. In Section 6, we use this bound on the optimal solution to show that counting oracles, both exact and approximate, can be used to optimize the convex program via the ellipsoid algorithm. In Section 7, we show the other direction of the reduction and give an algorithm that can approximately count given an oracle that can approximately solve the max-entropy convex program. Standard proofs are omitted from the main body and appear in Appendix A. In Appendix B we show how generalized counting oracles can be obtained via max-entropy oracles. Here, we also introduce the program for minimizing the KL-divergence with respect to a fixed distribution. Finally, in Appendix C, we give a bound on ∥∇f∥2→2.\|\nabla f\|_{2\rightarrow 2}.

Preliminaries

2 Combinatorial Polytopes, Separation Oracles, Counting Oracles and Interiority

The polytopes of interest arise as convex hulls of subsets of {0,1}m\{0,1\}^{m} for some m.m. For a set M⊆{0,1}m,{\mathcal{M}}\subseteq\{0,1\}^{m}, the corresponding polytope is denoted by P(M).P({\mathcal{M}}). Thus,

Another way to describe P(M)P({\mathcal{M}}) is to give a maximal set of linearly independent equalities satisfied by all its vertices, and to list the inequalities that define P(M).P({\mathcal{M}}). Thus, P(M)P({\mathcal{M}}) can be described by (A=,b)(A^{=},b) and (A≤,c)(A^{\leq},c) such that

While the former set cannot be more than m,m, the latter set can be exponential in mm and we do not assume that (A≤,c)(A^{\leq},c) is given to us explicitly.

In fact, such an oracle is often termed a strong separation oracle. In our results that depend on access to a strong separation oracle, we can relax the guarantee to that of a weak separation oracle. We omit the details.

Counting Oracles. The standard counting problem associated to M{\mathcal{M}} is to determine ∣M∣,|{\mathcal{M}}|, i.e., the number of vertices of P(M).P({\mathcal{M}}). We are interested in a more general counting problem associated to M{\mathcal{M}} where there is a weight λe\lambda_{e} for each e∈[m]e\in[m] and the weight of MM under this measure is e−λ(M).e^{-\lambda(M)}. A generalized exact counting oracle for M{\mathcal{M}} then outputs the following two quantities:

Zλ=def∑M∈Me−λ(M)Z^{{\lambda}}\stackrel{{\scriptstyle\textup{def}}}{{=}}\sum_{M\in{\mathcal{M}}}e^{-\lambda(M)} and

for every e∈[m],    Zeλ=def∑M∈M,  M∋ee−λ(M).e\in[m],\;\;Z^{{\lambda}}_{e}\stackrel{{\scriptstyle\textup{def}}}{{=}}\sum_{M\in{\mathcal{M}},\;M\ni e}e^{-\lambda(M)}.

The oracle is assumed to be efficient, as in it runs in time polynomial in mm and bits needed to represent e−λee^{-\lambda_{e}} for any e∈[m]e\in[m]. To deal with issues of irrationality, it suffices to obtain the first kk bits of ZλZ^{{\lambda}} and ZeλZ^{{\lambda}}_{e} in time polynomial in kk and mm.

(1−ε)Zλ≤Z~λ≤(1+ε)Zλ(1-\varepsilon)Z^{\lambda}\leq\widetilde{Z}^{{{\lambda}}}\leq(1+\varepsilon)Z^{\lambda} and

for every e∈[m],e\in[m], (1−ε)Zeλ≤Z~eλ≤(1+ε)Zeλ.(1-\varepsilon)Z^{\lambda}_{e}\leq\widetilde{Z}^{{\lambda}}_{e}\leq(1+\varepsilon)Z^{\lambda}_{e}.

The running time is polynomial in mm, \nicefrac1ε,\nicefrac{{1}}{{\varepsilon}}, log⁡\nicefrac1α\log{\nicefrac{{1}}{{\alpha}}} and the number of bits needed to represent e−λee^{-\lambda_{e}} for any e∈[m]e\in[m]. For the sake of readability, we ignore the fact that approximate counting oracle may be randomized. The statements of the theorems that use randomized approximate counting oracles can be modified appropriately to include the dependence on α.\alpha. Note that if the problem at hand is self-reducible, then having access to an oracle that outputs an approximation to just ZλZ^{\lambda} suffices. We omit the details and the reader is referred to a discussion on self-reducibility and counting in . Finally, it can be shown that, in our setting, the existence of a generalized (exact or approximate) counting oracle is a stronger requirement than the existence of a separation oracle.

Interior of the Polytope. The dimension of P(M)P({\mathcal{M}}) is m−rank(A=);m-{\rm rank}(A^{=}); the polytope restricted to this affine space is full dimensional. Since we work with polytopes that are not full dimensional, we extend the notion of the interior of the polytope P(M)P({\mathcal{M}}) and use the following definition.

For an η>0,\eta>0, a point θ\theta is said to be in the η\eta-interior of P(M)P({\mathcal{M}}) if

We say that θ\theta is in the interior of P(M)P({\mathcal{M}}) if θ\theta is in the η\eta-interior of P(M)P({\mathcal{M}}) for some η>0.\eta>0.

We are be interested in the case where η≥1poly(m).\eta\geq\frac{1}{{\rm poly}(m)}. Hence, it is natural to ask if for every P(M),P({\mathcal{M}}), there is a point in its 1poly(m)\frac{1}{{\rm poly}(m)}-interior. The following lemma, whose proof appears in Section 7, asserts that the answer is yes if the entries of A≤A^{\leq} and cc are reasonable (as is the case in all our applications).

At this point, if one wishes, one can look at Section 3 for some examples of combinatorial polytopes we consider in this paper.

3 The Maximum Entropy Convex Program

In this section we present the convex program for computing max-entropy distributions. Let P(M)P({\mathcal{M}}) be the polytope corresponding to M.{\mathcal{M}}. While we do not care about whether we have an oracle for M{\mathcal{M}} in this section, the notion of interiority is important.

For any point θ∈P(M),\theta\in P({\mathcal{M}}), by definition, it can be written as a convex combination of vertices of P(M),P({\mathcal{M}}), each of which is indicator vector for some M∈MM\in{\mathcal{M}}. Each such convex combination is a probability distribution over M∈M.M\in{\mathcal{M}}. Of central interest in this paper is a way to find the convex combination that maximizes the entropy of the underlying probability distribution. Given θ,\theta, we can express the problem of finding the max-entropy distribution over the vertices of P(M)P({\mathcal{M}}) as the program in Figure 1.

For a point θ\theta in the interior of P(M),P({\mathcal{M}}), there exists a unique distribution p⋆p^{\star} which attains the max-entropy while satisfying

As we observe soon, while p⋆p^{\star} is unique, λ⋆\lambda^{\star} may not be. First, we record the following definitions about such product distributions.

The marginals of such a distribution are denoted by θλ\theta^{{\lambda}} and defined to be

The proof of this lemma relies on establishing that strong duality holds for computing the max-entropy distribution with marginals θ\theta for the convex program in Figure 1. The dual of this program appears in Figure 2. Thus, if θ\theta is in the interior of P(M),P({\mathcal{M}}), then there is a λ⋆\lambda^{\star} such that p⋆=pλ⋆p^{\star}=p^{\lambda^{\star}} and fθ(λ⋆)=H(p⋆).f_{\theta}(\lambda^{\star})=H(p^{\star}).

Note that λ⋆\lambda^{\star} may not be unique and, finally, that an important property of the dual objective function is that fθf_{\theta} does not change if we shift by a vector in the span of the rows of A=.A^{=}. This is captured in the following lemma whose proof appears in Appendix A.2.

fθ(λ)=fθ(λ+(A=)⊤d)f_{\theta}(\lambda)=f_{\theta}(\lambda+(A^{=})^{\top}d) for any d.d.

4 Formal Statement of Our Results

Our first result shows that if one has access to an generalized exact counting oracle then one can indeed compute a good approximation to the max-entropy distribution for specified marginals.

where λ⋆\lambda^{\star} is the optimal solution to the dual of the max-entropy convex program for (M,θ)({\mathcal{M}},\theta) from Figure 2. Assuming that the generalized exact counting oracle is polynomial in its input parameters, the running time of the algorithm is polynomial in mm, \nicefrac1η,\nicefrac{{1}}{{\eta}}, log⁡\nicefrac1ε\log\nicefrac{{1}}{{\varepsilon}} and the number of bits needed to represent θ\theta and (A=,b).(A^{=},b).

The proof of this theorem follows from an application of the ellipsoid algorithm for minimizing the dual convex program. At a first glance, it may seem enough to show that ∥λ⋆∥≤2poly(m)η\|\lambda^{\star}\|\leq 2^{\frac{{\rm poly}(m)}{\eta}} since the number of iterations of the ellipsoid algorithm depends on log⁡∥λ⋆∥\log\|\lambda^{\star}\|. Unfortunately, this is not enough since each call to the oracle with input λ\lambda takes time polynomial in the number of bits needed to represent e−λee^{-\lambda_{e}} for any e∈[m]e\in[m]. We show the following theorem which provides a polynomial bound on ∥λ⋆∥\|\lambda^{\star}\|.

We specifically note that the proof of this theorem needs that λ⋆\lambda^{\star} satisfies A=λ⋆=0.A^{=}\lambda^{\star}=0. Combinatorially, it is an interesting open problem to see one can get such a bound depending only on \nicefrac1η.\nicefrac{{1}}{{\eta}}. Next we generalize Theorem 2.6 to polytopes where only an approximate counting oracle exists, for example, the perfect matching problem in bipartite graphs. While we state this theorem in the context of deterministic counting oracles, it holds in the randomized setting as well.

Here λ⋆\lambda^{\star} is an optimal solution to the dual of the max-entropy convex program for (M,θ).({\mathcal{M}},\theta). Assuming that the generalized approximate counting oracle is polynomial in its input parameters, the running time of the algorithm is polynomial in mm, \nicefrac1η\nicefrac{{1}}{{\eta}}, \nicefrac1ε\nicefrac{{1}}{{\varepsilon}} and the number of bits needed to represent θ\theta and (A=,b).(A^{=},b).

It can be shown that once we have a solution λ∘\lambda^{\circ} to the dual convex program such that

as in Theorems 2.6 and 2.8, one can show that the marginals obtained from the distribution corresponding to λ∘\lambda^{\circ} is close to that of λ⋆\lambda^{\star} (which is θ\theta), i.e., ∥θλ∘−θ∥∞≤O(ε).\left\|\theta^{{{{\lambda}}^{\circ}}}-\theta\right\|_{\infty}\leq O(\sqrt{\varepsilon}). See Appendix A.2, and in particular Corollary A.5 for a proof.

We can also obtain proofs of Theorems 2.6 and 2.8 by applying the framework of projected gradient descent. (See Section 3.2.3 in for details on the gradient descent method.) For the gradient descent method to be polynomial time, one would need an upper bound on ∥λ⋆∥\|\lambda^{\star}\| and ∥∇f∥2→2.\|\nabla f\|_{2\rightarrow 2}. The first bound is provided by Theorem 2.7 and the second bound is proved in Theorem C.1 in Appendix C. We have chosen the ellipsoid method-based proofs of Theorems 2.6 and 2.8 since the ellipsoid method is required in the proof of Theorem 2.11.

Our final theorem proves the reverse: If one can compute good approximations to the max-entropy convex program for P(M)P({\mathcal{M}}) for a given marginal vector, then one can compute good approximations to the number of vertices in P(M).P({\mathcal{M}}). First, we need a notion of a max-entropy oracle for M.{\mathcal{M}}.

An approximate max-entropy oracle for M,{\mathcal{M}}, given a θ{\theta} in the η\eta-interior of P(M),P({\mathcal{M}}), a ζ>0\zeta>0, and an ε>0\varepsilon>0, either

asserts that inf⁡λfθ(λ)≥ζ−ε\inf_{{\lambda}}f_{{\theta}}({\lambda})\geq\zeta-\varepsilon or

The oracle is assumed to be efficient, i.e., it runs in time polynomial in mm, \nicefrac1ε,\nicefrac{{1}}{{\varepsilon}}, \nicefrac1η\nicefrac{{1}}{{\eta}} and the number of bits needed to represent ζ.\zeta.

This is consistent with the algorithms given by Theorem 2.6 and 2.8.

There exists an algorithm that, given a maximal set of linearly independent equalities (A=,b)(A^{=},b) and a separation oracle and an approximate optimization oracle for M{\mathcal{M}} as above, returns a Z~\widetilde{Z} such that (1−ε)∣M∣≤Z~≤(1+ε)∣M∣.(1-\varepsilon)|{\mathcal{M}}|\leq\widetilde{Z}\leq(1+\varepsilon)|{\mathcal{M}}|. Assuming that the running times of the separation oracle and the approximate max-entropy oracle are polynomial in their respective input parameters, the running time of the algorithm is bounded by a polynomial in m,m, \nicefrac1ε\nicefrac{{1}}{{\varepsilon}} and the number of bits needed to represent (A=,b).(A^{=},b).

Analogously, one can easily formulate and prove a randomized version of Theorem 2.11, we omit the details. As an important corollary of this theorem, if one is able to efficiently find approximate max-entropy distributions for the perfect matching polytope for general graphs, then one can approximately count the number of perfect matchings they contain. Both problems have long been open and this result, in particular, relates their hardness.

One may ask if Theorem 2.11 can be strengthened to obtain generalized approximate counting oracles from max-entropy oracles. The question is natural since Theorems 2.6 and 2.8 assume access to generalized counting oracles. The answer is yes and is provided in Theorem B.2 in Appendix B. It turns out that one needs access to a generalized max-entropy oracle, an oracle that can compute the distribution that minimizes the KL-divergence with respect to a fixed product distribution and a given set of marginals. These latter programs are shown, in Appendix B, to be no more general than max-entropy programs. In fact, analogs of Theorems 2.6 and 2.8 can be proved for min-KL-divergence programs rather than max-entropy programs, see Theorem B.5.

5 The Ellipsoid Algorithm

In this section we review the basics of the ellipsoid algorithm. The ellipsoid algorithm is used in the proofs of our equivalence between optimization and counting: Both in the proof of Theorems 2.6 and 2.8 and in the proof of Theorem 2.11. Consider the following optimization problem where g(⋅)g(\cdot) is convex and hi(⋅)h_{i}(\cdot) are affine functions.

We assume that gg is differentiable everywhere and that its gradient, denoted by ∇g,\nabla g, is defined everywhere. In our application, for a polytope P(M)P({\mathcal{M}}) and a θ\theta in the η\eta-interior of P(M),P({\mathcal{M}}), g=fθ,g=f_{\theta}, the objective function in the dual program of Figure 2. The hi(⋅)h_{i}(\cdot)s are the constraints A=λ=0,A^{=}\lambda=0, where (A=,c)(A^{=},c) is the maximal set of linearly independent equalities satisfied by the vertices of M.{\mathcal{M}}. Thus, as noted in Lemma 2.5, we can restrict our search for the optimal solution to the set KK which is defined to be

Note that 0∈K.0\in K. The ellipsoid algorithm can be used to solve such a convex program under fairly general conditions and we first state a version of it needed in the proof of Theorem 2.6. A crucial requirement is a strong first-order oracle for gg which is a function such that given a λ,\lambda, outputs g(λ)g(\lambda) and ∇g(λ).\nabla g(\lambda). Since we are only interested in λ∈K,\lambda\in K, and we are given the equalities describing KK explicitly, we assume that we can project ∇g(λ)\nabla g(\lambda) to K.K. By abuse of notation, we denote the latter also by ∇g(λ).\nabla g(\lambda).

The following theorem claims that if one is given access to a strong first-order oracle for gg, one can use the ellipsoid algorithm to obtain an approximately optimal solution to the convex program mentioned above. This statement is easily derivable from (Theorem 8.2.1).

The number of calls to the strong first-order oracle for gg are bounded by a polynomial in mm, log⁡R\log R and log⁡\nicefrac1β.\log{\nicefrac{{1}}{{\beta}}}.

In our applications of this theorem, we in fact need the ellipsoid to be in an affine space of dimension possibly lower than m.m. The definitions and the theorem continue to hold under such a setting.

Examples of Combinatorial Polytopes

If one wishes, one can keep the following combinatorial polytopes in mind while trying to understand and interpret the results of this paper.

The Spanning Tree Polytope. Given a graph G=(V,E)G=(V,E), let

where, for S⊆V,S\subseteq V, E(S)=def{e={u,v}∈E:{u,v}∩S={u,v}}E(S)\stackrel{{\scriptstyle\textup{def}}}{{=}}\{e=\{u,v\}\in E:\{u,v\}\cap S=\{u,v\}\} and, for a subset of edges H⊆E,H\subseteq E, x(H)=def∑e∈Hxe.x(H)\stackrel{{\scriptstyle\textup{def}}}{{=}}\sum_{e\in H}x_{e}. Edmond also shows the existence of a separation oracle for this polytope. A generalized exact counting oracle is known for this spanning tree polytope via Kirchoff’s matrix-tree theorem, see .

The Perfect Matching Polytope for Bipartite Graphs. Given a bipartite graph G=(V,E)G=(V,E), let

It follows from a theorem of Birkhoff that, when GG is bipartite,

where, for v∈V,v\in V, δ(v)=def{e={u,v}∈E}.\delta(v)\stackrel{{\scriptstyle\textup{def}}}{{=}}\{e=\{u,v\}\in E\}. Here, it can be shown that all the facets, i.e., the defining inequalities, are one of the set of 2m2m inequalities 0≤xe≤10\leq x_{e}\leq 1 for all e∈[m].e\in[m]. The exact counting problem is #P-hard and while a (randomized) generalized approximate counting oracle follows from a result of Jerrum, Sinclair and Vigoda for computing permanents.

The Cycle Cover Polytope for Directed Graphs. Given a directed graph G=(V,A),G=(V,A), let

A cycle cover in GG is a collection of vertex disjoint directed cycles that cover all the vertices of G.G. The corresponding cycle cover polytope is denoted by P(M).P({\mathcal{M}}). This polytope is easily seen to be a special case of the perfect matching polytope for bipartite graphs as follows. For G=(V,A),G=(V,A), construct a bipartite graph H=(VL,VR,E)H=(V_{L},V_{R},E) where VL=VR=V.V_{L}=V_{R}=V. For each vertex v∈Vv\in V we have vL∈VLv_{L}\in V_{L} and vR∈VR.v_{R}\in V_{R}. There is an edge between uL∈VLu_{L}\in V_{L} and vR∈VRv_{R}\in V_{R} in HH if and only if (u,v)∈A.(u,v)\in A. Thus, there is a one-to-one correspondence between cycle covers in GG and perfect matchings in H.H. Hence, the algorithm gives a generalized approximate counting oracle in this case as well.

The Perfect Matching Polytope for General Graphs. Given a graph G=(V,E)G=(V,E), let

A celebrated result of Edmonds states that

The separation oracle for this polytope is non-trivial and follows from the characterization result of Edmonds. A direct separation oracle was also given by Padberg and Rao . Coming up with a counting oracle for this polytope, even with uniform weights which counts the number of perfect matchings in a general graph, is a long-standing open problem.

New Algorithmic Approaches for the Traveling Salesman Problem

Here, for a vertex v,v, δ+(v)\delta^{+}(v) is the set of directed edges going out of it and δ−(v)\delta^{-}(v) is the set of directed edges coming in to v.v. Let x⋆x^{\star} denote the optimal solution to this linear program. The authors of make the observation that θuv=defn−1n(xuv⋆+xvu⋆)\theta_{uv}\stackrel{{\scriptstyle\textup{def}}}{{=}}\frac{n-1}{n}(x^{\star}_{uv}+x^{\star}_{vu}) defined on the undirected edges is a point in the interior of the spanning tree polytope on GG. The algorithm then samples a spanning tree TT from the max-entropy distribution with marginals as given by θ\theta and crucially relies on properties of such a TT to obtain an O(log⁡nlog⁡log⁡n)O\left(\frac{\log n}{\log\log n}\right)-approximation algorithm for the ATSP problem.

Interestingly, there is another integral polytope in which x⋆x^{\star} is contained. Consider the convex hull PP of all cycle covers of GG, see Section 3. Then,

It is easy to see that x⋆∈Px^{\star}\in P. Similar to the cycle cover algorithm of Frieze et al , the following is a natural algorithm for the ATSP problem.

Solve the subtour elimination LP for GG to obtain the solution x⋆x^{\star}.

Sample a cycle cover C{\mathcal{C}} from the max-entropy distribution with marginals x⋆x^{\star}.

Include in HH all edges in C{\mathcal{C}}, i.e., H←H∪(∪C∈CC).H\leftarrow H\cup\left(\cup_{C\in{\mathcal{C}}}C\right).

Select one representative vertex vCv_{C} in each cycle C∈CC\in{\mathcal{C}} and delete all the other vertices.

Before analyzing the performance of this algorithm, a basic question is whether this algorithm can be implemented in polynomial time. As an application of Theorem 2.8 to the cycle cover polytope for directed graphs, it follows that one can sample a cycle cover from the max-entropy distribution in polynomial time and, thus, the question is answered affirmatively. The generalized (randomized) approximate counting oracle for cycle covers in a graph follows from the work of . The technical condition of interiority of x⋆x^{\star} can be satisfied with a slight loss in optimality of the objective function. The analysis of worst case performance of this algorithm is left open, but to the best of our knowledge, there is no example ruling out that the Randomized Cycle Cover Algorithm is an O(1)O(1)-approximation. Similarly, the application of Theorem 2.8 to the perfect matching polytope in bipartite graphs makes the permanent-based approach suggested in for the (symmetric) TSP computationally feasible.

Bounding Box

In this section, we prove Theorem 2.7 and show that there is a bounding box of small radius containing the optimal solution λ⋆{\lambda}^{\star}. We begin with the following lemma.

Proof: First, note that the supremum of the primal convex program over all θ{\theta} is ln⁡∣M∣≤m.\ln|{\mathcal{M}}|\leq m. Hence, from strong duality it follows that f(λ⋆)≤m.f({\lambda}^{\star})\leq m. This implies that

Since x∈P(M)x\in P({\mathcal{M}}), we have x=∑M∈MrM1Mx=\sum_{M\in{\mathcal{M}}}r_{M}{1}_{M} where ∑M∈MrM=1\sum_{M\in{\mathcal{M}}}r_{M}=1 and rM≥0r_{M}\geq 0 for each M∈MM\in{\mathcal{M}}. Multiplying (3) by rMr_{M} and summing over MM we get

As a consequence, we obtain that ⟨λ⋆,θ⟩−⟨λ⋆,x⟩≤m,\langle{\lambda}^{\star},{\theta}\rangle-\langle{\lambda}^{\star},x\rangle\leq m, completing the proof of the lemma.

Recall that A=x=cA^{=}{x}=c denotes the maximal set of independent equalities satisfied by P(M)P({\mathcal{M}}). We now define the following objects. Let

be the ball centered around θ{\theta} restricted to the affine space A=x=cA^{=}x=c of radius η\eta. Since θ{\theta} is in the η\eta-interior of P(M),P({\mathcal{M}}), we have that B⊆P(M)B\subseteq P({\mathcal{M}}). Let

be the ball centered around θ{\theta} of radius 1η\frac{1}{\eta} in the same affine space and let

Proof: We first prove that Q⊆Q~.Q\subseteq\widetilde{Q}. Let y∈Qy\in Q. The constraints A=y=cA^{=}y=c are clearly satisfied since y∈Qy\in Q. For any x∈Bx\in B,

Thus, y∈Q~y\in\widetilde{Q}. Now we show that Q⊆Q~.Q\subseteq\widetilde{Q}. Let z∈Q~z\in\widetilde{Q}. The constraints A=z=cA^{=}z=c are clearly satisfied since z∈Q~z\in\widetilde{Q}. Now consider

Thus, z′∈Bz^{\prime}\in B. Hence, we must have ⟨z−θ,z′−θ⟩≤1.{\langle{z-{\theta}},{{z}^{\prime}-{\theta}}\rangle}\leq 1. This implies that

Here we have used the fact that A=λ⋆=0,A^{=}\lambda^{\star}=0, see Lemma 2.5. We now verify the second condition. Let x∈Bx\in B. Then

where the last inequality follows from that fact that x∈B⊆P(M)x\in B\subseteq P({\mathcal{M}}) and Lemma 5.1. Thus, λ~∈Q\widetilde{\lambda}\in Q and therefore, we must have ∥λ~−θ∥≤\nicefrac1η\|\widetilde{\lambda}-{\theta}\|\leq\nicefrac{{1}}{{\eta}}. Therefore, ∥\nicefracλ⋆m∥≤\nicefrac1η\|\nicefrac{{\lambda^{\star}}}{{m}}\|\leq\nicefrac{{1}}{{\eta}} proving Theorem 2.7.

Optimization via Counting

In this section, we prove Theorems 2.6 and 2.8. The proof of both the theorems rely on the bounding box result of Theorem 2.7 and employs the framework of the ellipsoid algorithm from Section 2.5.

We first use Theorem 2.13 to give a proof of Theorem 2.6. The algorithm assumes access to a strong first-order oracle for P(M).P({\mathcal{M}}). We then present details of how to implement a strong first-order oracle using an generalized exact counting oracle. Suppose λ⋆{\lambda}^{\star} is the optimum of our convex program. Theorem 2.7 implies that for ∥λ⋆∥∞≤\nicefracmη.\|{{\lambda}}^{\star}\|_{\infty}\leq\nicefrac{{m}}{{\eta}}. Thus, we may pick the bounding radius to R=def\nicefracmηR\stackrel{{\scriptstyle\textup{def}}}{{=}}\nicefrac{{m}}{{\eta}} and it does not cut the optimal λ⋆\lambda^{\star} we are looking for. The only thing left to choose is a β\beta such that

This would imply that the solution λ∘{{\lambda}}^{\circ} output by employing the ellipsoid method from Theorem 2.13 is such that

To establish a bound on β,\beta, start by noticing that inf⁡λfθ(λ)≥0.\inf_{{\lambda}}f_{\theta}({\lambda})\geq 0. This follows from weak-duality and the fact that entropy is always non-negative. On the other hand we have the following simple lemma.

sup⁡∥λ∥∞≤Rfθ(λ)≤(2m+1)R.\sup_{\|{\lambda}\|_{\infty}\leq R}f_{\theta}({\lambda})\leq(2m+1)R.

Here we have used the fact that ∣M∣≤2m|{\mathcal{M}}|\leq 2^{m} and that θe∈\theta_{e}\in for each e∈[m].e\in[m].

Thus, β\beta can be chosen to be ε(2m+1)R.\frac{\varepsilon}{(2m+1)R}. Hence, the running time of the ellipsoid method depends polynomially on the the time it takes to implement the strong first-order oracle for fθf_{\theta} and log⁡mRε.\log\frac{mR}{\varepsilon}.

Since fθ(λ)=⟨λ,θ⟩+ln⁡∑M∈Me−λ(M)=⟨λ,θ⟩+ln⁡Zλ,f_{\theta}({\lambda})=\langle{\lambda},{\theta}\rangle+\ln\sum_{M\in{\mathcal{M}}}e^{-\lambda(M)}=\langle{\lambda},{\theta}\rangle+\ln Z^{\lambda}, it is easily seen that

Hence, ∇fθ(λ)=θ−θλ.\nabla f_{\theta}({\lambda})={\theta}-{\theta}^{\lambda}. Recall that the strong first-order oracle for fθf_{\theta} requires, for a given λ,{\lambda}, fθ(λ)f_{\theta}({\lambda}) and ∇fθ(λ).\nabla f_{\theta}({\lambda}). The generalized exact counting oracle for P(M)P({\mathcal{M}}) immediately does it as it gives us ZeλZ^{\lambda}_{e} for all e∈[m]e\in[m] and Zλ.Z^{\lambda}. This allows us to compute fθ(λ)f_{\theta}({\lambda}) and ∇fθ(λ)\nabla f_{\theta}({\lambda}) in one call to such an oracle. In addition we also need time proportional to the number of bits needed to represent θ.\theta.

Thus, the number of calls to the counting oracle by the ellipsoid algorithm of Theorem 2.13 is bounded by a polynomial in m,m, log⁡R\log R and log⁡\nicefrac1ε.\log\nicefrac{{1}}{{\varepsilon}}. Since each oracle call can be implemented in time polynomial in mm and RR, Here we ignore the fact that e−λee^{-\lambda_{e}} can be irrational. This issue can be dealt in a standard manner as is done in the implementation details of all ellipsoid algorithms. See for details. this gives the required running time and concludes the proof of Theorem 2.6.

2 Proof of Theorem 2.8

Now we give the ellipsoid algorithm that works with a generalized approximate counting oracle and prove Theorem 2.8. Here, the fact that the counting oracle is approximate means that the gradient computed as in the previous section is approximate. Thus, this raises the possibility of cutting off the optimal λ⋆\lambda^{\star} during the run of the ellipsoid algorithm. We present the ellipsoid algorithm to check, given a θ\theta and a ζ,\zeta, whether ∣fθ(λ⋆)−ζ∣≤ε|f_{\theta}(\lambda^{\star})-\zeta|\leq\varepsilon. The technical heart of the matter is to show that when ∣fθ(λ⋆)−ζ∣≤ε,|f_{\theta}(\lambda^{\star})-\zeta|\leq\varepsilon, λ⋆\lambda^{\star} is never cut off of the successive ellipsoids obtained by adding the approximate gradient constraints. Moreover, in this case, once the radius of the ellipsoid becomes small enough, we can output its center as a guess for λ⋆.\lambda^{\star}. Since the radius of the final ellipsoid is small and contains λ⋆\lambda^{\star}, the following lemma, which bounds the Lipschitz constant of fθ,f_{\theta}, implies that the value of fθf_{\theta} at the center of the ellipsoid is close enough to fθ(λ⋆).f_{\theta}(\lambda^{\star}).

which completes the proof. Here we have used the Cauchy-Schwarz inequality in the first and third inequalities and in the second inequality we have used the fact that θ∈m.\theta\in^{m}.

Proceeding to the ellipsoid algorithm underlying the proof of Theorem 2.8, we do a binary search on the optimal value fθ(λ⋆)f_{\theta}({\lambda}^{\star}) up to an accuracy of \nicefracε8\nicefrac{{\varepsilon}}{{8}}. For a guess ζ∈(0,m]\zeta\in(0,m], we check whether the guess is correct with the following ellipsoid algorithm. For ease of analysis, we assume that all oracle calls are answered correctly with probability 1.1. The failure probability can be adjusted to arbitrary precision with a slight degradation in the running time.

A θ\theta which is guaranteed to be in the η\eta-interior of P(M).P({\mathcal{M}}).

A maximally linearly independent set of equalities (A=,b)(A^{=},b) for P(M).P({\mathcal{M}}).

A generalized approximate counting oracle for M.{\mathcal{M}}.

A guess ζ∈(0,m]\zeta\in(0,m] (for fθ(λ⋆)).f_{\theta}(\lambda^{\star})).

Let E0=defE(B0,c0)E_{0}\stackrel{{\scriptstyle\textup{def}}}{{=}}E(B_{0},c_{0}) be a sphere with radius R=\nicefracmηR=\nicefrac{{m}}{{\eta}} centered around the origin (thus, containing λ⋆{\lambda}^{\star} by Theorem 2.7) and restricted to the affine space A=x=0.A^{=}x=0.

Repeat until the ellipsoid EtE_{t} is contained in a ball of radius at most ε16m.\frac{\varepsilon}{16\sqrt{m}}.

Given the ellipsoid Et=defE(Bt,ct)E_{t}\stackrel{{\scriptstyle\textup{def}}}{{=}}E(B_{t},c_{t}), set λt=defct.{\lambda}_{t}\stackrel{{\scriptstyle\textup{def}}}{{=}}c_{t}.

Compute ζt\zeta_{t} using the counting oracle such that fθ(λt)−\nicefracε8≤ζt≤fθ(λt)+\nicefracε8.f_{\theta}({\lambda}_{t})-\nicefrac{{\varepsilon}}{{8}}\leq\zeta_{t}\leq f_{\theta}({\lambda}_{t})+\nicefrac{{\varepsilon}}{{8}}.

Compute θt\theta_{t} such that ∥θt−θλt∥1≤\nicefracε16R\|{\theta}_{t}-{\theta}^{{\lambda}_{t}}\|_{1}\leq\nicefrac{{\varepsilon}}{{16R}} using the counting oracle.

Compute the ellipsoid Et+1E_{t+1} to be the smallest ellipsoid containing the half-ellipsoid {λ∈Et:⟨λ−λt,θ−θt⟩≤0}\{{\lambda}\in E_{t}:\langle{\lambda}-{\lambda}_{t},{\theta}-{{\theta}_{t}}\rangle\leq 0\} restricted to the affine space A=x=0.A^{=}x=0.

Let T=tT=t and compute ζT\zeta_{T} using the counting oracle such that fθ(λT)−\nicefracε8≤ζT≤fθ(λT)+\nicefracε8f_{\theta}({\lambda}_{T})-\nicefrac{{\varepsilon}}{{8}}\leq\zeta_{T}\leq f_{\theta}({\lambda}_{T})+\nicefrac{{\varepsilon}}{{8}}.

else return fθ(λ⋆)>ζf_{\theta}(\lambda^{\star})>\zeta and stop (ζ\zeta is not a good guess for fθ(λ⋆)f_{\theta}(\lambda^{\star})).

We first show that the algorithm can be implemented using a polynomial number of queries to the approximate oracle. Steps (3b), (3iiA) and (4) can be computed using oracle calls to the generalized approximate counting oracle for M{\mathcal{M}} to obtain Z~λt\widetilde{Z}^{{\lambda}_{t}} such that (1−\nicefracε16)Zλt≤Z~λt≤(1+\nicefracε16)Zλt.(1-\nicefrac{{\varepsilon}}{{16}})Z^{{\lambda}_{t}}\leq\widetilde{Z}^{{\lambda}_{t}}\leq(1+\nicefrac{{\varepsilon}}{{16}})Z^{{\lambda}_{t}}. We set ζt=⟨λt,θ⟩+ln⁡Z~λt\zeta_{t}=\langle{\lambda}_{t},{\theta}\rangle+\ln{\widetilde{Z}^{{\lambda}_{t}}}. A simple calculation then shows that

since fθ(λt)=⟨λt,θ⟩+ln⁡Zλt.f_{\theta}({\lambda}_{t})=\langle{\lambda}_{t},{\theta}\rangle+\ln{{Z}^{{\lambda}_{t}}}. Similarly using one oracle call to the counting oracle with error parameter ε16R\frac{\varepsilon}{16R}, we can compute

as needed in Step (3iiA) of the algorithm. Using Theorem 2.14, the number of iterations can be bounded by a polynomial in m,log⁡\nicefracRεm,\log\nicefrac{{R}}{{\varepsilon}}. The analysis is quite standard and omitted. Each of the oracle call can be implemented in time polynomial in m,Rm,R and \nicefrac1ε\nicefrac{{1}}{{\varepsilon}}. We now show the following lemma which completes the proof of Theorem 2.8.

Let ζ∘\zeta^{\circ} be the smallest guess for which the ellipsoid algorithm succeeds in finding a solution and let λ∘{\lambda}^{\circ} denote the corresponding solution returned. Then, fθ(λ∘)≤fθ(λ⋆)+εf_{\theta}({\lambda}^{\circ})\leq f_{\theta}({\lambda}^{\star})+\varepsilon.

Since ζ∘\zeta^{\circ} is the smallest guess for which the algorithm succeeds in returning an answer, it fails for some ζ∈[ζ∘−\nicefracε8,ζ∘]\zeta\in[\zeta^{\circ}-\nicefrac{{\varepsilon}}{{8}},\zeta^{\circ}]. We show that fθ(λ⋆)≥ζ−\nicefracε4f_{\theta}({\lambda}^{\star})\geq\zeta-\nicefrac{{\varepsilon}}{{4}}. This suffices to prove the theorem since

Suppose for the sake of contradiction that

We then show that λ⋆{\lambda}^{\star} must be in the final ellipsoid ETE_{T} when the ellipsoid algorithm is run with guess ζ\zeta. Let λt{\lambda}_{t} be center of the ellipsoid EtE_{t} in any iteration with guess ζ\zeta. Let ζt\zeta_{t} be computed in Step (3b) such that

Since the algorithm does not return any answer with guess ζ\zeta, we must have ζt>ζ\zeta_{t}>\zeta. Thus,

where the last inequality follows from inequality (4). Let θt{\theta}_{t} be computed in Step (3iiA) of the algorithm such that ∥θt−θλt∥1≤ε32R\|{\theta}_{t}-{\theta}^{{\lambda}_{t}}\|_{1}\leq\frac{\varepsilon}{32R}. But then

where the first inequality follows from convexity of ff. Thus, λ⋆{\lambda}^{\star} satisfies the separating constraint put in Step (3iiB) of the algorithm. Therefore, it must be contained in the final ellipsoid ETE_{T}. Let λT{\lambda}_{T} be the center of the ellipsoid ETE_{T}. Let ζT\zeta_{T} be computed such that ∣ζT−fθ(λT)∣≤\nicefracε8.|\zeta_{T}-f_{\theta}({\lambda}_{T})|\leq\nicefrac{{\varepsilon}}{{8}}. Then

where we use Lemma 6.2. Therefore, the algorithm must have returned λ∘=λT\lambda^{\circ}={\lambda}_{T} as the feasible solution for guess ζ\zeta a contradiction. This completes the proof of Lemma 6.3.

Counting via Optimization

In this section we present the proof of Theorem 2.11. We start by phrasing the problem of estimating ∣M∣|{\mathcal{M}}| as a convex optimization problem.

Let g(θ)g({\theta}) denote the optimum of the max-entropy program of Figure 4 for M{\mathcal{M}} and a point θ\theta in P(M).P({\mathcal{M}}). If θ\theta is in the interior of P(M),P({\mathcal{M}}), then strong duality holds for this convex program and

see Lemma 2.3. By the concavity of the Shannon entropy, g(⋅)g(\cdot) can be easily seen to be a concave function of θ.\theta. Recall that in the setting of Theorem 2.11, we have an access to an approximate max-entropy oracle which, given a θ\theta in the η\eta-interior of P(M),P({\mathcal{M}}), a ζ>0\zeta>0 as a guess for g(θ),g(\theta), and an ε>0,\varepsilon>0, either asserts that g(θ)≥ζ−εg(\theta)\geq\zeta-\varepsilon or returns a λ\lambda such that fθ(λ)≤ζ+ε.f_{\theta}(\lambda)\leq\zeta+\varepsilon. The running time of this oracle is polynomial in m,\nicefrac1εm,\nicefrac{{1}}{{\varepsilon}} and in the number of bits needed to represent ζ.\zeta. Using this oracle, we hope to get an estimate on ∣M∣.|{\mathcal{M}}|. The starting point of the proof is the observation that the point that maximizes g(θ)g(\theta) when θ\theta is in P(M)P({\mathcal{M}}) is

the vertex centroid of P(M).P({\mathcal{M}}).

sup⁡θ∈P(M)g(θ)≤ln⁡∣M∣\sup_{{\theta}\in P({\mathcal{M}})}g(\theta)\leq\ln|{\mathcal{M}}| and g(θ⋆)=ln⁡∣M∣.g(\theta^{\star})=\ln|{\mathcal{M}}|.

Proof: For any θ{\theta} in the interior of P(M)P({\mathcal{M}}), g(θ)g(\theta) is the entropy of some probability distribution over the elements in ∣M∣|{\mathcal{M}}|. A standard fact in information theory implies that the maximum entropy of any distribution over a finite set is obtained by the uniform distribution. The entropy of the uniform distribution on M{\mathcal{M}} is ln⁡∣M∣,\ln|{\mathcal{M}}|, hence, g(θ)g(\theta) can be upper bounded by ln⁡∣M∣\ln{|{\mathcal{M}}|}. On the other hand, the uniform distribution over M{\mathcal{M}} has marginals equal to θ⋆\theta^{\star} and, thus, g(θ⋆)=ln⁡∣M∣.g(\theta^{\star})=\ln|{\mathcal{M}}|.

Thus, if we could find g(θ⋆),g(\theta^{\star}), then we can estimate ∣M∣.|{\mathcal{M}}|. Finding g(θ⋆)g(\theta^{\star}) is the same as solving the convex program

We use the framework of the ellipsoid method to approximately solve this convex program and find a point which gives us a good enough estimate to g(θ⋆).g(\theta^{\star}). Note that, unlike the results in the previous section, the bounding box here is easily obtained since θ∈P(M)⊆m.\theta\in P({\mathcal{M}})\subseteq^{m}.

2 The Interior of P⁡(ℳ)P({\mathcal{M}})

To check how close a candidate point θ\theta is to θ⋆,\theta^{\star}, we use the max-entropy separation oracle provided to us. The main difficulty we encounter is that the running time of the max-entropy oracle with marginals θ\theta is inverse-polynomially dependent on the interiority of the point θ.\theta. Note that interiority of θ\theta is a pre-requisite for strong duality to hold and for a succinct representation of the entropy-maximizing probability distribution to exist as in Lemma 2.3. The reason we assume a max-entropy oracle that works only if θ\theta is in the inverse-polynomial interior of P(M)P({\mathcal{M}}) is that such an oracle is the best we can hope for algorithmically and, indeed, Theorems 2.6 and 2.8 provide such an oracle. Without this restriction the proof of Theorem 2.11 is simpler, but the theorem itself is less useful as there may not exist a max-entropy oracle whose running time does not depend on the interiority of θ.\theta.

The first issue raised by interiority is whether the point we are looking for, θ⋆\theta^{\star} may not be in the inverse-polynomial interior of P(M).P({\mathcal{M}}). To tackle this, we show that there is a point θ∙{\theta^{\bullet}} in the η\eta-interior of P(M)P({\mathcal{M}}) for η=poly(ε,\nicefrac1m)\eta={\rm poly}(\varepsilon,\nicefrac{{1}}{{m}}) such that g(θ∙)∼g(θ⋆)=ln⁡∣M∣.g({\theta^{\bullet}})\sim g(\theta^{\star})=\ln|{\mathcal{M}}|. Thus, instead of aiming for θ⋆,\theta^{\star}, the ellipsoid algorithm aims for θ∙.{\theta^{\bullet}}.

Given an ε>0\varepsilon>0, there exists an η>0\eta>0 and θ∙{\theta^{\bullet}} such that θ∙{{\theta^{\bullet}}} is in η\eta-interior of P(M)P({\mathcal{M}}) and g(θ∙)≥(1−ε16m)ln⁡∣M∣≥ln⁡∣M∣−ε16g({\theta^{\bullet}})\geq\left(1-\frac{\varepsilon}{16m}\right)\ln|{\mathcal{M}}|\geq\ln|{\mathcal{M}}|-\frac{\varepsilon}{16}. Moreover, η\eta is at least a polynomial in \nicefrac1m\nicefrac{{1}}{{m}} and ε.\varepsilon.

be a facet of P(M)P({\mathcal{M}}) where the inequality constraint is one of (A≤,c).(A^{\leq},c). Since the dimension of a facet is one less than that of a polytope, at least one of z0,z1,…,zr,z_{0},z_{1},\ldots,z_{r}, say z0,z_{0}, does not lie in FF and, hence, Ai≤z0<ci.A^{\leq}_{i}z_{0}<c_{i}. Therefore,

since all coefficients are \nicefrac1kl\nicefrac{{1}}{{k_{l}}}-integral. Thus, the distance of z0z_{0} from FF is at least

Henceforth, we assume that kl,ku=poly(m).k_{l},k_{u}={\rm poly}(m).

where we used the fact that ln⁡∣M∣≤m\ln|{\mathcal{M}}|\leq m.

3 A Separation Oracle for Interiority

Our final ingredient is a test for checking whether a point θ{\theta} is in the inverse-polynomial interior of P(M).P({\mathcal{M}}). We show that the separation oracle for P(M)P({\mathcal{M}}) can be used to give such a test. We state the result in generality for any polyhedron PP. For any η>0\eta>0, let

denote the set of η\eta-interior points in PP.

asserts that θ∈P\nicefracη2m{\theta}\in P_{\nicefrac{{\eta}}{{2m}}}, i.e., θ{\theta} is in the \nicefracη2m\nicefrac{{\eta}}{{2m}}-interior of PP, or,

returns aa such that ⟨a,y⟩<⟨a,θ⟩\langle{a},{y}\rangle<\langle{a},{\theta}\rangle for each y∈Pη{y}\in P_{\eta}, or equivalently, a separating hyperplane which separates the η\eta-interior of PP from θ{\theta}.

Proof: We use the the separation oracle for PP on a collection of a small number of points close to θ{\theta} to deduce if θ{\theta} is in the interior of PP. Even if one of these points is not in PP, we use a separating hyperplane for such a point to separate θ{\theta} from the interior of PP. First, we describe the procedure when PP is full dimensional. Let x0,…xm{x}_{0},\ldots{x}_{m} form an η\eta-regular simplex with center θ{\theta}, i.e.,

for each i≠ji\neq j. Such x0,…,xmx_{0},\ldots,x_{m} can be found by starting with a regular simplex and then translating and scaling it. Now, the algorithm applies the separation oracle for each of xi{x}_{i}. Suppose the separation oracle asserts that xi∈P{x}_{i}\in P for each 0≤i≤m0\leq i\leq m. In this case, we assert that θ∈P\nicefracη2m{\theta}\in P_{\nicefrac{{\eta}}{{2m}}}. Observe that since each vertex of the simplex is in PP, we must have that the whole simplex is in PP. Since the simplex is regular where each edge is length η\eta and the center is θ{\theta}, there exists a ball of radius η2m\frac{\eta}{2m} centered at θ{\theta} which is contained in the simplex and, hence, in PP. Thus, θ{\theta} is in η2m\frac{\eta}{2m}-interior of PP as asserted.

Now, suppose that xi∉P{x}_{i}\notin P for some ii and let a{a} be the separating hyperplane, i.e., ⟨a,y⟩<⟨a,xi⟩\langle{a},{y}\rangle<\langle{a},x_{i}\rangle for each y∈P{y}\in P. Then consider the constraint ⟨a,y⟩<⟨a,θ⟩\langle{a},{y}\rangle<\langle{a},{\theta}\rangle. We claim that it is satisfied by each y∈Pη{y}\in P_{\eta}. Let y∈Pη{y}\in P_{\eta} and consider

Since ∥θ−xi∥≤η\|{\theta}-{x}_{i}\|\leq\eta and y∈Pη{y}\in P_{\eta}, we have that y′∈P{y}^{\prime}\in P which implies that ⟨a,y′⟩<⟨a,xi⟩\langle{a},{y}^{\prime}\rangle<\langle{a},{x}_{i}\rangle. But this implies that

which gives us the required separating hyperplane.

Now consider the case where PP is not full dimensional and let rr be the dimension of PP. Recall that in this case we define interior of PP by restricting our attention to points in the affine space {x:A=x=c}\{x:A^{=}{x}=c\}. We modify the algorithm to chose a rr-dimensional simplex in this affine space and check whether each of the vertices of the simplex is in PP. The analysis is identical in this case.

4 The Ellipsoid Algorithm for Theorem 2.11

Now we present the ellipsoid algorithm to approximately solve the convex program min⁡θ∈P(M)g(θ)\min_{{\theta}\in P({\mathcal{M}})}g({\theta}) and prove Theorem 2.11. The starting ellipsoid is a ball of radius m\sqrt{m} that contains m^{m} which contains P(M).P({\mathcal{M}}). Let us fix an ε>0\varepsilon>0 and apply Lemma 7.2 to obtain η\eta which is a polynomial in \nicefrac1m\nicefrac{{1}}{{m}} and ε{\varepsilon} and guarantees the existence of θ∙{\theta^{\bullet}} in the η\eta-interior such that g(θ∙)≥ln⁡∣M∣−ε16g({\theta^{\bullet}})\geq\ln|{\mathcal{M}}|-\frac{\varepsilon}{16}. In the range (0,ln⁡∣M∣](0,\ln|{\mathcal{M}}|] we perform a binary search for the highest ζ\zeta such that the set

is non-empty when we search ζ\zeta within an accuracy \nicefracε16\nicefrac{{\varepsilon}}{{16}}.

Given a guess ζ\zeta for g(θ∙),g({\theta^{\bullet}}), at an iteration tt of the ellipsoid algorithm, we use the center θt\theta_{t} of the ellipsoid as a guess for θ∙.{\theta^{\bullet}}. Ideally, we would pass θt\theta_{t} to the max-entropy oracle which would either assert that g(θt)≥ζ−\nicefracε16g(\theta_{t})\geq\zeta-\nicefrac{{\varepsilon}}{{16}} or returns a λt\lambda_{t} such that fθt(λt)≤ζ+\nicefracε16.f_{\theta_{t}}(\lambda_{t})\leq\zeta+\nicefrac{{\varepsilon}}{{16}}. In the first case we stop and return θt.\theta_{t}. In the latter case, we continue the search and use this λt\lambda_{t} returned by the max-entropy oracle to update the ellipsoid into one with a smaller volume. However, to get the guarantee on the running time, we need to first check that the candidate point θt\theta_{t} is in the η\eta-interior of P(M).P({\mathcal{M}}). Here, we use the separation oracle from Lemma 7.4. We proceed to the max-entropy oracle only if this separation oracle asserts that the point θt\theta_{t} is in the \nicefracη2m\nicefrac{{\eta}}{{2m}}-interior of P(M).P({\mathcal{M}}). In case this separation oracle outputs a hyperplane separating θt\theta_{t} from Pη(M),P_{\eta}({\mathcal{M}}), we use this hyperplane to update the ellipsoid. The key technical fact we show is that when ∣ζ−g(θ∙)∣≤\nicefracε16,|\zeta-g({\theta^{\bullet}})|\leq\nicefrac{{\varepsilon}}{{16}}, θ∙{\theta^{\bullet}} is always contained in every ellipsoid. Thus, once the radius of the ellipsoid becomes small enough, we can output its center as a guess for θ∙.{\theta^{\bullet}}. Since the radius of the final ellipsoid is small and contains θ∙{\theta^{\bullet}}, the following lemma implies that the value of g(⋅)g(\cdot) at the center of the ellipsoid is close enough to g(θ∙)g({\theta^{\bullet}}) and, hence, by Lemma 7.2, to g(θ⋆).g(\theta^{\star}).

Let θ,θ′∈P(M)\theta,\theta^{\prime}\in P({\mathcal{M}}) such that ∥θ−θ′∥≤ε\|\theta-\theta^{\prime}\|\leq\varepsilon and θ\theta is in η\eta-interior of P(M)P({\mathcal{M}}). Then

Proof: Let λ⋆{\lambda}^{\star} be an optimal solution to inf⁡λfθ(λ)\inf_{\lambda}f_{\theta}(\lambda). Thus, pλ⋆p^{{{\lambda}}^{\star}} is the optimal solution to primal convex program and H(pλ⋆)=inf⁡λfθ(λ)H(p^{{{\lambda}}^{\star}})=\inf_{\lambda}f_{\theta}(\lambda). We construct a probability distribution q{q} which is feasible for the primal convex program with parameter θ′\theta^{\prime} and H(q)≥(1−\nicefracεη)H(pλ⋆)H({q})\geq(1-\nicefrac{{\varepsilon}}{{\eta}})H(p^{{{\lambda}}^{\star}}), thus, proving the lemma. We begin with a claim.

Let θ′′=defθ′−(1−\nicefracεη)θ\nicefracεη\theta^{\prime\prime}\stackrel{{\scriptstyle\textup{def}}}{{=}}\frac{\theta^{\prime}-(1-\nicefrac{{\varepsilon}}{{\eta}})\theta}{\nicefrac{{\varepsilon}}{{\eta}}}. Then θ′′∈P(M)\theta^{\prime\prime}\in P({\mathcal{M}}).

Proof: First, observe that any equality constraint for P(M)P({\mathcal{M}}) of the form ⟨Ai=,x⟩=bi\langle A^{=}_{i},x\rangle=b_{i} is satisfied by both θ\theta and θ′\theta^{\prime}. Therefore,

Thus, it is enough to show that ∥θ′′−θ∥≤η.\|\theta^{\prime\prime}-\theta\|\leq\eta. To see this note that

where the last inequality follows from the fact that ∥θ−θ′∥≤ε\|\theta-\theta^{\prime}\|\leq\varepsilon.

Let q′′{q}^{\prime\prime} be an arbitrary probability measure over M{\mathcal{M}} such that the marginals of q′′{q}^{\prime\prime} equal θ′′\theta^{\prime\prime}, i.e., θe′′=∑M∈M:e∈Mq′′M\theta^{\prime\prime}_{e}=\sum_{M\in{\mathcal{M}}:e\in M}{q^{\prime\prime}}_{M}. Let q{q} be the probability measure defined to be

By concavity and non-negativity of the entropy function, we have

We now move on to the description of the ellipsoid algorithm and subsequently complete the proof of Theorem 2.11.

A maximally linearly independent set of equalities (A=,b)(A^{=},b) for P(M).P({\mathcal{M}}).

A separation oracle for the facets (A≤,c)(A^{\leq},c) of P(M).P({\mathcal{M}}).

A max-entropy oracle for M.{\mathcal{M}}.

A guess ζ∈(0,m]\zeta\in(0,m] (for g(θ∙)g({\theta^{\bullet}})).

Let E0=defE(B0,c0)E_{0}\stackrel{{\scriptstyle\textup{def}}}{{=}}E(B_{0},c_{0}) be a sphere with radius R=mR={\sqrt{m}} containing m^{m} restricted to the affine space A=x=b.A^{=}x=b.

Repeat until the ellipsoid EtE_{t} is contained in a ball of radius at most εη16m.\frac{\varepsilon\eta}{16m}.

Given the ellipsoid Et=defE(Bt,ct)E_{t}\stackrel{{\scriptstyle\textup{def}}}{{=}}E(B_{t},c_{t}), set θt=defct{\theta}_{t}\stackrel{{\scriptstyle\textup{def}}}{{=}}c_{t}.

Check using the separation oracle for P(M)P({\mathcal{M}}) as in Lemma 7.4 if θt∈Pη2m(M){\theta}_{t}\in P_{\frac{\eta}{2m}}({\mathcal{M}})

else let ete_{t} be the separating hyperplane returned as in Lemma 7.4, i.e., ⟨et,θ−θt⟩≥0\langle e_{t},{\theta}-{\theta}_{t}\rangle\geq 0 for all θ∈Pη(M){\theta}\in P_{\eta}({\mathcal{M}}) and goto Step (3e).

Call the max-entropy oracle with input θt{\theta}_{t}, ζ\zeta and \nicefracε16\nicefrac{{\varepsilon}}{{16}}.

If g(θt)≥ζ−\nicefracε16g({\theta}_{t})\geq\zeta-\nicefrac{{\varepsilon}}{{16}}

else the max-entropy oracle returns λt{\lambda}_{t} such that fθt(λt)≤ζ+\nicefracε16f_{{\theta}_{t}}({\lambda}_{t})\leq\zeta+\nicefrac{{\varepsilon}}{{16}}. Let et=λte_{t}={\lambda}_{t}.

Compute the ellipsoid Et+1E_{t+1} to be the smallest ellipsoid containing the half-ellipsoid {θ∈Et:⟨et,θ−θt⟩≥0}\{{\theta}\in E_{t}:\langle e_{t},{\theta}-{\theta}_{t}\rangle\geq 0\} and restricted to the affine space A=x=b.A^{=}x=b.

Let T=tT=t call the max-entropy oracle with input θT,ζ\theta_{T},\zeta and \nicefracε16.\nicefrac{{\varepsilon}}{{16}}.

If g(θT)≥ζ−\nicefracε16g(\theta_{T})\geq\zeta-\nicefrac{{\varepsilon}}{{16}}

else return g(θ∙)<ζg({\theta^{\bullet}})<\zeta and stop (ζ\zeta is not a good guess for g(θ∙)g({\theta^{\bullet}})).

It is clear that any call to the approximate optimization oracle is made for points θ{\theta} which are in η2m\frac{\eta}{2m} interior. Thus, the running time of the algorithm is polynomially bounded by mm and \nicefrac1ε\nicefrac{{1}}{{\varepsilon}} for each call. To bound the number of iterations note that the starting ellipsoid has radius m\sqrt{m} and the final ellipsoid poly(\nicefrac1m,ε).{\rm poly}(\nicefrac{{1}}{{m}},\varepsilon). Hence, the number of iterations can be bounded by Theorem 2.14 by poly(m,\nicefrac1ε).{\rm poly}(m,\nicefrac{{1}}{{\varepsilon}}). It remains to prove the correctness of the algorithm.

Towards this, let ζ∘{\zeta^{\circ}} be the largest guess of ζ\zeta for which the algorithms returns a positive answer and let θ∘{{\theta}^{\circ}} be the point returned by the algorithm for guess ζ∘\zeta^{\circ}. We return Z∘=defeζ∘Z^{\circ}\stackrel{{\scriptstyle\textup{def}}}{{=}}e^{{\zeta^{\circ}}} as our estimate of ∣M∣|{\mathcal{M}}|. To complete the proof of Theorme 2.11, we show that Z∘Z^{\circ} satisfies

Consider the run of the ellipsoid algorithm for a guess ζ\zeta and let the hyperplane {θ:⟨et,θ−θt⟩≥0}\{{\theta}:\langle e_{t},{\theta}-{\theta}_{t}\rangle\geq 0\} be used as a separating hyperplane in some iteration of the algorithm. Then this separating hyperplane does not cut any point θ\theta such that θ∈Pη(M)\theta\in P_{\eta}({\mathcal{M}}) and g(θ)≥ζ+\nicefracε16.g(\theta)\geq\zeta+\nicefrac{{\varepsilon}}{{16}}.

Proof: If the hyperplane ete_{t} is obtained in Step (3(b)ii), then it is clearly a valid inequality for Pη(M)P_{\eta}({\mathcal{M}}) and therefore does not cut off any of its points. Otherwise, suppose et=λte_{t}={\lambda}_{t} is obtained in Step (3(d)ii). Then

and, therefore, by (6), θ{\theta} satisfies the constraint ⟨et,θ−θt⟩≥0\langle e_{t},{\theta}-{\theta}_{t}\rangle\geq 0.

We now show that ζ∘≥ln⁡∣M∣−4ε16\zeta^{\circ}\geq\ln|{\mathcal{M}}|-\frac{4\varepsilon}{16}. Consider the run of the algorithm for

θ∙{\theta^{\bullet}} cannot be cut off in any iteration by Lemma 7.7. If the ellipsoid returns an answer when run with guess ζ′\zeta^{\prime} then

as claimed. Otherwise, we end with an ellipsoid ETE_{T} of radius at most εη16m\frac{\varepsilon\eta}{16m}. Let θT\theta_{T} be the center of the ellipsoid ETE_{T}. Since θ∙∈ET{\theta^{\bullet}}\in E_{T}, we have that ∥θ∙−θT∥≤εη16n\|{\theta^{\bullet}}-\theta_{T}\|\leq\frac{\varepsilon\eta}{16n}. Since θ∙{\theta^{\bullet}} is in η\eta-interior, from Lemma 7.5 it follows that

This contradicts the fact that the algorithm did not output θT{\theta}_{T} in the last iteration and asserted

Since ζ∘≥ln⁡∣M∣−4ε16\zeta^{\circ}\geq\ln|{\mathcal{M}}|-\frac{4\varepsilon}{16} and ζ∘≤ln⁡∣M∣+ε16\zeta^{\circ}\leq\ln|{\mathcal{M}}|+\frac{\varepsilon}{16}. We obtain that (1−ε)∣M∣≤Z∘≤(1+ε)∣M∣(1-\varepsilon)|{\mathcal{M}}|\leq Z^{\circ}\leq(1+\varepsilon)|{\mathcal{M}}| proving (5) and completing the proof of Theorem 2.11.

References

Appendix A Omitted Proofs

For a point θ\theta in the interior of P(M),P({\mathcal{M}}), there exists a unique distribution p⋆p^{\star} which attains the max-entropy while satisfying

Proof: Consider the convex program for computing the maximum-entropy distribution with marginals θ\theta as in Figure 4.

We first prove that the dual of this convex program is the one given in Figure 5.

To see this consider multipliers λe\lambda_{e} for constraints (7) in Figure 4 and a multiplier zz for the constraint (8). Then the Lagrangian L(p,λ,z)L(p,\lambda,z) is defined to be

Let g(λ,z)=definf⁡p≥0L(p,λ,z).g(\lambda,z)\stackrel{{\scriptstyle\textup{def}}}{{=}}\inf_{p\geq 0}L(p,\lambda,z). Thus, the pp which achieves g(λ,z)g(\lambda,z) can be obtained by taking partial derivatives with respect to pMp_{M} and setting them to 00 as follows.

Thus, pM=e−1−z−λ(M)p_{M}=e^{-1-z-\lambda(M)} for all M∈M.M\in{\mathcal{M}}. Summing this up over all M∈MM\in{\mathcal{M}} we obtain that

For such a (p,λ,z),(p,\lambda,z), if we multiply each (12) by pMp_{M} and add all of them up we obtain

Hence, combining this with (11) and using (13), the dual becomes to find the infimum of g(λ,z)g({\lambda},z) which is

Optimizing g(λ,z)g(\lambda,z) over zz one obtains that g(λ,z)g(\lambda,z) is minimized when

Hence, z=ln⁡∑M∈Me−λ(M)−1.z=\ln\sum_{M\in{\mathcal{M}}}e^{-\lambda(M)}-1. Thus, the Lagrangian dual becomes to minimize

This completes the proof that the dual of Figure 5 is the convex program in Figure 4.

Since θ\theta is in the interior of P(M),P({\mathcal{M}}), the primal-dual pair satisfies Slater’s condition and strong duality holds, see , implying that the optimum of both the programs is the same. Moreover, by the strict concavity of the entropy function, the optimum is unique. Hence, at optimality, pM⋆=e−λ⋆(M)∑N∈Me−λ⋆(N)p^{\star}_{M}=\frac{e^{-\lambda^{\star}(M)}}{\sum_{N\in{\mathcal{M}}}e^{-\lambda^{\star}(N)}} where λ⋆\lambda^{\star} is the optimal dual solution and p⋆p^{\star} is the optimal primal solution.

A.2 Optimal and Near-Optimal Dual Solutions

In this section we first prove that if λ\lambda is a solution to the program in Figure 5 for (M,θ)({\mathcal{M}},\theta) of value ζ,\zeta, then so is any λ+(A=)⊤d\lambda+(A^{=})^{\top}d for any d.d. Recall that (A=,b)(A^{=},b) are the equality constraints satisfied by all vertices of M.{\mathcal{M}}. Hence, in our search for the optimal solution to the dual convex program, we restrict ourselves to the space of λ\lambda s.t. A=λ=0.A^{=}\lambda=0.

fθ(λ)=fθ(λ+(A=)⊤d)f_{\theta}(\lambda)=f_{\theta}(\lambda+(A^{=})^{\top}d) for any d.d.

Proof: First, note that ⟨λ+(A=)⊤d,θ⟩=⟨λ,θ⟩+⟨(A=)⊤d,θ⟩.\langle\lambda+(A^{=})^{\top}d,\theta\rangle=\langle\lambda,\theta\rangle+\langle(A^{=})^{\top}d,\theta\rangle. Note that θ\theta can be written as ∑M∈MpM1M\sum_{M\in{\mathcal{M}}}p_{M}{1}_{M} and A=1M=bA^{=}{1}_{M}=b for all M∈M.M\in{\mathcal{M}}. Hence,

since ∑M∈MpM=1.\sum_{M\in{\mathcal{M}}}p_{M}=1. On the other hand note that

Combining, we obtain that fθ(λ+(A=)⊤d)f_{\theta}(\lambda+(A^{=})^{\top}d) equals

which equals fθ(λ).f_{\theta}(\lambda). This completes the proof of the lemma.

Thus, we can assume that A=λ⋆=0A^{=}\lambda^{\star}=0 where λ⋆\lambda^{\star} is the optimal solution for the program of Figure 5 for (M,θ).({\mathcal{M}},\theta).

Next we prove that if λ\lambda is such that fθ(λ)f_{\theta}(\lambda) is close to fθ(λ⋆),f_{\theta}(\lambda^{\star}), then pλp^{{\lambda}} and pλ⋆p^{{\lambda}^{\star}} are close to each other. We relate the Kullback-Leibler distance between pλp^{{\lambda}} and pλ⋆p^{{\lambda}^{\star}} to fθ(λ)−fθ(λ⋆).f_{\theta}(\lambda)-f_{\theta}(\lambda^{\star}). In particular θλ\theta^{\lambda} and θ\theta are close to each other. Before we state this lemma, we recall some basic measures of proximity between probability distributions.

Let p,qp,q be two probability distributions over the same space Ω.\Omega. The following are natural measures of distances.

∥p−q∥TV=defmax⁡S⊆Ω∣p(S)−q(S)∣.\|p-q\|_{\rm TV}\stackrel{{\scriptstyle\textup{def}}}{{=}}\max_{S\subseteq\Omega}|p(S)-q(S)|.

∥p−q∥1=def∑ω∣p(ω)−q(ω)∣.\|p-q\|_{1}\stackrel{{\scriptstyle\textup{def}}}{{=}}\sum_{\omega}|p(\omega)-q(\omega)|.

If p,q>0,p,q>0, then the Kullback-Leibler distance between them is defined to be

This distance function is always non-negative but not necessarily symmetric.

The following lemma shows a close relation between the dual solutions and Kullback-Leibler distance between the corresponding primal distributions.

Suppose λ\lambda is such that fθ(λ)≤fθ(λ⋆)+εf_{\theta}(\lambda)\leq f_{\theta}(\lambda^{\star})+\varepsilon where λ⋆\lambda^{\star} is the optimum dual solution for the instance (M,θ).({\mathcal{M}},\theta). Let pλ,pλ⋆p^{{\lambda}},p^{{\lambda}^{\star}} be the probability distributions corresponding to λ\lambda and λ⋆\lambda^{\star} respectively:

Proof: Let Zλ,Zλ⋆Z^{{\lambda}},Z^{{\lambda}^{\star}} denote ∑M∈Me−λ(M)\sum_{M\in{\mathcal{M}}}e^{-\lambda(M)} and ∑M∈Me−λ⋆(M)\sum_{M\in{\mathcal{M}}}e^{-\lambda^{\star}(M)} respectively. Then, it follows from optimality of λ⋆\lambda^{\star} that

which, since pM=\nicefrace−λ(M)Zλp_{M}=\nicefrac{{e^{-\lambda(M)}}}{{Z^{{\lambda}}}} is

Here, we have used (14). Hence, DKL(p⋆∥p)=fθ(λ)−fθ(λ⋆)≤ε.D_{\rm KL}(p^{\star}\|p)=f_{\theta}(\lambda)-f_{\theta}(\lambda^{\star})\leq\varepsilon.

It is well-known, see Lemma 12.6.1, pp. 300-301, that for probability distributions p,qp,q over the same sample space

Hence, we obtain the following as a corollary to Lemma A.4.

Let λ\lambda be such that fθ(λ)≤fθ(λ⋆)+ε.f_{\theta}(\lambda)\leq f_{\theta}(\lambda^{\star})+\varepsilon. Then, for all e∈[m],e\in[m], ∣θeλ−θeλ⋆∣≤O(ε).|{\theta}^{{\lambda}}_{e}-\theta^{{\lambda}^{\star}}_{e}|\leq O(\sqrt{\varepsilon}).

Appendix B Generalized Counting and Minimizing Kullback-Leibler Divergence

(1−ε)Zμ≤Z~μ≤(1+ε)Zμ(1-\varepsilon)Z^{\mu}\leq\widetilde{Z}^{{\mu}}\leq(1+\varepsilon)Z^{\mu} and

for every e∈[m],e\in[m], (1−ε)Zeμ≤Z~eμ≤(1+ε)Zeλ.(1-\varepsilon)Z^{\mu}_{e}\leq\widetilde{Z}^{\mu}_{e}\leq(1+\varepsilon)Z^{\lambda}_{e}.

Observe that the objective is to find a distribution pp that minimizes the KL-divergence, up to a shift, between the distributions pp and pμp^{\mu}. This follows since the objective can be rewritten as

where ZμZ^{\mu} does not depend on the variable pp but only on the input μ\mu. The dual of this convex program is given in Figure 7. We use the following to denote the objective function of the dual:

When θ\theta is in the interior of P(M),P({\mathcal{M}}), strong duality holds between the programs of Figure 6 and 7. We assume that we are given the following approximate oracle to solve the above set of convex programs.

asserts that inf⁡λfθμ(λ)≥ζ−ε\inf_{{\lambda}}f^{\mu}_{{\theta}}({\lambda})\geq\zeta-\varepsilon or

The oracle is assumed to be efficient, i.e., it runs in time polynomial in mm, \nicefrac1ε,\nicefrac{{1}}{{\varepsilon}}, \nicefrac1η\nicefrac{{1}}{{\eta}}, the number of bits needed to represent ζ\zeta and ∥μ∥1.\|\mu\|_{1}.

The following theorem is the appropriate generalization of Theorem 2.11 in this setting.

We omit the proof since it is a simple but tedious generalization of the proof of Theorem 2.11. We highlight below the key additional points that must be taken into account. The algorithm in the proof of Theorem B.2 is obtained by using the ellipsoid algorithm to maximize the concave function

over the interior of P(M).P({\mathcal{M}}). Here, gμ(θ)=defmin⁡λfθμ(λ).g^{\mu}(\theta)\stackrel{{\scriptstyle\textup{def}}}{{=}}\min_{\lambda}f^{\mu}_{\theta}(\lambda). Indeed, the maximum is attained at θ⋆\theta^{\star} where

and the objective value at this maximum is ln⁡Zμ\ln Z^{\mu}. Thus, we use the ellipsoid algorithm to search for θ⋆\theta^{\star}. The issue of interiority as in Lemma 7.2 is resolved by proving the following lemma.

Given an ε>0\varepsilon>0, there exists an η>0\eta>0 and θ∙{\theta^{\bullet}} such that θ∙{{\theta^{\bullet}}} is in η\eta-interior of P(M)P({\mathcal{M}}) and gμ(θ∙)≥(1−ε16m∥μ∥1)ln⁡Zμ≥ln⁡Zμ−ε16g^{\mu}({\theta^{\bullet}})\geq\left(1-\frac{\varepsilon}{16m\|\mu\|_{1}}\right)\ln Z^{\mu}\geq\ln Z^{\mu}-\frac{\varepsilon}{16}. Moreover, η\eta is at least a polynomial in \nicefrac1m\nicefrac{{1}}{{m}}, ε\varepsilon and \nicefrac1∥μ∥1.\nicefrac{{1}}{{\|\mu\|_{1}}}.

Similarly, Lemma 7.5 can be generalized to show the following:

Let θ,θ′∈P(M)\theta,\theta^{\prime}\in P({\mathcal{M}}) such that ∥θ−θ′∥≤ε\|\theta-\theta^{\prime}\|\leq\varepsilon and θ\theta is in η\eta-interior of P(M)P({\mathcal{M}}). Then

Using the above two lemmas it is straightforward to generalize the argument in Theorem 2.11 to prove Theorem B.2.

To complete the picture we show that, given access to a generalized counting oracle, we can solve the above pair of convex programs. This gives the following theorem which is a generalization of Theorem 2.8.

where λ⋆\lambda^{\star} is the optimal solution to the dual of the max-entropy convex program for (M,θ,μ)({\mathcal{M}},\theta,\mu) from Figure 7. Assuming that the generalized approximate counting oracle is polynomial in its input parameters, the running time of the algorithm is polynomial in mm, \nicefrac1η,\nicefrac{{1}}{{\eta}}, log⁡\nicefrac1ε\log\nicefrac{{1}}{{\varepsilon}}, the number of bits needed to represent θ\theta and (A=,b),(A^{=},b), and ∥μ∥1.\|\mu\|_{1}.

A similar theorem can be stated in the exact counting oracle setting, extending Theorem 2.6. The proof of Theorem B.5 is quite straightforward and relies on the following lemma that states that the objective of the primal convex program is just an additive shift from the objective of the maximum entropy convex program. Thus, the primal optimum solution remains the same. This implies that the dual convex program can be solved as in the proof of Theorem 2.8 with one additional call to the generalized approximate counting oracle involving μ\mus.

Let pp be any feasible solution to the primal convex program given in Figure 6. Then the objective

where we have used the facts that ∑MpM=1\sum_{M}p_{M}=1 and ∑M:e∈MpM=θe\sum_{M:e\in M}p_{M}=\theta_{e} since pp satisfies the constraints of the convex program in Figure 6.

Appendix C 2→22\rightarrow 2-norm of ∇f\nabla f

Recall that ∥∇f∥2→2\|\nabla f\|_{2\rightarrow 2} is the 2→22\rightarrow 2 Lipschitz constant of ∇f\nabla f and is defined to be the smallest non-negative number such that

for all λ,λ′.\lambda,\lambda^{\prime}. In this section, we show the following theorem, which can be used to give alternative gradient-descent based proofs of Theorems 2.6 and 2.8.

Let ff be defined as in (16). Then, ∥∇f∥2→2≤O(mm).\|\nabla f\|_{2\rightarrow 2}\leq O(m\sqrt{m}).

Proof: Given λ1\lambda_{1} and λ2\lambda_{2}, let pλ1p^{\lambda_{1}} and pλ2p^{\lambda_{2}} be the corresponding product distributions and let θ1\theta_{1} and θ2\theta_{2} be the corresponding marginals. We break the calculation of ∥∇f∥2→2\|\nabla f\|_{2\rightarrow 2} into two parts:

Estimating ∥∇f∥2→2\|\nabla f\|_{2\rightarrow 2} in the first case is straightforward. To see this, recall that

since θ,θi∈P(M)⊆m\theta,\theta_{i}\in P({\mathcal{M}})\subseteq^{m}, which implies that θ−θi∈m\theta-\theta_{i}\in^{m} for i=1,2.i=1,2. Hence,

Hence, we move on to proving the theorem in the case

Note that by assumption (20), ε≤\nicefrac110.\varepsilon\leq\nicefrac{{1}}{{10}}. It follows from (21) that for any M∈MM\in{\mathcal{M}},

The following series of claims establishes Theorem C.1.

e−ε≤Zλ1Zλ2≤eε.e^{-\varepsilon}\leq\frac{Z^{\lambda_{1}}}{Z^{\lambda_{2}}}\leq e^{\varepsilon}.

Proof: For each M∈M,M\in{\mathcal{M}}, (22) implies that

Here, we have used the inequality that for non-negative numbers a1,a2,…a_{1},a_{2},\ldots and b1,b2,…,b_{1},b_{2},\ldots,

The claim follows by combining (24) with the definition

For each M∈MM\in{\mathcal{M}}, e−2ε≤pMλ1pMλ2≤e2ε.e^{-2\varepsilon}\leq\frac{p^{\lambda_{1}}_{M}}{p^{\lambda_{2}}_{M}}\leq e^{2\varepsilon}.

Since all the numbers involved in this product are positive, (23) and Claim C.2 imply that both the ratios in the right hand side of the equation are bounded from below by e−εe^{-\varepsilon} and from above by eε.e^{\varepsilon}. Hence, their product is bounded from below by e−2εe^{-2\varepsilon} and from above by e2εe^{2\varepsilon}, completing the proof of the claim.

For each e∈[m]e\in[m], e−2ε≤(θ1)e(θ2)e≤e2ε.e^{-2\varepsilon}\leq\frac{(\theta_{1})_{e}}{(\theta_{2})_{e}}\leq e^{2\varepsilon}.

Proof: By the definition of θ1\theta_{1} and θ2,\theta_{2},

Combining Claim C.3 and (25), we obtain that

For ε≤\nicefrac110,\varepsilon\leq\nicefrac{{1}}{{10}}, ∥θ1−θ2∥1≤3εm.\|\theta_{1}-\theta_{2}\|_{1}\leq 3\varepsilon m.

Since θ1,θ2≥0,\theta_{1},\theta_{2}\geq 0, Claim C.4 implies that for each e∈[m],e\in[m],

Since max⁡{∣e−2ε−1∣,∣e2ε−1∣}≤3ε\max\{|e^{-2\varepsilon}-1|,|e^{2\varepsilon}-1|\}\leq 3\varepsilon for ε≤\nicefrac110,\varepsilon\leq\nicefrac{{1}}{{10}}, the above inequality reduces to, for each e∈[m],e\in[m],

since θ2≥0\theta_{2}\geq 0 and θ2∈P(M)⊆m.\theta_{2}\in P({\mathcal{M}})\subseteq^{m}. This completes the proof of the claim.

Finally, to complete the proof of Theorem C.1, note that when (20) holds,