Abstract 1 Introduction 2 Proof Overview 3 Model and Preliminaries 4 Lower Bound for Moment Estimation 5 Derandomization for Total Functions 6 Separation of White-Box from Deterministic References

White-Box Adversarial Streaming Lower Bounds Beyond Two-Party Communication

Klim Efremenko ORCID Ben-Gurion University, Be’er-Sheva, Israel    Gillat Kol ORCID Princeton University, NJ, US    Raghuvansh R. Saxena ORCID Tata Institute of Fundamental Research, Mumbai, India    Zhijun Zhang ORCID INSAIT, Sofia University “St. Kliment Ohridski”, Bulgaria
Abstract

Streaming algorithms in adversarial settings have attracted considerable attention recently. We show that, in the white-box adversarial streaming model [1], the fundamental problem of estimating the Fp moment to within any constant factor requires Ω(n) memory. In this model, the internal state of the (randomized) streaming algorithm is visible to an adversary, who can exploit this information when constructing subsequent stream updates. As a corollary, we also obtain a white-box lower bound for the well-studied problem of estimating the maximum matching size in graphs.

[1] proved that two-party white-box communication protocols can be derandomized. This allows them to prove deterministic communication lower bounds and automatically derive white-box (communication and streaming) lower bounds. However, such two-party lower bounds can only rule out approximation of the Fp moment within a specific constant factor. Ruling out approximation within any constant factor typically requires proving a lower bound for a multi-party communication problem.

We show that white-box communication protocols involving any number of parties can be derandomized, provided they compute a total function. However, this derandomization fails entirely when extended to partial functions and, consequently, to approximation problems. We are therefore compelled to prove our moment estimation lower bound for the white-box model directly. Our proof introduces a novel hybrid technique that, instead of taking hybrids over input distributions, constructs hybrids over white-box adversaries.

Keywords and phrases:
White-box streaming, moment estimation, hybrid argument
Category:
Track A: Algorithms, Complexity and Games
Funding:
Klim Efremenko: Supported by the Israel Science Foundation (ISF) through grant No. 1456/18 and European Research Council Grant number: 949707.
Gillat Kol: Supported by a National Science Foundation CAREER award CCF-1750443 and by a BSF grant No. 2018325.
Raghuvansh R. Saxena: Supported by the Department of Atomic Energy, Government of India, under project no. RTI4001.
Zhijun Zhang: This research was partially done while at Princeton University and was partially funded by the Ministry of Education and Science of Bulgaria (support for INSAIT, part of the Bulgarian National Roadmap for Research Infrastructure).
Copyright and License:
[Uncaptioned image] © Klim Efremenko, Gillat Kol, Raghuvansh R. Saxena, and Zhijun Zhang; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Streaming, sublinear and near linear time algorithms
Editors:
Sayan Bhattacharya, Danupon Nanongkai, Michael Benedikt, and Gabriele Puppis

1 Introduction

The classical streaming model.

In the classical streaming model, an algorithm receives a sequence of elements u1,,um, one at a time, and needs to output a value that depends on the stream while using limited memory. The output should be correct (with high probability) for any possible input stream. For example, the elements might represent entries in a database, and the algorithm may be tasked with estimating the number of distinct elements. The estimation must be correct for any content of the database and any order in which the entries appear.

Although this model requires the algorithm to work for worst-case input streams, potentially chosen by an adversary, it assumes that the entire stream is fixed in advance and that the adversary is oblivious to the algorithm’s internal state, including its memory contents and random coins. For deterministic algorithms, this restriction is inconsequential, since the algorithm’s behavior is entirely determined by the input stream. However, most useful streaming algorithms are randomized, and their internal state depends on both the input stream and the random coins used during execution.

Therefore, the classical assumption that the adversary cannot observe the algorithm’s internal state effectively requires the input stream to be independent of the algorithm’s randomness. This assumption has been challenged by many recent works that considered stronger adversaries capable of generating the input stream adaptively, based on (partial) knowledge of the algorithm’s internal state.

The white-box streaming model.

The white-box streaming model, introduced by [1], considers adversaries that see the full internal state of the streaming algorithm throughout its execution. Specifically, a white-box adversary can observe all previously used random coins (and, consequently, also the algorithm’s memory contents) and may use this information to decide on the next stream element.

Formally, let π be a streaming algorithm. At time t[m], a white-box adversary generates the element ut based on the prior stream elements u1,,ut1 and the previously sampled random strings r1,,rt1. The algorithm then draws fresh randomness rt and updates its internal memory using ut, rt, and its current memory contents111In the original formulation by [1], the stream may consist of both insertions and deletions and the algorithm is required to output the current value of the function or relation after each update. In this work, we focus on the insertion-only setting where the output is only produced at the end. This only makes our lower bounds stronger.. For δ[0,1], we say that π solves or computes a relation f with probability δ, if, for every white-box adversary, the algorithm’s final output is correct with probability at least δ, over both the adversary’s choices and the algorithm’s randomness222If the success probability is omitted, we take δ=2/3..

The white-box streaming model has analogues in several other areas. In the study of dynamic data structures, recent work has considered adversaries that generate updates adaptively after observing the full contents of the data structure. Similarly, in machine learning, many recent efforts aim to design algorithms that are robust to adversarial white-box attacks, where attackers have full access to the model’s parameters, architecture, or training model. In the context of persistent data structures, which are commonly used to enable efficient access to historical versions of shared data in collaborative environments, users often interact with exposed versioning mechanisms, allowing updates to depend on prior versions. For a more comprehensive survey of white-box models across different domains, see [1, 11].

The study of the white-box streaming model is motivated by several factors. First, algorithms may not have access to a securely private source of randomness, or they may run on remote machines where memory privacy cannot be guaranteed. Second, as with other public-coin algorithms (e.g., public-coin interactive proofs), white-box algorithms support public verifiability. For example, if the algorithm publishes its internal state and uses a trusted, publicly available source of randomness, users contributing elements to the data stream can verify that the computations involving their data were performed correctly. A third motivation, highlighted by [1, 11], is that the white-box model captures scenarios where a centralized server distributes an initial state (e.g., random bits or parameters) to a network of remote users. These users may then generate their data based on this shared state and send it back to the server, for example, for aggregate statistical analysis.

Moment estimation.

Frequency moment estimation is among the most extensively studied problems in classical streaming algorithms, dating back to the seminal work of [2]. Given a stream u[n]m, let fi denote the number of occurrences (frequency) of element i[n] in the stream. The p-th frequency moment is defined as Fp(u)=i[n]fip.

Estimating Fp has a wide range of applications, including efficient approximation of statistical properties, data summarization, and anomaly detection in high-throughput data environments such as those arising in computer network monitoring and security, sensor networks, social platforms, financial systems, and real-time analytics.

Elegant, randomized, streaming algorithms for α-approximation of Fp are known for any constant α>1 and any p. When p2, only O~(1) bits of memory are needed [2, 16]. For p>2, the space complexity of estimating Fp is Θ~(n12/p) [4, 17]. In contrast, for any p1, it is known that deterministic algorithms require Ω(n) memory to achieve any constant-factor approximation [7].

The gap between the memory requirements of randomized and deterministic algorithms, combined with the fact that white-box algorithms lie somewhere in between, raises the question: Can Fp still be approximated using sublinear memory in the white-box streaming model for constant α?

The many randomized streaming algorithms for moment estimation rely on a diverse set of algorithmic techniques or “tricks”, each leveraging randomness in a different way. Designing white-box adversaries to break these algorithms may seem to require custom strategies.

For example, F0, the number of distinct elements, can be estimated using hash functions, e.g., [12, 2]. Intuitively, the algorithm hashes each stream element and maintains the minimum hash value. The smaller this hash value, the greater the estimated number of distinct elements. Observe that a white-box adversary can fail this algorithm by repeatedly feeding it with the same u that has the minimum hash value under the algorithm’s chosen hash function.

Another technique for estimating F0 relies on sub-sampling, e.g., [8]. Intuitively, the algorithm maintains a dynamic set, initially empty. Upon receiving an element ui, if ui is already in the set, it is removed; otherwise, it is (re-)inserted with a fixed probability p. A larger final set size corresponds to a higher estimate of the number of distinct elements. To break this algorithm, a white-box adversary can repeatedly insert a single value u1 into the stream until the algorithm removes it from the set, then do the same with another element u2, and so on, ensuring the set remains empty.

For general Fp estimation with p1, [2] introduced an algorithm that selects a random element from the stream and estimates Fp by counting the number of times this element appears in the remainder of the stream. The higher this count, the higher the estimated Fp. To break the algorithm, a white-box adversary can repeatedly insert a single element u until it is selected. Then, the adversary only inserts a different element uu, ensuring a zero count for the selected element u.

1.1 Our Results

Lower bound for white-box moment estimation.

Are any of the clever tricks used by randomized moment estimation streaming algorithms resilient to all white-box adversaries? Theorem 1 answers this question in the negative, proving that no white-box streaming algorithm using o(n) memory can achieve any constant-factor approximation for any Fp.

Theorem 1.

For p1, n, and α=α(n)1, any white-box streaming algorithm that α-approximates Fp on [n] with constant success probability greater than 1/2, requires Ωp(αmax(p,1)|p1|nOp(logn)) memory.333The notation Ωp and Op suppress constants in p, the asymptotic is in α and n. The Op(logn) term is relevant only for large super-constant α.

We note that for every p and α, the lower bound in Theorem 1 matches the known deterministic lower bound for Fp estimation [7]. For p[0,1) and any α, it also matches the deterministic upper bound [7]444[7] shows that for every p, there exists a deterministic streaming algorithm that α-approximates Fp over streams on [n], using O~(α1/|p1|n) memory (for streams of length poly(n))..

We also note that a lower bound for white-box Fp estimation with weaker guarantees was previously shown by [1]. Specifically, they ruled out white-box algorithms using o(n) space for some constant αp, whereas our result rules out o(n)-space algorithms for any constant approximation factor α, including arbitrarily large values. Moreover, our lower bound degrades gracefully for super-constant values of α.

Lower bound for approximating the maximum matching size.

As a corollary of Theorem 1, we obtain a white-box space lower bound for α-approximating the Maximum Matching Size (MMS). The bound follows by a direct, simple reduction from our F0 lower bound.

Theorem 2.

For every n and every α=α(n)1, any white-box streaming algorithm that α-approximates MMS on undirected graphs on n vertices with constant success probability greater than 1/2 requires Ω(nαO(logn)) memory.

Quantitatively, Theorem 2 matches the best-known deterministic lower bound of [7]. A deterministic 2-approximation for MMS is straightforward with O(n) space: maintain a maximal matching and output its size. In contrast, it is still open whether randomized streaming algorithms can achieve any constant-factor approximation to MMS using sublinear space. Currently, even nε-space algorithms cannot be ruled out, for any ε>0.

For super-constant approximation factors, efficient randomized algorithms are known. In particular, when α=O(n), a folklore approach uses only polylog(n) space (see, e.g., [3, 18]). In this regime, Theorem 2 gives an Ω(n) lower bound for white-box streaming algorithms, thus separating randomized and white-box space complexity for approximating MMS.

Derandomization of white-box algorithms for total functions.

To prove their inapproximability result for Fp, [1] gave a general theorem showing that for any total function and any boolean (possibly partial) function f(x1,x2), every randomized white-box two-party communication protocol555The white-box communication complexity of f(x1,,xk) is the maximum communication per party of the best randomized, k-party protocol for f that is resilient to any white-box adversary. Such an adversary generates the input xi for party i after observing the random strings of the previous i1 parties. Upon receiving xi, the message from party i1, and a fresh random string, party i sends a message to party i+1. See Section 3.2. can be converted to a deterministic protocol with the same communication cost.

Informally, white-box two-party communication protocols correspond to streaming algorithms that are resilient against an adversary who adapts once at a fixed point during the stream. To complete their proof, they gave an Ω(n) deterministic communication lower bound for the two-party decision version of the Fp problem.

While many classical streaming lower bounds are derived via reductions from two-party communication problems, such reductions often fall short for approximation tasks. For example, in the case of distinct elements, Alice and Bob can individually count the number of distinct elements in their respective inputs and simply add the counts. This yields a 2-approximation with little communication. Similarly, for sufficiently large α, a lower bound for α-approximation of Fp cannot be derived from a two-party communication lower bound.

[1] also shows that their argument cannot be extended to general k-party communication problems. In contrast, our next theorem proved in Section 5 shows that for protocols computing total functions with any number of parties, such a derandomization is possible. Informally, this means that any deterministic streaming memory lower bound for a total function also holds in the white-box streaming model.

Theorem 3.

For k1 and a total function f(x1,,xk) (not necessarily boolean), if there is a white-box communication protocol that solves f with probability better than 1/2, then there is also a one-way deterministic communication protocol that solves f with the same communication.

Separating white-box from deterministic streaming.

Theorems 1 and 3, along with the derandomization result of [1], indicate that for many streaming problems, the white-box and deterministic memory requirements are effectively the same. Additionally, the best known separations between the two models are quantitatively small (at least for streams of polynomial length). For example, [1] show that the deterministic space complexity of the approximate counting problem is Θ(logn), whereas the Morris counter algorithm, which uses only Θ(loglogn) space, can be implemented in the white-box setting666We note that in models with computationally bounded adversaries, significantly larger separations have been shown under cryptographic assumptions [1, 11]. However, in this work, we focus on the information-theoretic notion of white-box adversaries..

Can white-box streaming algorithms use substantially less memory than deterministic ones? Theorem 3 rules out such separations for total functions. However, our next theorem proved in Section 6 shows that large separations do exist for (boolean) partial functions777Such separations are trivially possible for sampling problems. For instance, outputting a random bit or a random element from the stream can be done with O(1) space by a white-box algorithm, but makes little sense for deterministic streaming algorithms..

Theorem 4.

There is a boolean partial function f for which there exists a white-box streaming algorithm that computes it using O~(1) memory, while any deterministic algorithm that computes it uses Ω~(n) memory.

At a high level, the partial function f used in the proof of Theorem 4 forces the adversary to “commit” to part of the stream by imposing a promise that couples the prefix and the suffix of the stream. Consequently, even if the adversary can identify future stream updates that would cause the algorithm to fail, it cannot introduce them without violating the promise.

1.2 Additional Related Work

Several alternatives to the classical streaming model have recently received significant attention. One such extensively studied model, that is closely related to the white-box streaming model, is the adversarially robust streaming model [6, 5]. In this model, the streaming algorithm must respond to a query after each update (insertion or deletion), and the adversary may select the next update based on the algorithm’s response. For example, to α-approximate F0, the algorithm must, after each update, output (with high probability) an α-approximation of the number of distinct elements seen so far. The adversary can then use this information to adaptively determine the next update.

Clearly, any algorithm that works in the white-box streaming model also works in the adversarially robust model. The robust model can be viewed as a “black-box” adversarial streaming model, since the adversary does not have access to the algorithm’s internal state, only to the outputs it reveals through queries.

In contrast to our Theorem 1, which shows that for any constant α1, Ω(n) memory is required to α-approximate Fp in the white-box insertion-only model, [5] design algorithms that use sublinear space for the same task in the adversarially robust insertion-only model. The memory requirements of their algorithms match those of classical randomized algorithms for Fp estimation (up to logarithmic factors). These algorithms work by changing their responses to queries only a small number of times, thereby revealing only a limited amount of their randomness. However, they fail entirely if the adversary is given access to the full internal state of the algorithm.

A major open problem posed by [5] is to determine the space complexity of adversarially robust Fp-estimation in the turnstile streaming model. A recent result by [15] makes substantial progress by ruling out linear sketches. Note that since the white-box lower bound in Theorem 1 is proved for insertion-only streams, it also applies to the white-box turnstile model.

The white-box streaming model, introduced by [1], captures a richer class of adversarial scenarios. As discussed above, [1] prove lower bounds for this model that are derived from deterministic two-party communication lower bounds. On the algorithmic side, the significant power granted to adversaries in the white-box model has led most research to focus on settings where adversaries are computationally bounded, often under cryptographic assumptions. Surprisingly, despite the fact that streaming algorithms in the white-box model lack even a secret key, [1, 11] were able to leverage cryptographic tools to design space-efficient algorithms for a range of classical problems, including L1-heavy hitters, turnstile L0 estimation, the rank decision problem, string pattern matching, sparse vector recovery, low-rank matrix and tensor recovery, and low-rank plus sparse matrix recovery.

A very recent work of [14] gives an almost-optimal Ω(n) lower bound on the white-box streaming space complexity of the Longest Increasing Subsequence (LIS) problem. Although near-tight deterministic lower bounds for LIS have been known for decades [13, 10], no superlogarithmic randomized streaming lower bound space is currently known.

