tburst commited on
Commit
ca3c910
1 Parent(s): 056f873

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +21 -0
README.md CHANGED
@@ -50,6 +50,27 @@ print(predicted_class)
50
  # 201 - Freedom and Human Rights
51
  ```
52
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
  ## Model Performance
54
 
55
  The model was evaluated on a test set of 186,276 annotated manifesto statements (10% of the whole corpus).
 
50
  # 201 - Freedom and Human Rights
51
  ```
52
 
53
+ ## Training procedure
54
+
55
+ Training of the model took place on all quasi-sentences of the Manifesto Corpus (version 2023a), minus 10% that were kept out of training for the final test and evaluation results.
56
+ This results in a training dataset of 1,601,329 quasi-sentences.
57
+ As our context-including model input poses the threat of data-leakage problems between train and test data, we refrained from randomly splitting quasi-sentences into train and test data.
58
+ Instead, we randomly split the dataset on the manifesto level, so that 1779 manifestos and all their quasi-sentences were assigned to the train set and 198 to the test set.
59
+
60
+ As training parameters, we used the following settings: learning rate: 1e-5, weight decay: 0.01, epochs: 1, batch size: 4, gradient accumulation steps: 4 (effective batch size: 16).
61
+
62
+ ### Context
63
+
64
+ To adapt the model to the task of classifying statements in manifestos we made some modifications to the traditional training setup.
65
+ Given that human annotators in the Manifesto Project are encouraged to use surrounding sentences to interpret ambiguous statements , we combined statements with their context for our model's input.
66
+ Specifically, we used a sentence-pair input, where the single to-be-classified statement gets followed by the separator token followed by the whole bigger context of length 200 tokens, in which the statement to-be-classified is embedded.
67
+ Here is an example: "`<s>` We must right the wrongs in our democracy, `</s>` To turn this crisis into a crucible, from which we will forge a stronger, brighter, and more equitable future. We must right the wrongs in our democracy, redress the systemic injustices that have long plagued our society,throw open the doors of opportunity for all Americans and reinvent our institutions at home and our leadership abroad. `</s>`".
68
+ The second part, which contains the context, is greedily filled until it contains 200 tokens.
69
+ Our tests showed that including the context helped to improve the performance of the classification model considerably (~8% accuracy).
70
+ We tried other approaches like using two XLM-RoBERTa models as a duo, where one receives the sentence and one the context, and a shared-layer model, where both inputs are fed separately trough the same model.
71
+ Both variants performed similarly to our sentence pair approach, but lead to higher complexity and computing costs, which is why we ultimately opted for the sentence pair way to include the surrounding context.
72
+
73
+
74
  ## Model Performance
75
 
76
  The model was evaluated on a test set of 186,276 annotated manifesto statements (10% of the whole corpus).