---
title: 'MissARF: Adversarial Random Forests for Imputation'
url: https://www.emergentmind.com/topics/missarf
type: topic
---

# MissARF: Adversarial Random Forests for Imputation

Searching arXiv for MissARF and closely related methods to ground the article in recent papers.
MissARF, short for **missing value imputation with adversarial random forests**, is an imputation method for incomplete tabular data that frames missing-data handling as a **conditional sampling problem** under a generative tree-based model. It uses **adversarial random forests (ARF)** for density estimation and data synthesis, then imputes missing entries by conditioning on the observed part of an observation and sampling from, or summarizing, the resulting conditional distribution. The method is designed to provide both **single imputation** and **multiple imputation**, with the latter incurring essentially no major additional training cost once the ARF has been fit [2507.15681].

## 1. Problem setting and motivation

MissARF was developed against a standard set of trade-offs in missing-data methodology. **Complete-case analysis** is simple but can waste data and bias results unless missingness is MCAR. **Mean, median, and random imputation** are easy to apply but often distort variance and dependence structure. **MissForest** and related machine-learning methods can model nonlinearities and interactions well, but are still **single-imputation methods** and therefore do not represent imputation uncertainty. **Multiple imputation** procedures such as **MICE** are more appropriate for inferential workflows, but they require the analyst to choose among univariate imputation models that may be difficult to align with the empirical data distribution. Deep generative approaches also exist, but the paper characterizes them as typically computationally heavy, data-hungry, hard to tune, and less suited to tabular biostatistical data [2507.15681].

Within that context, MissARF is positioned as a method that combines the practical strengths of tree-based learning with a generative view of missing-data imputation. Its central premise is that imputation should proceed by estimating the conditional distribution of the missing part of a row given its observed entries, rather than by treating each variable independently or by producing only a single deterministic completion. This suggests a unification of predictive and inferential use cases: the same fitted generative model can support point imputations, stochastic imputations, and repeated imputations for downstream uncertainty propagation.

## 2. Adversarial random forests as a generative density estimator

MissARF is built on **adversarial random forests**, which are used as a **density estimator and simulator** rather than only as a discriminative ensemble. ARF operates in an iterative **discriminate-and-generate** loop. First, it creates naïve synthetic data by sampling independently from each variable’s marginal distribution. Second, it trains a random forest classifier to distinguish real data from the synthetic data. Third, it generates improved synthetic data by sampling within the leaves of the learned forest, so that the synthetic observations respect the induced tree partitions. The procedure alternates between these steps until the forest can no longer reliably separate real from synthetic data. The stopping rule is based on out-of-bag accuracy and halts when that accuracy falls below
$$
0.5 + \delta,
$$
for small $\delta \ge 0$; the last forest before this threshold is taken as the final ARF model [2507.15681].

A key approximation is **local independence within leaves**. If $L$ denotes the number of leaves and $p$ the number of features, then within leaf $l$ the estimated density is
$$
\hat{p}_l(\mathbf{x}) = \prod_{j=1}^p \hat{p}_{lj}(x_j).
$$
For continuous variables, the leafwise marginals are modeled with **truncated Gaussian fits**; for categorical variables, they are modeled with **multinomial distributions**. The overall density estimate is then
$$
\hat{p}_{\mathrm{ARF}}(\mathbf{x}) = \sum_{l=1}^L \omega_l \hat{p}_l(\mathbf{x})
= \sum_{l=1}^L \omega_l \prod_{j=1}^p \hat{p}_{lj}(x_j),
$$
where $\omega_l$ is the weight of leaf $l$, reflecting how much of the real data falls in that leaf.

This construction gives ARF a direct generative interpretation. To synthesize a new observation, the model samples a leaf according to $\omega_l$ and then samples each feature independently from that leaf’s estimated univariate distributions. The learned tree partitions therefore encode dependence structure, while the within-leaf factorization keeps density estimation tractable.

## 3. Conditional imputation mechanism

