{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/raft-rationale-adaptor-for-few-shot-abusive","title":"Rationale-Guided Few-Shot Classification to Detect Abusive Language","arxiv_id":"2211.17046","date":"2022-11-30","proceeding":null,"authors":["Punyajoy Saha","Divyanshu Sheth","Kushal Kedia","Binny Mathew","Animesh Mukherjee"],"abstract":"Abusive language is a concerning problem in online social media. Past research on detecting abusive language covers different platforms, languages, demographies, etc. However, models trained using these datasets do not perform well in cross-domain evaluation settings. To overcome this, a common strategy is to use a few samples from the target domain to train models to get better performance in that domain (cross-domain few-shot training). However, this might cause the models to overfit the artefacts of those samples. A compelling solution could be to guide the models toward rationales, i.e., spans of text that justify the text's label. This method has been found to improve model performance in the in-domain setting across various NLP tasks. In this paper, we propose RGFS (Rationale-Guided Few-Shot Classification) for abusive language detection. We first build a multitask learning setup to jointly learn rationales, targets, and labels, and find a significant improvement of 6% macro F1 on the rationale detection task over training solely rationale classifiers. We introduce two rationale-integrated BERT-based architectures (the RGFS models) and evaluate our systems over five different abusive language datasets, finding that in the few-shot classification setting, RGFS-based models outperform baseline models by about 7% in macro F1 scores and perform competitively to models finetuned on other source domains. Furthermore, RGFS-based models outperform LIME/SHAP-based approaches in terms of plausibility and are close in performance in terms of faithfulness.","url_abs":"https://arxiv.org/abs/2211.17046v2","url_pdf":"https://arxiv.org/pdf/2211.17046v2.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"raft-rationale-adaptor-for-few-shot-abusive","repo_url":"https://github.com/punyajoy/rgfs_ecai","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"abusive-language","task_name":"Abusive Language"},{"task_slug":"classification-1","task_name":"Classification"},{"task_slug":"cross-domain-few-shot","task_name":"Cross-Domain Few-Shot"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2211.17046","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2211.17046"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/punyajoy/rgfs_ecai","reach":null}],"summary":{"ran_honours":1,"ran_draft_wrong":2,"unverified":1},"by_repo_kind":{"official":{"samples":4,"ran":3,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"d43da207af817fdd","entry":"get_predicted","repo":"punyajoy/rgfs_ecai","repo_kind":"official","path":"Eval_code/eval_scripts.py","file_url":"https://github.com/punyajoy/rgfs_ecai/blob/HEAD/Eval_code/eval_scripts.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d43da207af817fdd"}},{"code_sha256_prefix":"590b22f923c9c19f","entry":"masked_softmax","repo":"punyajoy/rgfs_ecai","repo_kind":"official","path":"Model_code/models.py","file_url":"https://github.com/punyajoy/rgfs_ecai/blob/HEAD/Model_code/models.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"590b22f923c9c19f"}},{"code_sha256_prefix":"333cfbdfbc8311e4","entry":"masked_softmax_NormalizeLength","repo":"punyajoy/rgfs_ecai","repo_kind":"official","path":"Model_code/models.py","file_url":"https://github.com/punyajoy/rgfs_ecai/blob/HEAD/Model_code/models.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"333cfbdfbc8311e4"}},{"code_sha256_prefix":"181bf586aa1c6ccc","entry":"evaluate_classifier","repo":"punyajoy/rgfs_ecai","repo_kind":"official","path":"Eval_code/eval_scripts.py","file_url":"https://github.com/punyajoy/rgfs_ecai/blob/HEAD/Eval_code/eval_scripts.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"181bf586aa1c6ccc"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}