Randomized decision trees #
A randomized decision tree tosses coins, uses them to pick a deterministic decision tree, and runs
it. We represent it by the distribution over decision trees that it draws from, a finitely
supported probability distribution Convexity.StdSimplex ℝ (DecisionTree ι β)
(RandomizedDecisionTree). Its depth is the largest depth of a tree it can draw: the number of
queries it makes in the worst case over the inputs and the coins (RandomizedDecisionTree.depth).
It computes f with error ε when on every input the tree it draws outputs a wrong value with
probability at most ε (RandomizedDecisionTree.errorProb, RandomizedDecisionTree.Computes).
The randomized decision tree complexity R_ε(f) is the least depth of a randomized decision tree
computing f with error ε (QueryComplexity.randomizedComplexity) [BdW02]; the
bounded-error complexity R(f) of the literature is R_{1/3}(f).
Deterministic trees are randomized trees that draw one tree, so R_ε(f) ≤ D(f) for ε ≥ 0
(DecisionTree.randomizedComplexity_le_complexity). With error 0 every tree that can be drawn
computes f, so R_0(f) = D(f) (QueryComplexity.randomizedComplexity_zero); zero-error
complexity in the literature usually counts the expected number of queries instead, which can be
smaller. A fair coin guesses a Boolean value correctly with probability 1/2, so R_ε(f) = 0 for
Boolean-valued f and ε ≥ 1/2 (QueryComplexity.randomizedComplexity_eq_zero_of_le).
If a randomized tree computes f with error ε, then for every distribution ν on the inputs
some tree that it can draw errs with probability at most ε on inputs drawn from ν
(RandomizedDecisionTree.Computes.exists_distributionalError_le, from
Convexity.StdSimplex.exists_mem_support_le_sum_mul in CslibFrontier.Probability.Minimax). This
averaging argument is the easy direction of Yao's principle [Yao77]; the converse follows from
the minimax theorem (QueryComplexity.exists_computes_of_forall_exists_distributionalError_le).
Post-processing the output with a function g (RandomizedDecisionTree.mapOutput) makes no
further queries and errs against g ∘ f at most as often as the original tree errs against f
(RandomizedDecisionTree.errorProb_mapOutput_le); so lower bounds for computing g ∘ f are lower
bounds for computing f. More generally, a transformation φ of the drawn tree
(RandomizedDecisionTree.mapTree), such as appending a verification to every leaf, adds the
queries that φ adds (RandomizedDecisionTree.depth_mapTree_le) and no error when φ preserves
correctness (RandomizedDecisionTree.errorProb_mapTree_le).
Main definitions #
Cslib.DecisionTree.randomizedCost: deterministic decision trees as aCslib.RandomizedCostmodel.Cslib.RandomizedDecisionTree: randomized decision trees, as finitely supported distributions over decision trees, withRandomizedDecisionTree.depth,RandomizedDecisionTree.errorProbandRandomizedDecisionTree.Computes.Cslib.RandomizedDecisionTree.mapTree: transforming the drawn tree.Cslib.RandomizedDecisionTree.mapOutput: post-processing the output.Cslib.DecisionTree.distributionalError: the error of a decision tree on inputs drawn from a distribution.Cslib.QueryComplexity.randomizedComplexity: the randomized decision tree complexityR_ε(f).
Main results #
Cslib.RandomizedDecisionTree.Computes.exists_distributionalError_le: the averaging argument.Cslib.RandomizedDecisionTree.depth_mapTree_le,Cslib.RandomizedDecisionTree.errorProb_mapTree_le: transforming the drawn tree adds the queries of the transformation and no error when it preserves correctness.Cslib.RandomizedDecisionTree.depth_mapOutput_le,Cslib.RandomizedDecisionTree.errorProb_mapOutput_le: post-processing adds no queries and no error.Cslib.DecisionTree.randomizedComplexity_le_complexity:R_ε(f) ≤ D(f)forε ≥ 0.Cslib.QueryComplexity.randomizedComplexity_zero:R_0(f) = D(f).Cslib.QueryComplexity.randomizedComplexity_antitone:R_ε(f)decreases asεgrows.Cslib.QueryComplexity.randomizedComplexity_eq_zero_of_le:R_ε(f) = 0for Boolean-valuedfandε ≥ 1/2.
References #
A randomized decision tree over Boolean variables indexed by ι, with outputs in β: a
finitely supported probability distribution over decision trees. It draws a tree from this
distribution and runs it.
Deterministic decision trees as a RandomizedCost model with evaluation DecisionTree.eval
and worst-case cost DecisionTree.depth.
The error of a decision tree t on inputs drawn from ν: the probability that on an input x
drawn from ν it outputs a value other than f x.
distributionalError with any decidable equality on the outputs.
A decision tree computing f has error 0 on every distribution.
The depth of a randomized decision tree: the largest depth of a tree that it can draw, so the number of queries it makes in the worst case over the inputs and the coins.
The probability that the tree drawn from μ outputs on x a value other than f x.
A randomized decision tree μ computes f with error ε when on every input the tree drawn
from μ outputs a wrong value with probability at most ε.
errorProb with any decidable equality on the outputs.
A randomized decision tree can only compute with nonnegative error.
A deterministic decision tree computing f computes it with any nonnegative error.
A randomized decision tree computes f with error 0 exactly when every tree it can draw
computes f.
The averaging argument, the easy direction of Yao's principle: if μ computes f with
error ε, then for every distribution ν on the inputs some tree that μ can draw errs with
probability at most ε on inputs drawn from ν.
Transforming the drawn tree #
Transform the tree drawn from μ by φ: draw a tree t from μ and run φ t.
Every tree that mapTree φ μ can draw is φ t for a tree t that μ can draw.
If φ adds at most d queries to every tree, then so does mapTree φ.
If φ turns every tree that outputs f x on x into one that outputs g x on x, then
mapTree φ μ errs against g on x at most as often as μ errs against f.
If φ turns every tree into one that outputs g x on x, then mapTree φ μ never errs
against g on x.
Post-processing the output #
Post-process the output of a randomized decision tree with g: draw a tree from μ and
relabel its leaves with g (DecisionTree.map).
Post-processing makes no further queries.
Post-processing does not increase the error: the tree drawn from mapOutput g μ errs
against g ∘ f at most as often as the tree drawn from μ errs against f.
The randomized decision tree complexity R_ε(f): the least depth of a randomized decision tree
computing f with nonnegative error budget ε over finitely many variables. These restrictions
ensure that a feasible tree exists.
With error 0 randomness does not help: R_0(f) = D(f). The cost here is the worst case over
the coins, unlike the expected number of queries of zero-error (Las Vegas) complexity.
From ε = 1/2 on, a fair coin computes every Boolean-valued function: R_ε(f) = 0.