How to Differentiate Learning