MissARF turns imputation into conditioning under the ARF density. For an observation $\mathbf{x}$ with missing entries at positions
$$
\overline{C} = \{j \mid x_j = \mathrm{NA}\},
$$
the observed positions are
$$
C = \{j \mid x_j \neq \mathrm{NA}\}.
$$
The method conditions on the observed values $\mathbf{x}_C$ and estimates the conditional distribution of the missing part $\mathbf{x}_{\overline{C}}$ via Bayes’ theorem and the ARF leaf structure:
$$
\hat{p}_{\mathrm{ARF}}\left(\mathbf{x}_{\overline{C}} \mid X_C = \mathbf{x}_C\right)
=
\frac{\hat{p}_{\mathrm{ARF}}(\mathbf{x}_{\overline{C}}, \mathbf{x}_C)}
{\hat{p}_{\mathrm{ARF}}(\mathbf{x}_C)}
=
\sum_{l=1}^L \tilde{\omega}_l \prod_{j \in \overline{C}} \hat{p}_{lj}(x_j).
$$
The adjusted leaf weights are
$$
\tilde{\omega}_l(\mathbf{x}_C) = \omega_l \frac{\hat{p}_l(\mathbf{x}_C)}{\hat{p}_{\mathrm{ARF}}(\mathbf{x}_C)}.
$$

These adjusted weights perform two functions. They **filter** the forest so that only leaves compatible with the observed values contribute, and they **reweight** those compatible leaves according to how likely the observed values are within each leaf. Because the leaf densities are truncated to leaf bounds, leaves outside the conditioning set naturally receive weight $0$.

For **single imputation**, MissARF can either sample once from the conditional distribution or use a summary statistic. In the reported experiments, the default for continuous variables is the **conditional expectation**
$$
\dot{x}_j = \mathbb{E}\left[X_j \mid X_C = \mathbf{x}_C\right]
= \sum_{l=1}^L \tilde{\omega}_l \mu_{lj},
$$
where $\mu_{lj}$ is the mean of the real, non-missing values for feature $j$ in leaf $l$, conditioned on $\mathbf{x}_C$. For categorical variables, the imputed category is the **most frequent category** among the selected leaves, weighted by $\tilde{\omega}_l$.

For **multiple imputation**, MissARF repeatedly samples from the conditional distribution. Importantly, it does **not** merely resample within one leaf. For each imputation, it reselects a leaf according to the adjusted weights $\tilde{\omega}_l$ and then samples the missing value or values from that leaf’s conditional distribution. This produces distinct completed datasets and is intended to reflect imputation uncertainty directly [2507.15681].

## 4. Training on incomplete data and computational workflow

A practical complication is that the ARF itself must be fitted to incomplete data, while ordinary random forests do not natively handle missing values. MissARF addresses this by implementing a modified version of the **missingness incorporated in attributes** approach in `ranger`. For a numerical split on feature $x_j$ at threshold $s$, the algorithm compares the two candidate partitions
$$
\{x_j \le s \text{ or } x_j = \mathrm{NA}\} \quad \text{vs.} \quad \{x_j > s\}
$$
and
$$
\{x_j \le s\} \quad \text{vs.} \quad \{x_j > s \text{ or } x_j = \mathrm{NA}\},
$$
then selects whichever split optimizes the criterion. For categorical variables, missing values are treated as an additional category. This allows the forest to learn where missings should be routed during tree construction, without requiring a separate preliminary imputation step [2507.15681].

The workflow can be summarized in five stages. First, the incomplete dataset is provided as input. Second, an ARF is trained on the incomplete data by alternating discrimination and synthetic-data generation until the out-of-bag stopping criterion is met. Third, for each row with missing values, the observed part $\mathbf{x}_C$ is identified, the compatible leaves are determined, and the adjusted weights $\tilde{\omega}_l(\mathbf{x}_C)$ are computed. Fourth, missing values are imputed either by conditional means or modes, by a single stochastic draw, or by repeated stochastic draws for multiple imputation. Fifth, the procedure outputs either one completed dataset or $m$ completed datasets.

The implementation is provided in the `arf` R package, with support for both single and multiple imputation:
```r
data_single_imp <- arf::impute(data)
data_multiple_imp <- arf::impute(data, m = 20)
```
The paper emphasizes that the method is **fast**, **easy to use**, and available in **R**, and argues that once the ARF has been trained, the remaining imputation step reduces to conditional leaf selection plus local sampling.

## 5. Empirical evaluation

