TL;DR
The authors introduce DT-GFN, a novel hybrid approach that treats decision tree construction as a sequential decision-making problem solved via Generative Flow Networks (GFlowNets). By training a deep reinforcement learning policy to sample trees directly from the Bayesian posterior, DT-GFN generates highly accurate, compact, and interpretable tree ensembles that scale consistently with compute and exhibit superior robustness to distribution shifts compared to traditional greedy methods.
What Problem Does This Paper Address?
While deep learning dominates fields like computer vision and NLP, tabular data remains a stronghold for tree-based architectures like Gradient Boosted Decision Trees (GBDTs; e.g., XGBoost, LightGBM). However, traditional decision trees are typically constructed using greedy heuristics (like CART), which optimize for immediate split quality rather than global tree optimality. This makes them prone to overfitting and poorly equipped to handle systematic distribution shifts.
An alternative is Bayesian structure inference, which treats tree generation as sampling from a posterior distribution over all possible tree structures. Unfortunately, the search space of decision trees explodes combinatorially—even a tree of depth 4 with 20 binary features yields over $10^{18}$ possible configurations. Existing exact or Markov Chain Monte Carlo (MCMC) sampling methods fail to scale or get trapped in local modes. This paper tackles the challenge of efficiently sampling diverse, high-quality decision trees from this intractable posterior space.
Methods
The core innovation of this paper is DT-GFN (Decision Tree GFlowNet), which frames tree construction as a Markov Decision Process (MDP) and applies GFlowNets to perform amortized variational inference.
- MDP Formulation: Starting from an empty root node, the policy sequentially constructs a tree by selecting a leaf node, choosing a feature, and picking a splitting threshold. The process ends when the policy chooses a special termination action or when no valid splits remain.
- GFlowNet Training: Instead of maximizing a traditional RL reward, the GFlowNet policy is trained using a Trajectory Balance objective. This ensures that the probability of generating any given tree is exactly proportional to its unnormalized reward.
-
The Reward Function: The reward is defined as the joint conditional probability (the Bayesian posterior): $$R(T|X) \propto P(Y|X, T) \cdot P(T|X)$$ The likelihood $P(Y|X, T)$ is computed analytically using a Dirichlet prior over leaf parameters, while the structure prior $P(T|X)$ incorporates Occam's razor by penalizing tree complexity (number of nodes) using Minimum Description Length (MDL) principles.
-
Ensembling: At inference time, multiple independent trees are sampled from the trained policy and combined via Bayesian model averaging to form a robust random forest.
Datasets
The authors evaluated DT-GFN across several standard classification, domain shift, and anomaly detection benchmarks:
- Standard Tabular Benchmarks (UCI Repository): Iris, Wine, Breast Cancer Diagnostic, and Raisin.
- Systematic Generalization / Domain Shift: Pima Indians Diabetes dataset, split explicitly to evaluate robustness against shifts in BMI and Age.
- Out-of-Distribution (OOD) Detection: Thyroid, Ecoli, Vertebral, and Glass datasets.
- Synthetic Control: A custom "Hidden XOR" dataset designed to expose the failure modes of greedy tree-induction algorithms under varying levels of binary and real-valued noise.
Key Insights and Ideas
- Amortized Structure Inference vs. Greedy Search: Traditional algorithms like CART make irreversible, locally optimal choices. By learning a generative policy over the entire tree structure, DT-GFN can discover non-greedy combinations of features (such as XOR relationships) that look unpromising at the root but yield optimal global splits.
- The Power of the Prior: By explicitly injecting a complexity penalty ($\beta$) derived from information theory, the model naturally favors shorter, highly interpretable trees without sacrificing accuracy.
- Consistent Scaling Behavior: Unlike GBDTs, which often suffer from diminishing returns or unstable performance when ensemble sizes grow excessively large, DT-GFN exhibits monotonic performance gains as more trees are sampled or more compute budget is allocated.
Key Results
- Single-Tree Superiority: When restricted to a single decision tree, DT-GFN consistently outperformed traditional baselines (CART, MCMC, SMC) across all UCI datasets while maintaining a significantly smaller model size (fewer nodes).
- Robustness to Domain Shift: On the Pima Diabetes dataset under distribution shifts, DT-GFN ensembles achieved an OOD accuracy of 0.755 (BMI shift) and 0.700 (Age shift), vastly outperforming XGBoost (0.598 / 0.610) and LightGBM (0.590 / 0.624).
- State-of-the-Art OOD Detection: In anomaly detection tasks, single trees from DT-GFN outperformed specialized deep learning and classical anomaly detection methods (like Isolation Forests) on datasets like Ecoli (F1 score of 0.812 vs. next best 0.778) without requiring prior knowledge of the anomaly ratio.
Limitations and Future Work
While DT-GFN marks a significant advance, the authors note a few limitations:
- Discretized Action Space: To keep the action space manageable, continuous features must be scaled and mapped to a fixed number of uniformly spaced thresholds. This discretization resolution remains a hyperparameter that requires tuning.
- Scalability to Massive Feature Spaces: Although highly efficient for small-to-medium datasets, scaling the hierarchical action selection mechanism to tabular datasets with thousands of continuous features could introduce computational bottlenecks during policy evaluation.
Future Directions: The authors propose extending DT-GFN to online and streaming data scenarios using streaming Bayes GFlowNets, as well as exploring its application to structure inference in more general probabilistic circuits and programs.
Summary updated