Scaling Laws with Hidden Structure