Like the white-box streaming model, the pan-private streaming model [9, 19], also considers settings where the internal state of the streaming algorithm may be exposed. However, the two models differ in their objectives. The white-box model focuses on ensuring correctness in the face of adaptive adversaries, whereas the pan-private model is concerned with privacy. In the pan-private setting, stream elements typically represent sensitive individual data (e.g., financial or medical records), and the goal is to ensure that even if the internal state of the algorithm is compromised, the privacy of each individual’s data remains protected.

2 Proof Overview

2.1 Lower Bound for Moment Estimation

We overview the proof of Theorem 1 in this section. For simplicity sake, we restrict our attention to the case of p=0, where the Fp moment is simply the number of distinct elements in the stream and thus, estimating the Fp moment is the same as estimating the number of distinct elements. Essentially the same ideas also extend to other values of p, as streams with few distinct elements will have a lot of repetitions and therefore, a very different Fp moment than streams that have a lot of distinct elements.

As is standard, we prove the desired white-box streaming lower bound by proving a corresponding communication lower bound. For our result, we consider a k-party communication problem, called the Set Union (𝖲𝖴) problem, where all the parties i[k] gets as input a set xi of size t from a universe of size n=2kt. The goal is to distinguish between the (“YES”) case where the sets received by all the parties are the same implying that the size of the union of all the sets is small and the (“NO”) case where the sets received by all the parties are (very) different implying that the size of the union of all the sets is large. As the size of the union is just the number of distinct elements, a lower bound for the Set Union problem also implies a lower bound for the problem of estimating the number of distinct elements.

In terms of parameters, we require that in the NO case, the size of the union of all the sets is at least t+(k1)t/2, that is, on average every set other than x1 contributes at least t/2 fresh elements to the union. As the size of the union in the YES case is t, showing that the YES and the NO cases are indistinguishable rules out the possibility of approximating the distinct elements to within a factor Ω(k). As k can be arbitrarily large, we have the desired result. We mention that the approximation factor we obtain for the k-party problem is tight up to constant factors. Indeed, it is easy to see that the size of the union lies in the interval [t,kt] implying that a k-approximation is trivial. This also establishes that it is impossible to obtain Theorem 1 via two-party techniques (even for p=0).

We show that a white-box communication protocol with communication o(t) cannot distinguish between the YES case and the NO case of the Set Union problem. This is tight up to constant factors because of a simple protocol where the first party simply sends x1 and all the other parties check if their sets are the same as x1 or not.

White-box adversaries and a hybrid argument.

We start by recalling the white-box communication model. In this model, the input x1 of the first party is chosen by a (possibly randomized) adversary. Then, this party uses its own private randomness to compute a message m1 to send to the second party. The adversary then sees this randomness and chooses an input x2 for the second party who can use it to compute a message m2 using its own randomness. This continues till party k computes a message mk that is either YES or NO, which constitutes the output of the protocol.

Note that, in the YES case of Set Union, all the adversary can do is to choose the input x1 as the other inputs are promised to be the same. We call the set of all such adversaries 𝐀1. On the other hand, in the NO case, the adversary can choose any sets x1,,xk as long as the promise |i[k]xi|t+(k1)t/2 of a large union is satisfied. We call the set of all such adversaries 𝐀k. If there exists a white-box protocol π that distinguishes the YES case from the NO case, then π should output YES with high probability in the presence of any adversary from 𝐀1 and should output NO with high probability in the presence of any adversary from 𝐀k. In other words, if q(π,𝒜) denotes the probability that π outputs YES in the presence of adversary 𝒜, the desired lower bound follows if we show that for any protocol π where every party sends o(t) bits, it holds that (the first max in this expression can be replaced by a min. However, our proof establishes a stronger statement so we retain the max):

max𝒜𝐀1q(π,𝒜)max𝒜𝐀kq(π,𝒜)=o(1). (1)

To show this statement, we use the hybrid technique. Instead of arguing about adversaries from 𝐀1 and 𝐀k, we construct intermediate “hybrid” adversaries 𝐀i, for all 1<i<k, and show that the difference between consecutive hybrids is at most o(1/k), that is, we have:

max𝒜𝐀iq(π,𝒜)max𝒜𝐀i+1q(π,𝒜)=o(1/k). (2)

By summing this result for all i, we have the desired lower bound. Roughly speaking, the set 𝐀i is the set of adversaries that behave like an adversary from 𝐀1 for the first ki+1 parties and an adversary from 𝐀k for the last i1 parties. That is, any adversary in the set 𝐀i ensures that the input sets received by the first ki+1 parties are always the same while the sets received by the last i1 parties can be different but they satisfy the promise |i[k]xi|t+(i1)t/2 so that each such set adds t/2 fresh elements to the union on average.

On hybrid mismatch.

Before showing that the difference of outputting YES between pairs of consecutive hybrids is small, we note a subtle point about the max versus min issue mentioned above. For the purposes of our lower bound it suffices to show that Equation 1 with the max in the first term replaced by a min as a correct protocol should output YES with high probability for any adversary from the set 𝐀1. In terms of the proof, this means that while it suffices to show that some adversary in 𝐀1 is close to an adversary in 𝐀k, we actually show that all adversaries in 𝐀1 are close to an adversary in 𝐀k.

This difference turns out to be crucial for the hybrid argument to work. Indeed, suppose all we know is that some adversary in 𝐀1 is close to an adversary in 𝐀2 and some adversary in 𝐀2 is close to an adversary in 𝐀3 and so on, then there is no way to conclude anything about the difference between 𝐀1 and 𝐀3 from just these claims. This is because the adversary in 𝐀2 that is close to 𝐀1 could be completely unrelated to the adversary in 𝐀2 that is close to 𝐀3. On the other hand, we have this claims about all adversaries, then it is straightforward to combine them and obtain a claim about closeness between 𝐀1 and 𝐀3. Put differently, the reason for proving Equation 1 with a max instead of min is to avoid a mismatch in the adversaries considered in different pairs of consecutive hybrids.

Showing consecutive hybrids are indistinguishable.

It now boils down to showing that for protocols π with o(t)-communication, any pair i and i+1 of consecutive hybrids satisfies Equation 2. For this, note that both hybrids i and i+1 have the property that the input to the first ki parties is the same. Thus, for adversaries from both these hybrids, party ki knows that the input of any party before it matches his own, and can simulate their behavior. In turn, we can conclude that the first ki1 parties do not need to send anything, which effectively means we can ignore these parties in our analysis. This means that the proof for the case i=k1, when no parties can be ignored, will also extend to all other i, and we can focus solely on this case.

To this end, fix an protocol π with o(t) communication and look at Equation 2 for i=k1. One of the main ingredients in our proof is that it is always possible to derandomize the first party. Indeed, note that if the first party uses randomness to compute its message it can go over all possible random strings and optimize to see which one performs the best over all the possible choices the adversary has for the future parties. The reason this is only true for the first party (and does not imply that the whole protocol can be derandomized which would have contradicted Theorem 4) is that the remaining parties do not know what inputs were given to the parties before them. All they see is the message they received which may not reveal the inputs entirely. Thus, they have no way of knowing the set of all possible choices the adversary has for the parties after them making it impossible to perform the optimization above.

Overall, we are now in situation where the first party is deterministic. Now, for each possible input x1 for the first party, let m1=m1(x1) be the message the first party sends to the second party. Note that the fact the π has low communication implies that the message m1 is the same for many different inputs x1 for the first party. Let S1 be the set of all such inputs x1 and consider what happens when the input to first party is replaced by a random input x1S1 that may or may not be the same as x1. With this modified input, if it is the case that the set of inputs to the parties satisfies the promise for 𝐀i+1, then the fact that the message m1 is the same for both x1 and x1 implies that the protocol does not distinguish well between 𝐀i and 𝐀i+1. Thus, it suffices to show that with high probability, a uniformly random input x1S1 satisfies the promise for 𝐀i+1.

For this, recall that i=k1 and note that the promise for 𝐀i+1 requires that |x1X>1|t+(k1)t/2, where we define X>1=1<ikxi for notational convenience. As any adversary in 𝐀i requires that x1=x2 and we have the promise for 𝐀i, we have that |X>1|t+(k2)t/2. Thus, the only way the promise is violated is when |x1X>1|<t/2. To finish, we use the fact that x1 is sampled from a large set S1 to get that the probability of this happening, even when conditioned on a given value of X>1 that is determined by the parties’ and the adversary’s future randomness independently of the choice of x1, is very small, and in particular, is o(1/k), as required for Equation 2.

2.2 Derandomization for Total Functions

