GMGaze: MoE-Based Context-Aware Gaze Estimation with CLIP and Multiscale Transformer

Xinyuan Zhao, Yihang Wu, Ahmad Chaddad, Sarah A. Alkhodair, Reem KatebarXiv 2026

TL;DR

GMGaze is a novel 3D gaze estimation framework that addresses feature entanglement and inefficient model scaling by combining CLIP semantic priors, multi-scale token fusion, and a sparse Mixture-of-Experts (MoE) Transformer. By disentangling environmental factors from gaze-relevant features early in the network, it achieves state-of-the-art performance across major within-domain and cross-domain benchmarks.

What Problem Does This Paper Address?

Appearance-based 3D gaze estimation aims to map a monocular RGB face image to a 3D gaze direction. While highly useful for applications like augmented reality and behavioral analysis, real-world deployment is plagued by "nuisance factors" like shifting illumination, varied head poses, and cluttered backgrounds.

The authors identify three fundamental limitations in existing architectures:

  1. Late Fusion: Merging multi-scale representations only at deeper layers limits the rich interaction between high-level semantic context and fine-grained visual details.
  2. Entangled Representations: Standard global image embeddings (like those from CLIP) fail to isolate gaze-predictive features from environmental noise.
  3. Inefficient Capacity Scaling: Uniformly scaling up dense networks wastes computational power on uninformative image regions (like background pixels) instead of focusing on subtle peri-ocular cues.

Methods

To overcome these challenges, the authors introduce GMGaze (Globally-conditioned Multi-scale Gaze estimation), which relies on three core architectural pillars:

  • Semantic Prototype Conditioning (SPC): To untangle the global image representation, the model uses a frozen CLIP text encoder to initialize four learnable prototype banks representing illumination, background, head pose, and description. A discrete selection mechanism (optimized via a Straight-Through Estimator) generates two complementary, context-biased global tokens ($f_1$ and $f_2$).
  • Early Unified Token Fusion: Instead of late-stage merging, GMGaze projects and concatenates the global semantic tokens ($f_1, f_2$), intermediate-scale CLIP patch tokens ($T_{patch}$), and fine-scale local CNN tokens ($T_{cnn}$) right at the input layer of the Transformer. This allows cross-scale interactions from the very beginning.
  • Mixture-of-Experts (MoE) Transformer: The standard Feed-Forward Networks (FFNs) in the Transformer layers are replaced with sparse MoE blocks. A Top-2 gating mechanism dynamically routes individual tokens to specialized experts, allowing the model to allocate computational capacity adaptively based on token type or environmental conditions.

For cross-domain scenarios, an adversarial domain discriminator is paired with a feature separation loss that forces $f_1$ and $f_2$ to remain orthogonal, maximizing their informational complementarity.

Figure 2: Flowchart of GMGaze. Left: Pre-defined prompt banks (Illuminations, Backgrounds, Head poses, and Descriptions) are encoded by the frozen CLIP text encoder to initialize learnable semantic prototype banks. Middle: A CLIP image encoder outputs a global embedding and patch tokens; a CNN provides high-resolution local tokens. The semantic tokens T𝐼1, T𝐻1, T𝐵1, and T𝑑encode key contextual dimensions: Illumination, Head pose, Background, and Description. Prototype similarity and discrete selection produce two conditioned global tokens 𝑓1 and 𝑓2, which are assembled with patch (𝑇patch) and CNN (𝑇cnn) tokens. Right: All tokens are projected to a unified dimension, concatenated, and processed by stacked transformer layers whose Feed-Forward Networks (FFN) are replaced by routed-and-shared MoE experts to predict the 3D gaze direction (𝑑𝑥, 𝑑𝑦, 𝑑𝑧).

Datasets

The framework was evaluated on four widely used public gaze estimation benchmarks:

  • MPIIFaceGaze (M): Images collected in everyday life scenarios with 15 participants.
  • EYEDIAP (E): Video recordings of 14 subjects under screen-target tracking sessions.
  • Gaze360 (G): A large-scale dataset spanning indoor and outdoor environments with a wide range of head poses and distances.
  • ETH-XGaze (Et): Over 756,000 high-resolution images encompassing extreme head poses and complex studio lighting conditions.

Key Insights and Ideas

  • Early Fusion Prevents Information Loss: Ablation studies confirmed that fusing semantic and visual tokens early consistently outperforms intermediate or late fusion. It allows global context to guide the processing of local visual features through self-attention.
  • Tokens Deserve Specialized Pathways: Replacing dense FFNs with sparse MoE layers prevents the model from overfitting to dominant modes (like well-lit frontal faces). The routing analysis revealed that different experts naturally specialize in specific modalities or environmental conditions.
  • Text Prompts as Semantic Anchors: Freezing the text backbone and optimizing only the initialized continuous prototypes strikes an ideal balance. It exploits robust CLIP priors while allowing the model to adapt to dataset-specific gaze patterns without degrading zero-shot capabilities.
Figure 3: (Left): Example of dense transformer layer, which consists of multi head attention (MHA) followed by a FFN. (Right): MoE transformer layer in which a FFN block is replaced by a set of experts, which operate in parallel. The final prediction head ultimately yields the 3D gaze direction predictions (𝑑𝑥, 𝑑𝑦, 𝑑𝑧).

Key Results

GMGaze achieved state-of-the-art (SOTA) results across all evaluated settings:

  • Within-Domain Performance: The model achieved mean angular errors of $1.44^\circ$ on ETH-XGaze, $10.16^\circ$ on Gaze360, $3.22^\circ$ on EYEDIAP, and $2.49^\circ$ on MPIIFaceGaze, outperforming all previous baselines. The improvement on ETH-XGaze (down from the previous best of $3.28^\circ$) highlights its exceptional capability in handling complex illumination and pose variations.
  • Cross-Domain Robustness: In domain generalization and fine-tuning tests, GMGaze set new SOTA benchmarks on standard transfer routes, such as $ETH\text{-}XGaze \rightarrow MPIIFaceGaze$ ($4.81^\circ$) and $Gaze360 \rightarrow MPIIFaceGaze$ ($5.53^\circ$).
  • Efficiency: Despite having 165.2M total parameters, freezing the CLIP image encoder means only 79.2M parameters are trainable. At inference time, the sparse MoE routing activates only 129.03M parameters, offering a highly competitive accuracy-to-flop trade-off compared to dense Transformers.

Limitations and Future Work

While powerful, GMGaze has a few limitations:

  • Discrete Granularity: The hard argmax selection for prototypes can struggle to represent smooth, continuous environmental changes, such as gradual lighting transitions.
  • Temporal Blindness: The current model operates strictly on single frames, missing out on temporal consistency cues available in video streams.
  • Cross-Domain Asymmetry: Performance gains were less pronounced when transferring from highly diverse datasets to low-diversity, lab-controlled environments (like EYEDIAP), where the model occasionally over-specialized.

Future Directions: The authors plan to explore data-driven, dynamically adapting prototypes, extend the architecture to video using temporal attention mechanisms, and apply expert distillation/pruning to compress the model for deployment on VR/AR headsets and mobile devices.

Summary updated

BibTeX
@misc{zhao2026gmgaze,
  author = {Xinyuan Zhao and Yihang Wu and Ahmad Chaddad and Sarah A. Alkhodair and Reem Kateb},
  title = {{GMGaze: MoE-Based Context-Aware Gaze Estimation with CLIP and Multiscale Transformer}},
  year = {2026},
  eprint = {2605.00799},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2605.00799},
}
Figure