-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to set delta_metric to identity in pairwise objective #11261
Comments
If you are referring to the rank net loss, then simple |
If that is the case, then I can't explain the performance drop I'm seeing in version 3.0.0 compared to 1.7.8. I'm using this parameters to try to reproduce the behaviour of 1.7.8 in 3.0.0 (full query optimization by rank without normalization and pairing method 'mean' as metric is spearman correlation):
I'll try to upload a portion of the data as a dataset on Kaggle along with code to reproduce the issue. |
|
I have trained the same model with the same data using versions 1.7.8 and 3.0.0. The only changes in the code are the parameters for version 3.0.0:
The learning with version 1.7.8 is stable and reaches a correlation of 0.0317 at 13K trees:
The result with version 3.0.0 does not improve after a few trees:
This happens with different dataset subsets, different sets of predictive variables, different general parameters (depth, colsample_bytree, lambda...)
Training with the number of pairs set to 10 the behavior is similar with 3.0.0, it quickly starts to degrade:
I'm not C++ coder and follow the differences between 1.7.8 and 3.0.0 is hard to me as is a whole new refactoring, but I think something is different to cause this behaviors. |
Ok, I get it now. The ranknet loss has no delta metric (1.0), but the 1.0 is normalized by the ranking score difference, which is undesirable. |
I've seen that you've disabled pair normalization in pairwise. This is the behavior of version 1.7. |
Thank you for pointing it out. It's made to prevent overfitting by "smoothing" things out. Sometimes it can make training stagnate as in your example. There are some other similar operations like the one employed by At the time of reworking the ranking, I did some tuning for some popular benchmarking datasets like the MSLR and found the normalization useful. On the other hand, as noted in https://xgboost.readthedocs.io/en/latest/tutorials/learning_to_rank.html#obtaining-good-result , I also find it quite difficult to get good results. Your experiments are welcome and feel free to make suggestions! I will try to make it an option instead. |
@trivialfis This seems fixed with the PR, thank you!
About normalization, I'm thinking in something like: Thank you again! |
delta_metric have been introduced from version 2 refactoring:
xgboost/src/objective/lambdarank_obj.h
Lines 111 to 126 in 600be4d
respect the way of computing gradient and hessians in 1.7 versions:
xgboost/src/objective/rank_obj.cu
Lines 876 to 892 in 36eb41c
Where is defined delta and which is its default value in master version?
My cases of use don't need any delta function to overweight top elements of each query as I'm optimizing spearman correlation of the whole query.
I would like not use delta function to weight pairs.
Is possible disable it or set to identity function?
The text was updated successfully, but these errors were encountered: