A Unified and Stable Risk Minimization Framework for Weakly Supervised Learning with Theoretical Guarantees