Stochastic gradient descent from RM