Gradient-Driven Rewards to Guarantee Fairness in Collaborative Machine Learning