The bit guessing game models two players, namely Alice and Bob, where Alice has a secret vector x⃗∈{0,1}n\vec x \in \{0, 1 \}^n which Bob tries to learn. Bob is only allowed to ask Alice the value of

c⃗⋅x⃗ \vec c \cdot \vec x

for bit vector c⃗∈{0,1}n\vec c \in \{0, 1\}^n he comes up with. Under this setting, it is trivial for Bob to learn each bit of xx: he needs to just query Alice for e⃗i⋅x⃗\vec e_i \cdot \vec x, where e⃗i\vec e_i is the indicator vector with its ii-th dimension equal to 1 and other dimensions equal to 0.

One way for Alice to prevent information leakage is to add some bounded noise ZZ to the query result and returns

r(c⃗)≐c⃗⋅x⃗+Z r(\vec c) \doteq \vec c \cdot \vec x + Z

For example, ZZ could be a bounded random variable. Is is still a chance for Bob to learn the vector x⃗\vec x?

Theorem 1. If Bob is allowed to query r(c⃗)r(\vec c) for all c⃗∈{0,1}n\vec c \in \{0, 1\}^n, and suppose that ZZ is bounded by some real number RR, then Bob can have an estimation y⃗\vec y such that

∣x⃗−y⃗∣=∑i=1n∣xi−yi∣≤4R |\vec x - \vec y| = \sum_{i = 1}^n | x_i - y_i | \le 4R

Remark: In this case Bob queries for 2n2^n vectors. This result implies that is Bob is able to ask exponential number of questions, then it is hard to prevent information leakage. E.g., suppose R=n/400R = n / 400, which is a relatively large number when nn is large, the theorem says that Bob can recover 99%99\% of bits in x⃗\vec x.

Proof: We say a vector y⃗\vec y is consistent with a query result r(c⃗)r(\vec c) if

∣r(c⃗)−c⃗⋅y⃗∣≤R. | r(\vec c) - \vec c \cdot \vec y| \le R.

The strategy of Bob is to choose any y⃗\vec y that is consistent with all c⃗∈{0,1}n\vec c \in \{0, 1\}^n. Such y⃗\vec y exits, a special of which is given by y⃗=x⃗\vec y = \vec x. It remains to prove that such an y⃗\vec y satisfies the constraint.

Consider the special case of c⃗=x⃗\vec c = \vec x,

∣r(x⃗)−x⃗⋅y⃗∣≤R∣r(x⃗)−x⃗⋅x⃗∣≤R |r(\vec x) - \vec x \cdot \vec y| \le R \\ |r(\vec x) - \vec x \cdot \vec x| \le R \\

By triangle inequality, it holds

∣x⃗⋅y⃗−x⃗⋅x⃗∣≤2R. |\vec x \cdot \vec y - \vec x \cdot \vec x| \le 2R.

Observe that x⃗⋅x⃗≥x⃗⋅y⃗\vec x \cdot \vec x \ge \vec x \cdot \vec y, which implies

∣x⃗⋅y⃗−x⃗⋅x⃗∣=x⃗⋅x⃗−x⃗⋅y⃗≤2R |\vec x \cdot \vec y - \vec x \cdot \vec x| = \vec x \cdot \vec x - \vec x \cdot \vec y \le 2R

Hence, y⃗\vec y and x⃗\vec x differ by at most 2R2R bits, on the non-zero dimensions of x⃗\vec x.

Let xˉ\bar x be the bit-wise complement of x⃗\vec x. By similar arguments, we get

∣xˉ⋅y⃗−xˉ⋅x⃗∣≤2R. |\bar x \cdot \vec y - \bar x \cdot \vec x|\le 2R.

and x⃗\vec x and y⃗\vec y differ by at most 2R2R bits, on the zero dimensions of x⃗\vec x. It concludes that ∣x⃗−y⃗∣≤4R|\vec x - \vec y | \le 4R.

■\blacksquare

What if Bob asks O(n)O(n) questions? The following theorem states that if ZZ is bounded by O(n)O(\sqrt n), then Bob is able to have a good estimation of x⃗\vec x.

Theorem 2. If Bob is able to ask nlog⁡2+ln⁡nlog⁡32−log⁡λ\frac{n \log 2 + \ln n}{\log \frac{3}{2} - \log \lambda } queries, and ZZ is bounded by αn\alpha \sqrt n, then Bob can obtains an estimation y⃗\vec y, such that

∣x⃗−y⃗∣≤(3eαλ)2⋅n |\vec x - \vec y| \le (3e \frac{\alpha}{\lambda } )^2 \cdot n

Proof: As before, a vector y⃗\vec y is said to be consistent with a query result r(c⃗)r(\vec c) if

∣r(c⃗)−c⃗⋅y⃗∣≤αn. | r(\vec c) - \vec c \cdot \vec y| \le \alpha \sqrt n.

