Affine leaf scores for decision trees #
Every structural leaf p ∈ t.paths of a decision tree t of depth at most d has a linear score
leafScore B d q t p in the real query margins q : ι → ℝ, summing B ^ (d - 1 - depth) * q i
over the nodes along p where p takes the true branch.
When every query margin has magnitude at most M ≥ 1 and the Boolean oracle x : ι → Bool agrees
with the sign of q with margin at least 1 (x i = true → 1 ≤ q i and x i = false → q i ≤ -1),
choosing base B = 2 * M + 1 ensures that the score of the reached leaf t.path x exceeds the
score of every other structural leaf p ∈ t.paths by at least 1 (Theorem 2.9).
Main definitions #
Cslib.DecisionTree.paths: the structural list of root-to-leaf paths in a decision tree.Cslib.DecisionTree.leafScore: the weighted sum oftrue-branch query margins along a path.
Main results #
Cslib.DecisionTree.length_paths,Cslib.DecisionTree.path_mem_paths,Cslib.DecisionTree.nodup_paths: structural properties ofpaths.Cslib.DecisionTree.leafScore_zero,Cslib.DecisionTree.leafScore_add,Cslib.DecisionTree.leafScore_smul: linearity ofleafScorein the query margins.Cslib.DecisionTree.two_mul_abs_leafScore_le: uniform magnitude bound2 * |leafScore (2 * M + 1) d q t p| ≤ (2 * M + 1) ^ d - 1.Cslib.DecisionTree.leafScore_add_one_le_leafScore_path,Cslib.DecisionTree.leafScore_add_one_le_leafScore_path_decide: Theorem 2.9, strict unit-margin separation of the reached leaf from all other structural leaves.
References #
- [Threshold Circuits as Decision Trees and Finite-State Programs, Theorem 2.9] [26]
Structural root-to-leaf paths #
The structural list of root-to-leaf paths in a decision tree.
Instances For
The number of structural root-to-leaf paths equals leafCount.
The path followed by any input belongs to t.paths.
The structural paths of a decision tree are pairwise distinct.
Relabelling queries preserves the structural path list.
Affine leaf scores and separation #
Score of a root-to-leaf path p in t at depth budget d with base B and real query
margins q : ι → ℝ, summing B ^ (d - 1 - depth) * q i over nodes along p where p
takes the true branch.
Instances For
For base B = 2 * M + 1 and query margins bounded in magnitude by M ≥ 0, every leaf score at
depth budget d ≥ t.depth has magnitude at most ((2 * M + 1) ^ d - 1) / 2.
Affine leaf scores (Theorem 2.9): if t has depth at most d, every query margin q i
has magnitude at most M (1 ≤ M), and x : ι → Bool agrees with the sign of q with margin at
least 1 (x i = true → 1 ≤ q i and x i = false → q i ≤ -1), then with base B = 2 * M + 1,
the score of the reached leaf t.path x exceeds the score of every other structural leaf
p ∈ t.paths (p ≠ t.path x) by at least 1.
Specialization of leafScore_add_one_le_leafScore_path to the threshold query oracle
fun i => decide (0 ≤ q i) when every query margin has magnitude between 1 and M.