Mitigating Knowledge Discrepancies among Multiple Datasets for Task-agnostic Unified Face Alignment

Jiahao Xia, Min Xu, Wenjian Huang, Jianguo Zhang, Haimin Zhang, Chunxia Xiao

TL;DR

TUFA (Task-agnostic Unified Face Alignment) is a new framework that unifies knowledge across multiple facial landmark datasets, even when they use different annotation standards (e.g., 68 vs. 98 points). By mapping facial structures onto a shared, interpretable 2D plane, the model achieves state-of-the-art performance and—for the first time—enables "zero-shot" face alignment, where it can locate landmarks it was never explicitly trained to find.

What Problem Does This Paper Address?

Face alignment—the task of identifying specific landmarks like eye corners or lip contours—is a cornerstone of facial recognition and emotion analysis. However, the field suffers from a "knowledge discrepancy" problem. Different datasets use different numbers of points and different semantic definitions (e.g., one dataset might place an "eye corner" slightly higher than another).

Most existing models are "task-specific": a model trained on a 68-point dataset cannot easily predict 98 points without being completely retrained. This fragmentation makes it hard for models to generalize across datasets or adapt to new landmark configurations with limited data. The authors aim to move from these "closed-set" models to a "task-agnostic" system that understands the underlying geometry of the human face.

Methods

The authors introduce TUFA, which treats face alignment as a mapping problem from a canonical 2D plane to a target image.

  1. The Interpretable Plane: Instead of regressing fixed vectors, TUFA calculates a "mean face shape" for every dataset. These shapes are aligned on a shared 2D plane.
  2. Semantic Alignment Embeddings: To fix the "discrepancy" where different datasets define landmarks differently, the authors add learnable embeddings to the mean shapes. These embeddings act as offsets that "nudge" landmarks into a consistent semantic position on the shared plane.
  3. Structure Prompt Encoder: The 2D coordinates of these aligned "anchors" are encoded into high-dimensional "structure prompts" using sine and cosine functions (similar to the positional encodings used in original Transformers).
  4. ViT-based Architecture: The system uses a Vision Transformer (ViT) to extract image features. A transformer decoder then uses the structure prompts as "queries" to attend to the image features and regress the final landmark positions.
  5. Random Masking: During training, the model randomly masks out 75% of the landmarks. This forces the model to learn the global relationship between distant parts of the face (e.g., using the nose to help find the chin) rather than relying on local, neighboring pixels.

Datasets

The model was evaluated on seven major benchmarks, showcasing its ability to handle diverse annotation styles:

  • WFLW: 98 landmarks, known for extreme poses and occlusions.
  • 300W & Masked 300W: 68 landmarks; the industry standard.
  • COFW & COFW68: 29 and 68 landmarks, focused on heavy occlusion.
  • MERL-RAV: 68 landmarks.
  • CelebA-aligned: Used for evaluating zero-shot consistency with 5 landmarks.

Key Insights and Ideas

  • Alignment is the Key: The "aha moment" is realizing that you can't just throw multiple datasets together; you must explicitly align their semantics. By learning a small offset for each dataset's landmarks, the model can finally treat them as a single, unified source of truth.
  • From Points to a Plane: By representing the face as a continuous 2D plane rather than a list of points, the model becomes "task-agnostic." You can "query" any coordinate on that plane, and the model will find the corresponding spot on the human face.
  • The Power of Masking: High masking ratios (75%) actually improve performance. It prevents the model from "cheating" by looking at adjacent pixels and forces it to understand the fundamental structural constraints of a human face.

Key Results

  • State-of-the-Art: TUFA outperformed existing coordinate and heatmap regression methods on the WFLW dataset, achieving a 7.09% improvement in Normalized Mean Error (NME) compared to models trained on single datasets.
  • Few-Shot Champion: With only 10 labeled samples from a new dataset, TUFA outperformed many state-of-the-art models that were trained on the entire dataset.
  • Zero-Shot Capability: TUFA is the first framework to demonstrate landmark-level zero-shot alignment. It can locate "scratch landmarks" (arbitrary shapes) on a face without any specific training for those points, simply by utilizing its understanding of the facial plane.
  • Efficiency: Despite its complexity, the model is efficient; the entire training process can be completed in under five hours on a single A40 GPU.

Limitations and Future Work

The authors acknowledge that TUFA currently only generalizes to landmarks within the face area. If a user tries to generate structural prompts for points far outside the face (e.g., on the neck or hair), the model struggles because the training data doesn't cover those regions.

Additionally, while the model handles geometric discrepancies well, it doesn't explicitly address "domain gaps" like varying lighting conditions or camera sensors across datasets. The authors suggest that future work could explore a more "universal" approach that bridges these environmental gaps alongside the geometric ones.

Summary updated

BibTeX
@article{xia2025mitigating,
  author = {Jiahao Xia and Min Xu and Wenjian Huang and Jianguo Zhang and Haimin Zhang and Chunxia Xiao},
  title = {{Mitigating Knowledge Discrepancies among Multiple Datasets for Task-agnostic Unified Face Alignment}},
  journal = {Int. J. Comput. Vis.},
  year = {2025},
  url = {https://openreview.net/forum?id=ZWiLajIpmd},
}
Figure