From sessions to a gradient step