tejasvichebrolu commited on
Commit
852873f
·
verified ·
1 Parent(s): 43e2fa1

Model upload from WebSci'25 paper

Browse files
README.md ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: en
3
+ license: apache-2.0
4
+ library_name: transformers
5
+ tags:
6
+ - text-classification
7
+ - personal-narrative
8
+ - political-discourse
9
+ - computational-social-science
10
+ - websci25
11
+ datasets:
12
+ - custom-reddit-dataset
13
+ base_model: falkne/storytelling-LM-europarl-mixed-en
14
+ ---
15
+
16
+ # Personal Narrative Classifier (WebSci'25)
17
+
18
+ This is the official repository for the text classification model presented in the paper: **"Personal Narratives Empower Politically Disinclined Individuals to Engage in Political Discussions"**, which received a Best Paper Honorable Mention at the 17th ACM Web Science Conference (WebSci'25).
19
+
20
+ The model is a fine-tuned BERT-based classifier (`falkne/storytelling-LM-europarl-mixed-en`) designed to identify personal narratives in online comments.
21
+
22
+ ## Model Description
23
+
24
+ This model classifies a given text as either a "Personal Narrative" or "Not a Personal Narrative". It was developed to support a large-scale computational analysis of how personal stories affect engagement in online political discussions on Reddit.
25
+
26
+ - **Label 0**: Not a Personal Narrative
27
+ - **Label 1**: Personal Narrative
28
+
29
+ ## Intended Uses & Limitations
30
+
31
+ ### Intended Use
32
+
33
+ This model is intended for researchers in computational social science, political science, communication, and HCI to study online discourse. It can be used to:
34
+ - Quantify the use of personal narratives in various online communities.
35
+ - Analyze the reception and impact of story-based arguments.
36
+ - Replicate and extend the findings of the original paper.
37
+
38
+ ### Limitations
39
+
40
+ As noted in the paper, this model has several limitations:
41
+ - The training and evaluation data comes from political subreddits on Reddit from 2020-2021. Its performance may vary on other platforms or time periods.
42
+ - The definition of "political activity" was based on subreddit engagement, which may not capture all forms of political interest.
43
+ - The model does not analyze the content or veracity of the narratives. Personal narratives can also be used to spread misinformation, which is an avenue for future research.
44
+
45
+ ## How to Use
46
+
47
+ You can use this model with the `transformers` library pipeline for easy inference.
48
+
49
+ ```python
50
+ from transformers import pipeline
51
+
52
+ repo_id = "tejasvichebrolu/personal-narrative-classifier"
53
+ classifier = pipeline("text-classification", model=repo_id)
54
+
55
+ # Example texts
56
+ narrative_text = "I’m in Alabama and oh my god it was so humid yesterday. I was so unproductive from how bad it was."
57
+ non_narrative_text = "The most straightforward solution is to encourage others to engage with politics online."
58
+
59
+ # Get predictions
60
+ results = classifier([narrative_text, non_narrative_text])
61
+ for text, result in zip([narrative_text, non_narrative_text], results):
62
+ print(f"Text: {text}")
63
+ # The pipeline may return LABEL_0/LABEL_1 or the names from the config
64
+ print(f" -> Prediction: {result['label']}, Score: {result['score']:.4f}\n")
65
+ ```
66
+
67
+ ## Training and Evaluation
68
+
69
+ The model was fine-tuned on a dataset of 2,000 manually labeled Reddit comments. It achieved a macro average F1-score of **0.82** in 5-fold cross-validation. For more details on the training procedure and performance, please refer to the paper.
70
+
71
+ ## Citation
72
+
73
+ If you use this model or its findings in your research, please cite our paper:
74
+
75
+ ```bibtex
76
+ @inproceedings{chebrolu2025narratives,
77
+ title={{Personal Narratives Empower Politically Disinclined Individuals to Engage in Political Discussions}},
78
+ author={{Chebrolu, Tejasvi and Kumaraguru, Ponnurangam and Rajadesingan, Ashwin}},
79
+ booktitle={{Proceedings of the 17th ACM Web Science Conference 2025 (Websci '25)}},
80
+ year={{2025}},
81
+ organization={{ACM}},
82
+ doi={10.1145/3717867.3717899}
83
+ }
84
+ ```
config.json ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "falkne/storytelling-LM-europarl-mixed-en",
3
+ "architectures": [
4
+ "BertForSequenceClassification"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "classifier_dropout": null,
8
+ "hidden_act": "gelu",
9
+ "hidden_dropout_prob": 0.1,
10
+ "hidden_size": 768,
11
+ "initializer_range": 0.02,
12
+ "intermediate_size": 3072,
13
+ "layer_norm_eps": 1e-12,
14
+ "max_position_embeddings": 512,
15
+ "model_type": "bert",
16
+ "num_attention_heads": 12,
17
+ "num_hidden_layers": 12,
18
+ "pad_token_id": 0,
19
+ "position_embedding_type": "absolute",
20
+ "torch_dtype": "float32",
21
+ "transformers_version": "4.40.0",
22
+ "type_vocab_size": 2,
23
+ "use_cache": true,
24
+ "vocab_size": 30522
25
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a5bf71006f45964ae0db325dc0d52dcc028f0f12d4ec246c40657f395aaf45ab
3
+ size 437958648
special_tokens_map.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "cls_token": "[CLS]",
3
+ "mask_token": "[MASK]",
4
+ "pad_token": "[PAD]",
5
+ "sep_token": "[SEP]",
6
+ "unk_token": "[UNK]"
7
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "[PAD]",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "100": {
12
+ "content": "[UNK]",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "101": {
20
+ "content": "[CLS]",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "102": {
28
+ "content": "[SEP]",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "103": {
36
+ "content": "[MASK]",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ }
43
+ },
44
+ "clean_up_tokenization_spaces": true,
45
+ "cls_token": "[CLS]",
46
+ "config": "./tokenizer_config.json",
47
+ "do_basic_tokenize": true,
48
+ "do_lower_case": true,
49
+ "mask_token": "[MASK]",
50
+ "max_len": 512,
51
+ "model_max_length": 512,
52
+ "never_split": null,
53
+ "pad_token": "[PAD]",
54
+ "sep_token": "[SEP]",
55
+ "strip_accents": null,
56
+ "tokenize_chinese_chars": true,
57
+ "tokenizer_class": "BertTokenizer",
58
+ "unk_token": "[UNK]"
59
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff