Manuscript Offprint

arXiv:2610.17015

DIME: Scaling Facial Representation Learning via Differential Masked Autoencoding

Hao Yu, Haoyu Chen, Hui Wei, Yan Jiang, Nicu Sebe, Guoying Zhao

Hao Yu, Haoyu Chen, Hui Wei, Yan Jiang, Nicu Sebe, and Guoying Zhao, Fellow, IEEE

Abstract—Scaling up data and model capacity has driven substantial progress in visual representation learning. However, we observe that conventional pretext tasks exhibit diminishing returns on fine-grained facial analysis. We attribute this to a scaling bottleneck: these tasks model the appearance of each image and are dominated by identity, pose, and illumination, so the subtle within-identity facial differences that such analysis depends on contribute little to the training signal. We introduce DIME, a differential masked autoencoder for large-scale facial representation learning. DIME builds on a simple observation: two images of the same person share identity-specific appearance, so their difference exposes how the face changes. DIME therefore reconstructs both masked images in an identity-matched pair and, through an Explicit Differential Direction Supervision (EDDS) objective, aligns the direction of their reconstructed difference with the true difference, while source isolation makes each reconstruction depend only on its own image. The shared appearance cancels in this difference, and because EDDS ignores magnitude, subtle facial changes count as much as large pose or illumination changes. DIME uses identity labels only to form pretraining pairs, requires no dense annotations, and learns dense facial representations with emergent part-level semantics. We pretrain DIME on 20 million high-resolution facial images consolidated from existing face datasets. We show that DIME's AU detection performance continues to improve as pretraining data scales from 6M to 20M images, with its BP4D F1 increasing by 5.9 points, while MAE gains only 0.5 points on the same subsets. DIME also outperforms specialized facial methods on several challenging face-related tasks: AU detection, AU intensity estimation, cross-domain anti-spoofing, landmark localization, head pose estimation, face parsing, and face generation. Our code is available on the project page: https://cv-ac.github.io/DIME_page.

Index Terms—Differential Masked Autoencoding, Facial Representation Learning, Facial Attribute Analysis, Masked Image Modeling.

Figure

(a): Masked AutoEncoder for Learning Appearance

(b): Differential Masked AutoEncoder for Learning Variation

(c): Accuracy vs. Parameters Curve

(d): Scaling on Facial Pretraining

Fig. 1: Scaling facial pretraining via DIME. (a) MAE reconstructs each image in isolation to learn appearance. (b) DIME treats two observations of the same person as a single learning unit and explicitly supervises their difference to model how a face changes. (c) Compared with generic visual encoders, DIME is far more efficient in facial representation learning tasks such as AU detection (mean performance over BP4D [1] and BP4D+ [2]). (d) Pretrained with the same settings and the same amount of facial data, MAE [3] saturates at 6M faces, whereas DIME keeps scaling all the way to 20M.

1 INTRODUCTION

F ACES support a broad range of applications beyond identity recognition [4], [5]. Through action unit (AU) analysis [6], expression understanding [7], face editing [8], and facial attack detection [9], they now shape fields ranging from healthcare and human-computer interaction to immersive media and biometric security. Despite the different prediction targets, these tasks share a perceptual basis of fine-grained deformation, texture, and subtle chromatic variation [7], [10], [11] in faces, which demand representation learning beyond the macro-level identity. Annotating these task-specific cues is costly and often requires domain expertise, leaving only limited labeled data for training task-specific models that are prone to identity and dataset shortcuts. This motivates a generic facial foundation model that preserves both global facial structure and subtle local variations, providing reusable representations of expression, configuration, and surface appearance across subjects.

Self-supervised learning [3], [13], [14] offers a scalable route to such a model, drawing on massive face images without costly dense annotations. Self-distillation methods [13], [15], [16] align predictions across augmented views, and masked image modeling [3], [14], [17], [18] predicts missing content from visible context. Both work well on natural images, whose transferable structure is organized around objects, spatial layouts, and scene semantics.

Applied to faces, however, scaling existing self-supervised paradigms encounters a bottleneck for fine-grained facial representation learning. We measure it on AU detection: AUs [19] encode the activations of individual

H. Yu, H. Chen, H. Wei, Y. Jiang, and G. Zhao are with the ELLIS Institute Finland and CMVS, University of Oulu, Finland. N. Sebe is with DISI, University of Trento, Italy. Corresponding author: Guoying Zhao (e-mail: guoying.zhao@oulu.fi).

Figure

(a): Dense features learned by DIME exhibit high semantic consistency

(b): Dense features under UMAP-PCA visualization

Fig. 2: Emergent capacity of DIME. (a) Cosine similarity between a marked query token (red cross) and all patches, demonstrating that DIME learns robust part-level semantic consistency across distinct facial parts (brighter colors indicate higher similarity). (b) UMAP-PCA [12] visualizations of dense features from DIME-L, DINOv3-L [13], and MAE-L [3]. DIME exhibits more semantically differentiated and structurally aligned facial representations.

facial muscles, and their combinations describe nearly all visible facial dynamics. Detecting AUs requires the subtle and identity-independent cues that many fine-grained facial tasks build on, so AU detection performance serves as a proxy for the quality of learned fine-grained facial representations. Specifically, as shown in Fig. 1(d), we pretrain the masked autoencoder (MAE) [3] on progressively larger sets of face images and fine-tune each pretrained encoder for AU detection on BP4D [1] under an identical protocol. Its F1 score begins to saturate at 6M pretraining images and improves by less than 1% as the dataset more than triples to 20M. This plateau suggests that scaling the pretraining mostly broadens the coverage of coarse appearance without better capturing these fine-grained cues of facial dynamics.

We trace this plateau to the way pixel reconstruction weights the factors of facial variation. Conventional masked image modeling regresses the normalized pixels of each masked patch with a squared loss, so the optimal prediction is their conditional mean given the visible patches. Modeling a factor then lowers the loss by the share of patch variance that it explains and that the visible patches can predict. A model with finite capacity and training time therefore favors factors that explain a large share of each patch, as the optimal low-rank predictor does in the linear case [20]. On aligned faces, most of this variance comes from the shared facial layout [21], identity-specific appearance, and large pose and illumination changes; between face images of the same person, such changes can even exceed the differences between different people [22]. The subtle changes that fine-grained tasks rely on, such as the local deformations of AUs, explain only a small share of each patch and contribute little to the loss. More images thus mainly refine the prediction of the large factors and leave the subtle ones underweighted, consistent with the plateau in Fig. 1(d). Contrastive and self-distillation objectives face a different limit. By making the features of two augmented views agree, they discard whatever the augmentations change [23], including color and geometric cues that facial tasks may need; contrastive facial features, for example, tend to lose pose detail [24].

To scale fine-grained facial representation learning, we propose DIME, a foundation model trained with Differential Masked Autoencoding (Fig. 1(b)). Unlike conventional masked image modeling, which learns the appearance of each image, DIME learns by reproducing how two face images of the same person differ. In their difference, the common-mode component cancels, including the facial layout and identity-specific appearance that dominate pixel reconstruction. What remains is the variation within a single identity, which mixes large pose changes with subtle facial deformations, and we turn it into an explicit learning target.

DIME realizes this idea through three designs. First, to keep the change from being copied, we mask both images and reconstruct them with the same network, so the change at hidden patches must be inferred from visible context. The two reconstructions are compared only through their difference, so their shared appearance never enters the comparison. Second, to keep subtle changes from being outweighed, we supervise this difference with Explicit Differential Direction Supervision (EDDS), which requires the reconstructed difference to point in the same direction as the true difference between the source images. Because EDDS disregards magnitude, missing a subtle change costs as much as missing a pronounced one, whereas a squared loss discounts each change by its energy. Third, we use source isolation masks that restrict attention to tokens of the same image, so neither image can supply the other's hidden patches. With these shortcuts closed, the model can lower EDDS mainly by inferring how a masked patch has changed from how the visible patches of the two images have changed. Pretraining is thereby steered toward fine-grained facial variations regardless of personal appearance.

Our experiments show that DIME keeps improving AU detection with more pretraining data and, using only the cheap identity labels, learns dense and fine-grained facial representations. Under the same training settings, DIME-B gains 5.9 F1 points as the pretraining data grows from 6M to 20M images, whereas MAE-B gains only 0.5 (Fig. 1(d)). This gap matches the analysis above: more data keeps adding fine-grained facial variation for DIME to learn, whereas for MAE it mainly refines the appearance factors. Even the smallest DIME-S surpasses general backbones [3], [13], [14], [25] and facial foundation models [6], [26] in AU detection with 3.7×3.7\times to 13×13\times fewer parameters (Fig. 1(c)). Following the visualization protocol of DINOv3 [13], we show emergent part-level semantics in DIME: its patch features stay within semantically consistent facial parts (Fig. 2(a)) and align structurally across subjects (Fig. 2(b)). Overall, DIME reaches state-of-the-art performance on seven face-related tasks: AU detection, AU intensity estimation, cross-domain anti-spoofing, landmark localization, head pose estimation, face parsing, and face generation. Our contributions are:

• We identify a scaling bottleneck in facial pretraining and propose DIME, which makes facial data scaling effective for learning fine-grained representations.

• We introduce EDDS to turn subtle facial variations into learning targets, enabling DIME to learn fine-grained facial semantics from large-scale face data with only cheap identity labels and no dense annotations.

• We show that the benefits of scaling DIME’s pretraining transfer effectively across a broad suite of facial analysis and generation tasks, where DIME outperforms generic visual foundation models, existing facial foundation models, and domain-specialized methods.

References (100)

  • BP4D-Spontaneous: a high-resolution spontaneous 3D dynamic facial expression database
  • Multimodal Spontaneous Emotion Corpus for Human Behavior Analysis
  • Masked Autoencoders Are Scalable Vision Learners
  • Robust Face Recognition via Sparse Representation
  • 50 Years of Automated Face Recognition
  • Facial Action Unit Detection and Intensity Estimation From Self-Supervised Representation
  • Dynamic Texture Recognition Using Local Binary Patterns with an Application to Facial Expressions
  • Face Generation and Editing With StyleGAN: A Survey
  • Learning Binary-Antithetical Information Bottleneck for Generalizable Face Anti-Spoofing
  • Facial expression recognition from near-infrared videos
  • FSFM: A Generalizable Face Security Foundation Model via Self-Supervised Facial Representation Learning
  • UMAP: Uniform Manifold Approximation and Projection for Dimension Reduction
  • DINOv3
  • MixMAE: Mixed and Masked Autoencoder for Efficient Pretraining of Hierarchical Vision Transformers
  • Emerging Properties in Self-Supervised Vision Transformers
  • DINOv2: Learning Robust Visual Features without Supervision
  • SimMIM: A Simple Framework for Masked Image Modeling
  • Bootstrap Masked Visual Modeling via Hard Patch Mining
  • Measuring facial movement
  • Reduced-rank regression for the multivariate linear model
  • A morphable model for the synthesis of 3D faces
  • Face recognition: the problem of compensating for changes in illumination direction
  • What Should Not Be Contrastive in Contrastive Learning
  • Pose-Disentangled Contrastive Learning for Self-Supervised Facial Representation
  • ConvNeXt V2: Co-Designing and Scaling ConvNets With Masked Autoencoders
  • Representation Learning and Identity Adversarial Training for Facial Behavior Understanding (opens arXiv in a new tab)
  • A Simple Framework for Contrastive Learning of Visual Representations
  • Masked Feature Prediction for Self-Supervised Visual Pre-Training
  • Self-Supervised Learning From Images With a Joint-Embedding Predictive Architecture
  • On Data Scaling in Masked Image Modeling
  • CroCo: Self-Supervised Pre-training for 3D Vision Tasks by Cross-View Completion
  • Siamese Masked Autoencoders
  • General Facial Representation Learning in a Visual-Linguistic Manner
  • PaCo-FR: Patch-Pixel Aligned End-to-End Codebook Learning for Facial Representation Pre-training (opens arXiv in a new tab)
  • FaceMAE: Privacy-Preserving Face Recognition via Masked Autoencoders (opens arXiv in a new tab)
  • LAFS: Landmark-based Facial Self-supervised Learning for Face Recognition
  • MARLIN: Masked Autoencoder for Facial Video Representation Learning
  • MAE-DFER: Efficient Masked Autoencoder for Self-supervised Dynamic Facial Expression Recognition
  • AU-vMAE: Knowledge-Guide Action Units Detection via Video Masked Autoencoder
  • Self-supervised learning of a facial attribute embedding from video
  • Self-Supervised Representation Learning From Videos for Facial Action Unit Detection
  • A Generative Framework for Self-Supervised Facial Representation Learning (opens arXiv in a new tab)
  • FaceLLM: A Multimodal Large Language Model for Face Understanding
  • GPTFace: Generative Pre-training of Facial-Linguistic Transformer by Span Masking and Weakly Correlated Text-image Data (opens arXiv in a new tab)
  • An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Training data-efficient image transformers & distillation through attention
  • Rotary Position Embedding for Vision Transformer
  • Causal Intervention for Subject-Deconfounded Facial Action Unit Recognition
  • D-PAttNet: Dynamic Patch-Attentive Deep Network for Action Unit Detection
  • CaFGraph: Context-aware Facial Multi-graph Representation for Facial Action Unit Recognition
  • Learning Multidimensional Edge Feature-based AU Relation Graph for Facial Action Unit Recognition (opens arXiv in a new tab)
  • WebFace260M: A Benchmark for Million-Scale Deep Face Recognition
  • Killing Two Birds with One Stone: Efficient and Robust Training of Face Recognition CNNs by Partial FC
  • ArcFace: Additive Angular Margin Loss for Deep Face Recognition
  • Towards Real-World Blind Face Restoration with Generative Facial Prior
  • Towards Robust Blind Face Restoration with Codebook Lookup Transformer
  • Hiera: A Hierarchical Vision Transformer without the Bells-and-Whistles
  • FACS3D-Net: 3D Convolution based Spatiotemporal Representation for Action Unit Detection
  • Multi-Label Image Recognition With Graph Convolutional Networks
  • Cross-Modality Attention with Semantic Graph Embedding for Multi-Label Classification
  • Exploiting Semantic Embedding and Visual Feature for Facial Action Unit Detection
  • DISFA: A Spontaneous Facial Action Intensity Database
  • MGRR-Net: Multilevel Graph Relational Reasoning Network for Facial Action Unit Detection
  • Facial Action Unit intensity prediction via Hard Multi-Task Metric Learning for Kernel Regression
  • A Transfer Learning Approach to Heatmap Regression for Action Unit Intensity Estimation
  • Affective Processes: stochastic modelling of temporal context for emotion and facial expression recognition
  • FERA 2015 - second Facial Expression Recognition and Analysis challenge
  • Rethinking Domain Generalization for Face Anti-Spoofing: Separability and Alignment
  • Liveness Score-Based Regression Neural Networks for Face Anti-Spoofing
  • Towards Unsupervised Domain Generalization for Face Anti-Spoofing
  • Gradient Alignment for Cross-Domain Face Anti-Spoofing
  • A face antispoofing database with diverse attacks
  • Face Spoof Detection With Image Distortion Analysis
  • OULU-NPU: A Mobile Face Presentation Attack Database with Real-World Variations
  • On the effectiveness of local binary patterns in face anti-spoofing
  • STAR Loss: Reducing Semantic Ambiguity in Facial Landmark Detection
  • 6d Rotation Representation For Unconstrained Head Pose Estimation
  • AGRNet: Adaptive Graph Representation Learning and Reasoning for Face Parsing
  • Look at Boundary: A Boundary-Aware Face Alignment Algorithm
  • Deep High-Resolution Representation Learning for Visual Recognition
  • ADNet: Leveraging Error-Bias Towards Normal Direction in Face Alignment
  • Recurrence Without Recurrence: Stable Video Landmark Detection With Deep Equilibrium Models
  • Facceptor: A Generalist Model for Face Perception
  • ORFormer: Occlusion-Robust Transformer for Accurate Facial Landmark Detection
  • Face Alignment in Full Pose Range: A 3D Total Solution
  • Random Forests for Real Time 3D Face Analysis
  • A Vector-based Representation to Enhance Head Pose Estimation
  • Multi-Task Head Pose Estimation in-the-Wild
  • RankPose: Learning Generalised Feature with Rank Supervision for Head Pose Estimation (opens arXiv in a new tab)
  • img2pose: Face Alignment and Detection via 6DoF, Face Pose Estimation
  • On the representation and methodology for wide and short range head pose estimation
  • A New Dataset and Boundary-Attention Semantic Segmentation for Face Parsing
  • MaskGAN: Towards Diverse and Interactive Facial Image Manipulation
  • Parameter Efficient Local Implicit Image Function Network for Face Segmentation
  • Decoupled Multi-task Learning with Cyclical Self-Regulation for Face Parsing
  • SegFace: Face Segmentation of Long-Tail Classes
  • Towards High-Quality and Disentangled Face Editing in a 3D GAN
  • A Style-Based Generator Architecture for Generative Adversarial Networks
  • Improved Baselines with Representation Autoencoders (opens arXiv in a new tab)
  • Representation Alignment for Generation: Training Diffusion Transformers Is Easier Than You Think (opens arXiv in a new tab)

Couldn't load all references. Reload the page to try again.