It suffices to find a sequence of vectors c⃗1,c⃗2,...,c⃗k\vec c_1, \vec c_2, ..., \vec c_k (kk is a value to be determined), such that

  1. k=O(n)k = O(n),
  2. For any y⃗\vec y with ∣x⃗−y⃗∣>(3eαλ)2⋅n|\vec x - \vec y| > (3e \frac{\alpha}{\lambda } )^2 \cdot n, there exists at least one c⃗i\vec c_i, such that y⃗\vec y is not consistent with r(c⃗i)r(\vec c_i), with high probability.

If Bob can find a sequence of query vectors with the specified properties, he can rule out any y⃗\vec y such that ∣x⃗−y⃗∣>(3eαλ)2⋅n|\vec x - \vec y| > (3e \frac{\alpha}{\lambda } )^2 \cdot n. Note that not every vector in {0,1}n\{0, 1\}^n will be ruled out. At least x⃗\vec x will remain. Bob can output any y⃗\vec y that is not ruled out as his guess of x⃗\vec x.

It turns out that fining c⃗i\vec c_i's is simple: each c⃗i\vec c_i is sampled independently and uniformly at random from {0,1}n\{0, 1\}^n. It remains to prove that any y⃗\vec y with ∣x⃗−y⃗∣>(3eαλ)2⋅n|\vec x - \vec y| > (3e \frac{\alpha}{\lambda } )^2 \cdot n will be ruled out with high probability.

For a fix ii, consider the probability of

Pr⁡[∣r(c⃗i)−c⃗i⋅y⃗∣>αn]=Pr⁡[∣c⃗i⋅(x⃗−y⃗)∣>αn]. \Pr[ | r(\vec c_i) - \vec c_i \cdot \vec y| > \alpha \sqrt n ] = \Pr[ |\vec c_i \cdot (\vec x - \vec y) | > \alpha \sqrt n ].

Lower bounding this probability is equivalent to upper bounding the probability

Pr⁡[∣c⃗i⋅(x⃗−y⃗)∣≤αn]. \Pr[ |\vec c_i \cdot (\vec x - \vec y) | \le \alpha \sqrt n ].

Lemma. For a value l∈Nl \in \mathbb{N},

Pr⁡[∣c⃗i⋅(x⃗−y⃗)∣=l]≤e∣x⃗−y⃗∣ \Pr[ |\vec c_i \cdot (\vec x - \vec y) | = l ] \le \frac{e }{\sqrt {|\vec x - \vec y| } }

We leave the proof of the lemma at the end of our discussion. It following by union bound that

Pr⁡[∣c⃗i⋅(x⃗−y⃗)∣≤αn]=∑l=−αnαnPr⁡[∣c⃗i⋅(x⃗−y⃗)∣=l]≤2e⋅αn∣x⃗−y⃗∣ \begin{aligned} \Pr[ |\vec c_i \cdot (\vec x - \vec y) | \le \alpha \sqrt n ] &= \sum_{l = -\alpha \sqrt n}^{\alpha \sqrt n} \Pr[ |\vec c_i \cdot (\vec x - \vec y) | = l ] \\ &\le \frac{2 e \cdot \alpha \sqrt n}{\sqrt {|\vec x - \vec y| } } \end{aligned}

Conditioning on that ∣x⃗−y⃗∣>(3eαλ)2⋅n|\vec x - \vec y| > (3e \frac{\alpha}{\lambda } )^2 \cdot n, this probability is at most

Pr⁡[∣c⃗i⋅(x⃗−y⃗)∣≤αn]≤23λ \begin{aligned} \Pr[ |\vec c_i \cdot (\vec x - \vec y) | \le \alpha \sqrt n ] &\le \frac{2}{3} \lambda \end{aligned}

The probability that this holds simultaneously for all c⃗i\vec c_i is therefore (2λ3)k(\frac{2\lambda }{3})^k. Applying union bound over all y⃗\vec y such that ∣x⃗−y⃗∣>(3eα)2⋅n|\vec x - \vec y| > (3e\alpha)^2 \cdot n, we have an upper bound of failure probability

(2λ3)k2n=exp⁡(klog⁡2λ3+nlog⁡2) (\frac{2 \lambda }{3})^k 2^n = \exp( k \log \frac{2 \lambda }{3} + n \log 2)

If we take k=nlog⁡2+ln⁡nlog⁡32−log⁡λk = \frac{n \log 2 + \ln n}{\log \frac{3}{2} - \log \lambda }, this probability becomes 1n\frac{1}{n}.

Proof of the lemma: Without lose of generality, suppose that l≥0l \ge 0. Observe that x⃗−y⃗\vec x - \vec y is a vector in {−1,0,1}n\{-1, 0, 1 \}^n. Denote v=∣x⃗−y⃗∣v = |\vec x - \vec y| be the number of non-zero dimensions in x⃗−y⃗\vec x - \vec y. Further, let v+v_+ (v−v_-) be the number of positive (negative) dimensions in x⃗−y⃗\vec x - \vec y. Hence, v=v++v−v = v_+ + v_-. As c⃗i\vec c_i is sampled uniformly from {0,1}n\{0, 1\}^n, we have

