Adaptive Ensemble Learning With Category-Aware Attention and Local Contrastive Loss