# Extra Trees

> Source: https://aiwiki.ai/wiki/extra_trees
> Updated: 2026-11-18
> Fact-checked: 2026-11-18
> Categories: Algorithms, Machine Learning
> License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) - attribute to "AI Wiki (aiwiki.ai)"
> Cite as: AI Wiki. "Extra Trees." aiwiki.ai, 18 Nov 2026. https://aiwiki.ai/wiki/extra_trees
> From AI Wiki (https://aiwiki.ai), the free encyclopedia of artificial intelligence. Reuse freely with attribution.

**Extra Trees** (short for **extremely randomized trees**, also written Extra-Trees or ET) is a tree-based [ensemble learning](https://aiwiki.ai/wiki/ensemble_learning) method for supervised [classification](https://aiwiki.ai/wiki/classification) and [regression](https://aiwiki.ai/wiki/regression) that grows many unpruned [decision trees](https://aiwiki.ai/wiki/decision_tree) and chooses each split's cut-point at random instead of optimizing it. Pierre Geurts, Damien Ernst and Louis Wehenkel of the University of Liège described the algorithm in the paper "Extremely randomized trees", published in the journal *Machine Learning* in 2006 [1]. Compared with a [random forest](https://aiwiki.ai/wiki/random_forest), the method differs in two ways: it draws cut-points uniformly at random within the range of each candidate attribute, and by default it grows every tree on the whole learning sample rather than on a bootstrap replica [1]. The authors reported accuracy that matched or exceeded other tree ensembles on most of their 24 benchmark problems, with markedly faster training [1].

[Scikit-learn](https://aiwiki.ai/wiki/scikit_learn) has shipped the method since its version 0.10 (January 2012) as `ExtraTreesClassifier` and `ExtraTreesRegressor` [9][4], and the R package ranger offers it as a splitting rule [12]. The setting with a single attribute drawn at each node, called totally randomized trees, builds tree structures that do not depend on the output values at all and has been used in [reinforcement learning](https://aiwiki.ai/wiki/reinforcement_learning) and in the theory of variable importance [1][2][14].

## Background

Geurts and colleagues motivated the method by the high variance of single decision trees. Their paper notes that an early experimental study by Mingers (1989) had suggested randomized trees could do as well as classical ones, but that a more careful experiment by Buntine and Niblett (1992) found them significantly less accurate on many datasets [1]. During the 1990s the variance of tree learners such as CART and C4.5 came to be widely recognized, and earlier work by Wehenkel had shown empirically that the optimal cut-point for a given attribute depends very strongly on the particular learning sample, even for large samples [1]. Attempts to smooth or average cut-points reduced this variance but did not translate into significantly better accuracy [1].

Ensemble methods offered another route. [Bagging](https://aiwiki.ai/wiki/bagging) (Breiman, 1996) randomizes trees implicitly by training them on bootstrap samples, the random subspace method (Ho, 1998) searches for the best split among a random subset of attributes at each node, and Breiman's random forests (2001) combine both ideas [1]. Geurts and colleagues argued that these methods, while randomizing tree growth, are still far from building totally random trees, and set out to test whether stronger randomization of both the attribute and the cut-point could improve accuracy further [1].

The algorithm appeared in print a year before the journal paper. Ernst, Geurts and Wehenkel's 2005 article "Tree-Based Batch Mode Reinforcement Learning" in the *Journal of Machine Learning Research* described "two newly proposed ensemble algorithms, namely extremely and totally randomized trees" and used them to approximate Q-functions [2]. The *Machine Learning* paper was received on 14 June 2005 and published online on 2 March 2006, in volume 63, issue 1, pages 3 to 42 [1][3].

## Algorithm

Extra Trees builds an ensemble of $M$ unpruned decision or regression trees with the classical top-down procedure. Every tree is grown from the full original learning sample. At each node with local sample $S$, the splitting procedure works as follows [1]:

1. Stop and create a leaf if $|S| < n_{\min}$, if all attributes are constant in $S$, or if the output is constant in $S$. A leaf stores the class frequencies (classification) or the average output (regression) of $S$.
2. Otherwise, select $K$ attributes $a_1, \ldots, a_K$ at random, without replacement, among the attributes that are not constant in $S$.
3. For each selected numerical attribute $a_i$, find its minimum $a_{\min}^S$ and maximum $a_{\max}^S$ in $S$ and draw a cut-point $a_c$ uniformly in $[a_{\min}^S, a_{\max}^S]$, giving the candidate split $[a_i < a_c]$.
4. Keep the candidate split with the highest score, split $S$ into two subsets, and recurse on each.

For a categorical attribute, the paper's full pseudo-code draws a random proper non-empty subset of the values that appear in $S$ (plus a random subset of the values that do not), and the split sends samples whose value is in that union to one side [1]. The paper's experiments, however, concentrate on numerical attributes [1].

The predictions of the $M$ trees are combined by majority vote in classification and by the arithmetic mean in regression [1].

### Score measures

The same score is used to compare the $K$ random candidates. For regression the paper uses the relative variance reduction. If $S_l$ and $S_r$ are the two subsets produced by a split $s$, then [1]

$$\text{Score}_R(s, S) = \frac{\operatorname{var}\{y \mid S\} - \frac{|S_l|}{|S|}\operatorname{var}\{y \mid S_l\} - \frac{|S_r|}{|S|}\operatorname{var}\{y \mid S_r\}}{\operatorname{var}\{y \mid S\}}$$

where $\operatorname{var}\{y \mid S\}$ is the variance of the output $y$ in $S$. For classification it uses a normalized [information gain](https://aiwiki.ai/wiki/information_gain), $\text{Score}_C(s, S) = 2 I_c^s(S) / (H_s(S) + H_c(S))$, where $H_c(S)$ is the [entropy](https://aiwiki.ai/wiki/entropy) of the class labels in $S$, $H_s(S)$ is the entropy of the split outcome, and $I_c^s(S)$ is the mutual information between the two [1].

### Parameters

The method has three parameters [1]:

| Parameter | Role | Default in the 2006 paper |
|---|---|---|
| $K$ | Number of attributes (and so random splits) screened at each node; controls the strength of attribute selection | $\sqrt{n}$ rounded for classification, $n$ for regression ($n$ = number of attributes) |
| $n_{\min}$ | Minimum sample size for splitting a node; controls averaging of output noise | 2 for classification (fully grown trees), 5 for regression |
| $M$ | Number of trees; controls the strength of variance reduction | 100 in the experiments |

Smaller values of $K$ mean stronger randomization. With $K = 1$, both the attribute and the cut-point are chosen independently of the output, which the authors called **totally randomized trees**. With $K = n$, the attribute choice is no longer randomized and only the cut-points are [1]. The authors chose to fix default values rather than tune them, in order to keep the method's computational advantage and autonomy, and found that adjusting $K$ by 10-fold [cross-validation](https://aiwiki.ai/wiki/cross-validation) gave the same result as the default on 22 of 24 datasets and a better one on two [1].

### Comparison with related tree ensembles

| Method | Training sample per tree | Attributes considered at a node | Cut-point |
|---|---|---|---|
| Tree bagging | Bootstrap replica | All | Optimized |
| Random subspace (local) | Full sample | Random subset of size $K$ | Optimized |
| Random forest | Bootstrap replica | Random subset of size $K$ | Optimized |
| Extra Trees | Full sample | Random subset of size $K$ | Drawn uniformly at random |
| Totally randomized trees | Full sample | One, at random ($K = 1$) | Drawn uniformly at random |

The table summarizes the descriptions in the 2006 paper [1]. The authors also discussed related randomized tree methods: Ali (1995) and Dietterich (2000) picked a test at random among the best-scoring ones, Kamath and colleagues (2002) evaluated splits only at histogram bin boundaries, and Cutler and Guohua's perfect random trees (PERT, 2001) drew a cut-point between the values of two randomly chosen examples from different classes [1]. Geurts and colleagues noted that the first two would still have to score every possible split at each node, losing the computational advantage of Extra Trees, and that PERT does not readily apply to regression [1].

## Empirical results in the original paper

The 2006 evaluation used 24 publicly available datasets, 12 for classification and 12 for regression, with between 2 and 617 attributes and learning samples of 300 to 10,000 observations; 13 of the problems were synthetic [1]. The authors compared pruned and unpruned single CART trees, tree bagging, the random subspace method, random forests and Extra Trees with default settings. For random subspace and random forests they reported the best result over all values of $K$, while Extra Trees used only its default [1].

Using a corrected paired t-test at the 95% level, Extra Trees with default settings never lost on the 12 classification problems against any of the other methods, while random forests lost 5 times against Extra Trees. On regression problems Extra Trees lost once against random subspace and twice against random forests [1]. The authors observed that Extra Trees were visibly (slightly) less accurate than some other ensembles only on the Vehicle and Housing datasets [1].

Training speed was the other main finding. The authors' own C implementation, run with the same $K$ for random forests and Extra Trees, gave the following averages over the datasets [1]:

| Measure | Classification | Regression |
|---|---|---|
| Training time of Extra Trees relative to random forests | 0.36 | 0.81 |
| Number of leaves of Extra Trees relative to random forests | 2.69 | 1.67 |

In classification, Extra Trees were also about 10 times faster than tree bagging on average, and on the largest dataset (Isolet, 617 attributes) more than ten times faster than random forests [1]. The speed comes from not searching for the optimal cut-point and from not needing to pre-sort the learning sample, which the authors note makes the random-forest cost grow linearly with the number of attributes [1]. The trade-off is model size: Extra Trees grew trees with 1.5 to 3 times as many leaves as random forests, though on average no more than about two levels deeper, so the authors judged the extra complexity to matter mainly for memory [1].

The paper also tested combining Extra Trees with bootstrap sampling. Bootstrap replicas give smaller trees and faster training, but the authors found that they reduced accuracy, often significantly [1].

## Bias and variance

The paper's bias-variance analysis, on three classification and three regression problems, found that every ensemble increases bias and reduces variance relative to a single tree, and that Extra Trees reduce variance the most while also increasing bias the most [1]. With $K$ tuned, Extra Trees cut variance relative to a single tree by 95% on average while raising bias by 21% on average, which the authors described as the best trade-off among the methods compared [1]. As $K$ increases, bias falls monotonically and variance rises [1].

The authors explained why this suits classification more than regression. Misclassification error tolerates biased class-probability estimates better than squared error does, so the error-rate optimum in classification lies at stronger randomization (smaller $K$) than the optimum of the squared error of probability estimates [1]. This, in their analysis, is why Extra Trees, totally randomized trees and random forests were usually significantly better than tree bagging in classification but not in regression [1].

Irrelevant attributes are the main weakness of strong randomization. Totally randomized trees pick an irrelevant attribute as often as a relevant one; splitting on it amounts to randomly splitting the sample, which acts like a reduction in sample size. Averaging removes the resulting variance but not the extra bias [1]. On the Pumadyn-32nm regression problem, where 2 of 32 attributes carry over 95% of the information about the output, removing the irrelevant attributes lowered the bias of an ensemble of 100 totally randomized trees from 82.44 to 9.83 [1]. Larger values of $K$ give the algorithm a better chance of filtering out such attributes [1]. The paper set the regression default to $K = n$ because error fell steadily as $K$ grew on all its regression problems except Abalone [1]. Conversely, on the symmetric Two-Norm problem, $K = 1$ was optimal because it preserves the problem's invariance to permutations of the attributes [1].

## Geometric and kernel view

Because cut-points are drawn from a continuous range, an infinite ensemble of Extra Trees produces a smoother function than optimized-split ensembles. Geurts and colleagues showed that for $n_{\min} \geq 2$, as $M \to \infty$ the ensemble yields a continuous, piecewise multi-linear approximation of the learning sample; in one dimension it is piecewise linear [1]. Any finite ensemble is still piecewise constant, and other tree ensembles remain piecewise constant even with infinitely many trees [1]. With fully grown trees ($n_{\min} = 2$) the ensemble interpolates the training outputs exactly [1].

The paper also writes tree ensembles as kernel-based models. For a regression ensemble $T$ of $M$ trees trained on $N$ examples, the prediction is

$$\hat{y}_T(x) = \sum_{i=1}^{N} y_i \, K_T(x_i, x)$$

where $K_T$ is the average over trees of a kernel defined by the normalized indicator functions of the leaves [1]. For totally randomized trees this kernel does not depend on the outputs $y_i$, so the ensemble can be read as a randomized, scale-invariant metric on the input space; the authors described it as an interesting alternative to the [k-nearest neighbors](https://aiwiki.ai/wiki/k_nearest_neighbors) algorithm [1]. Increasing $K$ makes the kernel sharper along directions in which the output varies strongly [1].

## Implementations

### Scikit-learn

Scikit-learn's ensemble module, added in version 0.10 (released 11 January 2012) by Gilles Louppe and Brian Holt, came with "the random forest algorithm and the extra-trees method" [9]. As of scikit-learn 1.9.1 (released September 2026), the relevant classes are [4][5][6][7][11]:

| Class | Purpose |
|---|---|
| `sklearn.ensemble.ExtraTreesClassifier` | Ensemble classifier |
| `sklearn.ensemble.ExtraTreesRegressor` | Ensemble regressor |
| `sklearn.tree.ExtraTreeClassifier`, `ExtraTreeRegressor` | A single extremely randomized tree, effectively a decision tree with `splitter="random"` |
| `sklearn.ensemble.RandomTreesEmbedding` | Unsupervised encoding of data by the leaves of a forest of completely random trees |

The library's user guide describes the method as drawing thresholds at random for each candidate feature and picking the best of these as the split, which "usually allows to reduce the variance of the model a bit more, at the expense of a slightly greater increase in bias" [4]. The source code draws each threshold uniformly between the minimum and maximum value of the feature among the node's samples, as in the paper [8].

Defaults follow the paper's recommendations in some respects and differ in others [4][5][6]:

| Setting | `ExtraTreesClassifier` | `ExtraTreesRegressor` |
|---|---|---|
| `n_estimators` (trees) | 100 (10 before version 0.22) | 100 (10 before version 0.22) |
| `max_features` ($K$) | `"sqrt"` | `1.0` (all features) |
| `bootstrap` | `False` (whole dataset per tree) | `False` |
| `min_samples_split` | 2 | 2 |
| Default split criterion | `"gini"` | `"squared_error"` |
| Prediction | Class with the highest mean predicted probability across trees | Mean of the trees' predictions |

Several differences from the 2006 paper follow from this. The classifier scores candidate splits with [Gini impurity](https://aiwiki.ai/wiki/gini_impurity) by default rather than the paper's normalized information gain, and it averages class probabilities rather than counting votes [1][5]. The regressor grows trees down to `min_samples_split=2`, where the paper used $n_{\min} = 5$ for regression [1][6]. Setting `bootstrap=True` turns on bootstrap sampling and makes out-of-bag scoring available [4][5]. The documentation warns that a single extra tree "should only be used within ensemble methods" [7], and that the default fully grown, unpruned trees can be very large on some datasets [5].

Version 1.6 (December 2024) added support for missing values to the extra-trees estimators: at each candidate split, a random threshold divides the non-missing values, and all samples with a missing value are sent at random to the left or right child [10][5]. Like other scikit-learn forests, the estimators expose impurity-based `feature_importances_`; the user guide warns that such importances are computed on training data and favor features with many unique values, and points to permutation importance as an alternative [4].

### Other software

The R package ranger, "A Fast Implementation of Random Forests", includes extremely randomized trees through `splitrule = "extratrees"` for classification, regression and survival forests, with a `num.random.splits` argument (default 1) for the number of random splits drawn per candidate variable [12]. Its documentation notes that this option randomizes splitting but, unlike Geurts and colleagues' algorithm, does not disable bagging; users who want the original behaviour must set `replace = FALSE` and `sample.fraction = 1` [12]. As of November 2026 the current CRAN release is version 0.18.0 [12].

## Applications and later research

The 2006 paper reported that the method had already been used on very high-dimensional problems such as image classification, mass-spectrometry data and time-series classification, where its computing performance made it, in the authors' words, "a first choice method" [1].

- **Reinforcement learning.** In fitted Q iteration, Ernst, Geurts and Wehenkel approximated the Q-function from a batch of transition four-tuples with several tree-based learners. Totally randomized trees gave good results while guaranteeing that the sequence of approximations converges, and extremely randomized trees gave better accuracy when that guarantee was relaxed [2].
- **Gene network inference.** GENIE3 (Huynh-Thu, Irrthum, Wehenkel and Geurts, 2010) infers a gene regulatory network by predicting each gene's expression from all others with random forests or Extra Trees and reading putative regulatory links from variable importances. It was the best performer in the DREAM4 In Silico Multifactorial challenge; the submitted entry used random forests, and the paper reports that random forests and Extra Trees gave comparable results [13].
- **Variable importance theory.** Louppe, Wehenkel, Sutera and Geurts (NIPS 2013) characterized mean decrease impurity importances for ensembles of totally randomized trees under asymptotic conditions, showing that a variable's importance is zero if and only if it is irrelevant and that a relevant variable's importance does not change when irrelevant variables are added or removed. They then discussed how these properties may change for random forests and Extra Trees [14].

## Limitations

- **Bias.** The authors identified bias as the dominant component of Extra Trees' error and suggested future work on reducing it, for example by combining the method with [boosting](https://aiwiki.ai/wiki/boosting) [1].
- **Irrelevant attributes.** Strong randomization (small $K$) can raise bias considerably when many attributes are irrelevant, as described above [1].
- **Convergence with few trees.** In classification, the authors observed that Extra Trees with default settings converge more slowly with the number of trees than tree bagging or random forests, although they quickly overtake them; totally randomized trees converge more slowly still [1].
- **Memory.** Trees are larger than those of random forests, which mainly affects memory use [1].
- **Noisy outputs.** Ensembles of fully grown trees overfit very noisy data; the authors found that raising $n_{\min}$ restores robustness in such cases [1].

## See also

- [Random forest](https://aiwiki.ai/wiki/random_forest)
- [Bagging](https://aiwiki.ai/wiki/bagging)
- [Decision tree](https://aiwiki.ai/wiki/decision_tree)
- [Gradient boosting](https://aiwiki.ai/wiki/gradient_boosting)
- [Attribute sampling](https://aiwiki.ai/wiki/attribute_sampling)
- [Bias-variance tradeoff](https://aiwiki.ai/wiki/bias_variance_tradeoff)
- [Split](https://aiwiki.ai/wiki/split)

## References

1. Pierre Geurts, Damien Ernst, Louis Wehenkel. "Extremely randomized trees". Machine Learning 63(1), 3-42, 2006 (author's copy, University of Liège ORBi repository). https://orbi.uliege.be/bitstream/2268/9357/1/geurts-mlj-advance.pdf
2. Damien Ernst, Pierre Geurts, Louis Wehenkel. "Tree-Based Batch Mode Reinforcement Learning". Journal of Machine Learning Research 6(18), 503-556, 2005. https://www.jmlr.org/papers/v6/ernst05a.html
3. Crossref. "Extremely randomized trees" (DOI record 10.1007/s10994-006-6226-1). Machine Learning, published online 2 March 2006. https://doi.org/10.1007/s10994-006-6226-1
4. scikit-learn developers. "1.11. Ensembles: Gradient boosting, random forests, bagging, voting, stacking". scikit-learn 1.9.1 documentation. https://scikit-learn.org/stable/modules/ensemble.html
5. scikit-learn developers. "ExtraTreesClassifier". scikit-learn 1.9.1 documentation. https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.ExtraTreesClassifier.html
6. scikit-learn developers. "ExtraTreesRegressor". scikit-learn 1.9.1 documentation. https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.ExtraTreesRegressor.html
7. scikit-learn developers. "ExtraTreeClassifier". scikit-learn 1.9.1 documentation. https://scikit-learn.org/stable/modules/generated/sklearn.tree.ExtraTreeClassifier.html
8. scikit-learn developers. "sklearn/tree/_splitter.pyx" (tag 1.9.1). GitHub. https://github.com/scikit-learn/scikit-learn/blob/1.9.1/sklearn/tree/_splitter.pyx
9. scikit-learn developers. "Older Versions" (Version 0.10, January 11, 2012). scikit-learn release history. https://scikit-learn.org/stable/whats_new/older_versions.html
10. scikit-learn developers. "Version 1.6" (Version 1.6.0, December 2024). scikit-learn release history. https://scikit-learn.org/stable/whats_new/v1.6.html
11. scikit-learn developers. "scikit-learn 1.9.1". GitHub releases, 11 September 2026. https://github.com/scikit-learn/scikit-learn/releases/tag/1.9.1
12. Marvin N. Wright et al. "ranger: A Fast Implementation of Random Forests" (reference manual, version 0.18.0). CRAN, 2026. https://cran.r-project.org/web/packages/ranger/refman/ranger.html
13. Vân Anh Huynh-Thu, Alexandre Irrthum, Louis Wehenkel, Pierre Geurts. "Inferring Regulatory Networks from Expression Data Using Tree-Based Methods". PLoS ONE 5(9): e12776, 2010. https://doi.org/10.1371/journal.pone.0012776
14. Gilles Louppe, Louis Wehenkel, Antonio Sutera, Pierre Geurts. "Understanding variable importances in forests of randomized trees". Advances in Neural Information Processing Systems 26 (NIPS 2013). https://papers.nips.cc/paper/2013/hash/e3796ae838835da0b6f6ea37bcf8bcb7-Abstract.html
