Add normal distribution regression objective #12550
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 305 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
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.342
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #12550"
general
weight: 0.35
RAMitchell
Summary
Adds
reg:normal, a distributional regression objective that predicts two values per row:The objective supports both one-tree-per-output and shared-topology vector trees. It also adds the
normal-nloglikevaluation metric.Stable variance updates
For log variance $s$, define
$$
z = \left((y-\mu)^2 + \epsilon\right)e^{-s},
$$
where $\epsilon$ is float epsilon. The gradient and pseudo-Hessian are
$$
g_s = \frac{w}{2}(1-z),
\qquad
h_s = \frac{w}{6}(1+2z).
$$
The observed Hessian $wz/2$ vanishes when the residual approaches zero. This can produce an arbitrarily large Newton update for log variance.
The proposed curvature instead gives the fixed-mean leaf update
$$
d = \frac{3(R-1)}{1+2R},
$$
where $R$ is the leaf-average standardized squared residual. This update is bounded to $(-3, 3/2)$, moves toward the exact optimum $\log R$, and provides a conservative quadratic gain estimate.
Adding float epsilon gives the variance a finite optimum when the mean interpolates the observations. It prevents training from continually driving the variance toward zero without introducing a user parameter.
The vector intercept is initialized exactly as the weighted response mean and
$$
\log(\text{weighted residual variance}+\epsilon).
$$
Results
The comparison used shared-topology vector trees on four public regression datasets, with three deterministic train/validation splits.
At
eta=0.3,lambda=1, depth 4, and 100 rounds:| Dataset | Newton validation NLL | Bounded-step validation NLL |
|---|---:|---:|
| Ailerons | 0.3648 | 0.3573 |
| CPU Activity | -0.6502 | -0.7033 |
| Kin8nm | 0.8479 | 0.8218 |
| Wine Quality | 1.2002 | 1.1956 |
In a zero-regularization stress test at
eta=0.1, all 12 observed-Newton runs became non-finite. All 12 bounded-step runs completed 100 rounds without a training-loss increase.A separate interpolation stress test used
eta=1, depth 12, and no regularization. All eight combinations of four synthetic datasets and the two multi-output strategies completed 100 rounds with finite predictions. Constant-label leaves settled at float epsilon variance.Implementation
normal-nloglikmetricmulti_output_treeandone_output_per_tree