← Back to Pull requests

[Breaking] Replace DART with tree subsampling #12536

Closed
unknown closed this pull request without merging on Sep 21, 2026 11:50 UTC
View on GitHub
unknown unknown commented on Sep 04, 2026 11:32 UTC
Author

Closes https://github.com/dmlc/xgboost/issues/12339.

Summary

Replace DART tree-reweighting normalization with expectation-preserving tree subsampling applied to the temporary training prediction.

For tree retention probability $q$, each existing tree is independently retained with

m_i \sim \mathrm{Bernoulli}(q),

and gradients are calculated from

\widetilde{F}(x) = F_0(x) + \frac{1}{q}\sum_i m_i F_i(x).

The base score or base margin $F_0$ is protected from normalization, giving

\mathbb{E}\left[\widetilde{F}(x)\right] = F(x).

The new tree is committed normally without modifying the weights of existing or newly added trees.

Motivation

Existing DART normalization repeatedly modifies historical tree weights. This changes the effective convergence behavior and complicates prediction caching, serialization, model continuation, and inference.

The new formulation treats the existing trees as a sampled training input:

  • Existing trees retain fixed coefficients.

  • New trees are committed normally.

  • Newly trained models do not create or serialize weight_drop.

  • Inference uses the ordinary additive-tree path.

  • Normalization is applied only to the temporary training prediction.
  • Parameters and migration

  • Add tree_subsample, the probability of retaining each existing tree, with $0.000001 \leq q \leq 1$ and default $q=1$.

  • When tree_subsample is absent, deprecated rate_drop=r is converted to tree_subsample=1-r.

  • The conversion warning explains that this preserves the uniform tree-retention probability but not legacy DART normalization, and links https://github.com/dmlc/xgboost/issues/12339.

  • If both parameters are supplied, tree_subsample takes precedence.

  • sample_type, normalize_type, one_drop, and skip_drop have no exact conversion. They are ignored with removal warnings that link the same issue.

  • booster=dart remains accepted as a deprecated alias for gbtree and warns that legacy DART normalization has been removed.
  • Relation to row subsampling

    Tree subsampling introduces variance into training and can help reduce overfitting similarly to row subsampling.

    Row subsampling perturbs only the tree fitted in the current round, so its relative influence on the total ensemble prediction diminishes as the ensemble grows. Tree subsampling perturbs every accumulated tree at the same per-tree probability, so its effect does not vanish merely because the ensemble contains more trees.

    Consequently, the omitted-tree fraction 1 - tree_subsample will often need to be smaller than the omitted-row fraction 1 - subsample.

    Compatibility

    This is an algorithmically breaking change: the legacy DART normalization algorithm is removed rather than emulated. Existing configurations remain parseable, and rate_drop receives an explicit conversion and behavioral warning instead of being silently ignored.

    Legacy weighted DART models remain loadable and retain their historical tree weights for prediction. New rounds appended to legacy models are committed with unit weight.

    Performance

    This PR does not attempt to optimize sampled training prediction. The current implementation expresses the random sample through temporary prediction weights and still traverses the full ensemble. A future optimization can predict only the omitted trees and subtract their contribution from the cached full prediction.

    Testing

  • CPU library and testxgboost build successfully.

  • Focused native parameter migration, serialization, unbiasedness, sampled-prediction, and deprecated-alias tests pass.

  • Focused Python tree-subsampling and multi-output tests pass.

  • Property-based serialized training-continuation testing passes.

  • C++ formatting, C++ lint, and git diff --check pass.
  • CUDA, R, JVM, and Ruff validation are left to CI.

    Diff: 481 lines (+360 / -121) across 6 files Reviewer: RAMitchell Review duration: 24498m
    All Vouch review confidence checks passed
    Residual risk 0.19 = Change Risk (0.47) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.47 · 481 lines diff across 6 files
    0.47
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.370
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #12536"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 47.3% (MEDIUM) · Higher = larger blast radius
    47.3%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 18.7% · Safe to merge
    18.7%
    Repository