Abstract
Face clustering is essential for organizing massive, unlabelled photo collections, yet "in-the-wild" images present significant challenges due to lighting, occlusions, and pose variations. We introduce Face Transformer (FaceT), a supervised framework that replaces traditional Graph Convolutional Networks (GCNs) with Transformers. FaceT leverages self-attention to aggregate local neighborhood context, effectively "rescuing" challenging samples by pulling them toward their correct cluster centers. Our approach achieves state-of-the-art results on the MS-Celeb-1M benchmark, demonstrating superior scalability and robustness.
Introduction
The task of grouping images by identity without prior labels—face clustering—is a cornerstone of modern photo management systems. However, traditional unsupervised methods like K-Means or DBSCAN often fail when faced with the non-linear distributions and noise typical of real-world datasets. While supervised GCN-based methods have shown promise, they are often limited by rigid graph topologies and the computational overhead of processing large adjacency matrices. FaceT addresses these issues by utilizing the flexible attention mechanism of Transformers to learn complex relationships within local neighborhoods.
Methodology: The Face Transformer (FaceT)
The FaceT framework decomposes clustering into two primary supervised stages: Relation Encoding and Linkage Prediction.
Relation Encoder (RE)
The RE focuses on the $hop_2$ neighborhood (neighbors of neighbors) of a target face. By applying self-attention layers, it aggregates information from the surrounding context to "smooth" the central face's feature representation. This process reduces intra-class variance and increases the distance between different classes, making the subsequent clustering task more tractable.
Linkage Predictor (LP)
The LP operates on the $hop_1$ (immediate) neighbors. It utilizes the enhanced features from the RE to classify whether a pair of images belongs to the same identity. Unlike simple distance metrics, this Transformer-based module learns a non-linear decision boundary for linkage.
Final Clustering
Following linkage prediction, a standard Union-Find algorithm is employed to generate final clusters based on the predicted probabilities and a defined similarity threshold.
Key Insights: Context as a Denoising Tool
A core strength of FaceT is its ability to handle "challenging samples"—images where the subject is partially obscured or in an extreme pose. While such an image might appear as an outlier in isolation, its local neighborhood often contains "cleaner" images of the same individual. The Relation Encoder uses this context to "correct" the outlier's embedding, effectively pulling it into the correct cluster.
As shown in the figure above, the integration of context significantly reduces the overlap between positive and negative edge similarity distributions. This "visual proof" highlights how the Transformer's attention mechanism effectively denoises the local topology, making the linkage prediction task significantly easier.
Experimental Results
FaceT was evaluated on the MS-Celeb-1M (MS1M) dataset, the industry standard for large-scale face recognition and clustering.
- State-of-the-Art Performance: On MS1M (subset 1), FaceT achieved a pairwise F-score of 91.12%, outperforming previous GCN-based leaders like VE-GCN (87.93%) and DS-GCN (87.61%).
- Scalability: The model scales gracefully. Even when tested on 5.21 million images, it maintained a high pairwise F-score of 83.86%, while remaining computationally efficient (28 minutes for the largest subset).
- Versatility: Beyond faces, the model demonstrated strong performance on the DeepFashion dataset, suggesting the framework is broadly applicable to general image retrieval and clustering tasks.
Conclusion
By shifting from GCNs to Transformers, FaceT provides a more robust and scalable solution for face clustering. The use of local context to refine feature embeddings allows the model to overcome the noise inherent in "in-the-wild" datasets, setting a new benchmark for supervised clustering performance.
Summary updated