CoolFace
Modelpublic

Vandita/Bert-finetuned-Sarc

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
0likes13downloads
Model Card

<!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. -->

EmoCentricSarcBERT

EmoCentricSarcBERT is a fine-tuned version of bert-base-cased on the SarcOji dataset. It achieves the following results on the Validation set (20% of stratified split of SarcOji dataset):

  • Loss: 2.1366
  • Accuracy: 0.7126
  • Precision: 0.4491
  • Recall: 0.6635
  • F1: 0.5356
  • Mcc: 0.3521
  • Roc Auc: 0.7425

Model description

The model uses text and emojis within text to classify sarcasm. The model first featured in:

bibtex
@article{grover2026emoji,
  title     = {An emoji centric approach to sarcasm detection in online discourse},
  author    = {Grover, V and Banati, H},
  journal   = {Scientific Reports},
  volume    = {16},
  number    = {1},
  pages     = {3891},
  year      = {2026},
  publisher = {Nature Publishing Group UK London}
}

Intended uses & limitations

While this model is effective for sarcasm classification on PlainText data since it has been fine-tuned on SarcOji (a sarcasm dataset). Being emoji-centric it relies on emojis for an enhanced sarcasm classification. At present it can tokenize 1444 emojis.

Training and evaluation data

Training and Validation set: SarcOji

bibtex
@inproceedings{grover2022understanding,
  title={Understanding the sarcastic nature of emojis with SarcOji},
  author={Grover, Vandita and Banati, Hema},
  booktitle={Proceedings of the Fifth International Workshop on Emoji Understanding and Applications in Social Media},
  pages={29--39},
  year={2022}
}

SarcOji dataset is available on: https://github.com/VanditaGroverKapila/SarcOji

Test Sets SarcOjiTest1 and SarcOjiTest2

bibtex
@article{grover2024attention,
  title={An attention approach to emoji focused sarcasm detection},
  author={Grover, Vandita and Banati, Hema},
  journal={Heliyon},
  volume={10},
  number={17},
  year={2024},
  publisher={Elsevier}
}

The tests are available on : https://github.com/VanditaGroverKapila/SarcOjiTestSets

Training procedure

For training procedure refer to the thesis:

bibtex
@phdthesis{grover2026emojis,
  author    = {Grover, V.},
  title     = {Emojis as Affective Signals for Sarcasm Detection: An Empirical Analysis Informing EmoCentricSarcBERT and Its Application in the RADMAD Framework for Toxicity Mitigation in Online Discourse},
  publisher  = {Zenodo},
  year      = {2026},
  type      = {Thesis},
  doi       = {10.5281/zenodo.21297666},
  
}

Training hyperparameters

The following hyperparameters were used during training:

  • learning_rate: 2e-05
  • trainbatchsize: 32
  • evalbatchsize: 32
  • seed: 42
  • distributed_type: tpu
  • optimizer: Use OptimizerNames.ADAMWTORCHXLA with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
  • lrschedulertype: linear
  • num_epochs: 10

Training results

Training LossEpochStepValidation LossAccuracyPrecisionRecallF1MccRoc Auc
0.39841.07350.30410.85070.88710.70700.78690.68460.9440
0.27892.014700.29030.87190.88100.77600.82520.72830.9522
0.16303.022050.30080.88600.86890.83320.85060.75890.9560
0.12754.029400.41380.88210.87300.81620.84360.75020.9538
0.06575.036750.51390.88070.88970.79210.83810.74730.9548
0.05556.044100.60630.88220.88640.80040.84120.75050.9525
0.03387.051450.68840.88780.85850.85280.85560.76400.9538
0.02568.058800.72410.88770.85810.85280.85550.76360.9551
0.01999.066150.75790.88920.85100.86770.85920.76800.9548
0.014810.073500.76970.88510.85430.85020.85230.75830.9546

Framework versions

  • Transformers 5.0.0
  • Pytorch 2.9.0+cpu
  • Datasets 4.5.0
  • Tokenizers 0.22.2