Abstract:To tackle low accuracy caused by limited generalization in few-shot Android malware family classification, this paper proposes SupProto, a dynamic prototype network driven by supervised contrastive learning. SupProto uses SupCon to refine the embedding space, improving inter-class separation and intra-class compactness, and adopts a dynamic prototype mechanism based on hierarchical clustering and silhouette coefficients to handle multimodal family structures. In terms of input and encoding design, RGB images are constructed from multi-source static features to provide unified and discriminative representations, while a DenseNet121 combined with a CBAM attention module strengthens feature extraction. Experiments on Drebin and CIC-InvesAndMal2019 show that SupProto achieves 90.59% and 85.64% accuracy in 5-way 5-shot settings, and 75.56% and 67.96% in 5-way 1-shot settings.