Pr⁡[∣c⃗i⋅(x⃗−y⃗)∣=l]=12v∑j=0min⁡{v+−l,v−}(v+l+j)(v−j)=12v∑j=0min⁡{v+−l,v−}(v+l+j)(v−v−−j)≤12v(v++v−l+v−)≤12v(v⌊v/2⌋) \begin{aligned} \Pr[ |\vec c_i \cdot (\vec x - \vec y) | = l ] &= \frac{1}{2^{v} } \sum_{j = 0}^{ \min \{ v_+ - l, v_- \} } \binom{v_+}{l + j} \binom{v_-}{j} \\ &= \frac{1}{2^{v} } \sum_{j = 0}^{ \min \{ v_+ - l, v_- \} } \binom{v_+}{l + j} \binom{v_-}{v_- - j} \\ &\le \frac{1}{2^{v} } \binom{v_+ + v_- }{l + v_-} \\ &\le \frac{1}{2^{v} } \binom{v }{ \lfloor v / 2 \rfloor } \\ \end{aligned}

By Stirling's approximation,

v!≤ev(ve)v⌊v/2⌋!≥2πv(⌊v/2⌋e)⌊v/2⌋⌈v/2⌉!≥2πv(⌈v/2⌉e)⌈v/2⌉ v! \le e \sqrt v (\frac{v}{e} )^v \\ \lfloor v / 2 \rfloor! \ge \sqrt{2 \pi v} (\frac{ \lfloor v / 2 \rfloor }{e} )^{\lfloor v / 2 \rfloor } \\ \lceil v / 2 \rceil ! \ge \sqrt{2 \pi v} ( \frac{ \lceil v / 2 \rceil }{ e } )^{\lceil v / 2 \rceil } \\

Assuming that ⌊v/2⌋≥1\lfloor v / 2\rfloor \ge 1, we get

Pr⁡[∣c⃗i⋅(x⃗−y⃗)∣=l]≤12v(v⌊v/2⌋)≤12ve2πvv+0.5(v/2)v+1(v/2⌊v/2⌋)⌊v/2⌋+0.5(v/2⌈v/2⌉)⌈v/2⌉+0.5≤1v(v/2⌊v/2⌋)⌊v/2⌋+0.5≤1vexp⁡(12⌊v/2⌋(⌊v/2⌋+0.5))≤ev \begin{aligned} \Pr[ |\vec c_i \cdot (\vec x - \vec y) | = l ] &\le \frac{1}{2^{v} } \binom{v }{ \lfloor v / 2 \rfloor } \\ &\le \frac{1}{2^{v} } \frac{e}{2 \pi} \frac{v^{ v + 0.5 } }{ (v / 2)^{ v + 1 } } (\frac{ v / 2 }{ \lfloor v / 2 \rfloor })^{ \lfloor v / 2 \rfloor + 0.5 } (\frac{ v / 2 }{ \lceil v / 2 \rceil })^{ \lceil v / 2 \rceil + 0.5 } \\ &\le \frac{ 1 }{ \sqrt v } ( \frac{ v / 2 }{ \lfloor v / 2 \rfloor })^{ \lfloor v / 2 \rfloor + 0.5 } \\ &\le \frac{ 1 }{ \sqrt v } \exp( \frac{ 1 }{ 2 \lfloor v / 2 \rfloor } ( \lfloor v / 2 \rfloor + 0.5 ) ) \\ &\le \frac{ e }{ \sqrt v } \\ \end{aligned}

□\square

The idea behind Theorem 2 is more obvious if we study the scenario where x⃗∈{−1,1}n\vec x \in \{-1, 1\}^n. For any estimation y⃗∈{−1,1}n\vec y \in \{-1, 1\}^n, if c⃗\vec c is sampled uniformly at random from {−1,1}n\{-1, 1\}^n, then

E[c⃗(x⃗−y⃗)]=0 \mathbb{E}[ \vec c (\vec x - \vec y)] = 0

If ∣x⃗−y⃗∣=O(α2n)|\vec x - \vec y| = O(\alpha^2 n), by anti-concentration property, the probability

Pr⁡[∣c⃗(x⃗−y⃗)∣≥αn] \Pr[ |\vec c (\vec x - \vec y) | \ge \alpha \sqrt n]

equals to some constant. Equivalently, Pr⁡[∣c⃗(x⃗−y⃗)∣<αn]\Pr[ |\vec c (\vec x - \vec y) | < \alpha \sqrt n] is some constant. By sampling c⃗\vec c repeatedly, the probability that ∣c⃗(x⃗−y⃗)∣<αn|\vec c (\vec x - \vec y) | < \alpha \sqrt n holds for all sampled c⃗\vec c decreases exponentially. That is why we can rule out any y⃗\vec y such that ∣x⃗−y⃗∣=O(α2n)|\vec x - \vec y| = O(\alpha^2 n) with high probability.

Reference

[1] C. Dwork and A. Roth, “The Algorithmic Foundations of Differential Privacy,” Foundations and Trends in Theoretical Computer Science, vol. 9, no. 3–4, pp. 211–407, 2013