(1) unequal #samples from each feature (2) gradients of all loss functions