Learning with Scalability and Compactness