We overview the proof of Theorem 3 in this section, focusing on the case k=3, which can be easily generalized to any k>3. Fix a 3-party white-box communication protocol π that computes a total function f. As mentioned in Section 2.1, the first party can easily be derandomized. Let 𝗌𝗎𝖼𝖼x1(r1) denote the maximum success probability of π in computing f, given that the first party’s input is x1 and its random string is r1. In our derandomized protocol, like in the derandomized protocol of [1], the first party fixes its random string to the string r1 that maximizes 𝗌𝗎𝖼𝖼x1(r1).

Crucially, the first party can compute 𝗌𝗎𝖼𝖼x1(r1) by enumerating all possible white-box adversaries 𝒜, calculating the success probability of π against each 𝒜 conditioned on x1 and r1, and taking the minimum. To compute the success probability against a fixed 𝒜, the first party iterates over all random strings for the second and third parties, simulates π, and compares the output to the correct value of f.

Like the first party, to derandomize its strategy, the second party aims to fix its randomness to the string r2 that maximizes 𝗌𝗎𝖼𝖼x1,x2(r2), the protocol’s success probability given inputs x1, x2 and the random string r2 for the second party (note that the first party is now deterministic). However, the second party does not know x1; it only observes the message m1 sent by the first party.

The key observation is that if π computes a total function, then for every x3, f(x1,x2,x3)=f(x1,x2,x3), as long as on input x1 the first party also sends the message m1. Since for a fixed r2, π gives the same output on inputs (x1,x2,x3) and (x1,x2,x3), and since f(x1,x2,x3)=f(x1,x2,x3), we get that the value of 𝗌𝗎𝖼𝖼x1,x2(r2) only depends on the message m1, and not on the specific value of x1. Therefore, the second party can compute this value using any input x1 consistent with the received message m1, instead of x1.

We note that this argument does not extend to partial functions, since when computing 𝗌𝗎𝖼𝖼x1,x2(r2), the second party must only consider adversaries 𝒜 that generate inputs satisfying the promise of f. For example, suppose the promise of f requires that x1=x3. If the second party substitutes the actual x1 with some x1x1 when simulating such an adversary, then the third party receives x3=x1, which differs from the true input x1 held by the first party. As a result, the generated input tuple is “inconsistent”, as it violates the promise of the function.

We note that in the proof of Theorem 1, we are able to avoid the consistency issue and successfully derandomize party j=ki by restricting our attention to adversaries that assign the same input to all of the first j parties. As a result, since party j knows its own input, it also knows the inputs of all earlier parties and therefore does not need to generate inputs for them.

Observe that this issue of consistency does not arise in the case of total functions, where all input combinations are valid by definition, so any choice of x1 remains consistent with any x3.

In the case of two-party (k=2) partial functions, no consistency issues arise, as there is no third party involved, and therefore no risk of violating the promise. This fact makes the derandomization of [1] work. We note that their derandomization also requires f to be boolean (if not a total function).

2.3 Separation of White-Box from Deterministic

Theorem 3 and the derandomization result of [1] leave open the possibility that partial functions or relations, f(x1,,xk), that are either boolean with k3 or non-boolean with k=2, might have white-box communication protocols that require significantly less memory than deterministic ones. Theorems 5 and 6 show that large separations are possible in both these cases. Note that Theorem 5 implies Theorem 4.

Theorem 5.

There is a boolean partial function f(a,b,c), such that its white box 3-party communication complexity is O~(1), while its one-way deterministic communication complexity is Ω~(n), where n is the length of the inputs. In fact, f also has a O~(1)-memory white-box streaming algorithm.

Roughly speaking, the inputs a,b and c to the partial function f(a,b,c) are vectors of length n. It is promised that ai=bi for at least 10% of the indices i[n]. Additionally, for every index i where aibi, it is promised that ci=. The goal is to distinguish between the following two cases: (i) For all indices i where ai=bi, we have ci=bi; or (ii) For all such indices i, we have cibi.

The following is a white box protocol for f: The second party sends to the third party a set of 100 random pairs (i,bi) (no message from the first party to the second). The pairs are selected using reservoir sampling, which, upon receiving bi, flips coins to decide whether to add (i,bi) to the set. Note that had the protocol decided ahead of time on this random set of indices, the white-box adversary could have made sure that aibi for all i’s in the set. Next, the third party goes over all indices i in the set, searching for one with ci. Such an index i should exist with high probability, and if ci=bi, the algorithm identifies case (i); otherwise, if cibi, it identifies case (ii).

To complete the proof of Theorem 5, we show an Ω(n) lower bound on the memory required by any deterministic algorithm that solves f. Observe that our derandomization argument from the proof of Theorem 3 fails when applied to the above white-box protocol for f. This is because c determines the set of indices where ai=bi. Therefore, without knowing this set, the second party cannot generate an input a such that a and b are consistent with the third party’s input c.

Theorem 6.

There is a (non-boolean) relation g(a,b), such that its white-box 2-party communication complexity is O~(1), while its one-way deterministic communication complexity is Ω~(n), where n is the length of the inputs. In fact, g also has a O~(1)-memory white-box streaming algorithm.

Roughly speaking, the relation g(a,b) considers input vectors a and b with the same promise as in f. The goal is to output a set of 100 indices such that, for at least one of them, ai=bi.

A white-box protocol for g simply has the second party output a uniformly random set of 100 coordinates (note that there is no communication between the parties). An Ω(n) deterministic lower bound for g is derived from that of f.

3 Model and Preliminaries

3.1 Notation

For integers n,k1, [n] denotes {1,,n}, [k,n] denotes {k,,n}, and ([n]k) represents the collection of all k-subsets of [n]. Throughout, logarithms are base-2.

A total function is a function that is defined for every input in its domain, whereas a partial function may only be defined on a subset of the inputs.

3.2 White-Box Communication

The standard approach of proving streaming lower bounds is via communication complexity. So we define the following (one-way) white-box communication model. Let π be a k-party protocol and 𝒜 be an adversary. Initially, m0=. At the i-th step, the i-th party computes mi based on mi1, its input xi, and its (private) randomness ri888The definition of the model can be modified to compute mi based on mi1,xi, and r1,,ri. This essentially corresponds to free access to a random oracle for streaming algorithms. Our lower bounds in this paper hold even against this strongest form of randomness. In particular, in the hybrid argument for proving Lemma 11, we partially derandomize a prefix of parties. This is essentially the same as revealing their randomness to all later parties., where xiXi is picked by the adversary (possibly randomly) based on m1,,mi1,x1,,xi1,r1,,ri1. At the end, the k-th party outputs mk.

Let f:X1××Xk2Y be a relation. The success probability of π in solving f against 𝒜 is defined to be Pr(mkf(x1,,xk)), where the probability is over both ri and the randomness of 𝒜, and x1,,xk are the input generated by 𝒜 on those randomness. Also define the communication complexity of π to be the maximum length of mi over all i[k] and all possible inputs x1,,xk. Note that the communication complexity is defined to be the maximum per-party communication due to the following connection between streaming and communication.

Observation 7.

For any relation f, if there is a white-box streaming algorithm that solves f with space S, then there is also a white-box communication protocol (for any number of parties) that solves f with the same probability and communication S.

4 Lower Bound for Moment Estimation

In this section, we prove Theorem 1, a white-box streaming lower bound for the moment estimation problem, defined as follows: Given a vector u[n]m, we denote by fi the frequency (number of appearances) of element i[n] in u. The p-th moment of u is defined as Fp(u)=i[n]fip. For α1, an (insertion-only) streaming algorithm α-approximates Fp on [n] with probability δ, if given a stream of elements u=u1,u2,, with ui[n], the algorithm outputs a number F such that Fp(u)FαFp(u), with probability at least δ.

To prove Theorem 1, in Section 4.1, we introduce a k-party promise problem 𝖲𝖴k,n,t,w in the white-box communication model. A proof of the lower bound for 𝖲𝖴k,n,t,w is presented in Section 4.2.

4.1 𝒌-Party Promise Problem 𝗦𝗨𝒌,𝒏,𝒕,𝒘

Definition 8 (Set Union).

For k,n,t1 and w(0,1), each party i[k] has xi([n]t). 𝖲𝖴k,n,t,w needs to distinguish between the following two cases:

(YES)

|i[k]xi|=t, or equivalently x1==xk;

(NO)

|i[k]xi|t+(k1)tw.

We remark that 𝖲𝖴k,n,t,w is similar to the communication problem used by [7], but our proof approach is quite different and tailored to white-box communication. To see the connection between 𝖲𝖴k,n,t,w and α-approximate Fp moment estimation, we have the following reductions.

