This paper, originally presented at ICML 2018, tackles a fundamental but often overlooked problem in machine learning: how to efficiently and effectively split nominal attributes (categorical data with many possible values) when building decision trees.
The Problem: Splitting Nominal Attributes
When building a decision tree or a Random Forest, the algorithm must decide how to split data at each node. For a nominal attribute like "Zip Code" or "User ID" that might have hundreds of distinct values ($n$), a "multiway split" (one branch per value) leads to massive data fragmentation and overfitting. To avoid this, practitioners prefer "binary splits," where the $n$ values are partitioned into two distinct groups.
The goal is to find a partition that minimizes "impurity" (usually measured via Gini or Entropy). While this is computationally trivial if you only have two target classes (e.g., Spam vs. Not Spam), it becomes explosive when you have $k > 2$ classes. For a small number of values $n$, you could search all $2^n$ possibilities. However, for large $n$, researchers have historically relied on heuristics without knowing how close those heuristics actually get to the "perfect" split.
Crucially, the authors formally prove that finding the optimal binary split for nominal attributes to minimize Entropy is NP-Hard when there are more than two classes. This proof sets a new baseline for what we can expect from splitting algorithms and justifies the need for approximation methods.
Proposed Methods: HcC and LCA
To solve this, the authors introduce two new algorithms based on the geometric property that an optimal split can be defined by a hyperplane in $k$-dimensional space. These are the first algorithms to provide provable approximation guarantees for impurity minimization, filling a long-standing gap in decision tree theory.
1. Hypercube Cover (HcC)
This algorithm searches through $2^k$ specific directions (the vertices of a unit hypercube). It is a simplified version of the classic "Twoing" method but comes with a solid theoretical backing: the authors prove it is a 2-approximation algorithm. This means the impurity it finds is at most twice the minimum possible impurity for a wide class of measures.
2. LargestClassAlone (LCA)
A much faster, "greedy-style" algorithm. It essentially tests a split where the most frequent class in the node is isolated into its own branch. It runs in $O(nk + n \log n)$ time. Even though it is remarkably simple, it provides a constant-factor approximation guarantee (at most 3x for Entropy and 2x for Gini).
Key Results and Performance
The authors evaluated their methods using Monte Carlo simulations with randomly generated contingency tables, as well as 11 real-world datasets from the UCI repository and Kaggle.
- Impurity Performance: In simulations, HcC consistently outperformed existing heuristics like
PCextandSLIQextin terms of finding the lowest impurity, especially as the number of classes $k$ increased.
- Tree Accuracy: When plugged into actual decision tree induction, LCA proved highly competitive. Despite being the fastest method, it often produced trees with accuracy equal to or better than more complex heuristics.
- The Power of Balance: For Entropy, the authors found that the most "balanced" splits (those that divide the total number of examples roughly in half) tend to minimize the impurity bound.
Efficiency and Limitations
While HcC provides excellent theoretical guarantees and empirical performance for a small number of classes (e.g., $k < 10$), its $2^k$ complexity makes it slow for high-dimensional classification. As the number of classes grows, the computational cost of HcC scales exponentially.
Conversely, LCA scales linearly with the number of classes, making it a highly practical alternative for complex datasets.
Future Work
- The Gini Mystery: While the authors proved NP-hardness for Entropy, the computational complexity of finding the minimum Gini partition remains an open theoretical question.
- Multi-way Extensions: The current work focuses on binary (2-way) partitions. Extending these approximation guarantees to $L$-way partitions (where $L > 2$) is a promising next step.
- FPTAS: The authors raise the question of whether a Fully Polynomial Time Approximation Scheme (FPTAS) exists for this problem, which would allow for even tighter approximations in the future.
Summary updated