This paper proposes a novel MER framework that efficiently models micro-expressions through parallel extraction and interactive optimization of decoupled spatio-temporal features. The overall architecture is illustrated in
Figure 1. Given an input video sequence
, each frame
is processed by a LoRA-tuned DinoV2 to extract frame-level embeddings, forming the feature sequence
. The sequence
X is then fed into two parallel branches:
SFA performs a 2D fast Fourier transform to decompose
X into low- and high-frequency components, which are adaptively fused via an expert-gating mechanism to produce the spatially enhanced feature
and the frequency weight matrix
.
DGAT constructs a temporal graph with frames as nodes and modulates edge weights using
to model frequency-guided temporal dependencies, generating the temporal representation
. Finally,
and
are fused into a unified representation for classification.
3.1. DinoV 2 Image Encoder Feature Extraction
Self-supervised Vision Transformers like DinoV2 provide robust visual representations, but fine-tuning on small MER datasets is computationally expensive. LoRA enables parameter-efficient adaptation, motivating its integration in our framework.
For the MER task, RGB video sequences serve as input. To match DinoV2 encoder requirements, all frames are extracted from each video, yielding a chronological sequence , where N is the total frame count. These are uniformly sampled to frames with interval to reduce computational complexity, resulting in . Uniform temporal sampling with a fixed length provides a compact and stable input representation. Although it may reduce temporal coverage for very long videos, micro-expression clips are typically short, and uniform sampling is widely adopted in prior MER studies.
To address the challenges of subtle expressions and brief durations in MER, we employ a self-supervised pretrained Vision Transformer (ViT), DinoV2 [
22], optimized via Low-Rank Adaptation (LoRA) [
30]. This preserves DinoV2’s generalization while infusing task-specific knowledge for fine-grained spatio-temporal feature capture. The encoder structure is shown in
Figure 1A.
DinoV2 comprises
Transformer blocks, each with multi-head attention, a feedforward network, and layer normalization. The first ten blocks remain frozen, while the final two undergo LoRA fine-tuning to align with micro-expression tasks, as higher layers yield more task-relevant features. For input features
at layer
l, the output after the Transformer blocks is
where
denotes the output of the
L-th block,
B is the batch size,
C the channel dimension,
is the spatial resolution, and
is the layer normalization. For the final two layers, we fine-tune the Query
and Value
matrices using LoRA, as this balances performance and efficiency [
30]. The original weights
and
remain frozen, while LoRA introduces low-rank update matrices
,
, and
,
, where
, with rank
. The fine-tuned
Q and
V are computed as
Here,
K retains the original weight
. During fine-tuning, only the low-rank matrices are optimized, minimizing parameters while adapting to micro-expression features. This yields deep features
per frame
, preserving generalization, reducing complexity, and providing high-quality spatial inputs for subsequent SFA and DGAT modules.
3.2. Spatial Frequency Adaptation Network (SFA)
In MER, capturing subtle facial texture variations is hindered by uneven spatial frequency distributions, where low-frequency components capture contours and high-frequency ones reveal local details. To address this, we introduce the SFA module, which enhances DinoV2 extracted features via Fourier-domain decomposition and expert networks, improving sensitivity to low-intensity motions.
SFA takes as input the global frame features
extracted by DinoV2 and produces enhanced spatial features
, with dimensions determined by subsequent convolutional operations. The structure is illustrated in
Figure 1B, and the process proceeds as follows: All frame-level features are stacked in temporal order to form a two-dimensional feature representation
. Subsequently, two-dimensional Fourier transform is applied to the feature representation
X along the feature dimension
D and the temporal dimension
T, yielding the frequency-domain representation
F, with the FFT transformation defined as
where
,
,
b, and
c denote batch and feature-channel indices, respectively, and
. Here,
D denotes the embedding dimension of the frame-level feature
produced by DinoV2, rather than a flattened spatial dimension. To separate low- and high-frequency components, we define a frequency mask
, where the frequency mask
M is a fixed binary mask. Taking the center of the frequency domain as reference, a fixed cutoff radius
r is defined, and all frequency components whose radial distance to the center does not exceed
r are regarded as low-frequency regions and assigned a value of 1, while the remaining frequency components are assigned a value of 0. This mask is used to distinguish low- and high-frequency components.
For effective separation, we apply a center shift to
F, relocating low-frequency components to the center, followed by frequency component isolation:
where ⊙ indicates element-wise multiplication. The representations are then reverted to the time domain via inverse shift and inverse FFT:
where
, and the real part is taken to obtain real-valued features. The calculation of frequency-domain weight is based on the energy distribution of high- and low-frequency components and is defined as
A Frequency Enhancement Module (FEM) normalizes and refines components:
and
represent the mean and variance of the features, respectively, with
, and
and
as learnable parameters. Normalized features undergo 2D convolution, splitting into components
and
; subsequently, a mixture-of-experts-based modeling mechanism is introduced to adaptively model the frequency features, and the specific computation process is described as follows:
denotes the scalar response of the
i-th expert, obtained by applying a channel-wise convolution followed by global aggregation. Each expert is implemented as lightweight convolutional layers designed to model frequency features from different parameterized perspectives. Specifically,
and
are applied to
and
, respectively, and the interacted features are mapped to
, which reflects the activation strength of the corresponding expert for the current input sample. The same feature normalization and modeling process is applied to both low- and high-frequency components, differing only in their respective frequency inputs.
The gating network computes a scalar importance score for each expert by aggregating the gated responses over the temporal and feature dimensions, followed by softmax normalization across experts:
where
denotes the gating parameter of the
n-th expert, and softmax ensures
. These weights indicate the relative contribution of each expert to the final feature representation for a given input sample, enabling the model to adaptively fuse expert outputs according to the frequency characteristics of the input. Using
experts achieves a balance between representation capacity and model complexity, providing complementary frequency modeling while mitigating overfitting on small-scale micro-expression datasets. The weighted expert aggregation refines frequency representations, producing final outputs
.
Compared with fixed band-pass filters, the proposed design explicitly decomposes features into the frequency domain via FFT and enables sample-adaptive frequency modeling through a mixture-of-experts and gating mechanism, allowing the model to dynamically balance low- and high-frequency information according to the frequency distribution of different micro-expression sequences. Compared with directly learning frequency-domain convolutions, this design preserves frequency interpretability while reducing the risk of overfitting when learning complex filters on small-scale micro-expression datasets, and the multi-expert structure further enhances the stability and generalization of frequency representations through complementary modeling.
For clarity, the intermediate tensor shapes in the SFA module are summarized as follows: denotes frame-level features; stacking all frames yields ; the low- and high-frequency components and , as well as the frequency-enhanced features , , , and , all preserve the same temporal-feature structure; denotes a scalar expert response; and is the final frequency-enhanced output.
3.3. Dynamic Graph Attention Temporal Network (DGAT)
In order to solve the spatio-temporal feature coupling, we propose an innovative DGAT module. This module integrates Graph Attention Networks [
32] and LSTM, leveraging SFA feedback for interactive optimization to effectively capture inter-frame dependencies.
In this paper, DGAT takes as input the per-frame features
extracted by DinoV2, producing enhanced temporal features
, with dimensions determined by subsequent pooling operations. The DGAT module structure is depicted in
Figure 1C.
To model temporal dependencies between frames, the T frames in a video sequence are treated as nodes in a graph, with feature dimension D serving as the node feature dimension. Based on this, a temporal-aware densely connected graph is constructed, whose adjacency matrix describes potential structural connections between frames, where indicates the existence of a possible connection between the i-th and j-th frames. It should be noted that the adjacency matrix is only used to define the graph topology, while the actual relational strengths between nodes are adaptively learned through the subsequent multi-head graph attention mechanism.
The self-attention mechanism computes attention weights between each frame and its neighbors. For layer
l of GAT, the feature update for frame
i is
where
denotes the neighbor set of node
i (including itself),
represents the linear projection matrix, and
denotes the intermediate feature dimension, which is set to
for each attention head to maintain a balanced model capacity under multi-head attention. The attention coefficient
computes as
where
represents attention parameters, and ∥ indicates vector concatenation. DGAT employs a multi-head attention mechanism with
H attention heads, concatenating outputs to the specified dimension.
To incorporate the frequency guidance from the SFA module into DGAT, the global frequency weight
computed in SFA is applied at the frame level, where the weight of the
i-th frame is denoted as
. Based on this, a frame-wise frequency modulation term is constructed as
which is used to measure the consistency of frequency responses between two frames. The resulting frequency modulation term is then injected into the attention computation. The updated attention score formula is
where
denotes the attention weight between the
i-th and
j-th frames,
denotes a learnable scalar,
is computed from the high- and low-frequency distributions in the SFA module, and the pairwise term
is constructed accordingly;
represent node features,
are projection matrices, and
indicates the attention dimension.
The cross-attention mechanism further aggregates multi-head outputs, yielding the final frame features:
Here,
represents the concatenated multi-head features.
restores the output dimension. The attention coefficient
computes similarly. GAT output yields
.
Specifically, DGAT first applies graph attention to model inter-frame relations, followed by temporal sequence modeling using an LSTM. We then feed the GAT output
into the LSTM and obtain the final representation as
Finally, temporal max-pooling aggregates frame-level LSTM outputs into the video-level feature
. We further evaluate the contribution of the LSTM by removing it and directly pooling the GAT outputs; detailed results are provided in
Appendix A (
Table A2).
This section achieves the precise capture of temporal dynamics through DGAT, serving as the framework’s temporal core. It interacts with upstream SFA spatial frequency information for fusion, ensuring coherence in downstream feature integration.
3.4. Feature Fusion and Multi-Task Loss Function
Figure 2 illustrates the dynamic convolution-based fusion mechanism used to integrate spatial frequency features and temporal representations.
To achieve effective synergy between the SFA and DGAT, we design an interactive fusion strategy based on dynamic convolution [
33]. This approach integrates spatial features
and temporal features
into a unified representation.
and
concatenate along the channel dimension, generating a fused input:
The concatenated features combine high- and low-frequency information with non-uniform inter-frame dynamics, providing rich information for dynamic convolution.
Dynamic convolution adaptively adjusts convolutional weights through an input-dependent kernel generator. A learnable fully connected layer
(where
denotes the number of convolutional kernels) performs a linear transformation on
, generating dynamic weights:
where
represents the weight of the
convolutional kernel, dynamically dependent on the spatial and temporal distribution of
.
The dynamic convolution fusion formula is:
Here, ⊙ denotes element-wise multiplication, and
performs channel projection and feature reconstruction on
. The output
retains
dimensional channels, compressing redundant information while preserving key spatio-temporal features. A subsequent fully connected layer projects to the number of classes
C, generating predicted probabilities:
The cross-entropy loss is defined as
where
represents the ground truth labels.
To mitigate class imbalance and enhance feature distribution consistency,
divergence regularization applies
where
denotes L2-normalized
, and
serves as a smoothing term.
To strengthen synergy between SFA and DGAT, we introduce a spatio-temporal consistency loss, promoting semantic alignment between spatial and temporal features to enhance the modeling of micro-expression spatio-temporal dynamics. The spatio-temporal consistency loss is defined as
The final loss function combines classification loss, regularization loss, and spatio-temporal consistency loss with weighted contributions:
where
and
are hyperparameters balancing each loss term. Joint optimization enables the model to classify micro-expressions accurately while learning more robust and consistent spatio-temporal features.