How does Gradient-based One-Side Sampling (GOSS) decide which samples to retain?

Quick Overview

Asks how Gradient-based One-Side Sampling in LightGBM chooses which training rows to keep for each tree. It tests understanding of gradient magnitude as a signal of how informative a row is, the top_rate and other_rate parameters, and why the sampled rows are reweighted.

How does Gradient-based One-Side Sampling (GOSS) decide which samples to retain?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: medium

Interview Round: Other

LightGBM can speed up each boosting iteration by building the tree on a subset of the training rows. How does Gradient-based One-Side Sampling (GOSS) decide which samples to retain? ```hint What the gradient tells you In gradient boosting, the gradient of the loss on a row says how far the current ensemble is from fitting that row. Think about which rows the split gain depends on most. ``` ```hint Watch the sums If you drop rows unevenly, the gradient and hessian sums that feed the split gain change. Consider how you would correct them. ``` ### What a Strong Answer Covers - Which rows are always kept, and why gradient magnitude is the selection signal. - How the remaining rows are sampled, including the roles of `top_rate` and `other_rate`. - The reweighting factor applied to the sampled small-gradient rows, and why it keeps the gain estimate close to unbiased. - The speed and accuracy trade-off, including how much of the data each tree sees. ### Follow-up Questions - Why is the sample drawn fresh at every boosting iteration instead of once before training? - What can go wrong with GOSS when the labels contain outliers or noise? - How does GOSS differ from the uniform row subsampling of stochastic gradient boosting, and when would you prefer one over the other? - LightGBM also uses Exclusive Feature Bundling. What does it reduce, and how does it complement GOSS?

Overview: Asks how Gradient-based One-Side Sampling in LightGBM chooses which training rows to keep for each tree. It tests understanding of gradient magnitude as a signal of how informative a row is, the top_rate and other_rate parameters, and why the sampled rows are reweighted.

General logo
General
Nov 25, 2026
mediumMachine Learning EngineerOtherMachine Learning
0
0

LightGBM can speed up each boosting iteration by building the tree on a subset of the training rows. How does Gradient-based One-Side Sampling (GOSS) decide which samples to retain?

What a Strong Answer Covers Guidance

  • Which rows are always kept, and why gradient magnitude is the selection signal.
  • How the remaining rows are sampled, including the roles of top_rate and other_rate .
  • The reweighting factor applied to the sampled small-gradient rows, and why it keeps the gain estimate close to unbiased.
  • The speed and accuracy trade-off, including how much of the data each tree sees.

Follow-up Questions Guidance

  • Why is the sample drawn fresh at every boosting iteration instead of once before training?
  • What can go wrong with GOSS when the labels contain outliers or noise?
  • How does GOSS differ from the uniform row subsampling of stochastic gradient boosting, and when would you prefer one over the other?
  • LightGBM also uses Exclusive Feature Bundling. What does it reduce, and how does it complement GOSS?