Empowering Decision Trees via Shape Function Branching

Nakul Upadhya, Eldan Cohen

Decision trees are a go-to model for tabular data because of their inherent transparency: a user can easily trace a path from the root to a leaf to understand exactly why a prediction was made. However, standard trees use simple axis-aligned linear splits (e.g., "is age $\le 30$?"). If a feature has a non-linear relationship with the target—for example, if both very young and very old patients are at high risk, but middle-aged patients are not—a standard tree must split on the age feature multiple times at different depths to capture this "U-shape."

This repeated splitting leads to deep, bloated trees. Deep trees are notoriously difficult for humans to comprehend, as the user must juggle many conditions simultaneously. To address this limitation, researchers propose a novel generalization: the Shape Generalized Tree (SGT).

The Shape Generalized Tree (SGT)

The core question the authors tackle is: How can we make individual tree nodes expressive enough to capture non-linearities in a single split, without losing the visual interpretability that makes trees so valuable?

Instead of splitting data based on a single threshold, each internal node in an SGT applies a learnable 1D "shape function" to a single feature. Because this function operates on just one feature, it can be easily visualized as a standard line graph, maintaining interpretability while vastly increasing the node's expressive power.

Comparison of a standard linear axis-aligned tree and an SGT on a non-linear Plus Sign dataset. The SGT achieves the same separation with a much shallower structure.

By making individual nodes slightly more complex (but still visualizable), the overall global tree structure becomes vastly simpler. A user only needs to look at a couple of shape function graphs rather than tracing a 10-deep path of simple thresholds. The authors formally prove that SGTs are strictly more expressive than standard trees; a highly periodic pattern that requires a standard tree to grow linearly can be captured perfectly by an SGT with just one internal node.

ShapeCART: Building the Trees

To build these trees, the authors introduce ShapeCART, an efficient top-down induction algorithm. Learning a flexible shape function at every node could be computationally explosive, so ShapeCART uses a clever two-stage approximation:

  1. Binning: Fit a standard, miniature CART tree inside the node on just the chosen feature. This groups the continuous feature into discrete, piecewise-constant bins.
  2. Mapping: Use a coordinate descent algorithm (initialized via Weighted K-Means) to assign these bins to the left or right child branches in a way that minimizes impurity.

The framework is also extended in three powerful ways:

  • Shape$^2$CART (S$^2$GT): Uses bivariate shape functions (evaluating two features at once), which can be visualized as 2D heatmaps.
  • ShapeCART$_K$ (SGT$_K$): Allows for multi-way branching, routing data to $K > 2$ children simultaneously.
  • Post-processing: The authors adapt Tree Alternating Optimization (TAO) to globally refine the greedily constructed ShapeCART trees, further boosting performance.

Key Results and Insights

The authors evaluated their models extensively on 26 classification datasets (e.g., adult, electricity, covtype) and 5 regression datasets (e.g., California Housing).

  • Superior Accuracy & Massive Compression: SGT-C (ShapeCART) consistently outperformed baseline greedy methods (CART, SERDT, HSTree) across all evaluated depths. SGTs often matched or exceeded the maximum-depth accuracy of standard trees using substantially shallower depths. On datasets like eye-movements and electricity, a depth-2 bivariate S$^2$GT achieved similar performance to a depth-6 standard bivariate tree.
  • Multi-way Branching Wins: The ternary tree variant (SGT$_3$-C) achieved the best overall performance among all greedy approaches, proving that allowing a node to split data three ways based on a shape function is highly effective.
  • State-of-the-Art Refinement: When post-processed with TAO, the SGT models achieved the highest performance across all axis-aligned approaches, beating complex non-greedy optimal tree algorithms.
  • Categorical Data Handling: Because the shape functions group bins into branches, ShapeCART naturally supports superset branching on one-hot encoded categorical variables, seamlessly grouping multiple categories into a single decision.

Limitations and Future Work

While 1D graphs and 2D heatmaps are visualizable, interpreting a shape function still requires slightly more cognitive effort from the user than reading a simple "$x \le 5$" rule. Furthermore, like all tree-based models, SGTs are primarily restricted to tabular data.

The authors note that while the structural sparsity of SGTs strongly implies better interpretability, formal human-subject studies are needed to prove that practitioners actually find them easier to use in the real world. Future work may also explore using neural networks to parameterize the shape functions (similar to Neural Additive Models) and adapting the SGT framework for clustering tasks.

Summary updated

BibTeX
@inproceedings{upadhya2025empowering,
  author = {Nakul Upadhya and Eldan Cohen},
  title = {{Empowering Decision Trees via Shape Function Branching}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=pZM3BsyzbM},
}
Figure