Lemma 9.

For p[0,1) and α1, if there is a white-box streaming algorithm that solves α-approximate Fp moment estimation on [n] with space S, then there is also a white-box communication protocol that solves 𝖲𝖴k,n,t,w with the same probability and communication S, where k=(2α)1/(1p),t=n/(2k),w=1/2.

Proof.

In the YES case of 𝖲𝖴k,n,t,w, the frequency vector has exactly t coordinates of value k and all other coordinates are zero. Its p-th moment is always kpt. On the other hand, the frequency vector has at least t+(k1)tw>kt/2 nonzero coordinates in the NO case. So the p-th moment is larger than kt/2. By Observation 7, a white-box streaming algorithm for α-approximate Fp moment estimation implies a white-box communication protocol for 𝖲𝖴k,n,t,w so long as αkptkt/2. This is satisfied by the given parameters999The reduction actually works for any value of t. t=n/(2k) is needed only to satisfy the condition of Lemma 11. The same holds for Lemma 10..

Lemma 10.

For p>1 and α1, if there is a white-box streaming algorithm that solves α-approximate Fp moment estimation on [n] with space S, then there is also a white-box communication protocol that solves 𝖲𝖴k,n,t,w with the same probability and communication S, where k=(2α)1/(p1),t=n/(2k),w=1k(p1)/2.

Proof.

In the YES case of 𝖲𝖴k,n,t,w, the frequency vector has exactly t coordinates of value k and all other coordinates are zero. Its p-th moment is always kpt. On the other hand, the frequency vector has at least t+(k1)tw>ktw nonzero coordinates in the NO case. Meanwhile, all the coordinates sum up to kt and each coordinate is in [k] because each element appears at most once in the input of each party. Note that up+vp(u1)p+(v+1)p for 1<uv<k. It implies that the maximum possible value of the p-th moment is obtained when each nonzero coordinate is either 1 or k. As the number of coordinates with value k is less than (ktktw)/(k1)2t(1w) due to k2, the p-th moment is upper bounded by 2kpt(1w)+kt=2kt. By Observation 7, a white-box streaming algorithm for α-approximate Fp moment estimation implies a white-box communication protocol for 𝖲𝖴k,n,t,w so long as kptα2kt. This is satisfied by the given parameters.

Now, we are ready to prove Theorem 1, assuming the following lower bound for 𝖲𝖴k,n,t,w.

Lemma 11.

For k,n,t1 and w(0,1) such that 2ktn, any white-box communication protocol that solves 𝖲𝖴k,n,t,w with constant probability better than 1/2, requires Ω(t(1w)logk) communication.

Proof of Theorem 1.

Suppose there is a white-box streaming algorithm for α-approximate Fp moment estimation on [n] with space S and constant probability better than 1/2. By Lemmas 9 and 10, there is also a white-box communication protocol for 𝖲𝖴k,n,t,w with communication S and the same probability, where k=(2α)1/|p1|,t=n/(2k),w=1kmax(p1,0)/2. Lemma 11 then implies that S=Ω(t(1w)logk)=Ω(n/kmax(p,1)O(logn)). Plugging in k=Op(α1/|p1|) concludes the proof.

4.2 Proof of Lemma 11

This section constitutes a proof of Lemma 11. We first define the following sets of adversaries 𝐀i. For i[k], an adversary is in 𝐀i if for any protocol, the generated input satisfies all requirements below.

  1. 1.

    x1==xki+1.

  2. 2.

    |i=1kxi|=|i=ki+1kxi|t+(i1)tw.

  3. 3.

    x1 is uniformly random over ([n]t).

Intuitively, adversaries in 𝐀i generate input such that the first ki+1 parties get a (partial) YES case while the last i parties get a (partial) NO case. We say the input is of type i if the first two requirements above are satisfied.

For protocol π and adversary 𝒜, let q(π,𝒜) denote the probability of π outputting YES against 𝒜 (over the randomness of both π and 𝒜)101010Although 𝖲𝖴k,n,t,w is a promise problem, any protocol for it can be arbitrarily extended to also output YES/NO on input not in YES/NO cases.. Also let qi(π)=max𝒜𝐀iq(π,𝒜) for i[k]. Fix a protocol π with communication C and probability δ>1/2. For any adversary 𝒜𝐀1, it only generates type-1 inputs, which are always in the YES case by Definition 8, so q(π,𝒜)δ. This further implies q1(π)δ. Similarly, we have qk(π)1δ. Consider the maximization Q=maxπ(q1(π)qk(π)) over all protocols π with (per-party) communication at most C. Altogether, this means Qq1(π)qk(π)2δ1=Ω(1).

On the other hand, however, we show that Q=o(1) if C=o(t(1w)O(logn)). This is a contradiction, hence proving Lemma 11. To this end, it is sufficient to show that Qi=maxπ(qi(π)qi+1(π))=o(1/k) for all i[k1], where the maximization is over all protocols π with communication at most C.

Fix i from now on. Let j=ki. Let πi be a protocol with communication at most C such that Qi=qi(πi)qi+1(πi). Observe that qi() and qi+1() only involve adversaries in 𝒜i and 𝒜i+1, who only generate type-i and type-(i+1) inputs. Therefore, each of the first j parties of πi knows that x1==xj. In this case, the j-th party can simulate the first j parties and compute by itself the same message it would have in πi.

Let πi′′ be the protocol obtained from πi by replacing the messages of the first j1 parties by the empty message and having the j-th party simulate the first j parties to compute mj. So we have qi(πi′′)qi+1(πi′′)=qi(πi)qi+1(πi). Now, for any possible randomness rj for the j-th party, let πi,rj′′ be the protocol obtained from πi′′ by fixing the randomness of the j-th party to rj. We select πi to be πi,rj′′ for the rj that maximizes qi(πi,rj′′)qi+1(πi,rj′′). We next show that qi(πi)qi+1(πi)qi(πi′′)qi+1(πi′′)=qi(πi)qi+1(πi)=Qi. As shown above, since we are considering only qi() and qi+1(), we always that x1==xj, and thus it suffices for the adversary to only select inputs for parties [j,k]. Indeed, we have

qi(πi′′)qi+1(πi′′) =𝔼rj[max𝒜𝐀iq(πi,rj′′,𝒜)]𝔼rj[max𝒜𝐀i+1q(πi,rj′′,𝒜)]
=𝔼rj[max𝒜𝐀iq(πi,rj′′,𝒜)max𝒜𝐀i+1q(πi,rj′′,𝒜)]
=𝔼rj[qi(πi,rj′′)qi+1(πi,rj′′)].

So we get that qi(πi)qi+1(πi)qi(πi′′)qi+1(πi′′), as claimed.

Let 𝒜i be an adversary in 𝐀i such that qi(πi)=q(πi,𝒜i). It suffices to construct another adversary 𝒜𝐀i+1 such that q(πi,𝒜)q(πi,𝒜i)o(1/k). Let Mj:xjmj be the function computed by the j-th party in πi111111Mj depends solely on xj, but not mj1,rj, because the first j1 parties do no computation and the j-th party is deterministic.. Consider the adversary 𝒜=𝒜(πi), who generates input x1,,xk as follows:

  1. 1.

    Let x1==xj be generated by 𝒜i. Sample xj uniformly at random from Zj(xj)={xjMj(xj)=Mj(xj)}. For the first j parties, generate x1==xj.

  2. 2.

    For [j+1,k], let x be generated by 𝒜i, who pretends that for i[1], the i-th party gets xi as input121212In particular, this means xj+1=xj==x1.. If |(i=j1xi)x|+(k)tt+itw, then generate x=x for the -th party. Otherwise, for all parties i[,k], generate xi that is disjoint from x1,,xi1.

 Remark 12.

Informally, 𝒜 faithfully simulates 𝒜i except that:

  1. 1.

    It re-samples a uniformly random xj conditioned on mj=Mj(xj).

  2. 2.

    Once |(i=j1xi)x|+(k)t<t+itw, it disregards 𝒜i and generates disjoint sets for all remaining parties. This is well-defined because 2ktn.

We first claim 𝒜𝐀i+1. The first requirement is satisfied because x1==xj and j=k(i+1)+1. For the second requirement, let [j,k] be the largest index such that |(i=j1xi)x|+(k)tt+itw during the execution131313This is well defined because the inequality is always satisfied by index j.. By Item 2 of Remark 12, we have

|i=jkxi|=|i=k(i+1)+1kxi|=|i=jxi|+(k)tt+((i+1)1)tw.

