/LCMR-3S

[****** 2025] Learning Cross-modality Representation via Selective State Space Model for Depression Detection on Social Media

Primary LanguagePython

LCMR-3S: Learning Cross-modality Representation via Selective State Space Model for Depression Detection on Social Media [****** 2025]

Quang Vinh Nguyen, Thanh Dong Nguyen, Duc Duy Nguyen, Doan Khai Ta, Ji-Eun Shin, Seung-Won Kim, Hyung-Jeong Yang, Soo-Hyung Kim

Official PyTorch implementation

🔥 News

  • (September 16, 2024)
    • Paper submitted at ****** 2025 (Rank A) ! ⌚

🌱 Installation

pip install -r requirements.txt

🍓 Dataset Preparation

# Twitter
python extract_twitter_embeddings.py --modality image --embs clip
python extract_twitter_embeddings.py --modality image --embs dino

python extract_twitter_embeddings.py --modality text --embs bert
python extract_twitter_embeddings.py --modality text --embs roberta
python extract_twitter_embeddings.py --modality text --embs emoberta
python extract_twitter_embeddings.py --modality text --embs minilm

🚀 Training and Evaluating

# Twitter
python main.py  --config_file configs/combos/clip_roberta.yaml --name fold-0-twitter-ws-128-clip-roberta --group lcmr3s --dataset twitter --fold 0 --window_size 128 --position_embeddings zero --mode run --epochs 200 --batch_size 32
python evaluate.py  --config_file configs/combos/clip_roberta.yaml --name fold-0-twitter-ws-128-clip-roberta --group lcmr3s --dataset twitter --fold 0 --window_size 128  --position_embeddings zero --output_dir twitter

👀 Visualization

# Visualize the sentiment distribution of posts 
python visualization/sentiment_distribution.py --config_file configs/combos/clip_roberta.yaml --dataset twitter --fold 0 --window_size 128 --position_embeddings zero --kind test --weight best.ckpt

# Visualize the attention map of posts
python visualization/post_attention.py --config_file configs/combos/clip_roberta.yaml --dataset twitter --fold 0 --window_size 128 --position_embeddings zero --kind test --weight best.ckpt

# Visualize state space of depressed and non-depressed users
## Depressed Users
python visualization/state_space.py --config_file configs/combos/clip_roberta.yaml --dataset twitter --fold 0 --window_size 128 --position_embeddings zero --kind test --type Depressed --weight best.ckpt
## Non-Depressed Users
python visualization/state_space.py --config_file configs/combos/clip_roberta.yaml --dataset twitter --fold 0 --window_size 128 --position_embeddings zero --kind test --type Non-Depressed --weight best.ckpt