Hi, I’m working on implementing the Pareto efficient fairness algorithm for fairness mitigation that involves a composite loss function as given below:
loss1 = cross-entropy loss
loss2 = lambda * (alpha * L1-norm(error) + (1-alpha)* variance(error))
loss = loss1 + loss2
where, error is a vector of subgroup metrics(accuracies).
Is loss2 differentiable? Also, how do I get the gradients of loss1 and loss 2 w.r.t model parameters separately?