Downloads · 30 days
7
26% of all-time downloads
ambarvish/ED_BERT_model
ED_BERT_model is a machine learning model from ambarvish. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This is a binary classification model that was trained to detect whether a piece of evidence is relevant to a given claim or not.
Downloads · 30 days
7
26% of all-time downloads
All-time downloads
27
Public
Parameters
125M
1.4 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors499 MB · 100%
From the Hugging Face model README
This is a binary classification model that was trained to detect whether a piece of evidence is relevant to a given claim or not.
This model is a fine-tuned version of roberta-base for the task of evidence detection. Given a claim and a piece of evidence, it predicts whether the evidence supports the claim (1) or does not support the claim (0).
Repository https://huggingface.co/FacebookAI/roberta-base
MODEL_NAME = "ambarvish/ED_BERT_model"
tokenizer = RobertaTokenizer.from_pretrained(MODEL_NAME)
model = RobertaForSequenceClassification.from_pretrained(MODEL_NAME)
For further use see the demo: ev-detect-BERT-demo.ipynb
~20k pairs of claims and evidences
Validation/Development data set: ~6k pairs
Performed a grid search with the grid: learning_rates = [2e-5, 3e-5, 5e-5], batch_sizes = [8, 16, 32], epochs = [3, 4, 5] on the development training set using 20% of the data for validation.
These hyperparamaters were then fixed and the model re-trained on the larger training dataset.
Optimizer: AdamW
Loss Function: FocalLoss (CrossEntropy with focusing and balancing paramaters - see [1])
Learning Rate: Grid-searched, optimal value found to be 2e-5
Batch Size: Grid-searched, optimal value found to be 32
Epochs: Grid-searched, optimal value found to be 4
Hardware Used: Trained on GPU (Google Colab environment)
Validation dataset consisting of 6k pairs.
The following metrics were used to provide a quantitative evaluation of the model
Accuracy: 0.8815
Weighted Precision: 0.8859
Weighted Recall: 0.8815
Weighted F1-Score: 0.8831
Confusion Matrix: Included in evaluation script: ev-detect-BERT.ipynb
MCC: 0.7136
[1]: Lin, T.Y., Goyal, P., Girshick, R., He, K. and Dollár, P., 2017. Focal loss for dense object detection. In Proceedings of the IEEE international conference on computer vision (pp. 2980-2988).