So 𝒜 always generates type-(i+1) input. Regarding the third requirement, as x1 is uniformly random over ([n]t) due to 𝒜i𝐀i, the probability of 𝒜 generating any x1 is

x1:x1Zj(x1)Pr(x1)1|Zj(x1)|=x1Zj(x1)Pr(x1)1|Zj(x1)|=|Zj(x1)|(nt)1|Zj(x1)|=1(nt).

Therefore, 𝒜𝐀i+1.

Finally, we conclude the proof of Lemma 11 by showing q(πi,𝒜)q(πi,𝒜i)o(1/k). Observe that by Item 1 of Remark 12, the resampling of 𝒜 ensures that mj remains the same. As a result, if this were the only deviation from 𝒜i, i.e., x=x for all [j+1,k], the joint distribution of x,r,m for [j+1,k] was exactly the same as if πi were executed against 𝒜i. In particular, this means that the probability of outputting YES would be q(πi,𝒜i). In the actual execution of πi against 𝒜, this probability is lowered only in the case |(i=j1xi)x|+(k)t<t+itw for some [j+1,k], which also implies |xj(i=j+1kxi)|<t+itw. Note that |i=j+1kxi|=|i=ki+1kxi|t+(i1)tw as 𝒜i𝐀i always generates type-i input. Combining the two inequalities, we get |xjX|<tw, where X=i=j+1kxi. Let Zj[mj]={xjMj(xj)=mj}. Altogether, we have

q(πi,𝒜i)q(πi,𝒜)
Pr(|xjX|<tw)
=mjPr(mj)XPr(Xmj)Pr(|xjX|<twmj,X)
=mj|Zj[mj]|(nt)XPr(Xmj)xjZj[mj]Pr(xjmj,X)𝟙[|xjX|<tw] (as xj is uniformly random in ([n]t))
=mj|Zj[mj]|(nt)XPr(Xmj)xjZj[mj]1|Zj[mj]|𝟙[|xjX|<tw] (as xj is uniformly random in Zj[mj] and independent of X given mj)
=1(nt)mjXPr(Xmj)xjZj[mj]𝟙[|xjX|<tw]
1(nt)mjXPr(Xmj)u=0tw1(n|X|u)(|X|tu) (enumerating over u=|xjX|)
2C(nt)maxmjXPr(Xmj)u=0tw1(n|X|u)(|X|tu) (as πi has communication at most C)
2C(nt)maxmjXPr(Xmj)u=0tw1(nu)((k1)ttu) (as |X|(kj)t(k1)t)
2CmaxmjXPr(Xmj)u=0tw1((k1)ttu)(nutu) (as (nt)=(nu)(nutu))
=2CmaxmjXPr(Xmj)u=0tw1v=0tu1(k1)tvnuv
2CmaxmjXPr(Xmj)u=0tw112tu (as nuv2ktt2((k1)tv))
2CmaxmjXPr(Xmj)22t(1w)
2C22t(1w)
=o(1k), (as C=o(t(1w)logk))

as claimed.

4.3 Proof of Theorem 2

This section proves Theorem 2, a white-box streaming space lower bound for estimating MMS. Fix α1. An (insertion-only) streaming algorithm is said to α-approximate MMS with success probability δ if, on any stream of undirected edges E=e1,e2,, it outputs a value M satisfying 1αMMS(E)MMMS(E) with probability at least δ, where MMS(E) denotes the size of a maximum matching in the graph with edge set E.

Proof of Theorem 2.

We show any white-box streaming algorithm P that α-approximates MMS with space s and success probability p, implies a white-box algorithm P that α-approximates F0 on [n] with space s+O(logT) and success probability p, where T is the length of the stream. The algorithm P works by feeding P edges of a bipartite graph G=(LR,E), with L=[n] and R=[T] (assume that T is known to P in advance), constructed as follows: P maintains a counter i, initialized to 0. Upon receiving an item a[n], it increments i and feeds the edge (a,i) to P. At the end of the stream, P outputs the estimate produced by P multiplied by α.

Below we prove that for any stream A for P (possibly obtained by a white-box adversary), the maximum matching size in the graph G, fed to P by P, equals the number of distinct elements in A, i.e., MMS(G)=F0(A). Additionally, every white-box adversary 𝒜 for P induces an adversary 𝒜 for P: if, in time i, the adversary 𝒜 inserts the element a[n] to the stream A, the adversary 𝒜 inserts the edge (a,i). Since P is a white-box algorithm that α-approximates MMS with probability p, with probability at least p, it outputs an α-approximation of MMS(G). Since MMS(G)=F0(A), this output, multiplied by α, is an α-approximation of F0(A). We got that, for every white-box adversary 𝒜, the algorithm P outputs an α-approximation of F0(A) with probability p, and therefore P is a white-box algorithm for α-approximation of F0(A) with probability p.

In terms of space, aside from the working memory of P, the algorithm P only stores the counter i[T], which requires O(logT) bits. Hence the total memory used by P is at most s+O(logT). Observe that in the hard instances used to prove Theorem 1, the stream length satisfies T=Θ(n) and the lower bound follows even if the algorithm knows T. Therefore, by Theorem 1, every white-box streaming algorithm that α-approximates F0 on streams of length T=Θ(n) over the universe [n] with probability p>1/2 must use Ω(n/αO(logn)) memory. Since P uses at most s+O(logn) memory for streams of length n and succeeds with probability p, we conclude that if p>1/2, then s=Ω(n/αO(logn)), as claimed by the theorem.

To conclude the proof, it remains to show that for every stream A, the graph G obtained from it satisfies, MMS(G)=F0(A). First, let M be any matching in G, and define D:={a[n]:i[T] with (a,i)M}. Since M is a matching, each left vertex a[n] is incident to at most one edge of M, hence the mapping (a,i)a is injective on M and therefore |M|=|D|. Moreover, if (a,i)M then by construction a=ai, so every aD appears in A, implying |D|F0(A). Hence |M|F0(A), and taking the maximum over matching gives MMS(G)F0(A).

Conversely, let D[n] be the set of distinct elements appearing in A, so |D|=F0(A). For each bD, choose an (arbitrary) index i(b)[T] such that ai(b)=b; then (b,i(b))E. The set M:={(b,i(b)):bD} is a matching: the vertices bb correspond to different left vertices, therefore cannot be matched with the same right vertex. The reason is that each right vertex i[T] is incident to at most one edge in G (this edge connects it to the stream element at time i). Since |M|=|D|=F0(A), we get that MMS(G)F0(A). Combining the two inequalities yields MMS(G)=F0(A), and the claim of the theorem follows.

5 Derandomization for Total Functions

This section constitutes a proof of Theorem 3, showing that every white-box communication protocol that computes a total function can be derandomized. Let k1, X1,,Xk,Y be sets, and f:X1××XkY be a total function. Fix a white-box communication protocol π with probability better than 1/2. The proof is by induction on the parties. Suppose the first i parties are deterministic, which holds vacuously for i=0. Let Mi:(x1,,xi)mi be the (deterministic) function jointly computed by the first i parties. Also let Zi[mi]={(x1,,xi)Mi(x1,,xi)=mi}. The (i+1)-th party is derandomized as follows.

  1. 1.

    Pick an arbitrary (x1,,xi)Zi[mi].

  2. 2.

    Pick the best ri+1 that maximizes the probability of π (against the worst adversary), pretending that for i[i], the i-th party gets xi as input. This is done by, for all possible ri+1 and adversary 𝒜, computing the success probability of π, conditioned on ri+1, against 𝒜. This is well-defined because it can compute the success probability of π exactly given the input of the first i parties.

To show the correctness of the above derandomization, we first claim that the choice of x1,,xi is irrelevant in the sense that f always evaluates to the same value.

Claim 13.

For (x1,,xi),(x1′′,,xi′′)Zi[mi], and xiXi for i[i+1,k], it holds that f(x1,,xi,xi+1,,xk)=f(x1′′,,xi′′,xi+1,,xk).

Proof.

Consider two adversaries 𝒜 and 𝒜′′ that always generate x1,,xi,xi+1,,xk and x1′′,,xi′′,xi+1,,xk, respectively. As the first i parties are deterministic, π always computes mi against either 𝒜 or 𝒜′′. Furthermore, since both 𝒜 and 𝒜′′ always generate xi+1,,xk for the remaining parties, the output distribution of π must be the same in two cases. Also note that π outputs f(x1,,xi,xi+1,,xk) with probability more than 1/2 against 𝒜 while outputting f(x1′′,,xi′′,xi+1,,xk) with probability more than 1/2 against 𝒜′′. This is possible only if f(x1,,xi,xi+1,,xk)=f(x1′′,,xi′′,xi+1,,xk).

