Online Condensing of Unpredictable Sources via Random Walks
Abstract
A natural model of a source of randomness consists of a long stream of symbols , with some guarantee on the entropy of conditioned on the outcome of the prefix . We study unpredictable sources, a generalization of the almost Chor–Goldreich (CG) sources considered in [9]. In an unpredictable source , for a typical draw of , for most -s, the element has a low probability of occurring given . Such a model relaxes the often unrealistic assumption of a CG source that for every , and every , the next symbol has sufficiently large entropy. Unpredictable sources subsume all previously considered notions of almost CG sources, including notions that [9] failed to analyze, and including those that are equivalent to general sources with high min entropy.
For a lossless expander with , we consider a random walk on using unpredictable instructions that have sufficient entropy with respect to . Our main theorem is that for almost all the steps in the walk, the vertex is close to a distribution with min-entropy at least .
As a result, we obtain seeded online condensers with constant entropy gap, and seedless (deterministic) condensers outputting a constant fraction of the entropy. In particular, our condensers run in space comparable to the output entropy, as opposed to the size of the stream, and even when the length of the stream is not known ahead of time. As another corollary, we obtain a new extractor based on expander random walks handling lower entropy than the classic expander based construction relying on spectral techniques [11].
As our main technical tool, we provide a novel analysis covering a key case of adversarial random walks on lossless expanders that [9] fails to address. As part of the analysis, we provide a “chain rule for vertex probabilities”. The standard chain rule states that for every and , . If is the vertex reached using , then the chain rule for vertex probabilities essentially states that the same phenomena occurs for a typical :
where is the vertex distribution of the random walk at step using .
Keywords and phrases:
Randomness Extractors, Expander GraphsFunding:
Dana Moshkovitz: Supported in part by NSF Grant CCF-2312573 and CCF-2200956.Copyright and License:
2012 ACM Subject Classification:
Theory of computation Expander graphs and randomness extractorsEditors:
Srikanth SrinivasanSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Introduction
Randomness is an extremely useful and ubiquitous tool in computer science. Algorithms, protocols and reductions often assume access to uniformly distributed bits. An inherent question is what kind of randomness we can reasonably obtain from nature (or engineering), and whether we can make such randomness as useful as uniform bits. This has spawned a long line of research with many deep and interesting results.
Random walks and their analysis are also an essential tool in computer science, as well as in mathematics and physics. It is natural, therefore, to ask
How do random walks behave when the instructions for each step are not truly uniform and independent?
Such a scenario occurs when the instructions come from a weak source of randomness. A common assumption about a weak source is that overall, it has min-entropy.111We say has min-entropy , , if . We call such an a -source and the entropy rate. The hope is that the quality of the vertex distribution of the random walk is much better, and more useful, than that of the original source.
Gillman’s Chernoff bound for random walks on expanders [11] implies that most nodes on an expander random walk are close to uniform for any source with entropy rate very close to 1 (see, e.g., [21]). However, random walks cannot mix for general rate sources, since an adversary that controls half the steps can have the even numbered steps undo the odd numbered steps. It’s therefore interesting to ask if any structure in the source can enable random walks to mix for lower entropy rates. The first paper to address this question was [9], who showed that for certain low-rate sources random walks do mix well.
Successful analyses of such random walks give clean constructions of extractors and condensers, which purify the randomness in a weak source. Specifically, an extractor is a function that uses an independent and uniform -bit seed to convert into a distribution that is statistically close to uniform. A condenser is slightly weaker: It’s a function that converts into a distribution with high entropy rate. If is close to a -source, then a successful condensing means that . The -bit string in both cases is called the seed. In certain cases, seedless (deterministic) extraction and condensing, where , is also possible.
A natural family of weak sources is one where is a long stream of short symbols, , with each symbol being revealed one at a time. Indeed, historically, some of the first definitions of weak sources [14, 5] were streaming models. Similarly, a very natural question is how well a random walk mixes when one uses the stream of short symbols as instructions. The streaming model of randomness also corresponds to common sources of randomness in practice. Probably the most popular sources of entropy involve the exact timing of interrupts from mouse movements, keyboard strokes, disk I/O, receiving network packets, and other unpredictable events. Other sources include thermal noise and repeatedly looking at the last few digits of a clock timed according to an independent clock.
To model such streaming sources, one needs some property that implies that each has some entropy, even conditioned on the previously observed (we often abbreviate this as ). Commonly studied notions such as sequences of independent sources, Santha–Vazirani (SV) sources [14], and Chor–Goldreich (CG) sources [5] indeed have these properties. A -CG source is a sequence of random blocks , each , such that for any and any prefix , it holds that . A previous work [9] shows that random walks using CG sources can in fact mix, and obtains excellent deterministic condensers as a result.
One distinct advantage of random walk based extractors and condensers is that they are readily online. That is, it is not necessary to know ahead of time how long the stream is, and nevertheless, the procedure can utilize most of the total entropy within, by processing each symbol of the stream sequentially in a read-once fashion, and in space comparable to the amount of entropy we need, as opposed to the length of the stream . We emphasize that the notion of online extracting and condensing goes hand in hand with streaming models of randomness such as CG sources, which in turn goes hand in hand with random walks. Moreover, aside from a few works [7, 8, 9], online constructions for various types of sources are scarce.
Unfortunately, the assumptions of a CG source are quite strong, and may be unrealistic in practice. In a CG source, no matter the outcome of the previous symbols , it must be the case that the next symbol has high entropy. In some sense, such a definition asserts that the randomness stream can contain no “errors” of a certain type. Although [9] effectively analyzes certain kinds of errors, for others, it completely fails.
Our work continues the line of inquiry in [9] by generalizing the notion of CG sources and asking whether online condensing of randomness streams is possible even in the presence of errors. We give a novel analysis of random walks using a stream of symbols, which may be of independent interest, showing that mixing is possible even in the presence of a very general notion of errors. Thus, we give online extractors and condensers for a more general and practical class of sources. The class of randomness streams we consider are what we call unpredictable sources.
Definition 1 (unpredictable source, simplified).
We say that , each , is a (simplified) unpredictable source, if, for every , with probability at least over , it holds that .
In words, in an unpredictable source, for every , with high probability over a sample , the next symbol is unlikely, conditioned on its prefix. This notion forgoes the often demanding assumption of CG sources: It is no longer true that has high entropy regardless of the outcome of the previous symbols. (For another simplified instantiation of unpredictable sources, see Definition 6.)
We think of as the error parameter of the source. Intuitively, it represents the probability of seeing a low-entropy step. As we discuss later on, the analysis of [9] completely fails on unpredictable sources, and so online condensing of such sources is unknown. Our results even hold for a more general notion of unpredictable source, where only the average “error” over needs to be small.
Definition 2 (unpredictable source).
We say that , each , is a unpredictable source, if, when defining
it holds that .
We present and study this definition for two main reasons. The first is that it seems natural. In particular, it elegantly generalizes all previous notions of almost CG source considered in [9] (see Definition 6). The second is that, perhaps surprisingly, this notion is weak enough to capture arbitrary high-entropy sources. Indeed, not only are unpredictable sources close to having high min-entropy, but the converse is true as well: Arbitrary -sources are unpredictable sources! (see [10, Proposition 6.4], the full version of this extended abstract). Since sources cannot be condensed (without seed) beyond their entropy rate (see e.g. [10, Claim A.1]), the following observation is immediate:
Observation 3.
For , there is no deterministic condenser for unpredictable sources to entropy rate .
Nevertheless, we give an elegant construction of a seeded condenser for such sources beyond this entropy rate, and a deterministic condenser for such sources close to this rate.
The crux of our result is an analysis that shows that random walks using unpredictable sources can “mix” sufficiently well.
Theorem 1 (main (informal)).
(See [10, Theorem 3.14, Corollary 3.16]) Let and be constants. Let , , be a unpredictable source. Let be a sufficiently good -regular lossless expander on an appropriately chosen number of vertices .222See Section 1.3 for a discussion about lossless expanders. is chosen to be up to roughly , for being the (smooth) min-entropy of .
Suppose that the -s are used as instructions for a random walk on from an arbitrary starting vertex. Given , let denote the vertex reached in the -th step using as instructions, and let . Then,
In words, for most steps in the second half of the random walk, most of the vertices reached are unlikely. Thus, for a random , is close to an extremely high entropy distribution, namely one with constant entropy gap! We emphasize again that the analysis requires a new technique, since the analysis in [9] fails to give anything useful for unpredictable sources. Moreover, this works for low entropy rate, unlike the high-entropy result that follows from Gillman’s Chernoff bound for random walks. Constructions of online condensers and extractors follow as corollaries to this analysis, and we discuss them next.
1.1 Online Extracting and Condensing
Due to the streaming nature of our source , one would like a condenser (or extractor) for such sources to process each symbol sequentially as it is received. The notion of online condensing achieves exactly this. As in the model from Dodis, Guo, Stephens-Davidowitz, and Xie [7, 8], in (deterministic) online condensing, the function is implemented by a procedure that starts in a state , and makes a sequence of calls to an update procedure
The length of each state should be not much larger than the final output length . The procedure may then output the final state (or perhaps some function of ).
We clarify that the question of whether online condensing is possible is entirely orthogonal to the question of whether seeded condensing is possible. Indeed, a natural question to ask is whether (and how well) can general weak sources be condensed in an online manner. In the case of seeded online condensing (and in some regimes, we provably must use a seed), one may consider an update procedure that also takes as input a seed that is independent of the stream , and computes .333 Since the seed length typically depends on , when the length of the stream is not known in advance, one can model the use of a uniform seed by also viewing it as a stream of uniform and independent bits. For example, the seed can be initialized to the empty string (or some constant length uniform string), and may call, in conjunction with each update, an additional procedure, , that may choose to increase the length of by one or several bits, depending on the current state . Generally, the choice to extend will depend on how many symbols has seen so far, which would be stored in the state. The guarantee of such a should be that at any point in the stream , the state should contain most of the entropy seen so far in (or about , if this length is smaller), and the length of relative to should be small. The hope is that the update procedure accumulates the additional entropy from in each step into the state , and thus the final state contains most of the entropy in (or about the length of , if this length is smaller). As noted earlier, the advantages of such an online model of condensing are that it allows one to utilize the entropy that was overall contained in the entire stream , even if one does not know the length of the stream ahead of time. Moreover, when one only wishes to get bits of entropy out of a very long stream of length . An online construction would use space rather than .
1.2 Online Condensing via Random Walks
In [9], they showed that a natural way to condense a randomness stream is to use its symbols as instructions for a random walk over an expander , starting from an arbitrary fixed vertex (similarly to Theorem 1). The intuition is that if a step in a random walk makes progress towards mixing, then that step accumulates the entropy from the instruction into the vertex distribution. Thus, using the current vertex in the walk as our “state” yields a (deterministic) condenser with output length , where is the number of vertices of .444One may notice that committing to a graph of size may be problematic when the length of the stream is not known ahead of time, as one would like to be comparable to . This can be fixed with a trick of repeatedly increasing the size of the graph at regular intervals. We discuss this more in Section 1.5.1, and for most of the introduction, we will assume that is known ahead of time.
In this work, we are primarily focused on sequences that may not mix at every step, as is the case for unpredictable sources. We now give broad intuition on how such erroneous steps affect condensing. Suppose that a symbol is highly correlated with the previous instructions . Also, assume that the vertex distribution at step is uniform on some set of size . If is a -regular graph, then an adversarially chosen may cause the walk to “consolidate” the vertices of into groups of size . This would result in a vertex distribution that is uniform on a set of size , and hence bits of entropy were lost. In general, one can show that this is the worst that can happen, and so if there are very few bad steps overall, then overwhelmingly, mixing, and thus condensing, indeed occurs. Realizing this intuition for unpredictable sources poses several challenges, that we discuss further in Section 1.5.
1.3 CG-Sources, Lossless Expanders, and the DMOZ Condenser
Towards discussing unpredictable sources, let us first review in more detail the previous work, [9], on condensers via random walks. Both here, and in [9], we study random walks on lossless expanders. A degree- -lossless expander on vertices is an undirected graph such that for any set , the size of the neighborhood satisfies .555More technically, we consider bipartite graphs , as these are what the known explicit constructions yield. However, at a high level, this distinction is not necessary. [9] proved that a random walk using , starting from an arbitrary fixed vertex, on a sufficiently good lossless expander, accumulates entropy and thus yields a deterministic condenser.
Theorem 4 ([9], informal).
Let be constants. Suppose that for every , there exists an explicitly computable -regular -lossless expander on vertices, with , and . Then, for any positive integer , there exists an explicit function
such that given a -CG source , is -close to an -source. Moreover, can be computed in an online manner.666[9], also handled almost -CG sources. In this definition, instead of each being a -source for every prefix, each is only -close to being a -source.
That is, condenses to within a constant entropy gap, where we say that the entropy gap (with error ) of a distribution is if is -close to an -source.
But in practice, it may be unreasonable to assert that for every and every prefix , the next symbol is highly unpredictable. To address this, [9] does consider generalized versions of CG sources, although the guarantee about from Theorem 4 for such sources is much weaker there. In particular, the situation (before this work) becomes quite bleak when introducing the generalization coined -error in [9].
Definition 5 (-almost CG source).
A -almost -CG source is a sequence of random variables with , such that for each , we have that for at least probability over the prefix , it holds that .
It turns out that in the presence of -error (together with other error types discussed shortly), general min-entropy sources are almost CG sources in some regime of parameters (see [9, Section 8]). Thus, in general, deterministic condensing to within a constant entropy gap of such sources is impossible. Moreover, before this work, it was unknown whether or not a random walk using -almost CG sources mix well in any sense at all. In this paper we show that it is indeed the case that random walks mix, even under the more general notion of unpredictable sources, which captures all previously considered generalizations of CG sources.
1.4 Unpredictable Sources
As discussed previously, the notion of CG sources is quite strong – it assumes that every prefix leads to a high entropy distribution is quite strong. An unpredictable source does not make such an assumption. Indeed, notice that in the definition of an unpredictable source, we do not directly insist on any guarantee on the (smooth) min-entropy of the distribution , only that usually, the next symbol is unlikely conditioned on . We give unpredictable sources their name as it closely resembles the intermediate objects of the same name that show up in pseudorandom constructions such as reconstructive extractors [18, 15, 17] (for the precise definition of reconstructive extractors, see, e.g., [16]).
When talking about unpredictable sources, we informally refer to as the “entropy rate” of the unpredictable source, and as its “error rate”.777An unpredictable source is indeed, roughly, -close to an sources. It is easy to see that this definition captures almost-CG sources with all previously considered error parameters.
Definition 6 (almost CG source with all error parameters).
We say that , each , is a almost CG source, if, for at least fraction of , the following holds:
Indeed, a almost CG source is a unpredictable source.888It is also true that the converse holds via several averaging arguments, although with a large loss in parameters. We prefer to study and phrase our results for unpredictable sources, as the statements are clean, and with minimal artifacts of analysis. Additionally, as was the case for almost CG sources with all error parameters, every general source with min entropy is an unpredictable source, with a much more straightforward argument, with fewer constraints on , and with less loss in converting into the error parameters of an almost CG source (see [10, Proposition 6.4]). In this work, we give the following result for unpredictable sources, analogous to Theorem 4:999Theorem 4 and 2 are analogous in the sense that they both yield a condenser with constant entropy gap for their respective class of sources. There is a key difference in that Theorem 4 is seedless, whereas 2 is seeded. This is necessary. As we have discussed before, general weak sources are unpredictable sources.
Theorem 2 (seeded condensing (informal); see Corollary 3.16 in [10]).
Let be constants, and let and be constants that satisfy . Suppose that for every , there exists an explicitly computable -regular -lossless expander on vertices, with . Then, for any positive integer , there exists an explicit function
such that given a unpredictable source and an independent and uniform , is -close to an source. Moreover, can be computed in an online manner.101010See [10, Appendix B] for a more detailed description of the online version.
As suggested by prior discussion, the construction is again to simply use as instructions for a random walk on a lossless expander, with the random seed indicating the stopping time. In order to show that such a walk mixes, we develop a new analysis, different than that of [9], which we discuss in detail in Section 1.5.
Let us briefly discuss the error term in the theorem’s statement. First, roughly speaking, the term is the probability that a set “does not expand” in some sense. For example, is the probability over a uniformly chosen vertex and uniform neighbor , that has another neighbor in . Broadly speaking, events such as this are undesirable: they represent “collisions” of paths in the random walk. Thus we expect such an error term, as it corresponds to the (inherent) error of the expander. We should also expect the error rate to appear for the same reason: this corresponds to the probability that “expansion does not occur” due to low quality randomness (as opposed to the expander’s error). Indeed, if one considers the unpredictable distribution that is with probability , and uniform otherwise, one can see that at every step of a random walk using , some vertex will have probability mass at least .
Finally, we comment on the relationship between these parameters. In general, as is an error probability over the entire space of , it is possible for it to be sub-constant. While can be subconstant, the constant- regime is more interesting, and our theorem handles the case when is in fact fairly large, for example . Thus, the error term can be thought of as , and in fact it is necessary that . Intuitively, using a unpredictable source, in a typical run of the random walk, one expects there to be roughly steps each accumulating bits of entropy (for a total of entropy gained), and roughly steps that lose bits of entropy (for a total of entropy lost). Thus overall, one should not expect anything good to happen when the entropy rate of the unpredictable source is smaller than the error rate.
We can also show that even without a random stopping time, we can use our new analysis of random walks to get a result about deterministic condensing, although, as expected, the entropy gap is not constant.
Theorem 3 (seedless condensing (informal); see Corollary 3.17 of [10]).
Let be constants and let and be constants that satisfy . Suppose that for every , there exists an explicitly computable -regular -lossless expander on vertices, with . Then, for any positive integer , there exists an explicit function
such that given a unpredictable source , is -close to a -source, where . Moreover, can be computed in an online manner.
Overall, Theorem 2 and Theorem 3 indicate that it is indeed possible to condense a very general class of sources in an online manner.
On Extracting from Unpredictable Sources
As a final note for this section, recall that we cannot hope to extract from arbitrary unpredictable sources without a seed. However, even if one only cares about extracting, rather than condensing, from unpredictable sources, our work is the first to do so in an online manner: Indeed, one can use Theorem 2 to within constant entropy gap, and then apply a known online construction for constant entropy gap. We stress that known constructions for arbitrary weak sources with linear entropy rate, such as [20, 21], are not online, and thus are unsatisfying for streams of randomness.
1.4.1 A Two-Stage Construction, and Recent Developments in Lossless Expanders
An expert reader may notice that the statements of Theorem 4, Theorem 2, and Theorem 3 are slightly weaker than what is actually achievable. In each of these theorems, we require explicit expanders with . In other words, as the entropy rate of the source gets smaller, the error of the expander that we use must improve. Optimal, non-explicit expanders (as well as random ones) can achieve a dependence of and would thus allow us to handle any constant entropy rate . However, the [2] explicit construction only achieves , and more recent works can improve this to [6, 12]. Thus, even considering recent improvements, Theorem 4, Theorem 2, and Theorem 3 can only support entropy rate .
Fortunately, explicit optimal constructions are not necessary. A trick from [9], the two-stage construction, utilizes constant-sized optimal expanders (found by brute force) to condense small blocks of the stream into a higher entropy rate larger blocks, that is high enough to use the known (suboptimal) explicit constructions. For details of the construction for unpredictable sources, see [10, Section 4].
Nevertheless, we choose to present our results and phrase our theorems assuming optimal expanders for several reasons. The first is that the parameters are better, aesthetically simpler, and easier to analyze when no two stage construction is required. Moreover, we wish to highlight that the novelty of this work is the analysis of random walks on a single expander, without the trick of the two-stage construction. Finally, because of the two-stage construction, the current lack of better constructions of explicit expanders is not an inherent barrier to the plausibility of explicit condensing for smaller .
We give instantiations of Theorem 2, and Theorem 3 for any entropy rate in [10, Theorem 5.3 and Theorem 5.5] using currently known explicit expanders and the two-stage construction. As the statement is relevant for the next discussion, we give an informal version of the latter here, which considers deterministic condensing.
Theorem 4 (informal; see Theorem 5.5 of [10]).
Let be any constant, let , and . Then, for any positive integer , there exists an explicit function
with such that for any unpredictable source with each , is close to a , source, where , for some universal constant .
1.4.2 Perspective: Condensing from Unpredictable Sources vs. General Sources
Having presented our main results about seeded condensing to within constant entropy gap, and deterministic condensing outputting a constant fraction of the entropy, we provide a few observations about the nature of unpredictable sources.
First, we know that general sources are unpredictable sources in the high entropy regime (see [10, Proposition 6.4]). Indeed, if , then is already a unpredictable source. Thus, essentially for any , nontrivial condensing requires seed, and we provide a simple such condenser that is even online.
However, this does not imply that for every , an unpredictable source is as hard to deal with as a general source of the same entropy rate. Indeed, Theorem 4 shows that for small entropy rate , deterministic condensing is possible to with output entropy rate roughly . Thus, one can deterministically condense unpredictable sources from entropy rate to entropy rate . Such a feat is not possible for general sources! Indeed, if is a general source with entropy rate, say, , a simple argument shows that it cannot be deterministically condensed to entropy rate, say, (see [10, Claim A.1]). This suggests an interesting property about unpredictable sources: Deterministic condensing “past the entropy rate” of such sources is easy, while the hard part is condensing “past the error rate.” In particular, although our analysis only achieves an output entropy rate of , we suspect that deterministic condensing to an entropy rate of is possible. Moreover, there is good reason to believe that there is a barrier to condensing past this error rate: When considering general sources, the entropy gap becomes the error rate when thinking of it as an unpredictable source.
We end the discussion by leaving as an open line of inquiry to determine the exact threshold of the output entropy rate of deterministic condensers.
1.5 Technical Overview: Random Walks Using Unpredictable Sources
We are now ready to present a technical overview of how we analyze random walks via unpredictable sources. Since unpredictable sources subsume CG sources, we’ll start with discussing the challenges inherent to both sources, and the previous solution for CG sources. An initial observation is that for both types of sources, spectral analysis fails, and for two main reasons. The first one is that spectral expanders may not be lossless, and even the best spectral expanders may only be -lossless. Such expansion is insufficient for us, as it intuitively means that for a distribution on a set of vertices , at least half of all edges leaving may lead to collisions (with perhaps other nodes in ). Since, as discussed before, collisions imply a loss in entropy, even the good high entropy steps fail to mix, unless the steps were almost uniform.
The second reason is that random walks using CG sources and unpredictable sources are non-Markovian: The distribution of the next step depends on the entire history of the walk up until that point. Therefore, we cannot analyze the evolution of the vertex distribution at each step by repeatedly applying a transition matrix and bounding the norm of the corresponding probability vector. Moreover, the distribution of the next instruction , given a prefix , can be adversarial. That is, whatever the vertex distribution may be for each , could be the worst possible edge distribution that yields the least amount of improvement for (while still satisfying the overall conditions on the source ).
Nevertheless, [9] provides a direct analysis that shows that the norm of the vertex distribution does evolve favorably over time. Specifically, they show that for the -norm, setting , if is the vertex distribution of the random walk at step , then . More concretely they prove:
Theorem 7 (informal; see [9], Theorem 5).
Let be a sufficiently good lossless expander, and let for some sufficiently small constant .
Fix any , and let , for each , be a distribution over , each being a source. For any and let denote the probability that the edge leading from to is chosen under . By definition, is defined as Then,
as long as is not already smaller than .
This essentially implies that the entropy of the vertex distribution increases by at least . Thus, inductively, the final distribution will have , implying that it has min entropy roughly .
For ease of exposition, for the remainder of the section, we consider unpredictable sources where for every , for some constant . This case captures most of the intuition and difficulty at a high level.
The -norm analysis fails
Unfortunately, in the case of unpredictable sources, the -norm analysis cannot give a good bound on the norm of the final vertex distribution, . To see this, consider a distribution that is with probability , and is a -CG source otherwise. This is both a CG source with -error and a -unpredictable source. However, the norm of the final vertex distribution will always be at least . Thus, the -norm will not help us to establish that the final (smoothed) min entropy is large. But note that it is true in this example, where clearly we are -close to having high min-entropy. It has been an open question since [9] to give an analysis that shows this is always the case.
Beating the union bound, once again
Naively, one might try to fix the -norm analysis as follows. For each , condition on the event that has “high entropy” given . The original -norm analysis could then work on this conditional distribution, and since the probability that this event does not happen is at most , we can conclude that in the -th step, the -norm decreases “except with error .” Unfortunately, it is not clear how to chain such an argument multiple times over all steps , without using a union bound which would require .
We remark that originally, in the case of CG sources, [9] uses the -norm analysis in part to beat the union bound over the expander error . As we’ve seen from the discussion above, the -norm analysis does not allow you to do the same for . Thus, beating the union bound over is yet another challenge to overcome.
Probability evolution, not distribution evolution: a “chain rule” for vertex probabilities
The issue with the approaches above is that they attempt to make a statement about the quality of the vertex distribution at every step . As discussed, it is not clear how to make any such statement. This leads us to search for an alternative approach. Denote by as the vertex reached when taking the instructions . In an unpredictable source, given a typical , one expects to see roughly “good” steps in which
and “bad” steps in which . One would like to argue that this directly translates to good steps and bad steps in the random walk. In other words, for every good step,
and for every bad step, .
Notice that such an approach does not directly make a statement about the distribution at each step: we do not claim that for each , the overall entropy of increases. Rather, we say that individually, each path of vertices that the random walk takes is on its own journey of ups and and downs in individual probability, and typically there are few downs. We are able to make this approach concrete with the following key lemma.
Theorem 5 (chain rule for vertex probabilities; see Theorem 3.6, Corollary 3.7 of [10]).
Let be a -biregular lossless expander. Let , each , and fix some . Then, for any , there is a subset with , such that for every ,
We believe that this chain rule for vertex probabilities is interesting in its own right. The standard chain rule for probability states that for every , and every the probability of decreases from the probability of by a factor of . The chain rule for vertex probabilities states that the same evolution of probabilities occurs when considering and , as long as the conditional probability of “has entropy” (as is needed for expansion), and accounting for the probability of a collision due to the inherent error of the expander or the probability the next step has no entropy.111111An expert reader might ask how the 5 compares to the standard statement about lossless expanders as lossless conductors. In the standard case, when and , the property of lossless conductors states that if is a source with min entropy , then is -close to a -source. 5 on the other hand, requires no assumption on the entropy of the input source , and is still able to conclude that the distribution “improves” in one step.
Analyzing a full random walk
So far, we’ve shown that at every step, there is a high probability over that the corresponding vertex probabilities decrease. Notice we have made no assertion yet about how drastically the vertex probability might increase when the event does not occur. However, it is not too hard to show that it is extremely unlikely for the probability to increase drastically. Overall, we can argue that in expectation over , there are roughly steps for which the vertex probability goes down by a factor of roughly , more accurately, , and the total factor increase from the remaining steps, is roughly .
This argument so far is essentially all we need to obtain Theorem 3: When is small, for a typical , the number of good steps is overwhelmingly large comparing to the number of bad steps, and therefore one expects most runs of the random walk to end up at a vertex that has probability at most .
Using a random stopping time
To obtain a seeded condenser with constant entropy gap, as in Theorem 2, we must characterize a bit more accurately how a typical run of the random walk behaves. In reality, Theorem 5 states that if is a good step for (that is, ), then the probability of the vertex reached at step decreases by as long as the vertex probability has not already reached the “capacity” , which is a constant factor smaller than , for being the number of vertices in the expander.121212In general, for constant degree lossless expanders, . If we can prove that over a random , and a random stopping time , that the vertex probability is at capacity with high probability, then we have proven Theorem 2.
Suppose we choose to be noticeably less than , say, . Then, we expect that in a typical run of the random walk, the vertex probability reaches the capacity (or is close to it) after steps. We can assume for simplicity that the vertex probability is exactly at capacity after steps. Now, let us consider what happens in the last steps, under this assumption. There are only steps for which the vertex probability can increase, each of which increases it by a factor of roughly . Thus, most of the other steps either keep the vertex probability at capacity, or “repairs” a deficit from capacity by a factor of . Overall, this means that over a random stopping time in the last steps, the probability of not being at capacity (meaning the walk has recently taken one of the bad steps, or one of the “repairing” good steps), is roughly .
1.5.1 Making Our Condensers Fully Online
A random walks based condenser is online if each symbol is processed and used to update the state sequentially in a “read-once” fashion. However, there is an issue when the length of the stream is not known ahead of time. Indeed, if one must settle on a graph of size ahead of time, then one cannot hope for a final output entropy larger than . This is problematic if the length of the stream is not known ahead of time, and ends up being much larger than , as we will miss out on most of the entropy of the stream. Broadly speaking, the workaround to this issue is as follows: If we know how much entropy we expect overall in each , then we can repeatedly increase the size of the graph at regular intervals, to accommodate the additional entropy expected. This allows us to maintain the guarantee that the entropy of the vertex distribution is close to for all (or most) steps.
In a bit more detail, for simplicity, assume that the total length of the stream is a power of two (although still unknown). We begin the random walk from a fixed vertex on a small -regular graph of size for some constant . If we see more than symbols from the stream, we embed the current vertex into a -regular graph of size and walk for another steps. If a node in the smaller graph is represented by , then one can embed it in the larger graph as . Such an embedding provides a one-to-one mapping from the vertex distribution in the small graph to one with the same entropy in the large graph. We repeat this embed-and-walk process until the stream ends. This idea essentially suffices to implement the deterministic condenser of Theorem 3 in an online fashion.
To implement the condenser from Theorem 2, we use the same embed-and-walk process, but we must take care to implement the random stopping time in an online fashion as well. Once again, for simplicity, assume that is a power of two. We once again begin the walk on a constant sized graph of size , and initialize a seed of length to pick a random stopping time in case . When the random stopping time is reached, we save the resulting vertex additionally in the state, and we continue the random walk until time . If the stream ends at time , output the saved vertex. Otherwise, we embed the current vertex into a graph of size , and use to add one more bit to the seed. Now, represents a random stopping time between and , and we can repeat this process until the stream ends. Ultimately, this shows that for every that is a power of two, the distribution obtained from using as a random walk (with a random stopping time) contains most of the entropy seen so far, within a graph whose size is not too much larger than , all the while only needing to generate bits of seed.
As the details of such an online implementation are mostly minor alterations to the main results of our work, we defer a more detailed explanation to [10, Appendix B].
1.6 Improved Random Walk-Based Extractors for High Min-Entropy Sources
So far, the main takeaway from our results is that lossless expanders can handle unpredictable sources with low entropy rate. On the other hand, spectral expanders can handle unpredictable sources with high entropy rate, as can be seen by looking at the classic random walks based extractor.
However, even for the case of sources with high entropy, the lossless expander random walk yields a quantitatively better result. In the classic expander random walk extractor (or sampler), based on the expander Chernoff bound, in order to achieve an error of in the output distribution, it is necessary for the entropy of the input source to be at least for some constant .
Theorem 8 (standard RW-based extractor).
There exists a universal constant such that the following holds. For every positive integer , and any , there exists an explicit extractor
for any .
The factor is inherent in the use of the expander Chernoff bound. On the other hand, if one uses our new lossless expander random walk to condense to constant entropy gap (and then apply known constructions of extractors for sources with constant entropy gap with short seed length), one only needs the input source to have entropy for some constant in order to obtain final output error . In addition, all of this can be implemented in a fully online manner, even when is not known ahead of time.
Theorem 6 (new RW-based extractor; see Theorem 6.6 of [10]).
There exist universal constants and such that the following holds. For every positive integer , and any constant , there exists an explicit extractor
for any .
1.7 Related Work
Before introducing -almost CG sources, [9] first generalizes CG sources by introducing what is coined -error.
Definition 9 (-almost CG source).
A -almost -CG source is a sequence of random variables with , such that for at least of , we have that for any prefix , it holds that .
Unlike -error, for -error, [9] is still able to construct condensers by running a random walk using , although not with a constant entropy gap. Instead, the gap is roughly , for reasons inherent to the random walk construction itself. Intuitively, for the fraction of bad indices , could be completely determined (and adversarially chosen) based on . Therefore, whatever edge instructs the walk to take, could instruct to return via the same edge, effectively wiping out the progress made from . Overall, when all the bad indices are at the end, it can wipe out steps of entropy accumulation, leaving an entropy gap of .131313When but the -fraction of bad blocks is nicely distributed in the sense that each suffix contains at most -fraction of bad blocks (up to an additive term), we can regain constant entropy gap. See [9, Section 3.1], where this property is called suffix friendliness. The case of -error is interesting in its own right. In fact, a recent work of Chattopadhyay, Gurumukhani, and Ringach [4], shows that deterministic condensing of -almost -CG sources is impossible, even with large entropy gap, in the regime where .
Goodman, Li, and Zuckerman [13] showed how to condense CG sources even when the blocks are long, and the entropy rate is subconstant. However, their constructions are not online, and they don’t address the case of almost CG sources.141414However, their constructions work for suffix-friendly CG sources.
Previous works that directly consider (deterministic) online extraction [7, 8] assume a strong notion of unpredictability, wherein the -s are independent (but with some min-entropy). In their model, they assume that for every , , with the length of the stream sufficiently long that the total entropy of is at least . Recall that in our work, we generally think of each for some constant , , and . More specifically, [7] considers how entropy accumulates for specific update functions that are based off of practical random number generation. They show that entropy accumulates when the -s are independent draws from certain classes of distributions known as 2-monotone distributions. [8], considers linear update functions and shows that entropy accumulates when the -s are independent -sources.
Other previously studied notions of sequential sources include Somewhere Honest Entropy Look Ahead (SHELA) sources [1], also known as online Non-Oblivious Symbol Fixing (oNOSF) sources [4]. Such sources are essentially the -error CG sources discussed above, except for two distinctions. The first is that the good steps are all high entropy distributions that are independent from each other. The second is that each bad step only depends on previous blocks.151515The latter property is why those sources are called “online” – an adversary corrupts the bad blocks while only knowing the history. They do not give online condensers for such sources. Aggarwal et a. [1] shows that extracting from oNOSF sources is impossible, however one can convert oNOSF sources into uniform oNOSF sources. Chattopadhyay, Gurumukhani, and Ringach explored the limits of online condensing of such sources [4], and later achieved constructions with essentially optimal parameters [3].
A recent work by Xun and Zuckerman [19] provides constructions of strong offline extractors whose seed length has nearly optimal dependence on and : for any desired , their construction gives an extractor with seed length , as long as the entropy rate is sufficiently close to (depending on ). To compare, our results discussed in Section 1.6 provide online extractors with seed length when .
References
- [1] Divesh Aggarwal, Maciej Obremski, João Ribeiro, Luisa Siniscalchi, and Ivan Visconti. How to extract useful randomness from unreliable sources. In Advances in Cryptology–EUROCRYPT 2020: 39th Annual International Conference on the Theory and Applications of Cryptographic Techniques, pages 343–372. Springer, 2020. doi:10.1007/978-3-030-45721-1_13.
- [2] Michael Capalbo, Omer Reingold, Salil Vadhan, and Avi Wigderson. Randomness conductors and constant-degree lossless expanders. In Proceedings of the 34th Annual Symposium on Theory of Computing (STOC), pages 659–668. ACM, 2002. doi:10.1145/509907.510003.
- [3] Eshan Chattopadhyay, Mohit Gurumukhani, and Noam Ringach. Condensing against online adversaries. In Electronic Colloquium on Computational Complexity (ECCC), 2024. URL: https://eccc.weizmann.ac.il/report/2024/171.
- [4] Eshan Chattopadhyay, Mohit Gurumukhani, and Noam Ringach. On the existence of seedless condensers: Exploring the terrain. In Proceedings of the 65th Annual Symposium on Foundations of Computer Science (FOCS), pages 1451–1469. IEEE, 2024. doi:10.1109/FOCS61266.2024.00093.
- [5] Benny Chor and Oded Goldreich. Unbiased bits from sources of weak randomness and probabilistic communication complexity. SIAM Journal on Computing, 17(2):230–261, 1988. doi:10.1137/0217015.
- [6] Itay Cohen, Roy Roth, and Amnon Ta-Shma. HDX condensers. In Proceedings of the 64th Annual Symposium on Foundations of Computer Science (FOCS), pages 1649–1664. IEEE, 2023. doi:10.1109/FOCS57990.2023.00100.
- [7] Yevgeniy Dodis, Siyao Guo, Noah Stephens-Davidowitz, and Zhiye Xie. No time to hash: On super-efficient entropy accumulation. In Advances in Cryptology–CRYPTO 2021: 41st Annual International Cryptology Conference, pages 548–576. Springer, 2021. doi:10.1007/978-3-030-84259-8_19.
- [8] Yevgeniy Dodis, Siyao Guo, Noah Stephens-Davidowitz, and Zhiye Xie. Online linear extractors for independent sources. In Proceedings of the 2nd Conference on Information-Theoretic Cryptography (ITC), pages 14:1–14:14. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2021. doi:10.4230/LIPICS.ITC.2021.14.
- [9] Dean Doron, Dana Moshkovitz, Justin Oh, and David Zuckerman. Almost Chor–Goldreich sources and adversarial random walks. In Proceedings of the 55th Annual Symposium on Theory of Computing (STOC), pages 1–9. ACM, 2023. doi:10.1145/3564246.3585134.
- [10] Dean Doron, Dana Moshkovitz, Justin Oh, and David Zuckerman. Online condensing of unpredictable sources via random walks. Electron. Colloquium Comput. Complex., TR24-165, 2024. URL: https://eccc.weizmann.ac.il/report/2024/165.
- [11] David Gillman. A Chernoff bound for random walks on expander graphs. SIAM Journal on Computing, 27(4):1203–1220, 1998. doi:10.1137/S0097539794268765.
- [12] Louis Golowich. New explicit constant-degree lossless expanders. In Proceedings of the 35th Annual Symposium on Discrete Algorithms (SODA), pages 4963–4971. ACM-SIAM, 2024. doi:10.1137/1.9781611977912.177.
- [13] Jesse Goodman, Xin Li, and David Zuckerman. Improved condensers for Chor-Goldreich sources. In Proceedings of the 65th Annual Symposium on Foundations of Computer Science (FOCS), pages 1513–1549. IEEE, 2024. doi:10.1109/FOCS61266.2024.00096.
- [14] Miklos Santha and Umesh V. Vazirani. Generating quasi-random sequences from semi-random sources. Journal of Computer and System Sciences, 33(1):75–87, 1986. doi:10.1016/0022-0000(86)90044-9.
- [15] Ronen Shaltiel and Christopher Umans. Simple extractors for all min-entropies and a new pseudorandom generator. Journal of the ACM, 52(2):172–216, 2005. doi:10.1145/1059513.1059516.
- [16] Amnon Ta-Shma and Christopher Umans. Better lossless condensers through derandomized curve samplers. In Proceedings of the 47th Annual Symposium on Foundations of Computer Science (FOCS), pages 177–186. IEEE, 2006. doi:10.1109/FOCS.2006.18.
- [17] Amnon Ta-Shma, David Zuckerman, and Shmuel Safra. Extractors from Reed–Muller codes. Journal of Computer and System Sciences, 72:786–812, 2006. doi:10.1016/J.JCSS.2005.05.010.
- [18] Luca Trevisan. Extractors and pseudorandom generators. Journal of the ACM, 48(4):860–879, 2001. doi:10.1145/502090.502099.
- [19] Zhiyang Xun and David Zuckerman. Near-optimal averaging samplers. Electron. Colloquium Comput. Complex., TR24-097, 2024. URL: https://eccc.weizmann.ac.il/report/2024/097.
- [20] David Zuckerman. Randomness-optimal oblivious sampling. Random Structures and Algorithms, 11(4):345–367, 1997. doi:10.1002/(SICI)1098-2418(199712)11:4\%3C345::AID-RSA4\%3E3.0.CO;2-Z.
- [21] David Zuckerman. Linear degree extractors and the inapproximability of Max Clique and Chromatic Number. Theory of Computing, 3:103–128, 2007. doi:10.4086/TOC.2007.V003A006.
