Understanding Learning Invariance in Deep Linear Networks