Why High-rank Neural Networks Generalize?: An Algebraic Framework with RKHSs