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

Shibal Ibrahim, Kayhan Behdin, Rahul Mazumder

Abstract

We propose a new optimization-based approach for feature selection in tree ensembles, an important problem in statistics and machine learning. Popular tree ensemble toolkits e.g., Gradient Boosted Trees and Random Forests support feature selection post-training based on feature importance scores, while very popular, they are known to have drawbacks. We propose Skinny Trees: an end-to-end toolkit for feature selection in tree ensembles where we train a tree ensemble while controlling the number of selected features. Our optimization-based approach learns an ensemble of differentiable trees, and simultaneously performs feature selection using a grouped $\ell_0$-regularizer. We use first-order methods for optimization and present convergence guarantees for our approach. We use a dense-to-sparse regularization scheduling scheme that can lead to more expressive and sparser tree ensembles. On 15 synthetic and real-world datasets, Skinny Trees can achieve $1.5{\times}$–$620{\times}$ feature compression rates, leading up to $10{\times}$ faster inference over dense trees, without any loss in performance. Skinny Trees lead to superior feature selection than many existing toolkits e.g., in terms of AUC performance for 25% feature budget, Skinny Trees outperforms LightGBM by 10.2% (up to 37.7%), and Random Forests by 3% (up to 12.5%).

Introduction

Decision tree ensembles, such as Random Forests and Gradient Boosted Trees, are fundamental tools in modern machine learning. However, they often struggle with effective feature selection. Most existing toolkits rely on post-training importance scores (e.g., Gini importance) to prune features. These methods are frequently unreliable, particularly when features are highly correlated or when the sample size is small relative to the feature count. Furthermore, "embedded" methods typically perform selection at the individual node level, which does not necessarily yield a "skinny" model—one that utilizes a small, global subset of features.

Skinny Trees addresses these challenges through an end-to-end optimization framework that performs feature selection during training. By optimizing for both predictive power and global sparsity in a single pass, Skinny Trees produces highly compressed models with significant inference speedups and superior accuracy compared to traditional post-processing approaches.

Methodology

The Skinny Trees framework is built upon three core technical pillars:

  1. Differentiable (Soft) Trees: Standard decision trees use discrete, non-differentiable splits. Skinny Trees employs "soft" trees with smooth activation functions (like Sigmoid) at split nodes, making the entire ensemble differentiable and amenable to gradient-based optimization.
  2. Grouped $\ell_0$-Regularization: To enforce global feature selection, a penalty is applied to the group of all weights associated with a specific feature across all nodes in the ensemble. The use of an $\ell_0$ (pseudo)norm encourages exact zeros, while an $\ell_2$ penalty prevents overfitting.
  3. Dense-to-Sparse Learning (DSL): Training sparse models from scratch is prone to poor local minima. DSL starts with a zero sparsity penalty (training a dense model) and exponentially increases it over time. This allows the model to capture complex data relationships before converging to a sparse, high-performing state.
Architecture of Skinny Trees showing the tensor formulation and differentiable tree structure.

The optimization is performed using proximal mini-batch gradient descent, for which the authors provide convergence guarantees. By representing the ensemble as a tensor, the framework leverages modern deep learning APIs for high-performance training.

Training dynamics illustrating the Dense-to-Sparse Learning (DSL) schedule on the Lung and Madelon datasets.

Experimental Evaluation

The approach was evaluated on 15 datasets, including synthetic high-dimensional settings and 14 real-world benchmarks from the PMLB repository and NIPS2003 challenge (e.g., Madelon, Lung, Dorothea). These datasets range from 20 to 100,000 features.

Key Results

  • Superior Accuracy: With a 25% feature budget, Skinny Trees outperformed LightGBM by an average of 10.2% and Random Forests by 3% in AUC.
  • Efficiency and Compression: The models achieved feature compression rates between 1.5x and 620x. This translated to 10x faster inference on 10 out of 15 datasets compared to dense soft trees, with no loss in predictive performance.
  • Robust Feature Recovery: In synthetic tests with high correlation, Skinny Trees achieved near-perfect F1-scores (1.00) for feature recovery, significantly outperforming XGBoost and Random Forests.

Conclusion

Skinny Trees offers a robust, end-to-end solution for learning sparse tree ensembles. While soft trees introduce "soft routing" (where samples are distributed across paths), they provide a powerful optimization landscape for feature selection. Future work may involve extending this framework to other differentiable models and exploring more complex group structures for hierarchical feature selection.

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