Downloads · 30 days
0
RibhavOjha/bilstm-evidence-detection
bilstm-evidence-detection is a machine learning model from RibhavOjha. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Downloads · 30 days
0
Access
Public
Updated Apr 24, 2024
Repo size
—
Likes
0
Public
Click a slice to open those files.
.md4.9 KB · 76%
From the Hugging Face model README
language: en license: cc-by-4.0 tags:
This is a classification model that was trained to detect, given a pair of claim and evidence, if the evidence supports or refutes the claim.
This model is based upon a BiLSTM model that was fine-tuned on 23.7K pairs of texts as a part of the ED (Evidence Detection) dataset.
This model is intended for the task of pairwise sequence classification for ED. It can be further finetuned on related pairwise sequence classification tasks. This model is inspired from the model discussed in in the paper "BiLSTM-Attention and LSTM-Attention via Soft Voting in Emotion Classification". The link can be found below.
23702 pairs of texts given in the coursework
The input claims and evidences are first converted into word embeddings using keras. Each of the embeddings is passed through a BiLSTM layer and then to a dropout layer. The output is concatenated and passed through an attention layer. The output is then merged and again passed through a BiLSTM layer to finally be passed to the output layer. The model is trained f0r 1 epoch. with a batch size of 32. Different batch sizes, learning rates, and model architectures were experimented with. First, the training data was split into training and validation. This was done to keep track of model's performance while training. However, it was realised that combining to two to train the model yielded better performance. Next, the trained model was tested on the dev dataset. Finally, the predictions were generated using the test dataset.
- learning_rate: 0.001
- train_batch_size: 32
- num_epochs: 1
- optimizer: Adam
- embedding_dim = 100
- LSTM dense units: 64 & 32
- Dropout Rate: 0.2
The model was trained on a T4 GPU on Google Colab.
- overall training time: 20 minutes
- duration per training epoch: 20 minutes
- model size: 417MB
A subset of the development set provided, amounting to 5926 pairs.
- Precision
- Recall
- F1-score
- Accuracy
- Support
- Macro Average
- Weighted Average
The model obtained an F1-score of 87% for irrelvant pairs, and 65% for relevant pairs. The model obtained an accuracy of 81% on the dev dataset. The macro avg and weighted avg numbers are close to each other, suggesting that the model's performance is consistent across classes and considering the class distribution.
- GPU: T4
- Transformers 4.18.0
- Pytorch 1.11.0+cu113
It is possible that the model is biased towards the small amount of training data it is trained on. It might perform poorly on data gathered from different sources.
Training data is limited in size. Increasing the size of the training data can help the model to generalise on unseen data better.
The hyperparameters were determined by experimentation with different values.