Grokking as Compression: A Nonlinear Complexity Perspective