The evaluation comprises both **simulated data** and a **real-world diabetes dataset** [2507.15681]. The simulation study uses multivariate data generated with a **Gaussian copula** and univariate marginals consisting of Normal $\mathcal{N}(0,1)$, Binary $\mathrm{Binom}(0.5)$, Poisson $\mathrm{Pois}(2)$, Gamma $\mathrm{Gamma}(2,0.5)$, and Uniform $\mathcal{U}(-1,1)$ variables. The sample sizes are
$$
n \in \{500, 1000, 10{,}000\},
$$
the dimensionalities are
$$
p \in \{4,10,20\},
$$
and the correlation structure is
$$
\mathrm{Corr}(\mathbf{X})_{ij}=0.5^{|j-i|}.
$$
Outcomes are generated with either linear or squared effects. Missingness is imposed under **MCAR**, **MAR**, and **MNAR** at proportions
$$
0.1,\ 0.2,\ 0.4,
$$
with each experiment replicated **1000 times**.

For **single imputation**, MissARF is compared with Random imputation, Median imputation, MissForest, and MICE-based procedures when the mean across multiple imputations is treated as a single completed dataset: **MICE PMM**, **MICE RF**, and **MissForest PMM**. For **multiple imputation**, the comparison set is Random imputation, MissForest, MissForest PMM, MICE PMM, MICE RF, and MissARF. In these experiments, MissARF is run with **100 trees** and minimum node size **10**.

The single-imputation evaluation uses **NRMSE** for data-level imputation error,
$$
\mathrm{NRMSE}(\dot{\mathbf{X}},\mathbf{X}) =
\sqrt{\frac{1}{np}\sum_{j=1}^{p} \sum_{i=1}^{n}
\left(\tilde{\dot{x}}_{ij} - \tilde{x}_{ij}\right)^2},
$$
and **Brier score** for downstream prediction quality,
$$
\mathrm{Brier\,Score}(\hat{\pi}, y)
= \frac{1}{n} \sum_{i=1}^n (\hat{\pi}_i - y_i)^2.
$$
The multiple-imputation evaluation uses **coverage rate**, **average confidence interval width**, and **RMSE of regression coefficients**.

The reported empirical conclusions are differentiated by task. For **single imputation**, MissARF performs **comparably to MissForest**, often among the best methods. It is reported to be especially strong for **binary data**. In many continuous settings, MissForest is slightly better in higher dimensions, while MissARF is strong in low and moderate dimensions. MissARF generally outperforms random and median imputation. For **multiple imputation**, MissARF is described as **competitive with MICE**, especially **MICE PMM**, which the paper treats as a de facto standard for multiple imputation. In many settings, MissARF and MICE PMM have similar coverage and coefficient RMSE, while MissARF often yields **smaller confidence interval widths** when coverage is good. The paper also reports that MissARF performs particularly well in **squared-effect** settings, where PMM methods often struggle, though performance can degrade at very high missingness in some linear-effect settings.

## 6. Runtime profile, scope, and methodological position

Runtime is a central part of the method’s positioning. The paper reports results for both single-threaded and **16-thread** settings. Simple baselines are fastest, as expected. Relative to more elaborate approaches, MissARF is reported to be much slower than simple baselines but much faster than repeated full multiple-imputation workflows. The principal computational claim is that MissARF has **essentially the same runtime for single and multiple imputation**, whereas MICE and MissForest become much slower when several imputations are required. In the aggregated comparison table, multiple imputation with MissARF is reported at around **14.4 s**, compared with roughly **325 s** for **MissForest PMM** and **78.5 s** for **MICE RF**. With 16 threads, MissARF is reported as the **fastest non-baseline method** in the comparison [2507.15681].

Methodologically, MissARF occupies a distinct position among imputation procedures. It is not merely a predictive random-forest imputer, because it uses ARF as a joint density model and explicitly conditions on observed values to obtain a distribution over the missing part of a row. It is also not a conventional chained-equations method, because the model is fit to the joint structure rather than through a sequence of univariate conditional models. A common misconception would be to treat its multiple imputation mode as repeated perturbation of a single deterministic fill-in; in fact, the procedure repeatedly samples from the conditional distribution with a newly selected leaf at each draw.

Its reported areas of particular suitability are likewise explicit. The authors recommend it especially when the same imputation approach is needed for both **prediction and inference**, when the data are **low-dimensional or binary**, and when **multiple imputation under unknown distributional structure** is required with fast runtime. A plausible implication is that MissARF is intended less as a replacement for all existing missing-data methodology than as a practical compromise between flexible nonparametric modeling and computationally efficient uncertainty-aware imputation for tabular biostatistical settings.

Source: https://www.emergentmind.com/topics/missarf