Sample Weight Averaging for Stable Prediction