Improving fairness generalization through a sample-robust optimization method