Robust data representations for visual learning