End-to-end Feature Selection Approach for Learning Skinny Trees

Shibal Ibrahim, Kayhan Behdin, Rahul Mazumder

TL;DR

Skinny Trees is a new optimization framework that performs end-to-end feature selection while simultaneously training a tree ensemble. By combining differentiable "soft" trees with a grouped $\ell_0$ sparsity penalty, it achieves up to $620\times$ feature compression and $10\times$ faster inference without sacrificing predictive accuracy.

What Problem Does This Paper Address?

Feature selection is critical for building interpretable models, reducing data collection costs, and speeding up inference. While popular tree ensemble toolkits like Random Forests and XGBoost are widely used, they typically handle feature selection as a post-hoc step using "importance scores."

These scores have well-documented flaws: they can be highly misleading when features are correlated or when the number of features far exceeds the number of samples. Furthermore, selecting features after training is inherently sub-optimal. The authors argue for an embedded approach—one that learns which features are important during the training process itself.

Methods

The authors introduce Skinny Trees, which treats feature selection as a joint optimization problem. The key components include:

  • Differentiable (Soft) Trees: Unlike standard decision trees that use hard, axis-aligned splits, soft trees use hyperplane splits (linear combinations of features) and "soft routing," where samples are fractionally sent to all leaves. This makes the entire ensemble differentiable and trainable via gradient descent.
  • Grouped $\ell_0 - \ell_2$ Regularization: To enforce global feature selection, the authors apply a penalty to the weights of the hyperplane splits. The grouped $\ell_0$ penalty encourages entire features to be zeroed out across every node in every tree in the ensemble. An additional $\ell_2$ (ridge) term is used to prevent overfitting.
  • Proximal Mini-batch Gradient Descent: The model is trained using a first-order optimization method. A standard gradient step is followed by a "proximal operator" (specifically, a hard-thresholding step) that zeroes out features based on the $\ell_0$ budget.
  • Dense-to-Sparse Learning (DSL): A critical innovation is the scheduling of the sparsity penalty. Instead of training a sparse model from scratch, the algorithm starts with a dense model and gradually increases the regularization strength ($\lambda_0$). This "annealing" allows the model to find high-quality dense solutions before drifting into a sparse local minimum.
Illustration of Skinny Trees architecture. Horizontal slices in the weight tensor $\mathcal{W}$ represent individual features being filtered out.

Datasets

The approach was evaluated on 15 datasets in total:

  • Synthetic Data: Designed with high feature correlation ($\sigma \in \{0.5, 0.7\}$) to test the model's ability to recover the true underlying "support" (the actual relevant features).
  • Real-World Classification: 14 open-source datasets ranging from 20 to 100,000 features, including Churn, Satimage, Texture, Mice-protein, Isolet, Madelon, Lung, Gisette, Tox, Arcene, CLL, SMK, GLI, and Dorothea.

Key Insights and Ideas

  • Joint Optimization is Superior: Simultaneous training and selection consistently outperform two-stage "wrapper" methods. By "seeing" the sparsity constraint during training, the model adapts its tree structures to the most informative feature subset.
  • The Power of DSL: The authors found that starting with a dense model is essential. As shown in Figure 2, the validation loss continues to improve even as the number of selected features drops sharply, suggesting that the model effectively "distills" knowledge from the dense phase into the sparse one.
  • Robustness to Correlation: Standard importance scores often "dilute" the importance of correlated features. Skinny Trees' optimization approach is much better at identifying the true signal in these challenging settings.
Trajectory of validation loss and feature count during training with DSL. The model maintains performance while drastically reducing feature count.

Key Results

Skinny Trees demonstrated significant advantages over state-of-the-art toolkits:

  • Feature Compression: Achieved compression rates between $1.5\times$ and $620\times$. On the Gli dataset, for example, it reduced the feature set by over 600 times while maintaining accuracy.
  • Inference Speed: The resulting "skinny" ensembles are up to $10\times$ faster at inference time compared to dense soft trees.
  • Predictive Performance: At a 25% feature budget, Skinny Trees outperformed LightGBM by 10.2% (up to 37.7% on some datasets) and Random Forests by 3% in terms of Test AUC.
  • Support Recovery: In synthetic tests with correlated features, Skinny Trees achieved an F1-score for feature recovery of up to 1.00, significantly higher than XGBoost or Random Forests.
Figure 3: Features selected by Random Forests, XGBoost and Skinny Trees for different sample sizes

Limitations and Future Work

While highly effective, the authors note that identifying relevant features while learning compact trees remains an open challenge. The current implementation relies on differentiable trees, which require more memory during training than standard greedy trees, though the final "skinny" model is extremely efficient. Future work could explore more complex scheduling for the DSL or extending the framework to handle even larger-scale datasets with millions of features.

Summary updated

BibTeX
@inproceedings{ibrahim2024end,
  author = {Shibal Ibrahim and Kayhan Behdin and Rahul Mazumder},
  title = {{End-to-end Feature Selection Approach for Learning Skinny Trees}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2024},
  url = {https://openreview.net/forum?id=vzUnDABMnH},
}
Figure