Noise stability and noise sensitivity #
Flipping each bit of a string x independently with probability (1 - ρ) / 2 gives a random
string y that is ρ-correlated with x. The noise operator T_ρ (BitString.noiseOp)
averages a real function over this noise, T_ρ f x = 𝔼_y f y. It damps the Fourier coefficient of
S by ρ ^ |S| (BitString.fourierCoeff_noiseOp), so it has Fourier expansion
∑_S ρ ^ |S| f̂(S) χ_S (BitString.noiseOp_eq_sum), the noise operators form a semigroup,
T_ρ T_σ = T_{ρ σ} (BitString.noiseOp_noiseOp), and each is self-adjoint
(BitString.expect_mul_noiseOp_comm).
The noise stability Stab_ρ[f] = 𝔼_x f x T_ρ f x (BitString.noiseStability) is the
correlation of f at two ρ-correlated strings. It is ∑_S ρ ^ |S| f̂(S) ^ 2
(BitString.noiseStability_eq_sum), so on 0 ≤ ρ ≤ 1 it increases with ρ from the squared
mean (𝔼 f) ^ 2 to the second moment 𝔼 f ^ 2.
The noise sensitivity NS_δ[f] of a Boolean function (BitString.noiseSensitivity) is the
probability that f x ≠ f y when y flips each bit of a uniform x independently with
probability δ. Reading f as the function F = (-1) ^ f with values ±1, it is
NS_δ[f] = 1 / 2 - 1 / 2 Stab_{1 - 2 δ}[F] (BitString.noiseSensitivity_eq_noiseStability),
hence NS_δ[f] = ∑_S (1 - (1 - 2 δ) ^ |S|) / 2 F̂(S) ^ 2 (BitString.noiseSensitivity_eq_sum)
O'Donnell, Section 2.4, and NS_δ[f] ≤ δ I[F], at most δ times the total
influence (BitString.noiseSensitivity_le_mul_totalInfluence)
O'Donnell, Exercise 2.42. A function close to a constant b is also stable
under noise: f x ≠ f y forces x or y, each uniform, to lie where f ≠ b, so NS_δ[f] is
at most twice the relative Hamming distance from f to b
(BitString.noiseSensitivity_le_two_mul_hammingDist_div), and at most twice the distance to
the nearer constant (BitString.noiseSensitivity_le_two_mul_min)
O'Donnell, Exercise 2.39.
The noised string is x + P, the coordinatewise exclusive or of x with a random mask P of
BitString.bernoulliAverage, bit strings adding in Mathlib's Boolean ring structure on
Bool. The coordinates of the mask are independent:
the average of a product of functions of the separate coordinates factorizes
(BitString.bernoulliAverage_prod), so the character of S averages to (1 - 2 p) ^ |S|
over a mask of rate p (BitString.bernoulliAverage_chi). In particular, for 0 ≤ δ ≤ 1
the parity of k independent bits that are 1 with probability 1 - δ is 1 with
probability 1/2 - (2δ - 1)^k / 2 (BitString.bernoulliAverage_parityOn, Arora–Barak,
Exercise 17.1, corrected). For other real δ the same formula holds as an identity of
signed-weight averages.
Main definitions #
Cslib.BitString.noiseOp,Cslib.BitString.noiseOpₗ: the noise operatorT_ρ, and the same as a linear map.Cslib.BitString.noiseStability: the noise stability of a real function.Cslib.BitString.noiseSensitivity: the noise sensitivity of a Boolean function.
Main results #
Cslib.BitString.bernoulliAverage_parityOn,Cslib.BitString.parityOn_bernoulliAverage_le: the parity of biased independent bits Arora–Barak, Exercise 17.1.Cslib.BitString.noiseOp_eq_sum,Cslib.BitString.fourierCoeff_noiseOp: the Fourier expansion ofT_ρ fO'Donnell, Proposition 2.47.Cslib.BitString.noiseOp_noiseOp: the noise operators form a semigroup.Cslib.BitString.noiseOp_nonneg,Cslib.BitString.noiseOp_pos,Cslib.BitString.noiseOp_pos_of_nonneg: the noise operator preserves nonnegativity and positivity, and for|ρ| < 1makes nonzero nonnegative functions positive.Cslib.BitString.noiseOp_comp_arrowCongr,Cslib.BitString.noiseOp_of_isEmpty: the noise operator commutes with renaming the coordinates and is the identity on the cube over no coordinates.Cslib.BitString.expect_mul_noiseOp_comm: the noise operator is self-adjoint.Cslib.BitString.noiseStability_eq_sum: the Fourier formula for the noise stability O'Donnell, Theorem 2.49, andCslib.BitString.noiseStability_derivative_eq_sumfor the noise stability of a derivative.Cslib.BitString.sq_expect_le_noiseStability,Cslib.BitString.noiseStability_le_expect_sq,Cslib.BitString.noiseStability_mono: the noise stability lies between the squared mean and the second moment, increasingly inρ.Cslib.BitString.sq_fourierCoeff_noiseOp_le,Cslib.BitString.expect_sub_expect_sq_noiseOp_le: for|ρ| ≤ 1,(T_ρ f)^(S) ^ 2 ≤ f̂(S) ^ 2andVar[T_ρ f] ≤ Var[f].Cslib.BitString.noiseSensitivity_eq_noiseStability,Cslib.BitString.noiseSensitivity_eq_sum: the noise sensitivity through the noise stability and its Fourier formula O'Donnell, Definition 2.43 and Theorem 2.49.Cslib.BitString.noiseSensitivity_le_mul_totalInfluence: the noise sensitivity atδis at mostδtimes the total influence.Cslib.BitString.noiseSensitivity_le_two_mul_hammingDist_div,Cslib.BitString.noiseSensitivity_le_two_mul_min: the noise sensitivity is at most twice the relative Hamming distance to either constant, and to the nearer one O'Donnell, Exercise 2.39.
Usage #
For hδ : δ ≤ 1 and f : (ι → Bool) → Bool, noiseSensitivity_le_two_mul_hammingDist_div hδ f b
bounds noiseSensitivity δ f by twice the relative Hamming distance
hammingDist f (fun _ => b) / 2 ^ Fintype.card ι from f to the constant b, and
noiseSensitivity_le_two_mul_min hδ f by twice the distance to the nearer constant. That distance
is the book's α = min(Pr[F = 1], Pr[F = -1]) for F = (-1) ^ f; both constants enter the
minimum, so the convention that false reads as 1 does not matter. The book also asks for
0 ≤ δ, which is not needed: below 0, where noiseSensitivity δ f is no longer a probability,
the bound of Exercise 2.42 is nonpositive. The same distance is the ε of Proposition 1.15 in
CslibFrontier.Foundations.BooleanAnalysis.Variance, so
(noiseSensitivity_le_two_mul_min hδ f).trans (two_mul_min_le_expect_sub_expect_sq_signVal f)
bounds the noise sensitivity by the variance of F. The checked clients in
CslibFrontierTests/BooleanAnalysisNearlyConstant.lean
apply both bounds to the conjunction of two bits, show that the bound is attained there at
δ = 1, and chain the bound with Proposition 1.15.
References #
The character of S averages to (1 - 2 p) ^ |S| over a random mask of rate p: each of its
coordinates is selected, negating the sign, with probability p.
Arora–Barak, Exercise 17.1, corrected (web draft 2007-01-08, p. 348/364). If the bits
X_i are independent with Pr[X_i = 1] = 1 - δ, the parity X of the bits in S has
Pr[X = 1] = 1/2 - (2δ - 1)^|S| / 2. The statement is an identity of bernoulliAverage, a
finite signed-weight average, for every real δ; it is a probability when 0 ≤ δ ≤ 1. The draft
prints 1/2 + (1 - 2δ)^k, which is false (at
k = 1 it gives 3/2 - 2δ for Pr[X_1 = 1] = 1 - δ). The bound the text uses (p. 322/338) is
parityOn_bernoulliAverage_le.
For 0 ≤ δ ≤ 1, the parity of |S| independent bits that are 1 with probability 1 - δ
is 1 with probability at most 1/2 + (1 - 2δ)^|S| / 2. The inequality between the
signed-weight averages holds for every real δ. For 0 ≤ δ ≤ 1/2 this gives the bound
1/2 + (1 - 2δ)^k that Arora–Barak cite Exercise 17.1 for (web draft 2007-01-08, p. 322/338).
The noise operator #
The noise operator T_ρ: the average of f at a string ρ-correlated with x, which
flips each bit of x independently with probability (1 - ρ) / 2. It is an average over a
probability distribution when -1 ≤ ρ ≤ 1.
The Fourier expansion of T_ρ f: the noise operator damps the coefficient of S by
ρ ^ |S| O'Donnell, Proposition 2.47.
The noise operator damps the Fourier coefficient of S by ρ ^ |S|
O'Donnell, Proposition 2.47.
At ρ = 1 no bit is flipped, so the noise operator is the identity.
At ρ = 0 the noised string is uniform, so the noise operator returns the mean.
The noise operator fixes the constants.
For -1 < ρ < 1, the noise operator maps a nonnegative function that is positive somewhere
to a positive function: every point is reached with positive probability.
The noise operator commutes with renaming the coordinates.
The correlation of f with T_ρ g is the sum of the products of the Fourier coefficients
damped by ρ ^ |S|.
The noise operator is self-adjoint: 𝔼 f T_ρ g = 𝔼 (T_ρ f) g.
Noise stability #
The noise stability Stab_ρ[f] of f at ρ: the correlation 𝔼 f x f y of f at a
uniform string x and a string y that is ρ-correlated with x.
The Fourier formula for the noise stability: Stab_ρ[f] = ∑_S ρ ^ |S| f̂(S) ^ 2
O'Donnell, Theorem 2.49.
The Fourier formula for the noise stability of a derivative:
Stab_ρ[Dᵢ f] = ∑_{S ∋ i} ρ ^ (|S| - 1) f̂(S) ^ 2.
The noise stability of a derivative: ρ Stab_ρ[Dᵢ f] weighs the squared coefficient of
f on each set containing i by ρ to the size of the set.
At ρ = 1 the noise stability is the second moment.
At ρ = 0 the noise stability is the squared mean.
On 0 ≤ ρ, the noise stability increases with ρ.
On 0 ≤ ρ, the noise stability is at least the squared mean.
On 0 ≤ ρ, the noise stability is nonnegative.
On |ρ| ≤ 1, the noise stability is at most the second moment.
On |ρ| ≤ 1, the noise operator does not increase the variance: Var[T_ρ f] ≤ Var[f].
Noise sensitivity #
The noise sensitivity NS_δ[f] of a Boolean function f at δ: the probability that
f x ≠ f y for a uniform string x and the string y that flips each bit of x independently
with probability δ.
The noise sensitivity through the noise stability:
NS_δ[f] = 1 / 2 - 1 / 2 Stab_{1 - 2 δ}[F], for F the function f with values ±1.
The Fourier formula for the noise sensitivity:
NS_δ[f] = ∑_S (1 - (1 - 2 δ) ^ |S|) / 2 F̂(S) ^ 2, for F the function f with values ±1
O'Donnell, Theorem 2.49.
With no noise, f never changes.
On 0 ≤ δ ≤ 1, the noise sensitivity is a probability.
On δ ≤ 1 / 2, the noise sensitivity increases with δ.
The noise sensitivity is at most δ times the total influence: NS_δ[f] ≤ δ I[F] for
δ ≤ 1, for F the function f with values ±1 O'Donnell, Exercise 2.42.
The noise sensitivity is at most twice the distance to either constant: for δ ≤ 1,
NS_δ[f] ≤ 2 Pr[f ≠ b], since f x ≠ f y forces x or y, each uniform, to lie where f ≠ b.
Nearly constant functions are stable under noise O'Donnell, Exercise 2.39:
for δ ≤ 1, NS_δ[f] ≤ 2 α for α = min (Pr[F = 1], Pr[F = -1]) with F = (-1) ^ f, the
relative Hamming distance from f to the nearer constant.