TCSLib

118 Boolean Analysis — Decision Tree Fourier

118.1 Overview

This module develops the Fourier spectrum of a function computed by a decision tree (O’Donnell Proposition 3.16). A recursive coefficient function computes the Fourier expansion of the \(\pm 1\)-encoded tree function by structural induction, using the branch identity \(f = (f_{\mathrm{lo}} + f_{\mathrm{hi}})/2 + \chi _i (f_{\mathrm{lo}} - f_{\mathrm{hi}})/2\) together with \(\chi _i \chi _S = \chi _{S \triangle \{ i\} }\). From this recursion the module reads off the degree bound, the spectral \(1\)-norm bound, granularity of the coefficients, and sparsity of the Fourier support, and restates the degree bound in terms of the minimum decision-tree depth \(\mathrm{dtDepth}\) as needed downstream in the LMN pipeline.

118.2 Declarations

Definition 118.1 Size of a decision tree
✓
#

The size of a decision tree, defined as its number of leaves: a leaf has size \(1\), and a branch has size equal to the sum of the sizes of its two subtrees.

Definition 118.2 Sign-encoded tree function
✓

The \(\pm 1\)-valued function computed by a decision tree \(T\), namely \(x \mapsto \mathrm{boolToSign}(T.\mathrm{eval}\, x)\), where \(\mathrm{false} \mapsto 1\) and \(\mathrm{true} \mapsto -1\).

Definition 118.3 Recursive Fourier coefficients of a tree
✓
#

The coefficient function \(\mathrm{coeffs}\, T : \mathcal{P}(\mathrm{Fin}\, n) \to \mathbb {R}\) defined by structural recursion on \(T\). A leaf labelled \(b\) assigns \(\mathrm{boolToSign}(b)\) to the empty frequency and \(0\) to all others; a branch on variable \(i\) with subtrees \(\mathrm{lo}, \mathrm{hi}\) assigns to \(S\) the value

\[ \frac{\mathrm{coeffs}\, \mathrm{lo}\, S + \mathrm{coeffs}\, \mathrm{hi}\, S}{2} + \frac{\mathrm{coeffs}\, \mathrm{lo}\, (S \triangle \{ i\} ) - \mathrm{coeffs}\, \mathrm{hi}\, (S \triangle \{ i\} )}{2}. \]
Lemma 118.4 Symmetric difference with a singleton is an involution
✓
#

Fix \(n \in \mathbb {N}\) and an index \(i \in \{ 0, 1, \dots , n-1\} \). The map on subsets of \(\{ 0, 1, \dots , n-1\} \) that sends each set \(S\) to its symmetric difference \(S \triangle \{ i\} \) with the singleton \(\{ i\} \) is an involution: applying it twice returns every set to itself, so \(\bigl(S \triangle \{ i\} \bigr) \triangle \{ i\} = S\) for all \(S\).

Lemma 118.5 Invariance of a subset-sum under symmetric difference with a point
✓
#

Fix \(n \in \mathbb {N}\), let \(i\) be an element of \(\{ 0, 1, \dots , n-1\} \), and let \(g\) assign a real number to each subset of \(\{ 0, 1, \dots , n-1\} \). Then summing \(g\) over all subsets is unaffected by first toggling the membership of \(i\); that is,

\[ \sum _{S} g\big(S \mathbin {\triangle } \{ i\} \big) = \sum _{S} g(S), \]

where both sums range over all subsets \(S \subseteq \{ 0, 1, \dots , n-1\} \) and \(S \mathbin {\triangle } \{ i\} \) denotes the symmetric difference of \(S\) with the singleton \(\{ i\} \).

Lemma 118.6 Symmetric difference by a singleton toggles a Walsh character
✓

Let \(S\subseteq [n]\), let \(i\in [n]\), and let \(x\in \{ 0,1\} ^n\). Then the Walsh–Fourier character indexed by the symmetric difference \(S\mathbin {\triangle }\{ i\} \) satisfies

\[ \chi _{S\, \triangle \, \{ i\} }(x) \; =\; \chi _S(x)\, \sigma (x_i), \]

where \(\sigma \) is the sign encoding \(\sigma (x_i)=(-1)^{x_i}\).

Lemma 118.7 Cardinality under singleton symmetric difference
✓
#

Let \(S\) be a finite subset of \(\{ 0,1,\dots ,n-1\} \) and let \(i\) be one of these indices. Then the symmetric difference \(S \triangle \{ i\} \) satisfies

\[ \left\lvert S\right\rvert - 1 \le \left\lvert S \triangle \{ i\} \right\rvert , \]

where \(\left\lvert S\right\rvert - 1\) denotes truncated subtraction on the natural numbers (so it is \(0\) when \(S\) is empty).

