CoolFace
Modelpublic

EsferSami/meme-sentiment-dual-cross-attention-v1

sourceHugging Facemitupdated 5mo agoView on Hugging Face
0likes
Model Card

Meme Sentiment Analysis — Dual Cross-Attention (V1)

Author: EsferSami Task: Multilingual Multimodal Meme Sentiment Analysis Dataset: MemoSen — Kaggle Version: V1 — Frozen Encoders (Pure Pretrained Baseline)


Overview

MemoSen is a multilingual multimodal meme sentiment dataset containing Bengali, English, and code-mixed meme captions paired with meme images. Each sample has a sentiment label: Positive, Negative, or Neutral.

This model resolves cross-modal conflict between meme text and image using a dual cross-attention framework. Meme understanding is challenging because text and image often conflict — especially in sarcastic, ironic, or culturally specific memes.


Model Architecture

ComponentDetails
Text EncoderXLM-RoBERTa base (frozen)
Image EncoderEVA02-CLIP-L/14 from QuanSun (frozen)
Feature Dim768 projected to 512
FusionDual Cross-Attention + Adaptive Gating
Conflict DetectionCosine similarity + MLP
Reliability WeightingPer-modality sigmoid scoring
ClassifierMLP (512 -> 256 -> 128 -> 3)

Dataset

Dataset: MemoSen on Kaggle

SplitRatio
Train70%
Validation15%
Test15%

Classes: Positive, Negative, Neutral Languages: Bengali, English, Code-mixed (Banglish)


Training Configuration

ParameterValue
Epochs50 (early stopped at 26)
OptimizerAdamW (lr=1e-4)
SchedulerCosineAnnealingLR
LossFocal Loss + Class Weights
Early StoppingPatience = 7
Batch Size32
Max Text Length128 tokens
Image Size224 x 224
GPUT4 (Kaggle)

Results (Validation Set)

MetricScore
Macro-F10.5584
Full test set metrics will be updated after evaluation. Main metric: Macro-F1

Training Curves

[image]


Notes

  • —V1 uses fully frozen encoders — only fusion and classification layers are trained
  • —Trainable parameters are limited to adaptation, cross-attention, conflict detection, reliability weighting, gated fusion, and MLP classifier
  • —V2 will experiment with unfreezing encoders and architecture modifications

Citation

If you use MemoSen dataset, please refer to the original dataset on Kaggle: https://www.kaggle.com/datasets/arifkaggle979/memosen-dataset