A Theoretical Perspective: How to Prevent Model Collapse in Self-consuming Training Loops