Remove unbiased LambdaRank - #12456
Draft
RAMitchell wants to merge 2 commits into
Draft
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Removes stateful unbiased LambdaRank while preserving lambdarank_unbiased as a warning-and-fallback compatibility option.
Changes:
- Removes CPU/CUDA position-bias state and kernels.
- Adds fallback and legacy-config tests.
- Updates demos and Python/R documentation.
- XGBoost4J-Spark parameters remain outdated and require changes.
Reviewed changes
Copilot reviewed 15 out of 16 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/common/ranking_utils.h |
Removes bias parameters and cache state. |
src/objective/lambdarank_obj.h |
Simplifies shared gradient interfaces. |
src/objective/lambdarank_obj.cuh |
Removes CUDA bias inputs. |
src/objective/lambdarank_obj.cc |
Implements warning and standard-ranking fallback. |
src/objective/lambdarank_obj.cu |
Removes CUDA unbiased calculations. |
tests/cpp/objective/test_lambdarank_obj.h |
Updates test declarations. |
tests/cpp/objective/test_lambdarank_obj.cc |
Tests fallback and legacy loading. |
tests/cpp/objective/test_lambdarank_obj.cu |
Updates CUDA tests. |
tests/cpp/plugin/test_sycl_lambdarank_obj.cc |
Updates SYCL fallback test. |
tests/python/test_ranking.py |
Removes unbiased behavior test. |
python-package/xgboost/testing/params.py |
Removes unbiased generated parameters. |
R-package/R/xgb.train.R |
Updates R parameter API documentation. |
R-package/man/xgb.params.Rd |
Regenerates R documentation. |
doc/parameter.rst |
Documents compatibility fallback. |
doc/tutorials/learning_to_rank.rst |
Documents feature removal and alternative. |
demo/guide-python/learning_to_rank.py |
Removes click-debiasing demo. |
Files not reviewed (1)
- R-package/man/xgb.params.Rd: Generated file
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Member
|
I'm not quite sure about this yet. The state seems quite trivial to fix. |
Member
Author
|
There are a couple more issues:
Stateful objectives break everything. |
Member
|
Both issues are about training continuation:
Does it make sense to do such things? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
lambdarank_unbiasedas a compatibility parameter that warns once and falls back to standard LambdaRankMotivation
Unbiased LambdaRank makes the objective stateful by learning and serializing position-bias vectors. This complicates model I/O, checkpoint/resume behavior, cache dimensions, and parameter changes. Removing the implementation simplifies LambdaRank ahead of separating its CPU and GPU kernels while preserving compatibility for existing configurations.
Closes #12302.
User impact
Setting
lambdarank_unbiased=trueno longer enables unbiased LambdaRank. XGBoost emits a warning and trains with standard LambdaRank. Existing saved configurations containing the parameter or the old bias vectors continue to load.Validation
testxgboostbuild./build/testxgboost --gtest_filter="LambdaRank.*:NDCGCache.*"(9 tests passed)git diff --check