Skip to content

[mt] Support feature selection.#11883

Merged
trivialfis merged 17 commits into
dmlc:masterfrom
trivialfis:mt-feat-select
Dec 25, 2025
Merged

[mt] Support feature selection.#11883
trivialfis merged 17 commits into
dmlc:masterfrom
trivialfis:mt-feat-select

Conversation

@trivialfis

@trivialfis trivialfis commented Dec 18, 2025

Copy link
Copy Markdown
Member
  • Column sampling, including feature weights.
  • Cleanup the Init method of the column sampler to avoid cross device copies.
  • Small optimization for the scan kernel with a warp-based implementation.

Feature constraint is not working yet. I will take a deeper look after handling other simpler parameters.

Ref #9043

@trivialfis
trivialfis marked this pull request as draft December 18, 2025 15:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds feature selection support to multi-target trees through column sampling and interaction constraints, along with optimization of the GPU histogram scan kernel. The implementation enables the use of colsample_bynode, colsample_bylevel, and colsample_bytree parameters for multi-target trees, and adds support for interaction constraints.

Key changes:

  • Column sampling infrastructure for multi-target trees with weighted feature sampling
  • Interaction constraint support via FeatureInteractionConstraintDevice
  • Scan kernel optimization from block-based to warp-based processing for better GPU utilization

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/python-gpu/test_gpu_multi_target.py Added test for column sampling functionality
tests/cpp/tree/gpu_hist/test_multi_evaluate_splits.cu Updated test with feature set initialization and pointer changes
tests/cpp/common/test_random.cc Updated tests to use HostDeviceVector API for feature weights
python-package/xgboost/testing/multi_target.py Implemented test helper for column sampling with feature weights
src/tree/updater_gpu_hist.cuh Added column sampler and interaction constraints to multi-target histogram maker
src/tree/updater_gpu_hist.cu Updated to pass column sampler to multi-target implementation
src/tree/updater_colmaker.cc Updated column sampler initialization to use new API
src/tree/split_evaluator.h Removed unused includes and enum, added documentation comments
src/tree/hist/evaluate_splits.h Updated column sampler calls to use new API
src/tree/gpu_hist/multi_evaluate_splits.cuh Changed scan buffer to use DeviceUVector for efficiency
src/tree/gpu_hist/multi_evaluate_splits.cu Optimized scan and evaluation kernels from block-based to warp-based processing
src/tree/gpu_hist/evaluate_splits.cuh Added feature_set and max_active_feature fields, changed pointers to raw pointers
src/metric/elementwise_metric.cu Added NVTX profiling marker
src/common/random.h Updated ColumnSampler::Init to accept HostDeviceVector for GPU compatibility
src/common/device_helpers.cuh Added warp-level helper functions LaneId() and WarpThreads()

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/common/random.h
Comment thread src/tree/gpu_hist/multi_evaluate_splits.cu
Comment thread src/tree/gpu_hist/multi_evaluate_splits.cu
@trivialfis
trivialfis requested a review from Copilot December 19, 2025 14:14
@trivialfis
trivialfis marked this pull request as ready for review December 19, 2025 14:14
@trivialfis trivialfis changed the title [wip][mt] Support feature selection. [mt] Support feature selection. Dec 19, 2025

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 16 out of 16 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/tree/updater_gpu_hist.cuh
Comment thread src/tree/gpu_hist/multi_evaluate_splits.cu
Comment thread python-package/xgboost/testing/multi_target.py
Comment thread src/common/device_helpers.cuh Outdated
@trivialfis

Copy link
Copy Markdown
Member Author

cc @rongou

@trivialfis
trivialfis merged commit ff83ad0 into dmlc:master Dec 25, 2025
87 of 92 checks passed
@trivialfis
trivialfis deleted the mt-feat-select branch December 25, 2025 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants