Unmasking Trees for Tabular Data

Calvin McCarter

Abstract

Despite much work on advanced deep learning and generative modeling techniques for tabular data generation and imputation, traditional methods have continued to win on imputation benchmarks. We herein present UnmaskingTrees, a simple method for tabular imputation (and generation) employing gradient-boosted decision trees which are used to incrementally unmask individual features. On a benchmark for out-of-the-box performance on 27 small tabular datasets, UnmaskingTrees offers leading performance on imputation; state-of-the-art performance on generation given data with missingness; and competitive performance on vanilla generation given data without missingness. To solve the conditional generation subproblem, we propose a tabular probabilistic prediction method, BaltoBot, which fits a balanced tree of boosted tree classifiers. Unlike older methods, it requires no parametric assumption on the conditional distribution, accommodating features with multimodal distributions; unlike newer diffusion methods, it offers fast sampling, closed-form density estimation, and flexible handling of discrete variables. We finally consider our two approaches as meta-algorithms, demonstrating in-context learning-based generative modeling with TabPFN.

Introduction

In the domain of tabular data—the backbone of most business and scientific databases—missing values remain a pervasive challenge. While deep learning and diffusion models have achieved transformative success in image and text generation, they often struggle with tabular data, which is typically characterized by small sample sizes, heterogeneous feature types, and complex patterns of missingness.

Existing solutions present a stark trade-off: traditional statistical methods like MissForest excel at imputation but lack generative capabilities, while modern diffusion models are computationally expensive, slow to sample, and often underperform when imputing values in datasets they were not specifically trained to repair. This research introduces UnmaskingTrees, a framework that leverages the inherent strengths of gradient-boosted decision trees (GBDTs) to provide a fast, robust, "out-of-the-box" solution for both imputation and generation.

Methodology

UnmaskingTrees

UnmaskingTrees is a meta-algorithm inspired by permutation language modeling. During training, the model processes data rows by randomly shuffling feature order and incrementally "masking" them. It learns to predict the value of a masked feature conditioned on the set of currently unmasked features. This autoregressive approach allows the model to handle any arbitrary pattern of missing data during inference by treating missing values as masked and unmasking them sequentially.

BaltoBot

To extend UnmaskingTrees to continuous data without making rigid parametric assumptions (such as Gaussianity), we developed BaltoBot. BaltoBot transforms regression into a hierarchical classification problem by building a "meta-tree" of binary classifiers. Using Kernel Density Integral (KDI) quantization, it recursively splits a variable's range into smaller bins. At each node, a GBDT determines the path for a given sample. This architecture enables the capture of complex, multi-modal distributions and provides closed-form density estimation.

Experimental Results

The framework was evaluated against a 27-dataset benchmark of small-to-medium public datasets, as well as synthetic case studies like "Two Moons" and "Iris."

Imputation and Generation Performance

UnmaskingTrees (UTrees) demonstrated leading performance in imputation tasks. On the 27-dataset benchmark, it outperformed state-of-the-art diffusion models (such as ForestDiffusion) across nearly all metrics.

Performance comparison on a 27-dataset benchmark for imputation. UTrees shows leading performance (indicated in blue) across multiple metrics.

Multimodal Distribution Capture

Visual verification on synthetic datasets confirms that BaltoBot successfully captures non-linear and multi-peaked distributions. Unlike standard regression models that tend to "smooth" over these complexities, BaltoBot maintains the structural integrity of the data distribution.

Visual comparison of generation and imputation on the synthetic "Two Moons" dataset, demonstrating the model's ability to capture complex, non-linear distributions.

Efficiency and Robustness

BaltoBot is approximately 7x faster at generating samples than recent diffusion-based tree methods like Treeffuser. Furthermore, the model achieves these results using default hyperparameters, highlighting its robustness for practical applications where extensive tuning is not feasible.

Conclusion

UnmaskingTrees and BaltoBot demonstrate that GBDTs remain a powerful tool for generative modeling in the tabular domain. By combining autoregressive unmasking with hierarchical classification, the framework bridges the gap between traditional imputation and modern generative modeling. Future work will focus on improving scalability for high-dimensional datasets and exploring multi-output tree architectures to further reduce training complexity.

Summary updated

BibTeX
@article{mccarter2025unmasking,
  author = {Calvin McCarter},
  title = {{Unmasking Trees for Tabular Data}},
  journal = {Accepted by TMLR},
  year = {2025},
  url = {https://openreview.net/forum?id=0AxbTF3Ouq},
}
Figure