MonoCon: A general framework for learning ultra-compact high-fidelity representations using monotonicity constraints