Let \(T\) be a decision tree on \(n\) Boolean variables, computing the \(\pm 1\)-valued sign-encoded function \(x \mapsto \sigma (T(x))\), where \(\sigma \) is the sign encoding sending \(\mathrm{false}\) to \(1\) and \(\mathrm{true}\) to \(-1\). For every point \(x \in \{ 0,1\} ^n\),

\[ \sigma (T(x)) \; =\; \sum _{S \subseteq [n]} c_T(S)\, \chi _S(x), \]

where the sum ranges over all subsets \(S\) of \([n]\), \(c_T(S)\) denotes the recursively defined coefficient of \(T\) at the frequency \(S\), and \(\chi _S\) is the Walsh character of \(S\).

Lemma 118.9 Fourier coefficients vanish above the tree depth
✓

Let \(T\) be a decision tree on \(n\) Boolean variables, and let \(S \subseteq \{ 0,1,\dots ,n-1\} \) be a set of variables whose cardinality \(\left\lvert S\right\rvert \) exceeds the depth of \(T\). Then the coefficient assigned to the frequency \(S\) vanishes, \(\mathrm{coeffs}\, T\, S = 0\).

Lemma 118.10 Coefficient one-norm bounded by tree size
✓

Let \(T\) be a decision tree on \(n\) Boolean variables, and for each subset \(S \subseteq \{ 0,\dots ,n-1\} \) let \(\mathrm{coeffs}\, T\, (S)\) denote its recursively defined Fourier coefficient at frequency \(S\). Then the total absolute mass of these coefficients is bounded by the number of leaves of \(T\):

\[ \sum _{S} \left\lvert \mathrm{coeffs}\, T\, (S)\right\rvert \; \le \; \mathrm{size}(T). \]
Lemma 118.11 Dyadic granularity of decision-tree Fourier coefficients
✓

Let \(T\) be a decision tree on \(n\) Boolean variables, and write \(\mathrm{coeffs}(T) : \mathcal{P}(\{ 0,\dots ,n-1\} ) \to \mathbb {R}\) for its recursively defined coefficient function. If \(k\) is a natural number with \(\mathrm{depth}(T) \le k\), then for every set \(S\) of variables the scaled coefficient \(\mathrm{coeffs}(T)(S)\cdot 2^{k}\) is an integer; that is, there exists \(m \in \mathbb {Z}\) with \(\mathrm{coeffs}(T)(S)\cdot 2^{k} = m\).

Lemma 118.12 Dyadic granularity of a decision tree’s coefficients
✓

Let \(T\) be a decision tree on \(n\) Boolean variables, and let \(S \subseteq \{ 0,\dots ,n-1\} \) be a frequency set. Then the coefficient \(\mathrm{coeffs}\, T\, S\) is a dyadic rational with denominator \(2^{\mathrm{depth}(T)}\): there exists an integer \(m \in \mathbb {Z}\) such that

\[ \mathrm{coeffs}\, T\, S = \frac{m}{2^{\mathrm{depth}(T)}}. \]

Equivalently, every such coefficient is an integer multiple of \(2^{-\mathrm{depth}(T)}\).

Lemma 118.13 Size bounded by two to the depth
✓

Let \(T\) be a decision tree on \(n\) Boolean variables, with size (number of leaves) \(\mathrm{size}(T)\) and depth \(\mathrm{depth}(T)\). Then \(\mathrm{size}(T) \le 2^{\mathrm{depth}(T)}\); that is, a decision tree of depth \(k\) has at most \(2^{k}\) leaves.

Lemma 118.14 Recovery of coefficients from a character expansion
✓

Fix \(n\), let \(c\) assign a real number \(c(S)\) to each subset \(S \subseteq [n]\), and consider the Boolean function \(f(x) = \sum _{S \subseteq [n]} c(S)\, \chi _S(x)\), where \(\chi _S\) is the Walsh–Fourier character of \(S\). Then for every \(T \subseteq [n]\) the Fourier–Walsh coefficient of \(f\) at frequency \(T\) recovers the corresponding coefficient, namely \(\hat f(T) = c(T)\).

Theorem 118.15 Fourier coefficients of a decision tree
✓

Let \(T\) be a decision tree on \(n\) Boolean variables, and let \(\sigma \! \circ \! T\) denote its sign-encoded function \(x \mapsto \sigma (T(x))\) on the Boolean hypercube \(\{ 0,1\} ^n\). Then for every frequency set \(S \subseteq [n]\), the Fourier–Walsh coefficient of this function at \(S\) agrees with the recursively defined tree coefficient:

\[ \widehat{\sigma \! \circ \! T}(S) \; =\; \mathrm{coeffs}(T)(S). \]
Theorem 118.16 Fourier degree of a decision tree is at most its depth
✓

Let \(T\) be a decision tree on \(n\) Boolean variables, and let \(f\colon \{ 0,1\} ^n\to \mathbb {R}\) be the \(\pm 1\)-valued function it computes, so that \(f(x)=\sigma (T(x))\) where \(\sigma \) sends \(\mathrm{false}\) to \(1\) and \(\mathrm{true}\) to \(-1\). Then \(f\) has Fourier degree at most the depth of \(T\): for every \(S\subseteq \{ 1,\dots ,n\} \) with \(\hat f(S)\ne 0\), one has \(\left\lvert S\right\rvert \le \operatorname {depth}(T)\).

Theorem 118.17 Spectral one-norm bounded by decision tree size
✓

Let \(T\) be a decision tree on \(n\) Boolean variables, and let \(g : \{ 0,1\} ^n \to \{ -1,1\} \) be the sign-encoded function it computes, sending an input \(x\) to \(\sigma (T(x))\) (with \(\mathrm{false}\mapsto 1\) and \(\mathrm{true}\mapsto -1\)). Then the sum of the absolute values of its Fourier–Walsh coefficients is bounded by the size of \(T\), i.e. its number of leaves:

\[ \sum _{S \subseteq [n]} \bigl|\hat g(S)\bigr| \; \le \; \mathrm{size}(T), \]

where the sum ranges over all subsets \(S\) of \(\{ 1,\dots ,n\} \).

Theorem 118.18 Granularity of decision-tree Fourier coefficients
✓

Let \(T\) be a decision tree on \(n\) Boolean variables, let \(f\colon \{ 0,1\} ^n\to \{ -1,1\} \) be the \(\pm 1\)-valued function it computes under the sign encoding \(\mathrm{false}\mapsto 1\), \(\mathrm{true}\mapsto -1\), and let \(d\) be the depth of \(T\). Then for every set of coordinates \(S\subseteq [n]\) there is an integer \(m\) such that the Fourier–Walsh coefficient of \(f\) at frequency \(S\) satisfies

\[ \hat f(S) \; =\; \frac{m}{2^{d}}. \]

That is, every Fourier coefficient of \(f\) is an integer multiple of \(2^{-d}\).

Theorem 118.19 Fourier sparsity bound for decision trees
✓

Let \(T\) be a decision tree on \(n\) Boolean variables, and let \(g \colon \{ 0,1\} ^n \to \{ -1,1\} \) be the sign-encoded function it computes. Then the number of frequencies \(S \subseteq [n]\) at which the Fourier–Walsh coefficient of \(g\) is nonzero satisfies

\[ \left\lvert \{ \, S \subseteq [n] : \hat g(S) \neq 0 \, \} \right\rvert \; \le \; \mathrm{size}(T)\cdot 2^{\, \mathrm{depth}(T)}, \]

where \(\mathrm{size}(T)\) is the number of leaves of \(T\) and \(\mathrm{depth}(T)\) is its maximum root-to-leaf path length.

Theorem 118.20 Fourier sparsity bound for decision trees
✓

Let \(T\) be a decision tree on \(n\) Boolean variables, and let \(f\colon \{ 0,1\} ^n\to \{ -1,1\} \) be its sign-encoded tree function. Then the number of subsets \(S\subseteq [n]\) whose Fourier–Walsh coefficient \(\hat f(S)\) is nonzero is at most \(4^{\, \mathrm{depth}(T)}\).

Lemma 118.21 Attainment of the decision-tree depth
✓

For every Boolean function \(f : (\mathrm{Fin}\, n \to \mathrm{Bool}) \to \mathrm{Bool}\), there is a decision tree \(T\) on the \(n\) Boolean variables whose depth is at most the decision-tree depth of \(f\) and which computes \(f\), meaning \(T\) evaluates to \(f(x)\) on every input \(x\).

Theorem 118.22 Degree bounded by decision-tree depth
✓

Let \(f : \{ 0,1\} ^n \to \{ 0,1\} \) be a Boolean-valued function, and let \(D(f)\) denote its decision-tree depth, the least \(d\) for which some decision tree of depth at most \(d\) computes \(f\). Let \(g : \{ 0,1\} ^n \to \mathbb {R}\) be its sign encoding, \(g(x) = \sigma (f(x))\), where \(\sigma \) sends \(0\) to \(1\) and \(1\) to \(-1\). Then \(g\) has degree at most \(D(f)\): every set \(S\) with \(\hat g(S) \neq 0\) satisfies \(\left\lvert S\right\rvert \le D(f)\).