Short and Long Range Relation Based Spatio-Temporal Transformer for Micro-Expression Recognition

Liangfei Zhang, Xiaopeng Hong, Ognjen Arandjelovic, Guoying Zhao

TL;DR

Researchers have developed the first purely Transformer-based architecture for Micro-Expression Recognition (MER), moving away from traditional convolutional neural networks (CNNs). By combining long-term optical flow with a spatio-temporal transformer (SLSTT), the model captures both subtle local movements and global facial relationships, becoming the first to achieve an unweighted F1-score above 0.9 on standard benchmarks.

What Problem Does This Paper Address?

Micro-expressions (MEs) are the "tells" of the human face—involuntary, fleeting facial movements (lasting only 0.04s to 0.2s) that reveal true emotions even when someone tries to hide them. Because they are so brief and low-intensity, recognizing them automatically is incredibly difficult.

Existing methods have largely relied on CNNs. While CNNs are excellent at picking up local patterns (like the twitch of a lip corner), they struggle to capture "long-range" spatial relationships—how a movement in one part of the face relates to another far away. Furthermore, many models struggle to integrate the temporal (time-based) aspect of these blink-and-you-miss-it expressions effectively.

Methods

The authors propose the Short and Long range relation based Spatio-Temporal Transformer (SLSTT). This is a "pure" transformer approach, meaning it completely avoids convolutional layers. The architecture consists of three main stages:

  1. Long-term Optical Flow: Instead of calculating motion between consecutive frames (which is often too subtle to detect), they calculate the optical flow between every frame and the onset (starting) frame. This creates a more stable and structured representation of the entire motion trajectory.
  2. Spatial Transformer Encoder: Based on the Vision Transformer (ViT) architecture, this stage treats facial patches as a sequence. By using self-attention, the model can simultaneously learn local "short-range" features within a patch and global "long-range" relationships between distant parts of the face.
  3. Temporal Aggregation (LSTM): To handle the sequence of frames, the authors use a three-layer Long Short-Term Memory (LSTM) block. This fuses the spatial features from each frame into a single representation of the entire video clip for final classification.

Datasets

The model was evaluated using a Leave-One-Subject-Out (LOSO) cross-validation strategy on three major spontaneous micro-expression datasets:

  • SMIC-HS: 164 sequences, 3 emotion classes.
  • CASME II: 247 sequences, 5 emotion classes.
  • SAMM: 159 sequences, 8 emotion classes.
  • Composite Database: A merged set of all three used for broader evaluation.

Key Insights and Ideas

  • The "Pure" Transformer Advantage: By ditching CNNs, the model doesn't have to wait for deep layers to understand global facial context. It considers the relationship between all facial regions right from the first encoder layer.
  • Onset-to-Frame Flow: The decision to use "long-term" optical flow (comparing back to the onset frame) is crucial. In MEs, the motion is so small that frame-to-frame differences are often lost in the noise. Comparing to the neutral starting point makes the "signal" of the expression much clearer.
  • Nuanced Learning: The authors found that their model performed exceptionally well on "fine-grained" tasks (like the 5-class CASME II) compared to simpler 3-class tasks. This suggests the transformer is particularly good at picking up the subtle nuances that distinguish similar emotions.

Key Results

The SLSTT model set new state-of-the-art (SOTA) records across the board:

  • Breaking the 0.9 Barrier: It is the first framework in published literature to achieve an unweighted F1-score (UF1) greater than 0.9 (specifically 0.901 on the CASME II dataset in the composite setting).
  • SDE Performance: In Sole Database Evaluation, the LSTM-based version achieved an accuracy of 75.00% on SMIC-HS and 75.81% on CASME II, significantly outperforming previous CNN and GCN-based methods.
  • Consistency: The model consistently outperformed rivals in both accuracy and F1-score across different ethnic groups and camera types represented in the three datasets.

Limitations and Future Work

The authors acknowledge a few hurdles that remain for the field:

  • The AU-Emotion Gap: The mapping between Facial Action Units (AUs) and actual emotions isn't always a perfect 1-to-1 match, which can lead to "noisy" labels in datasets.
  • Visual Only: Currently, the model only uses video data. The authors suggest that incorporating multi-modal signals (like depth information or physiological sensors) could further improve accuracy.
  • Dataset Size: While these are the "large" datasets of the field, they are still relatively small for training massive transformer models, making the risk of overfitting a constant concern that requires careful regularization (like the cosine annealing used here).

Summary updated

BibTeX
@article{zhang2022short,
  author = {Liangfei Zhang and Xiaopeng Hong and Ognjen Arandjelovic and Guoying Zhao},
  title = {{Short and Long Range Relation Based Spatio-Temporal Transformer for Micro-Expression Recognition}},
  journal = {IEEE Trans. Affect. Comput.},
  year = {2022},
  doi = {10.1109/taffc.2022.3213509},
}
Figure