(This is the sixth in a series of posts on online optimization techniques and their “applications” to complexity theory, combinatorics and pseudorandomness. The plan for this series of posts is to alternate one post explaining a result from the theory of online convex optimization and one post explaining an “application.” The first two posts were about the technique of multiplicative weight updates and its application to “derandomizing” probabilistic arguments based on combining a Chernoff bound and a union bound. The third and fourth post were about the Follow-the-Regularized-Leader framework, and how it unifies multiplicative weights and gradient descent, and a “gradient descent view” of the Frieze-Kannan Weak Regularity Lemma. The fifth post was about the constrained version of the Follow-the-Regularized-Leader framework, and today we shall see how to apply that to a proof of the Impagliazzo Hard-Core Lemma.)
1. The Impagliazzo Hard-Core Lemma
The Impagliazzo Hard-Core Lemma is a striking result in the theory of average-case complexity. Roughly speaking, it says that if is a function that is “weakly” hard on average for a class
of “efficiently computable” functions
, that is, if, for some
, we have that
then there is a subset of cardinality
such that
is “strongly” hard-on-average on
, meaning that
for a small . Thus, the reason why functions from
make a mistake in predicting
at least a
fraction of the times is that there is a “hard-core” set
of inputs such that every function from
makes a mistake about 1/2 of the times for the
fraction of inputs coming from
.
The result is actually not literally true as stated above, and it is useful to understand a counterexample, in order to motivate the correct statement. Suppose that contains just
functions, and that each function
differs from
in exactly a
fraction of inputs from
, and that the set of mistakes are disjoint. Thus, for every set
, no matter its size, there is a function
that agrees with
on at least a
fraction of inputs from
. The reason is that the sets of inputs on which the functions of
differ from
form a partition of
, and so their intersections with
form a partition of
. By an averaging argument, one of those intersections must then contain at most
elements of
.
In the above example, however, if we choose any three distinct functions from
, we have
So, although is weakly hard on average with respect to
, we have that
is not even worst-case hard for a slight extension of
in which we allow functions obtained by simple compositions of a small number of functions of
.
Theorem 1 (Impagliazzo Hard-Core Lemma) Let
be a collection of functions
, let
a function, and let
and
be positive reals. Then at least one of the following conditions is true:
- (
is not weakly hard-on-average over
with respect to a slight extension of
) There is a
, an integer
, and
functions
, such that
satisfies
- (
is strongly hard-on-average over a set
of density
) There is a set
such that
and
Where is equal to
or
depending on whether the boolean expression is true or false (the letter “
” stands for “indicator” function of the truth of the expression).
2. Proving the Lemma
Impagliazzo’s proof had polynomial in both
and
, and an alternative proof discovered by Nisan has a stronger bound on
of the order of
. The proofs of Impagliazzo and Nisan did not immediately give a set of size
(the set had size
), although this could be achieved by iterating their argument. An idea of Holenstein allows to prove the above statement in a more direct way.
Today we will see how to obtain the Impagliazzo Hard-Core Lemma from online optimization, as done by Barak, Hardt and Kale. Their proof achieves all the parameters claimed above, once combined with Holenstein’s ideas.
We say that a distribution (here “
” stands for probability measure; we use this letter since we have already used
last time to denote the Bregman divergence) has min-entropy at least
if, for every
,
. In other words, the min-entropy of a distribution
over a sample space
is defined as
The uniform distribution over a set has min-entropy
, and all distributions of min-entropy
can be realized as a convex combination of distributions that are each uniform over a set of size
, thus uniform distributions over large sets and large-min-entropy distributions are closely-related concepts. We will prove the following version of the hard-core lemma:
Theorem 2 (Impagliazzo Hard-Core Lemma — Min-Entropy Version) Let
be a finite set,
be a collection of functions
, let
a function, and let
and
be positive reals. Then at least one of the following conditions is true:
- (
is not weakly hard-on-average over
with respect to
) There is a
, an integer
, and
functions
, such that
satisfies
- (
is strongly hard-on-average on a distribution of min-entropy
) There is a distribution
of min-entropy
such that
Under minimal assumptions on (that it contains
functions), the min-entropy version implies the set version, and the min-entropy version can be used as-is to derive most of the interesting consequences of the set version.
Let us restate it one more time.
Theorem 3 (Impagliazzo Hard-Core Lemma — Min-Entropy Version) Let
be a finite set,
be a collection of functions
, let
a function, and let
and
be positive reals. Suppose that for every distribution
of min-entropy
we have
Then there is a
, an integer
, and
functions
, such that
satisfies
As in previous posts, we are going to think about a game between a “builder” that works toward the construction of and an “inspector” that looks for defects in the construction. More specifically, at every round
, the inspector is going to pick a distribution
of min-entropy
and the builder is going to pick a function
. The loss function, that the inspector wants to minimize, is
The inspector runs the agile online mirror descent algorithm with the constraint of picking distributions of the required min-entropy, and using the entropy regularizer; the builder always chooses a function such that that
which is always a possible choice given the assumptions of our theorem.
Just by plugging the above setting into the analysis from the previous post, we get that if we play this online game for steps, the builder picks functions
such that, for every distribution
of min-entropy
, we have
We will prove that (1) holds in the next section, but we emphasize again that it is just a matter of mechanically using the analysis from the previous post. Impagliazzo’s proof relies, basically, on playing the game using lazy mirror descent with regularization, and he obtains a guarantee like the one above after
steps.
What do we do with (1)? Impagliazzo’s original reasoning was to define
and to consider the set of “bad” inputs
such that
. We have
and so
The min-entropy of the uniform distribution over is
, and this needs to be less than
, so we conclude that
happens for at most a
fraction of elements of
.
This is qualitatively what we promised, but it is off by a factor of 2 from what we stated above. The factor of 2 comes from a subsequent idea of Holenstein. In Holenstein’s analysis, we sort elements of according to
and he lets be the set of
elements of
for which the above quantity is smallest, and he shows that if we properly pick an integer
and define
then will be equal to
for all
and also for at least half the
, meaning that
for at least a
fraction of the input. Since this is a bit outside the scope of this series of posts, we will not give an exposition of Holenstein’s argument.
3. Analysis of the Online Game
It remains to show that we can achieve (1) with of the order of
. As we said, we play a game in which, at every step
- The “inspector” player picks a distribution
of min-entropy at least
, that is, it picks a number
for each
such that
.
- The “builder” player picks a function
, whose existence is guaranteed by the assumption of the theorem, such that
and defines the loss function
- The “inspector” is charged the loss
.
We analyze what happens if the inspector plays the strategy defined by agile mirror descent with negative entropy regularizer. Namely, we define the regularizer
for a choice of that we will fix later. The corresponding Bregman divergence is
and we work over the space of distributions of min-entropy
.
The agile online mirror descent algorithm is
so that is the uniform distribution, and for
Solving the first step of agile online mirror descent, we have
Using the analysis from the previous post, for every distribution in
, and every number
of steps, we have the regret bound
and we can bound
and
where, in the last step, we used the fact the quantity in parenthesis is either 0 or which is
, and that
because
is a distribution.
Overall, the regret is bounded by
where the last inequality comes from an optimized choice of .
Recall that we choose the functions so that
for every
, so for every
and by choosing of the order of
we get
It remains to observe that
so we have that for every distribution of min-entropy at least
it holds that
which is the statement that we promised and from which the Impagliazzo Hard-Core Lemma follows.
4. Some Final Remarks
After Impagliazzo circulated a preliminary version of his paper, Nisan had the following idea: consider the game that we define above, in which a builder picks an , an inspector picks a distribution
of the prescribed min-entropy, and the loss for the inspector is given by
. We can think of it as a zero-sum game if we also assign a gain
to the builder.
If the builder plays second, there is a strategy that guarantees a gain that is at least , and so there must be a mixed strategy, that is, a distribution
over functions in
, that guarantees such a gain even if the builder plays first. In other words, for all distributions
of the prescribed min-entropy we have
Nisan then observes that we can sample functions
and have, with high probability
and the sampling bound on can be improved to order of
with the same conclusion.
Basically, what we have been doing today is to come up with an algorithm that finds an approximate solution for the LP that defines the optimal mixed strategy for the game, and to design the algorithm is such a way that the solution is very sparse.
This is a common feature of other applications of online optimization techniques to find “sparse approximations”: one sets up an optimization problem whose objective function measures the “approximation error” of a given solution. The object we want to approximate is the optimum of the optimization problem, and we use variants of mirror descent to prove the existence of a sparse solution that is a good approximation.
Is the upper bound on k known to be sharp in any sense?
Also, I might have found some typos:
“pick a distribution M_i” – in the later parts often M is written instead of M_i, like in L_i(M)
“Solving the first step of agile online mirror descent” – in the equation after this, and in a later equation as well, f should be f_i in I{f(x)=g(x)}
The question of optimality was studied in this paper https://link.springer.com/chapter/10.1007%2F978-3-540-73420-8_18
The level of generality of the statements in this post is the “fully black box” model of the paper, for which
is tight.
I could not find any place in which M should have been M_i (the definition of L_i must be given for all M otherwise the regret cannot be defined)
Indeed, you are right about M_i.
I would have a question about Nisan’s game theoretic argument. Why should there be such a DF distribution? For example, consider the rock-paper-scissors variant when builder has to show the same thing as the inspector. If inspector plays first, and builder plays second, builder always wins. But this doesn’t give any mixed strategy for the builder when builder plays first, in fact, in that case always inspector wins.
By “playing first” I mean deciding on a (possibily mixed) strategy, and then letting the second player choose their (possibly mixed) strategy based on that. If players choose mixed strategies, then the sampling from the mixed strategies happens independently. This is the setup in which you have the min-max theorem for two player zero sum games. Something that is important to make the argument work is that a mix of distributions of min entropy > K is also a distribution of min entropy > K
Makes perfect sense, thanks!
Pingback: Online Optimization Post 7: Matrix Multiplicative Weights Update | in theory
“The proofs of Impagliazzo and Nisan did not immediately give a set of size {2\delta2^n} (the set had size {\delta 2^n}), although this could be achieved by iterating their argument.” Could you elaborate on this, namely how iterating their argument gives 2\delta? I didn’t know there was a way of obtaining 2\delta other than Holenstein’s modification.
@ Sam McGuire: find a hard set H1 of size delta*2^n with the original proof. Now every circuit of size S makes errors in at least 1/2-eps but also at most 1/2+eps fraction of inputs of H1 (the bound has to be on both sides because the negation of a circuit that is wrong on more than 1/2+eps of the inputs would be correct on more than a 1/2+eps fraction of the inputs from H1).
Now, if we call X the whole set {0,1}^n, consider X1 = X – H1. Every circuit of size S makes at least delta*2^n mistakes in X, but at most (1/2 +eps)*delta*2^n in H1, so it makes about a 1-delta/2 fraction of errors in X1. This means that there is a subset H2 of X1 of size about delta*|X|/2 on which every circuit makes at least a 1/2-eps and at most a 1/2+eps fraction of errors.
It also means that H1 union H2 has about 1.5*delta*|X| elements and every circuit makes at least a 1/2-eps fraction of errors given a random elment of H1 union H2. Then you consider X2 = X1 – H2 and you keep going. You have to be more careful than I was about epsilon and delta, in computing the size of each set Hi and its density in X_{i-1}, but this is the basic idea
Awesome, thanks!