Skip to content

Repository for "Robust Stance Detection: Understanding Public Perceptions in Social Media"

Notifications You must be signed in to change notification settings

Davood-M/RobustStanceDet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Robust Stance Detection: Understanding Public Perceptions in Social Media

Implementation of the ASONAM'24 paper: Robust Stance Detection: Understanding Public Perceptions in Social Media

Code usage

The code is written in Python. To use the code:

[1] Install the requirements using the following command:

pip install -r requirements.txt

[2] Use the following commands to train and test the model:

### Train
python finetune.py --mode train --dataset ${TRAIN_DATA} --lr 2e-5 --batch_size 4 --epochs 2 --alpha 0.5 --beta 0.1 --num_pair 50 --num_label 2

### Test
python finetune.py --mode test --dataset ${TEST_DATA} --num_label 2

[3] For the dataset, please reach out to the authors. Due to X's policy, we cannot publically share the dataset, but it will be available upon request.

Python packages version

  • matplotlib==3.5.1
  • numpy==1.24.4
  • pandas==1.4.2
  • scikit_learn==1.0.2
  • torch==1.12.0
  • transformers==4.34.0

Reference

Nayoung Kim, Ahmadreza Mosallanezhad, Lu Cheng, Michelle V. Mancenido, and Huan Liu. ** Robust Stance Detection: Understanding Public Perceptions in Social Media **_Advances in Social Network Analysis and Mining 2024_ASONAM 2024, 2024.

About

Repository for "Robust Stance Detection: Understanding Public Perceptions in Social Media"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages