Milmer: a framework for multiple instance learning based multimodal emotion recognition

Zaitian Wang, Jian He, Yu Liang, Xiyuan Hu, Tianhao Peng, Kaixin Wang, Jiakai Wang, Chenlong Zhang, Weili Zhang, Shuang Niu, Xiaoyang Xie

TL;DR

This paper introduces "Milmer," a novel multimodal framework for emotion recognition that combines electroencephalogram (EEG) signals with facial expressions. By leveraging a transformer-based fusion approach, multiple instance learning (MIL) for facial data, and a novel cross-attention mechanism, Milmer achieves state-of-the-art accuracy in classifying emotions. This work is significant because it addresses the limitations of previous methods by effectively integrating diverse physiological and visual cues for more robust and accurate emotion detection.

What Problem Does This Paper Address?

Accurate emotion recognition is crucial for human-computer interaction (HCI), but it's a complex challenge. Previous research has often relied on single modalities (either facial expressions or physiological signals like EEG) or used simplistic fusion techniques. Facial expressions, while intuitive, can be exaggerated in datasets and don't always reflect true emotions, especially in real-world, subtle scenarios. EEG signals offer a more direct window into genuine emotional states but are prone to artifacts and require complex processing. Integrating these two modalities holds great promise, but effectively fusing their distinct characteristics has been a major hurdle. Existing multimodal approaches often overlook the temporal dynamics in facial expressions and struggle to balance the contributions of each modality, leading to suboptimal performance.

Methods

Milmer tackles these challenges with a multi-module, transformer-based architecture:

  • EEG Preprocessing Module: Standard bandpass filtering (1-50 Hz) is applied, followed by Independent Component Analysis (ICA) using Fast ICA to remove artifacts like EOG and EMG, ensuring cleaner EEG signals.
  • Facial Feature Extraction and Balancing Module:
    • Swin Transformer: A pre-trained Swin Transformer, fine-tuned on emotion datasets, is used for robust feature extraction from facial images.
  • Multiple Instance Learning (MIL): Instead of using a single frame, MIL treats a video segment as a "bag" of frames. It selects the most representative K frames to capture richer temporal dynamics and a more nuanced representation of facial expressions.
  • Cross-Attention Mechanism: This is crucial for balancing the modalities. It compresses the numerous visual tokens from the Swin Transformer to match the number of EEG tokens, preventing the visual modality from dominating the fusion process and ensuring harmonious integration.
  • Modality Fusion Module: A transformer encoder is used for cross-modal fusion. It incorporates:
  • Modal Type Embedding: Learnable vectors to distinguish between EEG and facial tokens.
  • Position Embedding: To preserve temporal (EEG) and spatial (facial) information.
  • CLS Token: A special token that aggregates information from both modalities for final classification.

Datasets

The primary dataset used for training and evaluation is the DEAP dataset. This dataset is widely recognized in multimodal affective computing and contains synchronized facial videos and bio-sensing signals (including EEG) from participants experiencing emotions elicited by music videos. Participants rate their emotions on dimensions like valence, arousal, dominance, and liking. The paper focuses on valence and arousal for emotion evaluation. Experiments were conducted using three classification schemes: DEAP-2 (binary), DEAP-3 (three-class), and DEAP-4 (four-class).

Key Insights and Ideas

  • MIL for Facial Dynamics: Treating facial expressions as a "bag" of instances (frames) rather than a single image is key to capturing subtle temporal dynamics often missed by prior work. This is especially important as real-world emotions are rarely expressed in single, static frames.
  • Cross-Attention for Modality Balance: The cross-attention mechanism is vital for preventing one modality (likely visual, due to more extracted features) from overwhelming the other. This ensures that both EEG and facial information are effectively utilized, leading to a more balanced and accurate representation.
  • Transformer Synergy: The transformer architecture, particularly when combined with Swin Transformer for feature extraction and cross-attention for fusion, proves highly effective at capturing complex interactions between heterogeneous data sources like EEG and facial expressions.
  • Real-World Relevance: The paper highlights that facial expressions in multimodal datasets are often more subdued and natural than in single-modality datasets, making them more representative of real-life scenarios and thus more challenging to interpret without complementary physiological data.

Key Results

  • State-of-the-Art Performance: Milmer achieved a classification accuracy of 96.72% and an F1 score of 96.71% on the DEAP dataset for the four-class emotion recognition task. This significantly surpasses existing multimodal and unimodal approaches.
  • Superior Fusion: The cross-attention (CA) fusion method significantly outperformed "None" (no integration) and MLP-based fusion strategies in visual feature integration analysis.
  • Optimal Token Balance: The best performance was achieved when the number of visual tokens was set to 64, suggesting a balanced configuration is crucial for effective multimodal fusion.
  • Ablation Study Success: Ablation studies confirmed the significant contributions of each component: EEG data, facial data, and the transformer-based fusion module, with the full Milmer framework achieving the highest accuracy.

Limitations and Future Work

  • Subject-Independent Performance: While Milmer performs exceptionally well in subject-dependent settings, there's a noticeable performance gap in subject-independent experiments. This is attributed to inherent individual differences in EEG and facial expressions, a common challenge in the field. Future work could focus on strategies to enhance robustness to individual variability.
  • EEG Processing Simplification: The paper notes that the EEG processing adopted in the study was simplified, with the primary focus on cross-modal fusion. More sophisticated EEG signal processing could potentially further improve performance.
  • Additional Physiological Signals: The authors suggest integrating other physiological signals like ECG and GSR to further enhance the diversity and robustness of multimodal learning frameworks.
  • Task Design and Loss Functions: Further optimization of classification tasks and loss functions for emotion recognition is an area for future exploration.
  • Joint Recognition: The joint recognition of facial expressions and physiological signals remains a challenging yet underexplored area, warranting deeper research.

Summary updated

BibTeX
@article{wang2026milmer,
  author = {Zaitian Wang and Jian He and Yu Liang and Xiyuan Hu and Tianhao Peng and Kaixin Wang and Jiakai Wang and Chenlong Zhang and Weili Zhang and Shuang Niu and Xiaoyang Xie},
  title = {{Milmer: a framework for multiple instance learning based multimodal emotion recognition}},
  journal = {Neurocomputing},
  year = {2026},
  doi = {10.1016/j.neucom.2026.134368},
}
Figure