diff --git a/src/tree/gpu_hist/evaluate_splits.cu b/src/tree/gpu_hist/evaluate_splits.cu index f3045f147dde..8241960b9d52 100644 --- a/src/tree/gpu_hist/evaluate_splits.cu +++ b/src/tree/gpu_hist/evaluate_splits.cu @@ -68,6 +68,24 @@ void EvaluateSplits(common::Span out_splits, reduce_val, thrust::make_discard_iterator(), out_reduce.data(), thrust::equal_to{}, [param] __device__(DeviceSplitCandidate l, DeviceSplitCandidate r) { + if (l.loss_chg == r.loss_chg + && l.left_sum.GetHess() >= param.min_child_weight + && l.right_sum.GetHess() >= param.min_child_weight + && r.left_sum.GetHess() >= param.min_child_weight + && r.right_sum.GetHess() >= param.min_child_weight) { + // tie-breaking logic + // 1. Favor lower feature ID + if (l.findex != r.findex) { + return (l.findex < r.findex) ? l : r; + } + // 2. If using same feature ID, favor kLeftDir direction + if (l.dir == DefaultDirection::kLeftDir) { + return l; + } + if (r.dir == DefaultDirection::kLeftDir) { + return r; + } + } l.Update(r, param); return l; });