面向鲁棒人脸识别的难样本条件化解耦注意力

·

研究论文 · 2026/11/06

该论文提出ViT-HarDis,一种基于样本难度的注意力头解耦方法,用于鲁棒人脸识别。多头部注意力在ViT中可能学习冗余模式,现有相关性惩罚对所有样本统一正则化。ViT-HarDis根据样本与负类中心的余弦相似度(即难度)施加不同的解耦强度,对难样本加强头解耦,促进身份模糊处的特化。实验表明,在多数基准上优于基线及统一解耦方法;分析显示该方法降低难样本与竞争类中心的相似度及头间注意力相似度,且仅对最后几层Transformer解耦优于全网正则化。在WebFace4M上训练,于IJB-B、IJB-C和TinyFace Rank-1上达到ViT类方法SOTA;在MS1MV3上训练,在IJB-B和TinyFace上取得最佳结果,且无需架构修改或额外推理成本。

该论文针对人脸识别中难样本的优化问题,提出了一种简单有效的注意力解耦方法,在不增加推理成本的情况下显著提升性能,且分析深入,具有较高的实用价值和启发意义。

Multi-head attention in Vision Transformers (ViTs) allows independent attention patterns across heads, but without explicit regularization, heads may learn redundant patterns rather than complementary roles. Correlation-based penalties encourage head disentanglement, yet apply uniform regularization across all training samples. In face recognition (FR), hard samples whose embeddings lie close to competing identities are critical for optimization and generalization. Motivated by this, we propose ViT-HarDis, which conditions attention head disentanglement on sample difficulty: samples with high cosine similarity to negative class centers receive stronger head decorrelation, enforcing specialization where identity ambiguity is highest. Experiments show improvements over both the baseline and uniform disentanglement on most benchmarks. Our analysis shows that ViT-HarDis reduces the similarity of hard samples to competing class centers while decreasing inter-head attention similarity, and that applying disentanglement only to the final transformer layers outperforms regularizing the entire network. Trained on WebFace4M, ViT-HarDis achieves SOTA results among ViT-based methods on IJB-B, IJB-C, and TinyFace Rank-1, while achieving the best IJB-B and TinyFace results when trained on MS1MV3, improving FR without architectural modifications or additional inference cost. Code: https://github.com/TaharChettaoui/Hard-Sample-Conditioned-Attention-for-FR.

阅读原文

参与讨论