FATE
FATE copied to clipboard
SBT 算法 regression 任务 使用 tweedie loss 无法收敛
1 问题描述: SBT 算法 regression 任务 使用 tweedie loss 无法收敛。 如下图
2 所用数据:scikit learn 种的 tweedie loss 样例,所使用的“ French Motor Third-Party Liability Claims dataset”。该数据符合 tweedie distribution,适合测试 tweedie loss。 https://scikit- learn.org/stable/auto_examples/linear_model/plot_tweedie_regression_insurance_ claims.html
3 调查报告 经过调研和测试,分析可能的原因如下:
3.1 Loss和Gradient的实现 参考资料: wikipedia:https://en.wikipedia.org/wiki/Tweedie_distribution xgboost代码:https://github.com/dmlc/xgboost/blob/master/src/objective/regression_obj.cu lightgbm代码:https://github.com/microsoft/LightGBM/blob/master/src/objective/regression_objective.hpp
Fate中的tweedie loss以及求导的实现,与xgboost和lightgbm等gbdt的开源软件的实现公式不同。
计算gradient
其他软件中的实现为:
Fate中的实现为:

计算hessian
其他软件中的实现为:
Fate中的实现为:

参照上述公式,对Fate代码进行修改后,打印日志可见gradient和hess的计算值符合预期。
3.2 cipher_compress
按照3.1中公式修正了梯度计算后,仍然无法收敛。 经检查,host段返回的split_info中的sum_gradient和sum_hess数值异常。 在测试中,发现设置cipher_compress = False后,训练结果变的正常。
以下是修正了loss和梯度计算公式,并设置cipher_compress=False的训练结果。 可以看到训练能够收敛。 Training summary: { "best_iteration": -1, "feature_importance": { "Area_5": 5, "BonusMalus": 5, "DrivAge": 1, "Region_11": 3, "Region_19": 2, "Region_22": 7, "host_10000_x1": 4, "host_10000_x13": 1 }, "is_converged": false, "loss_history": [ 640.329026013932, 476.5925096058432, 355.46417902700733, 265.9120654668475, 199.76079680432665 ], "validation_metrics": null }
注意: 1, cipher_compress导致host侧的split_info异常值的原因尚不明确。 2, Fate中的tweedie loss及其求导的实现,如果不是错误,而是本身的设计。还请相关人员澄清一下,谢谢。
hi! 问题已经收到,这边立刻会跟进下
- tweedie loss的问题我们会更正
- cipher compress 在修复后无法收敛的问题,我们排查下 非常感谢反馈
感谢你迅速的回复!期待后续更新:)
This issue has been marked as stale because it has been open for 365 days with no activity. If this issue is still relevant or if there is new information, please feel free to update or reopen it.
This issue was closed because it has been inactive for 1 days since being marked as stale. If this issue is still relevant or if there is new information, please feel free to update or reopen it.