Note that the assumption of the function being total is crucial as otherwise, x1,,xi may not be compatible with xi+1,,xk. As a corollary of Claim 13, conditioned on mi, the success probability of π is independent of both the actual input x1,,xi for the first i parties and the choice of x1,,xi made by the (i+1)-th party.

By arbitrarily fixing x1,,xi, the (i+1)-th party can then pick the best ri+1 to maximize the probability of π. Thus, this derandomization step never decreases the probability of π by an averaging argument141414This is specific to the white-box setting. In the white-box setting, the adversary picks the input xi+2 of the next party only after seeing the randomness ri+1 of the current party. So the success probability can be viewed as an expectation, over ri+1, of a minimization, over xi+2, of the conditional success probability. Thus, picking the best ri+1 is possible. In standard randomized setting, however, the entire input is fixed at the beginning. So it is not always possible to pick a single best ri+1 for all possible inputs.. After derandomizing all k parties, we get a deterministic protocol that outputs correctly against all possible adversaries, implying that it must be correct on all possible inputs. This concludes the proof of Theorem 3 as our derandomization step does not increase communication.

6 Separation of White-Box from Deterministic

We use 𝖤𝖭𝖤n,t,w defined in the following. Section 6.1 proves the optimal separation for 3-party boolean partial functions, using 𝖤𝖭𝖤n,t,w with constant t,w, as claimed in Theorem 5.

Definition 14 (Equal Not Equal).

For n,t1, w(0,1), and a1,,an, b1,,bn, c1,,cn[0,t], let I={iaibi0}. Define 𝖤𝖭𝖤n,t,w(a1,,an,b1,,bn,c1,,cn) to be

{1,if |I|nw, and iI,ci=bi, and iI,ci=00,if |I|nw, and iI,ci{0,bi}, and iI,ci=0undefined,otherwise.

A similar separation is shown in the 2-party setting for relations in general, as claimed in Theorem 6. We use 𝗁𝗂𝗍n,w defined as follows. In Section 6.2, we derive the separation for 𝗁𝗂𝗍n,w as a corollary of the separation for 𝖤𝖭𝖤n,t,w.

Definition 15.

For n1, w(0,1), and a1,,an,b1,,bn{0,1}, let I={i|aibi0}. A set S[n] of size at most (100logn)/w is in the correct set of outputs for the instance 𝗁𝗂𝗍n,w(a1,,an,b1,,bn) if and only if |I|<nw or SI.

6.1 𝟑-Party Boolean Partial Functions

The following lemma shows 𝖤𝖭𝖤n,t,w can be efficiently computed by sampling in white-box streaming, and therefore also by a short 3-party communication protocol.

Lemma 16.

For n,t1 and w(0,1), there is a white-box streaming algorithm that solves 𝖤𝖭𝖤n,t,w with high probability in space O((lognlognt)/w).

Proof.

The algorithm works as follows.

  1. 1.

    Ignore all ai.

  2. 2.

    Independently sample and store each (i,bi) with probability (10logn)/(nw).

  3. 3.

    Upon the first cj such that cj0 and (j,bj) is stored, output 𝟙[cj=bj].

Let a1,,an,b1,,bn,c1,,cn be generated by an arbitrary adversary. By Definition 14, bi,ci0 for all iI. Also note that for any j with cj0, we know jI. So the algorithm never outputs incorrectly.

It now remains to bound the probability of the algorithm failing to output. Since |I|nw, by Chernoff bound151515Note that the existence of the adversary does not invalidate Chernoff bound. This is because the adversary has to generate the input bi first, determining whether or not iI, and only after that will the algorithm sample. Formally, we can still define nw independent events i denoting if the i-th smallest index in I is sampled. All these events are also independent of the adversary., at least one (i,bi) for iI is stored with high probability. If so, upon ci for the first such i, the algorithm always outputs 𝟙[ci=bi] correctly.

Finally, again by Chernoff bound, the total number of (i,bi) stored by the algorithm is O((logn)/w) with high probability. This concludes the proof as each (i,bi) takes O(logn+logt)=O(lognt) space.

In the rest of this section, we prove the deterministic lower bound for the corresponding 3-party communication problem, where Alice has a1,,an, Bob has b1,,bn, and Charlie has c1,,cn.

First consider the following gap version of 2-party set disjointness.

Definition 17.

For n1 and w(0,1), Alice has XA[n] and Bob has XB[n]. 𝖲𝖣n,w needs to decide if XAXB= or |XAXB|nw.

Lemma 18.

For n1 and w(0,1/4), any deterministic communication protocol (not necessarily one-way) for 𝖲𝖣n,w requires Ω((1/4w)2n) communication.

Proof.

The proof constructs a fooling set by probabilistic method. Consider a set of uniformly randomly sampled (X,X¯), where X independently includes i[n] with probability 1/2. For each (X,X¯) and (X,X¯) of the set, |XX¯|nw and |XX¯|nw with probability 1exp(Ω((1/4w)2n)) by Chernoff bound. On the other hand, XX¯= always holds. By union bound, a sampled set of size exp(Ω((1/4w)2n)) is a fooling set with nonzero probability. Thus, there is a fooling set of size exp(Ω((1/4w)2n)), concluding the proof.

Using Lemma 18, we prove a lower bound for the following 3-party communication problem 𝟥𝖲𝖨n,t,w, which essentially reformulates the 3-party communication problem corresponding to 𝖤𝖭𝖤n,t,w. Indeed, Alice arbitrarily sets a1,,an[0,t] such that ai0 if and only if iXA. Meanwhile, Bob sets b1,,bn such that bi=gB(i) if iXB and bi=0 otherwise. Similarly, Charlie sets c1,,cn such that ci=gC(i) if iXC and ci=0 otherwise. It can be verified that the conditions and values of 𝖤𝖭𝖤n,t,w and 𝟥𝖲𝖨 are equivalent. For conciseness, we work with 𝟥𝖲𝖨n,t,w in the following.

Definition 19.

For n,t1 and w(0,1), Alice has XA[n], Bob has XB[n] satisfying |XAXB|nw and function gB:XB[t], and Charlie has XC=XAXB and function gC:XC[t]. 𝟥𝖲𝖨n,t,w needs to decide if gB(i)=gC(i) for all iXC, or gB(i)gC(i) for all iXC.

Lemma 20.

There exist constants t>1 and w(0,1/4) such that any one-way deterministic communication protocol for 𝟥𝖲𝖨n,t,w requires Ω(n) communication.

Let the constants t,w be determined later. Suppose for the sake of contradiction that there is a one-way deterministic communication protocol π𝟥𝖲𝖨 for 𝟥𝖲𝖨n,t,w with communication C=o(n). Let mA and mB be the messages sent by Alice and Bob, respectively. Also let ZA[mA] be the collection of XA on which Alice sends mA. Intuitively, without Alice sending a significant portion of XA, Bob cannot even find any item in XAXB. This is formalized by the following claim.

Claim 21.

For w(0,1/4), there exist mA,XB and z(0,w) such that for all subset XXB of size at most nz, XAX= for some XAZA[mA].

Proof.

Fix w. Suppose for the sake of contradiction that for all mA,XB and z(0,w), there exists subset XXB of size at most nz which satisfies XAX for any XAZA[mA]. Consider the following 𝖲𝖣n,w protocol π𝖲𝖣 (partially) simulating π𝟥𝖲𝖨.

  1. 1.

    Based on XA, Alice sends mA to Bob.

  2. 2.

    Based on mA,XB, Bob sends X to Alice.

  3. 3.

    Alice outputs “XAXB=” if and only if XAX=.

Observe that if indeed XAXB=, then XAX= regardless of X. Otherwise, since |XAXB|nw, our above assumption on π𝟥𝖲𝖨 implies XAX. Therefore, π𝟥𝖲𝖨 is a deterministic communication protocol for 𝖲𝖣n,w with communication

C+log(u=0nz(nu))C+log2(z)n=C+(z)n,

where (z)=zlogz(1z)log(1z). However, this contradicts Lemma 18 for sufficiently small z.

Let MB:(mA,XB,gB)mB be the function computed by Bob. Building upon Claim 21, we next show that Charlie cannot output correctly without Bob finding items in XAXB.

Claim 22.

For fixed mA,XB and w,z(0,1/4), there exists t>1/z and gB,gB:XB[t] such that |{igB(i)=gB(i)}|nz and MB(mA,XB,gB)=MB(mA,XB,gB).

Proof.

The proof is via probabilistic method. Consider a set of gB:XB[t] sampled uniformly at random. For each gB,gB of the set, |{igB(i)=gB(i)}||XB|znz with probability 1exp(Ω((z1/t)2|XB|))1exp(Ω((z1/t)2nw)) by Chernoff bound. By union bound, there is a set of size exp(Ω((z1/t)2nw)) such that every gB,gB of the set satisfy |{igB(i)=gB(i)}|nz. Furthermore, since C<Ω((z1/t)2nw) for sufficiently large t, there must be gB,gB of the set satisfying MB(mA,XB,gB)=MB(mA,XB,gB) as well.

Finally, we are ready to prove Lemma 20.

Proof of Lemma 20.

Arbitrarily fix w(0,1/4). Let mA,XB and z(0,w) be guaranteed by Claim 21. Also let t>1/z and gB,gB:XB[t] be guaranteed by Claim 22. Then we have that X={igB(i)=gB(i)} is a subset of XB and is of size at most nz. Claim 21 implies there exists XAZA[mA] such that XAX=. Define gC(i)=gB(i) for all iXC. Observe that gC(i)gB(i) for all iXC because XXC=XXAXB=. In other words, π𝟥𝖲𝖨 must output differently on (XA,(XB,gB),(XC,gC)) and (XA,(XB,gB),(XC,gC)). However, Alice sends mA in both cases, and Bob sends M(mA,XB,gB)=M(mA,XB,gB) in both cases by Claim 22. Consequently, Charlie cannot distinguish the two cases, contradicting the correctness of π𝟥𝖲𝖨.

6.2 𝟐-Party Relations

Note that a similar argument to Lemma 16 shows 𝗁𝗂𝗍n,w can be efficiently solved by sampling in white-box streaming, and therefore also by a short 2-party communication protocol.

Lemma 23.

For n1 and w(0,1), there is a white-box streaming algorithm for 𝗁𝗂𝗍n,w with high probability and space O((log2n)/w).

Next, we show a deterministic lower bound for the 2-party communication problem corresponding to 𝗁𝗂𝗍n,w, which is reformulated as 𝟤𝖲𝖨n,w.

Definition 24.

For n1 and w(0,1), Alice has XA[n] and Bob has XB[n]. 𝟤𝖲𝖨n,w needs to return X[n] of size at most (100logn)/w such that XAXB<nw or XXAXB.

Lemma 25.

There exists constant w(0,1/4) such that any one-way deterministic communication protocol for 𝟤𝖲𝖨n,w requires Ω(n) communication.

Proof.

Suppose for the sake of contradiction that there is a protocol π𝟤𝖲𝖨 for 𝟤𝖲𝖨n,w with o(n) communication. For any t1, a protocol π𝟥𝖲𝖨 for 𝟥𝖲𝖨n,t,w can be constructed by Alice and Bob simulating π𝟤𝖲𝖨, and Bob sending (i,gB(i)) to Charlie for all iX, which is sufficient for Charlie to decide. The communication of π𝟥𝖲𝖨 is o(n) as the size of X is at most (100logn)/w. This contradicts Lemma 20.

References

  • [1] Miklós Ajtai, Vladimir Braverman, T. S. Jayram, Sandeep Silwal, Alec Sun, David P. Woodruff, and Samson Zhou. The white-box adversarial data stream model. In International Conference on Management of Data (PODS), pages 15–27, 2022. doi:10.1145/3517804.3526228.
  • [2] Noga Alon, Yossi Matias, and Mario Szegedy. The space complexity of approximating the frequency moments. Journal of Computer and System Sciences, 58(1):137–147, 1999. doi:10.1006/jcss.1997.1545.
  • [3] Sepehr Assadi, Sanjeev Khanna, and Yang Li. On estimating maximum matching size in graph streams. In Philip N. Klein, editor, Symposium on Discrete Algorithms (SODA), pages 1723–1742, 2017. doi:10.1137/1.9781611974782.113.
  • [4] Ziv Bar-Yossef, T. S. Jayram, Ravi Kumar, and D. Sivakumar. An information statistics approach to data stream and communication complexity. Journal of Computer and System Sciences, 68(4):702–732, 2004. doi:10.1016/j.jcss.2003.11.006.
  • [5] Omri Ben-Eliezer, Rajesh Jayaram, David P. Woodruff, , and Eylon Yogev. A framework for adversarially robust streaming algorithms. Journal of the ACM, 69(2), 2022. doi:10.1145/3498334.
  • [6] Omri Ben-Eliezer and Eylon Yogev. The adversarial robustness of sampling. In Symposium on Principlesvof Database Systems (PODS), pages 49–62, 2020. doi:10.1145/3375395.3387643.
  • [7] Amit Chakrabarti and Sagar Kale. Strong fooling sets for multi-player communication with applications to deterministic estimation of stream statistics. In Symposium on Foundations of Computer Science (FOCS), pages 41–50, 2016. doi:10.1109/FOCS.2016.14.
  • [8] Sourav Chakraborty, N. V. Vinodchandran, and Kuldeep S. Meel. Distinct Elements in Streams: An Algorithm for the (Text) Book. In European Symposium on Algorithms (ESA), pages 34:1–34:6, 2022. doi:10.4230/LIPIcs.ESA.2022.34.
  • [9] Cynthia Dwork, Moni Naor, Toniann Pitassi, Guy N. Rothblum, and Sergey Yekhanin. Pan-private streaming algorithms. In Innovations in Computer Science (ICS), pages 66–80, 2010. URL: http://conference.iiis.tsinghua.edu.cn/ICS2010/content/papers/6.html.
  • [10] Funda Ergün and Hossein Jowhari. On the monotonicity of a data stream. Comb., 35(6):641–653, 2015. doi:10.1007/s00493-014-3035-1.
  • [11] Ying Feng and David P. Woodruff. Improved algorithms for white-box adversarial streams. In International Conference on Machine Learning (ICML), volume 202, pages 9962–9975, 2023. URL: https://proceedings.mlr.press/v202/feng23d.html.
  • [12] Philippe Flajolet and G. Nigel Martin. Probabilistic counting algorithms for data base applications. Journal of Computer and System Sciences, 31(2):182–209, 1985. doi:10.1016/0022-0000(85)90041-8.
  • [13] Anna Gál and Parikshit Gopalan. Lower bounds on streaming algorithms for approximating the length of the longest increasing subsequence. SIAM Journal on Computing, 39(8):3463–3479, 2010. doi:10.1137/090770801.
  • [14] Anna Gál, Gillat Kol, Raghuvansh R. Saxena, and Huacheng Yu. Optimal white-box adversarial streaming lower bounds for approximating LIS length. In Shubhangi Saraf, editor, 17th Innovations in Theoretical Computer Science Conference, ITCS 2026, Bocconi University, Milan, Italy, January 27-30, 2026, volume 362 of LIPIcs, pages 64:1–64:17. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2026. doi:10.4230/LIPIcs.ITCS.2026.64.
  • [15] Elena Gribelyuk, Honghao Lin, David P. Woodruff, Huacheng Yu, and Samson Zhou. Lifting linear sketches: Optimal bounds and adversarial robustness. In Michal Koucký and Nikhil Bansal, editors, Symposium on Theory of Computing (STOC), pages 395–406, 2025. doi:10.1145/3717823.3718227.
  • [16] Piotr Indyk. Stable distributions, pseudorandom generators, embeddings, and data stream computation. Journal of the ACM, 53(3):307–323, 2006. doi:10.1145/1147954.1147955.
  • [17] Piotr Indyk and David P. Woodruff. Optimal approximations of the frequency moments of data streams. In Harold N. Gabow and Ronald Fagin, editors, Symposium on Theory of Computing (STOC), pages 202–208, 2005. doi:10.1145/1060590.1060621.
  • [18] Michael Kapralov, Sanjeev Khanna, and Madhu Sudan. Approximating matching size from random streams. In Chandra Chekuri, editor, Symposium on Discrete Algorithms (SODA), pages 734–751, 2014. doi:10.1137/1.9781611973402.55.
  • [19] Darakhshan J. Mir, S. Muthukrishnan, Aleksandar Nikolov, and Rebecca N. Wright. Pan-private algorithms via statistics on sketches. In Symposium on Principles of Database Systems (PODS), pages 37–48, 2011. doi:10.1145/1989284.1989290.