NRGBoost: Energy-Based Generative Boosted Trees

João Bravo

Introduction

In the realm of tabular data, tree-based models like XGBoost and LightGBM remain the undisputed champions for classification and regression tasks. However, these models are inherently discriminative—they are explicitly trained to predict a specific target variable from a set of features. When tasks require generative capabilities, such as synthesizing new data, detecting outliers, or handling missing features at test time, practitioners typically pivot to deep learning models (like VAEs, GANs, or Diffusion models). Unfortunately, neural networks often struggle with the unique quirks of tabular data, such as mixed feature types and irregular distributions, frequently failing to match the raw predictive power of trees.

To address this gap, researchers introduce NRGBoost, an energy-based generative model that adapts the algorithmic structure of second-order gradient boosting to learn data densities. NRGBoost achieves discriminative performance nearly identical to state-of-the-art tree ensembles while unlocking powerful generative capabilities.

Methodology: Generative Boosting with Trees

NRGBoost treats an ensemble of decision trees as an Energy-Based Model (EBM). In this framework, the model defines the log-probability of the data as a sum of functions, which in this case are the individual trees.

NRGBoost Training Loop

The architecture relies on three key technical innovations:

  • Second-Order Boosting: Similar to how XGBoost utilizes a Taylor expansion to optimize the next tree for classification, NRGBoost employs a second-order approximation of the log-likelihood. This allows the model to grow trees that optimally represent the underlying data density.
  • Weak Learners as Energy Functions: The ensemble's "weak learners" are binary trees where the leaf weights represent local energy contributions. The authors derive a specific splitting criterion based on the Pearson $\chi^2$ divergence to grow these trees greedily.
  • Amortized Sampling: Training EBMs is notoriously slow due to the need for Markov Chain Monte Carlo (MCMC) sampling at every step. To prevent training time from exploding, NRGBoost introduces a "Sample Pool" approach. It maintains a set of samples across boosting iterations, using rejection sampling to update them and performing only a few Gibbs sampling steps to refresh the pool.

Key Results and Insights

Evaluated across a diverse suite of benchmarks—including UCI tabular datasets, California Housing, and a downsampled MNIST task—NRGBoost demonstrates that a model trained purely to understand the data distribution can perform almost as well as one trained specifically to predict a label.

Density estimation progression over boosting iterations
  • Discriminative Parity: On datasets like California Housing and Abalone, NRGBoost achieved $R^2$ and AUC scores nearly identical to XGBoost, outperforming alternative generative tree methods like Adversarial Random Forests (ARF).
  • Visual Quality and Density Estimation: As boosting iterations progress, NRGBoost effectively refines its density estimation. On the downsampled MNIST task (treated as a 196-feature tabular dataset), it was the only tabular-specific model capable of generating passable digit images, whereas competitors produced unrecognizable noise.
  • Principled Missing Data Handling: Traditional models handle missing data via imputation (e.g., filling blanks with mean values). Because NRGBoost is a density model, it handles missing data through marginalization—mathematically accounting for all possible values the missing feature could take. When important features were removed at test time, this marginalization approach significantly outperformed XGBoost paired with popular imputation methods.

Limitations and Future Work

While NRGBoost successfully bridges the gap between generative flexibility and discriminative accuracy for tabular data, it does face some limitations. MCMC sampling still accounts for roughly 70% of training time, making it more computationally intensive than standard GBDT training. Additionally, because it relies on Gibbs sampling, consecutive samples exhibit autocorrelation, making the generation of large batches of independent synthetic records slower than with "one-shot" models like GANs.

Future work will likely explore more advanced MCMC techniques and further optimize the tree-fitting process to scale to datasets with hundreds of millions of rows, solidifying generative trees as a versatile tool for tabular data.

Summary updated

BibTeX
@inproceedings{bravo2025nrgboost,
  author = {João Bravo},
  title = {{NRGBoost: Energy-Based Generative Boosted Trees}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=wQHyjIZ1SH},
}
Figure