BART: Bayesian additive regression trees
Paper · 2010 · Hugh A. Chipman, Edward I. George and Robert E. McCulloch
Summary
A regression tree predicts an outcome by asking a series of questions about the inputs. That is a flexible way to handle interactions, since the next question can depend on the answer to the previous one. It is a less economical way to represent several effects that simply add together. Bayesian additive regression trees, or BART, give each tree responsibility for only part of the prediction. One tree can account for a change associated with a single input while another handles a relationship that depends on several inputs. The authors use a Bayesian prior to favor small trees and to keep the numerical contribution of each tree modest. Together, the trees can describe a much more complicated relationship than any individual tree needs to learn.
Fitting proceeds by taking one tree out of the current sum, calculating what the remaining trees leave unexplained, and updating the omitted tree against that remainder. The procedure cycles through a fixed collection of trees and produces a sequence of plausible fits. Averaging their predictions gives an estimate of the expected response. The spread of those predictions describes uncertainty about that expectation at a particular input. The same draws also support estimates of how predictions change when one input varies, averaging over the other inputs in the data. A separate diagnostic counts how frequently each predictor is used in a split. The authors find that giving predictors fewer trees in which to appear can make the important ones stand out.
On 42 real regression datasets, BART with cross-validated settings had the lowest median relative root mean squared error across the repeated test splits. The default version also performed well, with a lower upper-quartile error than any of the competing methods and no search over settings. In a simulation where the true regression function was known, the authors could check the uncertainty intervals and see whether split counts highlighted the predictors that actually generated the response. The simulation also showed where the defaults could fail. With many irrelevant inputs and few observations, the tuned version retained substantially better predictive accuracy than the default.
For binary outcomes, the paper converts the sum of tree contributions into a probability using a probit link, which maps a real-valued score to the probability scale. In a compound activity dataset, the probit extension ranked active compounds well enough to compete with the other classifiers, although random forests achieved the highest average area under the ROC curve. Across these experiments, the distinction between a point prediction and a collection of plausible fits matters. The prediction comparison asks how close the fitted answer is on new data. The posterior draws also let the authors ask where that answer is uncertain, which patterns recur across fits, and how those conclusions change when the ensemble is made smaller.
Deep dive: BART: Bayesian additive regression trees
Bayesian additive regression trees combine many small trees to predict outcomes, estimate uncertainty, and identify influential predictors. · about 40 minutes to read
The problem and its context
Learning a response without specifying its shape
The paper starts with a response measured alongside a collection of predictors. Its target is the conditional mean, the average response that would be expected for a given combination of predictor values. Individual observations can vary around that average. A useful regression procedure must therefore separate the systematic part of the response from the remaining variation. The challenge is that the systematic part may have a different shape in different regions of the predictor space, and the analyst may have little information about those shapes before seeing the observations.
Consider the kinds of relationships that can coexist in the same regression problem. One predictor might add approximately the same amount to the expected response across a range of circumstances. A second might have a curved effect. A third might matter more when another predictor is high than when it is low. Writing a formula in advance would require decisions about which curves and interactions to include. The paper asks whether an ensemble of trees can discover such structure while still supporting inference about the result. In particular, the authors want a way to describe uncertainty in the estimated function and to examine the roles of candidate predictors.
A regression tree offers a direct means of conditioning on several variables. At the root, a rule sends observations along different branches. A subsequent rule can be applied only to observations that reach a particular branch. A split on one variable can thus matter in a region defined by another variable. The terminal nodes, often called leaves, assign constant values to the resulting regions. Different branches can use different predictors, so the tree can adapt the questions it asks to the part of the input space it is describing.
The economy of that representation depends on the relationship being fitted. Suppose several effects are additive, so that each contributes the same way regardless of the values of the other predictors. A single tree may have to reproduce similar splits in different branches to express those effects together. A sum can give the effects their own components. The authors also distinguish their approach from generalized additive regression built from low-dimensional smoothers. Those smoothers provide a natural way to express separate effects. A tree in BART can itself depend on several inputs, so interactions can be represented within a component and combined with additive effects elsewhere in the ensemble.
There is a tradeoff in giving the components this freedom. Many different trees can produce similar predictions, and many different collections of trees can produce the same sum. A particular contribution can be moved between components with little effect on the complete fit. This flexibility is useful for approximating the regression function. It creates little reason to attach a unique meaning to the identity of an individual tree. The statistical question is about the sum and what can be learned from it. The computational question is how to explore plausible sums when enumerating all the possible trees and leaf values is impractical.
How earlier ensembles fit their trees
The paper places BART beside boosting, bagging and random forests. In its account of boosting, trees enter in sequence. A new tree addresses variation that the earlier trees have left behind. Small contributions let the fit accumulate gradually. BART shares the idea that a tree can be assigned only a portion of the response pattern. Its collection is fixed during a run, and any tree in that collection can be revised later. A tree fitted early in a sweep will be revisited after the other trees have had a chance to change.
Bagging and random forests use randomization to produce a collection of trees and average their predictions. The motivation described in the paper is to reduce the variability of individual tree predictions through averaging. In BART, the terms within a draw are fitted as contributors to a joint sum. The averaging that produces the final prediction takes place across draws of that whole sum. This gives averaging a different role at each level. The underlying earlier approach is described in Bagging Predictors.
An earlier Bayesian approach assigns probabilities to possible single trees. Each tree is a candidate description of the entire response surface, and posterior averaging combines the predictions of those competing descriptions using their probabilities. This already provides a way to allow for uncertainty about the tree structure. BART shifts the object whose uncertainty is being represented. A single candidate in its posterior is a collection of trees, with each tree explaining a portion of the surface. The uncertainty concerns the complete collection and the quantities that can be calculated from it.
The authors draw on previous Bayesian work in another way. Their prior over individual trees uses forms developed for Bayesian classification and regression trees, commonly called CART. The same forms can serve a different purpose once the tree is a component of a sum. A tree responsible for an entire response surface may need a sizeable partition. A component can be given a strong preference for a much smaller partition, because other components remain available to describe different parts of the relationship. The paper also borrows the idea of Bayesian backfitting from work on additive regression and adapts it to components with uncertain tree structures.
What a fit should let the reader ask
A point predictor gives one answer for a new observation. The paper also asks how much support the data give that answer and what can be learned about the underlying relationship. An interval for the conditional mean addresses uncertainty about the response surface at a particular combination of inputs. A curve that averages over some inputs can make a complicated surface easier to examine. Frequencies of predictor use can help screen a long list of variables for those that the fitted trees repeatedly turn to.
These are different kinds of evidence. A variable can be associated with an important prediction change over a narrow region even when its average effect is modest. A variable can also appear in many splits without being essential to the aggregate fit, especially if the ensemble has components to spare. Handling those questions calls for more than one diagnostic. The authors use posterior function draws to summarize what the ensemble predicts, and split counts to describe how the ensemble constructs those predictions. Their experiments examine when the two kinds of evidence give a clear picture.
The method, step by step
A tree contributes a value to the sum
Begin with a single observation. Its predictor vector contains the inputs available when making a prediction. At a tree’s root, the observation is tested against a rule. For a continuous predictor, the usual rule sends values at or below a threshold down one branch and values above it down the other. The procedure follows the rules until it reaches a leaf and reads off the number assigned to that leaf. The tree gives the same contribution to every input that reaches that leaf, even when those inputs differ in other respects.
The starting regression relationship is written as follows.
Y = f(x) + ε, ε ∼ N(0, σ²)
Here Y is the response, x is its vector of predictors, and f(x) is the unknown conditional mean. The term ε is the random deviation around that mean. The symbol ∼ means “is distributed as,” and N denotes a normal distribution with mean 0 and variance σ². The quantity σ is the residual standard deviation. With a single tree, the fitted conditional mean would be the one leaf value selected by x.
Y = g(x; T, M) + ε
Here T is the tree, including its branching structure and split rules, and M is the collection of numerical values attached to its leaves. The function g takes input x and returns the value in M selected by following T. The semicolon inside g distinguishes the input x from the tree and leaf parameters. Y and ε retain the meanings given above, including the normal distribution for ε.
BART replaces this single contribution with a sum. Every tree sees the same input. Each can examine a different set of predictors or split a shared predictor at different points. A prediction adds the values obtained at the ends of all the paths.
Y = h(x) + ε, h(x) = ∑ⱼ g(x; Tⱼ, Mⱼ)
The fitted response surface is h. The sum ∑ⱼ runs over the trees, with j indexing the components from 1 through m and m denoting their fixed number. Tⱼ is the structure and rules of tree j, Mⱼ contains its leaf values, and g is the leaf lookup described above. Y, x and ε are the response, predictors and residual error. The target of the sum is f(x), the mean of Y at x.
When a tree uses only one predictor, its contribution is a step function in that predictor. An ensemble of such components is additive across predictors. When a path uses several predictors, the effect of passing one test can depend on the outcome of earlier tests, which gives the sum a way to represent interactions. There is no requirement to specify the interacting variables in advance. Tree structures and split rules are part of what the fitting procedure learns. The number of trees determines how many components can share the work, while the prior determines how much flexibility each component is likely to exercise.
How BART fits and summarizes a tree ensemble
The steps in order.
Putting a prior on the pieces
A Bayesian prior says which kinds of parameter values are plausible before the likelihood updates them. Here it has to cover tree structures, split rules, leaf values and residual noise. The authors make this manageable by giving the trees independent, identically specified priors. The residual scale has its own prior. Within a tree, once its structure is given, leaf values are independent under their prior.
p((Tⱼ, Mⱼ) for all j, σ) = p(σ) ∏ⱼ p(Tⱼ) p(Mⱼ | Tⱼ)
In this expression p denotes a probability or density as appropriate, and ∏ⱼ means to multiply the indicated factors over the tree index j. Tⱼ and Mⱼ are the structure and leaf values of that tree, and σ is the residual standard deviation. The vertical bar means “conditional on.” Thus p(Mⱼ | Tⱼ) describes a set of leaf values for the leaves that exist in Tⱼ. Once the data enter, different trees can depend on one another because their combined predictions determine how well they fit.
p(Mⱼ | Tⱼ) = ∏ᵢ p(μᵢⱼ | Tⱼ)
The index i in this expression runs over the leaves of tree j, and μᵢⱼ is the value in its leaf i. The product ∏ᵢ expresses independence of those values conditional on Tⱼ. The same leaf prior is used throughout the ensemble. That choice helps make tree proposals practical because the leaf values associated with a proposed tree can be integrated out separately under the normal likelihood and prior.
The tree prior specifies whether a node will split and, if it does, how the split is chosen. The probability of splitting decreases with depth. The authors use a uniform choice among available variables and then a uniform choice among available discrete split values for the selected variable. This construction uses the ordering of predictor values. A monotone rescaling of a predictor preserves the partitions available to the tree, with the corresponding ordering or branch orientation.
Pr(node splits at depth d) = α(1 + d)⁻ᵝ
Pr denotes probability, and d is the depth of the node, with the root at depth 0. The parameter α, between 0 and 1, sets the root’s probability of splitting. The non-negative parameter β determines how quickly the probability falls in deeper branches. Under the authors’ settings of α = 0.95 and β = 2, trees with 1, 2, 3, 4 and ≥5 leaves have prior probabilities of 0.05, 0.55, 0.28, 0.09 and 0.03, respectively. A prior that favors few leaves still leaves room for a larger tree when the data support it.
Regularizing the structure addresses how complicated a single tree can be. The paper also regularizes its numerical contribution. A shallow tree with very large leaf values could still dominate the sum. To decide what counts as large, the authors start with the implied prior on the sum at a fixed x. Each tree contributes exactly one leaf value there. If the leaf priors have a common normal mean and variance, the independent contributions add to a normal prior on the conditional mean.
h(x) ∼ N(mμ_μ, mσ_μ²)
Here h(x) is the sum at x, m is the number of trees, and μ_μ and σ_μ² are the common prior mean and variance of a leaf value. N denotes the normal distribution. The sum has mean mμ_μ and variance mσ_μ² because each tree contributes one value and the prior treats the components independently. This calculation connects the expected range of the complete fit to a sensible amount of variation in its parts.
[mμ_μ − k√m σ_μ, mμ_μ + k√m σ_μ] = [y_min, y_max]
The bracketed expressions give the endpoints of the calibration interval. Here y_min and y_max are the smallest and largest observed responses. The tuning parameter k specifies how many prior standard deviations of the sum lie on either side of its center, and √m is the square root of the tree count. The other symbols retain their meanings from the prior for h. With k = 2, the authors describe the range as containing about 95% of the prior probability at a fixed x. This is a choice about the scale of plausible means. The observed extremes are used for calibration, and the normal prior allows values beyond that range.
For implementation, the paper shifts and rescales the observed response so that its endpoints are −0.5 and 0.5. The leaf prior can then be centered at 0, and its scale can be written directly in terms of the ensemble size and the shrinkage setting.
μᵢⱼ ∼ N(0, σ_μ²), σ_μ = 0.5/(k√m)
Here μᵢⱼ is a leaf value, σ_μ is its prior standard deviation on the transformed response scale, k controls shrinkage, and m is the tree count. Increasing either k or m narrows the prior for an individual leaf. In particular, raising m spreads the potential contribution across more trees while preserving the calibrated prior scale of the complete sum at a fixed input. The paper recommends k = 2 for automatic use and discusses values from 1 to 3 as choices that worked well in its examples. Predictors do not need corresponding scale adjustments, because the split rules operate on their order.
Calibrating the amount of residual variation
For continuous outcomes, uncertainty about σ matters both to inference and to fitting. If a proposed tree changes the predictions, the size of that improvement is judged relative to the remaining noise. A specification strongly favoring negligible residual variation can encourage trees to fit accidental fluctuations. A specification that expects very large residual variation can make real patterns harder to distinguish.
σ² ∼ νλ / χ²_ν
Here σ² is the residual variance, ν controls the degrees of freedom, λ sets the scale, and χ²_ν denotes a chi-square random quantity with ν degrees of freedom. Dividing νλ by that quantity gives the scaled inverse chi-square prior used in the paper. Its form permits a direct conditional draw of the variance once the current tree predictions and hence the residuals are known.
The authors translate this prior into a choice about a rough upper reference value for σ. When an ordinary least squares fit is available, its residual standard deviation can serve as the reference. The sample standard deviation of the response is another option, particularly when there are too many predictors for the least squares calibration used in the paper. The response standard deviation includes variation due to the signal as well as the noise. It can therefore be substantially higher than the residual standard deviation that the final fit should explain.
Pr(σ < σ̂) = q
Here Pr is probability under the prior, σ is the residual standard deviation, σ̂ is the data-based reference, and q is the chosen probability below that reference. With ν specified, λ is chosen to make the equation hold. The default pair (ν, q) is (3, 0.90). The conservative pair is (10, 0.75), and the aggressive pair is (3, 0.99). With the same reference, assigning a higher quantile to that reference puts more prior support below it. The authors advise against ν below 3 because they found that the resulting concentration on small noise values could lead to overfitting.
For prediction, the authors recommend starting with m = 200. They discuss placing a prior on m or choosing it by cross-validation, both of which add computational work. Cross-validation means evaluating candidate settings on observations withheld from the fit that uses those settings. In the main regression comparison, the default version fixes (ν, q, k, m) at (3, 0.90, 2, 200). It still uses the observed response and a residual scale estimate to calibrate the priors. The tuned version searches a specified range of these settings. The paper uses a different rationale for choosing m when the objective is to distinguish variables by how often they appear.
Updating one tree against the rest
The posterior combines the prior with the evidence in the observed responses. It covers both numerical parameters and a large set of possible branching structures. The authors explore it with Markov chain Monte Carlo, or MCMC. A Markov chain moves from a current collection of trees and parameter values to a new collection by updating selected pieces. Repeated transitions produce draws for estimating features of the posterior, with dependence between successive draws.
p((Tⱼ, Mⱼ) for all j, σ | y)
The expression denotes the joint posterior. The observed response vector is y, while the predictor observations are taken as given. The tree pairs (Tⱼ, Mⱼ) cover all components indexed by j, σ is the noise scale, and p with a vertical bar denotes the distribution conditional on the observed responses.
The sampler starts with m single-node trees. Holding the other trees at their current values, it calculates the part of the observed response available to the tree under update. This partial residual changes when another tree changes. It includes whatever the omitted tree can presently explain together with variation that the current ensemble cannot explain.
Rⱼ = y − ∑ₗ≠ⱼ g(X; Tₗ, Mₗ)
Here Rⱼ is the vector of partial residuals for tree j, and y is the vector of observed responses. X denotes the observed predictor vectors, so g(X; Tₗ, Mₗ) applies tree l to every observation and returns a vector. The sum runs over indices l other than j. Subtraction acts observation by observation. Conditional on the other trees and σ, the evidence for tree j is captured by Rⱼ. Its update consequently has the form of fitting a single tree to a temporary response.
p(Tⱼ | Rⱼ, σ) ∝ p(Tⱼ) ∫ p(Rⱼ | Mⱼ, Tⱼ, σ) p(Mⱼ | Tⱼ) dMⱼ
The left side is the conditional probability of tree structure Tⱼ given the partial residual vector Rⱼ and residual scale σ. The symbol ∝ means “proportional to.” On the right, p(Tⱼ) is the tree prior, and p(Rⱼ | Mⱼ, Tⱼ, σ) is the normal likelihood for the partial residual data given the candidate tree and its leaf values. The remaining factor is the prior density of those values given the tree. The integral, with dMⱼ indicating integration over all leaf values, averages the likelihood under that prior. The normal prior and likelihood make this integral available in closed form. Candidate trees can therefore be scored even when they contain different numbers of leaves.
The algorithm updates the structure with a Metropolis–Hastings step. It proposes a local change to the current tree and uses an acceptance rule based on the conditional probabilities and the proposal mechanism. A rejected change leaves the structure where it was. The paper specifies a grow proposal with probability 0.25, which replaces a leaf with an internal split and its children. A prune proposal, also with probability 0.25, removes a split whose children are leaves. A change proposal with probability 0.40 alters an internal split rule, and a swap with probability 0.10 exchanges rules between a parent and a child. These are proposal probabilities. The frequency with which each proposed move actually changes a tree also depends on whether it is available and on its acceptance.
Mⱼ | Tⱼ, Rⱼ, σ
This notation describes the conditional draw of the leaf values Mⱼ once the tree Tⱼ, partial residuals Rⱼ and noise scale σ are given. The vertical bar indicates conditioning. Each leaf gets a normal draw informed by the partial residuals of observations routed to it and by the common prior. After these new values are in place, the next tree is updated using the revised sum. The separation between the structure step and the leaf step is what lets a grow or prune move change the number of leaves without proposing a simultaneous change between continuous parameter spaces of different dimensions.
σ | T₁, …, Tₘ, M₁, …, Mₘ, y
Here the subscripts run through the m updated trees and their leaf-value sets. The noise scale σ is drawn conditional on those sets and the observed response vector y. The paper obtains the corresponding draw using the inverse-gamma form for the residual variance. The algorithm then starts another sweep through the trees. As it proceeds, a contribution can move from one tree to another, and individual trees can grow and later shrink. The authors report that this ability to redistribute a fit makes the chain easier to explore than the single-tree chain they compare it with.
Turning draws into estimates and intervals
After burn-in, the initial sampling period discarded to reduce the effect of the starting point, the remaining sequence can be used to summarize the posterior. Each saved state gives a complete function. To predict at a new x, the procedure routes that input through the trees of every saved state and sums the corresponding values within each state. The draws can differ in structure and leaf values, so a collection of predictions at that same input reflects both forms of uncertainty.
fₖ*(x) = ∑ⱼ g(x; Tⱼₖ*, Mⱼₖ*)
Here k indexes a saved posterior draw and the asterisk marks a sampled quantity. In this notation k is a draw index, distinct from the shrinkage parameter used in the prior. The index j identifies a tree within the draw. Tⱼₖ* and Mⱼₖ* are the sampled structure and leaf values for that tree. The function g returns its value at x, and fₖ*(x) adds those values across the ensemble.
f̂(x) = (1/K) ∑ₖ fₖ*(x)
The symbol f̂(x) denotes the estimate of the conditional mean at x, K is the number of retained draws, and ∑ₖ aggregates their predictions. The factor 1/K gives each retained state equal weight in estimating the posterior mean. The authors also describe using the posterior median. Taking lower and upper quantiles gives a pointwise posterior interval. It describes uncertainty in the conditional mean at that input. A future observed response has the additional residual variation represented by ε.
To see how the estimated response varies with selected predictors, the paper uses partial dependence. The idea is to hold the selected coordinates at specified values and average over observed values of the remaining coordinates. That averaging makes it possible to examine a curve or surface even when the original regression has many inputs.
f̄(xₛ) = (1/n) ∑ᵢ f(xₛ, xᵢ꜀)
Here xₛ denotes the selected predictor coordinates, xᵢ꜀ is the complementary set of coordinates from observation i, and n is the number of observations used for averaging. The sum ∑ᵢ runs over those observations. The function f is evaluated on the combination of xₛ and xᵢ꜀, and f̄ is the resulting partial dependence. Such combined inputs need not have occurred in the data. To estimate uncertainty, the authors calculate this average separately for each saved function, then summarize the resulting collection of averages using its mean and quantiles. This preserves the variation across posterior functions when passing from a full prediction surface to a marginal curve.
The variable screening statistic addresses a different question. It measures how much of the ensemble’s splitting activity goes to a particular predictor. The authors aggregate within a draw before averaging across draws.
vᵢ = (1/K) ∑ₖ zᵢₖ
Here i indexes a predictor, k indexes a saved draw, and K is the number of saved draws. The quantity zᵢₖ is the proportion of all split rules in draw k that use predictor i. The average vᵢ therefore describes the predictor’s typical share of the splitting rules. A large ensemble can use many optional splits. With fewer trees, predictors that explain substantial variation have more opportunity to take a large share of the available rules. The paper examines that change across fits with different values of m.
Converting a tree sum to a classification probability
A binary response calls for a probability of the positive outcome. The authors retain the real-valued tree sum, then pass it through the standard normal cumulative distribution function. A larger sum gives a larger probability. A sum of 0 gives a probability of 0.5.
p(x) = Pr(Y = 1 | x) = Φ[G(x)]
Here p(x) is the probability of the positive class at x, Y is the binary response taking values 0 and 1, and Pr denotes conditional probability given the inputs. The function G(x) is the sum of the regression trees at x, with the same construction as h(x). The symbol Φ denotes the standard normal cumulative distribution function, which gives the probability that a standard normal draw is at or below its argument. The sum precedes the conversion to a probability. Each tree contributes on the latent numerical scale.
The prior over trees keeps the same structure as in regression. The scale of the leaf values is now calibrated to the range on which G is expected to lie. If most probabilities of interest correspond to scores between −3.0 and 3.0, the paper uses the following prior.
μᵢⱼ ∼ N(0, σ_μ²), σ_μ = 3.0/(k√m)
The leaf value μᵢⱼ belongs to leaf i of tree j, σ_μ is its prior standard deviation, k controls its shrinkage, and m is the number of trees. N is the normal distribution with mean 0 and variance σ_μ². Shrinking the latent sum toward 0 shrinks the probability toward 0.5. The authors describe shifting the center when a different reference probability is appropriate.
G꜀(x) = G(x) + c, c = Φ⁻¹(p₀)
Here G꜀ is the shifted score, G is the original tree sum, and c is the offset. The desired center on the probability scale is p₀, and Φ⁻¹ is the inverse of the standard normal cumulative distribution function. Applying Φ to the offset alone gives that reference probability. The authors also describe adjusting the leaf scale if a different range of plausible probabilities is relevant.
The sampler uses a latent continuous response to keep the regression updates available. Each observation has an unobserved score drawn around the current tree sum with a fixed variance. The observed label tells the algorithm which side of zero that score belongs on.
Zᵢ | G, xᵢ ∼ N(G(xᵢ), 1), Yᵢ = 1 when Zᵢ > 0 and Yᵢ = 0 otherwise
Here i indexes observations, xᵢ is observation i’s predictor vector, and Zᵢ is its unobserved score conditional on G and xᵢ. The normal distribution N has mean G(xᵢ) and variance 1. The binary response Yᵢ records the sign test. In the sampler, the current G and the observed label together determine a truncated normal draw. For a positive label the draw is restricted to the positive side, and for a negative label it is restricted to the other side. Given those draws, the algorithm updates the trees using the latent values as responses. The residual scale stays fixed in this construction, so there is no σ prior to tune.
pₖ*(x) = Φ[Gₖ*(x)]
Here Gₖ* is the sum from saved draw k, pₖ*(x) is the corresponding probability at x, and Φ applies the probability conversion to that draw. The paper averages the resulting probabilities for a point estimate and uses their quantiles for intervals. Because the probability conversion is nonlinear, averaging happens on the probability scale after evaluating each draw. The authors provide the implementation as the BayesTree library for R, with a standalone option, and use it for the reported BART applications.
Experiments and results
Regression across real datasets
The broad prediction comparison uses 42 real regression datasets selected from a collection of 52 considered in earlier work. The authors exclude datasets for which the earlier analysis used a single train/test split or for which the categorical predictors presented a problem for the random forest implementation. Sample sizes in the comparison run from 96 to 6806 observations. There are between 3 and 28 numerical predictors and between 0 and 6 categorical predictors before converting category levels into indicator variables. The authors also use a log or square-root transformation when it makes the response distribution more nearly bell-shaped. The reported prediction errors are therefore for the responses as prepared for the experiment.
For each dataset, the authors construct 20 random splits. The training set contains 5/6 of the observations and the test set contains the remaining 1/6. This yields the paper’s 840 training and test comparisons. The competing methods are the Lasso, gradient boosting, neural networks with one hidden layer, and random forests. Their tuning decisions use 5-fold cross-validation within each training set. Each method is subsequently judged on the held-out observations. The two BART versions both use posterior mean predictions and calibrate the noise prior relative to the least squares residual standard deviation. The authors typically discard 200 burn-in steps and use 1000 sampling iterations.
BART-cv tunes over three noise prior settings, shrinkage values k = 1, 2, 3, 5, and tree counts m = 50, 200. The resulting grid contains 24 choices. The paper counts 121 BART fits for this search and the final refit on one training split. BART-default uses the specified default settings directly. The competitors have their own tuning choices. The Lasso varies the strength of its penalty. Boosting varies the number and depth of trees and the size of updates. Random forests use 500 trees and vary the share of predictors sampled at a split. The neural network comparison adjusts hidden layer size and weight decay, which controls shrinkage of weights.
The basic score is test root mean squared error, or RMSE. It squares the prediction errors, averages those squared errors, and takes their square root. Raw RMSE depends on the scale of the response. To summarize results from different datasets, the authors divide each method’s RMSE by the lowest RMSE achieved by any candidate on the same split. This relative RMSE, or RRMSE, equals 1.0 for a method achieving the lowest error on that split. The median shows the middle of each method’s distribution across all splits. The 75% quantile gives a view of how far above the per-split best the method tends to be in the less favorable part of its distribution.
Median test relative RMSE across the 42 real regression datasets
Tuned BART has the lowest median relative error, and default BART ties the neural network.
The numbers
| System or setting | RRMSE |
|---|---|
| Lasso | 1.196 |
| Gradient boosting | 1.068 |
| Neural network | 1.055 |
| Random forest | 1.053 |
| BART-default | 1.055 |
| BART-cv (this paper) | 1.037 |
The quantiles give BART-default a somewhat different position from the one suggested by the median alone. At the 75% quantile it scores 1.164, behind BART-cv at 1.117 and ahead of random forests at 1.181. Boosting has 1.189, the neural network 1.195, and the Lasso 1.762. The paper also reports the share of splits with RRMSE above 1.5. It is 9.0% for BART-cv and 11.8% for BART-default, with 9.0% for the neural network, 13.6% for boosting, 16.2% for random forests and 29.5% for the Lasso. A method can have a competitive median and still differ appreciably in how its errors are distributed across problems.
The comparison helps separate accuracy from the effort needed to obtain it. The tuned BART fit has the strongest median in this collection, while the default comes close to the other leading methods without selecting settings by cross-validation. The relative scores summarize performance across splits with different winners. They do not identify which method is best for a particular dataset or tell how large a given error is in the original response units. The results describe these prepared datasets, candidate settings and held-out splits.
Checking inference against a known response surface
The simulation starts from Friedman’s test function, where the mean response is known before the data are generated. The inputs are independently sampled, and only the first five predictors affect the outcome. This gives the authors access to the true response surface as well as to the true list of relevant predictors. The other inputs make it possible to test whether irrelevant variables are picked up along the way.
x₁, …, xₚ independently ∼ Uniform(0, 1)
Here x₁ through xₚ are the p predictor coordinates, with Uniform(0, 1) assigning equal density over the interval from 0 to 1. Independence means that drawing a value for one coordinate does not change the distribution of the others. This design lets the authors change p while preserving the relationship among the predictors that enter the response function.
y = f(x) + ε = 10 sin(πx₁x₂) + 20(x₃ − 0.5)² + 10x₄ + 5x₅ + ε
Here y is a simulated response, x is the predictor vector, and f(x) is the sum of the signal terms preceding the final ε. The sine function sin uses the product of x₁ and x₂ scaled by π, the circle constant, giving an interaction between those predictors. The term involving x₃ is quadratic and centered at 0.5. The terms in x₄ and x₅ are linear, with coefficients 10 and 5, respectively. The other signal coefficients are 10 on the sine term and 20 on the quadratic term. The residual ε has a normal distribution with mean 0 and variance 1.
The first illustration uses p = 10 and n = 100 training observations. The authors fit default BART and use 5000 posterior draws after 1000 burn-in iterations. They compare the estimated conditional mean with the known f(x) at the 100 training inputs and at 100 independently selected test inputs. For each x, a 90% posterior interval runs from the 5% to the 95% quantile of predictions across draws. The test estimates show slightly weaker agreement with the truth, and their intervals tend to be wider. In the illustrated fit, coverage of the true conditional mean is 89% at training inputs and 96% at test inputs. Over 200 independent replications, the paper reports average coverage of 87% in sample and 93% out of sample. These are empirical coverage measures for f(x), which the simulation supplies independently of the observed noisy y values.
The same draws provide partial dependence estimates. The authors examine the fitted marginal patterns for the 10 inputs. The curves reveal variation with x₁ through x₅ and are consistent with flat relationships for x₆ through x₁₀. This gives a check on the fitted surface beyond its agreement with the correct means at individual observations. A fit can make accurate predictions at many points while still averaging away or misallocating part of a relationship. Here the known function allows the authors to examine whether the marginal patterns agree with its structure.
They repeat the inference exercise with 100 observations and p = 20, 100 and 1000. In these runs, m is 100, and the noise prior is anchored to the sample standard deviation of the response. The point and interval estimates at training inputs remain close to the known function. At test inputs, increasing the number of irrelevant predictors brings more shrinkage toward the center, particularly for extreme values of f(x), and wider intervals. The chains for σ repeatedly cross its true value of 1, but larger values of p bring more excursions toward higher residual scales. The response standard deviation used to anchor the prior in these examples is 4.87. The authors note that changing the anchor can itself shift the scale estimates.
Predicting the simulated function with many inputs
A separate comparison uses 100 simulated training datasets at each of p = 10, 100 and 1000, with 100 observations per dataset. For each fitted predictor, the authors use 1000 independent evaluation inputs and compare its answers directly with f(x). This test excludes newly generated response noise from the score. The metric is raw RMSE on the signal at those inputs. The BART fits use 3000 sampling iterations after 1000 burn-in draws, and setting selection again uses 5-fold cross-validation.
The competitors are boosted trees, random forests and neural networks. The authors omit the Lasso because the linear specification used in the real-data comparison would require changes to represent the nonlinear signal. At p = 100, they adjust the neural network search to keep the parameter count and shrinkage manageable. At p = 1000, computational difficulties lead them to drop that competitor. As in the previous high-dimensional simulation, BART uses the response standard deviation to anchor the noise prior when p is 100 or 1000.
At p = 10, the median signal RMSE is 0.89 for BART-default and 0.90 for BART-cv. Boosting has 0.99, the neural network 1.01, and random forests 1.25. At p = 100, tuned BART has median RMSE 0.93, followed by default BART at 1.02 and boosting at 1.03. Random forests and the neural network have medians of 1.46 and 1.71, respectively. The reported results at p = 1000 show the importance of the tuning choice most clearly.
Median test signal RMSE on Friedman’s simulation with 1000 predictors
Tuned BART has the lowest median error, while boosting is ahead of default BART.
The numbers
| System or setting | RMSE |
|---|---|
| Random forests | 1.62 |
| Gradient boosting | 1.08 |
| BART-default | 1.48 |
| BART-cv (this paper) | 0.99 |
At p = 1000, the 75% quantile is 1.06 for tuned BART, 1.33 for boosting, 1.66 for default BART and 1.68 for random forests. The tuned and default BART variants have diverged even though the true response still depends on the same predictors as before. At p = 100 or 1000, the paper reports that cross-validation chooses m = 50 with the aggressive σ prior, ν = 3 and q = 0.99, 60% of the time. The authors attribute the results partly to a noise prior that is insufficiently aggressive when its anchor contains substantial signal variation. They also suggest that a smaller ensemble is adequate for this particular signal and may make exploration easier in a space with so many irrelevant inputs.
Ranking compounds by predicted activity
The binary classification example uses molecular descriptors and an observed activity label from a National Cancer Institute dataset. The paper reports 266 predictors and 29,374 compounds, of which 542 are active. The predictors describe aspects of molecular structure. The task posed to BART is to estimate the probability that the recorded outcome is active for an input described by those predictors.
The initial exercise looks at compounds receiving the highest posterior mean probability of activity. The authors report training and test sets of 14,687 compounds each, with 271 active compounds in each set. The probit fit uses m = 50 and k = 2. Four separate chains of 250,000 iterations give essentially the same results in this exercise. Among the 20 highest-ranked compounds, 16/20 = 80% are active in each set. The base rate given for each set is 271/14,687 = 1.85%. The paper displays 90% posterior intervals for the ranked compounds’ probabilities. The average interval width for those shown is 0.47 in the training set and 0.50 in the test set. The result concerns the observed labels in the selected groups. Each compound’s interval still describes uncertainty in its estimated probability.
For the comparison with other classifiers, the authors use different splits so that the experiment can be repeated 20 times. Each training set contains 1000 compounds, with 271 active, and the test set contains 28,374 compounds, also with 271 active. The benchmark compares BART with boosting, random forests, neural networks and support vector machines. L1-penalized logistic regression is excluded because of numerical difficulties. Both BART variants use 10,000 MCMC iterations. The default for this comparison uses m = 200 and k = 2. BART-cv uses 5-fold cross-validation to choose among k = 0.25, 0.5, 1, 2, 3 and m = 100, 200, 400, 800. The competing classifiers likewise use cross-validation to choose their settings.
The metric is the area under the receiver operating characteristic curve, or AUC. It evaluates ranking across possible score thresholds. In the paper’s interpretation, it is the probability that a randomly selected active compound ranks above a randomly selected inactive compound. A random ordering has expected AUC 0.50. The comparison therefore measures how well the fitted scores order positives relative to negatives on the test set. The earlier top-ranked group addresses how many active compounds appear near the head of one particular ordering.
Mean test AUC across repeated splits of the compound activity dataset
Random forests lead the ranking comparison, with tuned BART close to boosting.
The numbers
| System or setting | AUC |
|---|---|
| Random forests | 0.7680 |
| Boosting | 0.7543 |
| BART-cv (this paper) | 0.7483 |
| Support vector machine | 0.7417 |
| BART-default | 0.7245 |
| Neural network | 0.7205 |
The paper gives a corresponding standard error of 0.0040 from an analysis that accounts for which scores came from the same replicate. It reports statistically distinguishable groups in the comparison but judges the practical gaps small. The ranking result is useful context for the main regression benchmark. BART competes with the other methods in this application, and the best result belongs to a different tree ensemble.
What the ablations show
A single tree and a sum leave different residuals
The comparison between a single tree and a collection of trees asks whether one partition can describe the simulated response adequately under the fitting procedure. In the initial Friedman example, the ensemble’s draws of σ fluctuate around the known value of 1 after a short initial period. When m = 1, the chain appears to take longer to settle and keeps σ substantially above the true value. Residual spread is informative here because the simulation fixes the actual noise level. The single-tree fit leaves genuine structure in the residuals, which the noise term then has to absorb. The comparison changes the representation available to the fit. It does not isolate the contribution of every prior or sampling choice.
The authors also change the noise and leaf priors and the number of trees, then compare in-sample and out-of-sample RMSE. Very small ensembles give poor error in this example. Once there are enough trees and k is above 1, several prior settings give similar results. Increasing the tree count well beyond what the fit needs produces only a slight deterioration in the plots. This suggests a broad working range for this particular prediction problem. It also explains why a default based on having enough components can be useful without locating a narrow optimum on the test function.
Fit correlations show how closely predictions can agree under some of these changes. The reported correlation between out-of-sample fits under (ν, q, k, m) = (3, 0.9, 2, 100) and (10, 0.75, 3, 100) is 0.9948. For two runs from different random seeds using (3, 0.9, 2, 200), it is 0.9994. These comparisons address different sources of sensitivity. One compares changes in the prior at the same tree count. The other compares randomness in the sampling run at the same settings. Both concern the resulting point predictions. Their agreement leaves open whether interval endpoints or split counts stabilize just as quickly. The high-dimensional prediction comparison also shows that the agreement between prior settings in the initial simulation has a limited range.
Fewer trees can make split counts clearer
In the variable screening exercise for Friedman’s function, the authors use 500 observations and record predictor usage across 5000 posterior draws for each of m = 10, 20, 50, 100, 200. As the tree count falls, the rules increasingly concentrate on the five predictors that generate the signal. The true relevant set is known in this experiment, so the concentration can be checked directly. The relevant and irrelevant groups become easier to distinguish because the smaller ensemble has fewer opportunities to fit extra partitions. This is consistent with the authors’ explanation that predictors compete more strongly for a place when the number of trees is restricted.
The authors fit their compound activity screening model using all 542 active compounds and a subset of 542 inactive compounds. They use four chains of 1,000,000 iterations to stabilize the split frequencies. At m = 5, 10 and 20 with k = 2, the same three variables have the largest usage, and the concentration is strongest with m = 5. The paper compares observed usage values of 0.050 to 0.100 with an equal-use reference of 1/266 ≈ 0.004. This comparison shows the degree to which the trees favor certain descriptors. The dataset does not supply a known set of truly relevant predictors comparable to the one built into the simulation. Here the evidence is repeatability of the ranking across ensemble sizes.
Extra predictors change uncertainty and computation
In the pure-noise simulation, the authors keep n = 100 and set the true regression function to zero. With p = 10 and p = 100, the intervals at training and test inputs either cover zero or are close to it. At p = 1000, some intervals at training inputs are far from zero, while those at new inputs are very wide and tend to include zero. This analysis tests what happens when there is no signal to recover. With many chances to partition a small sample, a fitted pattern at an observed input can appear stronger than the evidence for that pattern at fresh inputs. The out-of-sample intervals capture the uncertainty in extending it.
The timing experiments examine how much work the trees require as the data grow. At p = 50, the authors vary n from 100 to 10,000 and run each configuration 10 times. A very short configuration uses m = 200, no burn-in and 2 sampling iterations. Its measured time grows approximately linearly with sample size. A configuration with the same tree count, 100 burn-in iterations and 1000 sampling iterations displays a quadratic pattern over the tested sizes. The authors connect the difference to tree growth during longer runs. In a separate experiment with m = 50, average leaf count is 2.52 at n = 100 and 3.34 at n = 10,000, with reported maxima of 4 and 10, respectively. Larger trees require more work to evaluate predictions and proposed changes.
Over the tested range from p = 10 to 100, execution time changes relatively little with predictor count compared with sample size. In another comparison at fixed settings, the authors’ minimal BART run is faster than the other methods and the longer default run is slowest. The minimal run uses 20 burn-in iterations, 10 sampling iterations and 50 trees. It gives very similar fitted values to the default in the small Friedman example with n = 100 and p = 10. These are measurements for particular run lengths and criteria. A timing comparison of training predictions leaves the amount of sampling needed for precise posterior quantities as a separate question.
Limitations
Limits the authors identify
The default priors use the observed range of y and a data-based reference for σ. The authors explicitly acknowledge a loss of Bayesian coherence from using the same data to calibrate the prior and to contribute the likelihood. Their aim is to keep prior beliefs about response scale and noise from being badly at odds with the data when independent information is scarce. The definitions of permissible split values are also based on the available data. The resulting defaults are a practical fitting specification, with their performance assessed by the applications. The paper’s own high-dimensional experiment gives a concrete case where the default noise calibration and tree count prove inadequate for prediction.
The authors likewise qualify their uncertainty results. The intervals for f(x) are pointwise posterior intervals. Their repeated-sampling coverage can vary with location and with the amount of information nearby. The simulations show more shrinkage toward the center when the true value is extreme and the input is poorly supported by the data. The authors note that this can reduce coverage at extreme inputs. Their pure-noise analysis shows another form of dependence on the prior. At the largest predictor count considered, some training intervals suggest apparent structure even though the true function is flat.
The authors describe improved sampling behavior and agreement between runs in their examples. They also state that the run length required for reliable inference depends on the application. A more complex signal can require a longer burn-in or a longer sampling period. The compound example itself uses much longer runs for stable usage frequencies than the real-data regression benchmark uses for point prediction. The timing measurements therefore describe the cost of the chosen implementations and settings. They cannot establish how long an arbitrary new analysis will need to run to achieve comparable accuracy for the quantity of interest.
In variable screening, the authors note that spare tree capacity can give irrelevant predictors a route into the ensemble. They also point out that their default tree prior gives a single-node tree only 5% prior probability. This can encourage splitting even where the predictive benefit is modest. Such extra splits may change the usage statistic without appreciably changing prediction error. The paper suggests examining alternative priors and weighting split counts by the number of observations affected. These possibilities show that a usage score depends on how a split is counted and on how strongly the specification favors splitting.
What the experimental designs leave open
The broad regression benchmark tests a definite collection of datasets and a definite tuning procedure. The dataset selection is partly conditioned by the requirements of the comparison, including the random forest implementation and the availability of appropriate splits. Response transformations also affect what predictive error measures. Pooling relative errors lets the authors compare across different units, but gives each split a scale set by the competitors that happened to be included. It does not establish the practical cost of an error on any one dataset. Repeated splits improve the description of prediction variability within this collection, while reusing observations from the same original datasets. They are not equivalent to drawing a new collection of unrelated regression problems for each split.
The controlled simulation is valuable because it makes it possible to check estimates against the truth. Its predictors are independent, the signal has a fixed form, and the added irrelevant coordinates are independent of the predictors that matter. Recovering the correct support under these conditions does not establish that usage frequencies can distinguish strongly related or interchangeable predictors in other data. In such settings, different splits can offer similar predictive gains. The ensemble’s flexibility permits these choices, and a frequency ranking describes the choices made by the fitted procedure. It does not certify a unique set of underlying influences.
Partial dependence has a related limit. Its averaging operation can join selected predictor values to complementary values that were never observed with them. When a combination is scarce, its prediction can rely more heavily on the fitted representation and prior. Further, averaging over other predictors can flatten a pattern whose direction or strength depends on those predictors. A partial dependence curve summarizes the surface under a particular averaging operation. Its uncertainty interval reflects the fitted function draws passed through that operation and supplies no evidence about the effect of intervening on a predictor.
The compound results establish ranking performance for observed activity labels under the reported splits. The repeated comparison deliberately creates a small training set that includes many active observations relative to its size. AUC evaluates ranking under that design and says little by itself about how well numerical probabilities agree with observed rates at particular score levels. The enrichment among the top 20 compounds belongs to the earlier split and evaluation exercise. The AUC belongs to the repeated experiment with a different training-set size and composition. Combining those results into a single performance claim about one deployment setting would lose the distinction between the two evaluations.
Finally, the paper demonstrates several ways to use the same fitted distribution. Point prediction, pointwise uncertainty, marginal curves and split usage each come from the posterior draws, but each asks for a different kind of summary. Stable prediction across runs is direct evidence for the stability of the reported point predictions in those runs. It leaves the accuracy of rare posterior quantiles, simultaneous uncertainty across locations and reliability of a variable selection decision to be assessed separately. The paper supplies examples of several such checks and does not establish uniform behavior across applications.
What came after
The subsequent citing works listed for BART span Bayesian classification, the optimization of rule lists and the evaluation of dialogue corpora. Their titles establish what problems they address. The citation provides a connection to BART, while the specific use of BART’s priors, trees or posterior computations is unspecified for each of these works.
Letham and colleagues address stroke prediction with Bayesian analysis and interpretable classification rules. The comparison with BART is most direct at the level of representation. BART can use a predictor repeatedly across an ensemble, then describe its role through split usage or a marginal prediction curve. A rule-based classifier foregrounds the rules as objects for a reader to examine. Both works put Bayesian analysis alongside rule-based prediction, with different emphases in how a classifier’s behavior is presented. The available description establishes the stroke application and the emphasis on interpretable rules. Interpretable classifiers using rules and Bayesian analysis
Angelino and colleagues address the learning of certifiably optimal rule lists from categorical data. A rule list makes the ordering of rules part of the representation, while BART adds contributions from branching trees. The reported goals also differ. Certifiable optimality concerns the quality of a solution under the rule-list learning objective. BART’s backfitting produces a distribution over plausible functions and uses sample summaries to report predictions and uncertainty. The citing work gives another setting in which rules structure a predictor, with its stated emphasis on certifying the learned result. Learning Certifiably Optimal Rule Lists for Categorical Data
Aliannejadi and colleagues focus on building and evaluating corpora for open-domain dialogue with clarifying questions. This is a different application area from the regression and binary classification examples in BART. The title identifies corpus construction and evaluation as its contribution. The citation establishes that the dialogue paper refers to BART, and gives no further basis for attributing an ensemble, a probit classifier or a particular evaluation result to that connection. Building and Evaluating Open-Domain Dialogue Corpora with Clarifying Questions
Cite
Cite as Hugh A. Chipman, Edward I. George and Robert E. McCulloch. 2010. BART: Bayesian additive regression trees. The Annals of Applied Statistics.
@article{chipman2010bart,
title = {{BART: Bayesian additive regression trees}},
author = {Hugh A. Chipman, Edward I. George and Robert E. McCulloch},
journal = {The Annals of Applied Statistics},
year = {2010},
doi = {10.1214/09-aoas285},
eprint = {0806.3286},
archivePrefix = {arXiv},
url = {https://doi.org/10.1214/09-aoas285}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/chipman-2010-bart-bayesian-additive-regression-trees/