[Paper Review] Grid Search Hyperparameter Benchmarking of BERT, ALBERT, and LongFormer on DuoRC
This study conducts a comprehensive grid search hyperparameter benchmarking of BERT, ALBERT, and LongFormer on the DuoRC question answering dataset, fine-tuning models pre-trained on SQuAD and DuoRC. The ALBERT model fine-tuned on SelfRC achieved the highest F1 score of 76.4 and accuracy of 68.52, while LongFormer pre-trained on SelfRC outperformed others on ParaphraseRC with an F1 of 52.78 and accuracy of 46.60.
The purpose of this project is to evaluate three language models named BERT, ALBERT, and LongFormer on the Question Answering dataset called DuoRC. The language model task has two inputs, a question, and a context. The context is a paragraph or an entire document while the output is the answer based on the context. The goal is to perform grid search hyperparameter fine-tuning using DuoRC. Pretrained weights of the models are taken from the Huggingface library. Different sets of hyperparameters are used to fine-tune the models using two versions of DuoRC which are the SelfRC and the ParaphraseRC. The results show that the ALBERT (pretrained using the SQuAD1 dataset) has an F1 score of 76.4 and an accuracy score of 68.52 after fine-tuning on the SelfRC dataset. The Longformer model (pretrained using the SQuAD and SelfRC datasets) has an F1 score of 52.58 and an accuracy score of 46.60 after fine-tuning on the ParaphraseRC dataset. The current results outperformed the results from the previous model by DuoRC.
Motivation & Objective
- To evaluate the performance of BERT, ALBERT, and LongFormer on the DuoRC question-answering dataset through systematic hyperparameter tuning.
- To determine the optimal hyperparameters for each model using grid search across multiple configurations.
- To compare model performance across two DuoRC subsets: SelfRC (shorter, original plots) and ParaphraseRC (longer, paraphrased plots).
- To assess the impact of pretraining data (e.g., SQuAD1, SQuAD2, SelfRC) on fine-tuning performance for reading comprehension tasks.
- To establish a benchmark for transformer-based models on narrative and paraphrased document comprehension with complex reasoning demands.
Proposed method
- Pretrained weights for BERT, ALBERT, and LongFormer were sourced from Hugging Face's model hub.
- Grid search was performed over multiple hyperparameters: maximum sequence length (msl), dropout rate (ds), maximum query length (mql), and training batch size (tbs).
- Models were fine-tuned on two DuoRC subsets: SelfRC (original short plots) and ParaphraseRC (longer paraphrased plots).
- Evaluation metrics included F1 score and accuracy on both validation and test sets for each hyperparameter configuration.
- The best-performing hyperparameter combinations were selected based on validation set performance, with final results reported on the test set.
- Fine-tuning was conducted using standard Hugging Face Transformers training pipelines with cross-entropy loss and AdamW optimization.
Experimental results
Research questions
- RQ1Which BERT-based model (BERT, ALBERT, LongFormer) achieves the highest performance on the DuoRC dataset after hyperparameter tuning?
- RQ2How does pretraining data (SQuAD1, SQuAD2, SelfRC) influence fine-tuning performance on DuoRC?
- RQ3What hyperparameter configurations (msl, ds, mql, tbs) yield optimal F1 and accuracy scores on SelfRC and ParaphraseRC subsets?
- RQ4Why do F1 and accuracy scores differ between SelfRC and ParaphraseRC, and how do model architectures affect this gap?
- RQ5Can LongFormer, designed for long contexts, outperform other models on the longer ParaphraseRC subset despite lower absolute scores?
Key findings
- The ALBERT model pre-trained on SQuAD1 achieved the highest F1 score of 76.4 and accuracy of 68.52 on the SelfRC dataset after fine-tuning.
- The LongFormer model pre-trained on SelfRC achieved the best performance on ParaphraseRC with an F1 score of 52.78 and accuracy of 46.60.
- Fine-tuning with a maximum sequence length of 384 tokens and a batch size of 64 yielded consistently strong results across models.
- Models pre-trained on DuoRC-specific data (e.g., selfduorc) showed modest improvements over SQuAD-pretrained models, particularly in the ParaphraseRC setting.
- The F1 score on ParaphraseRC was consistently lower than on SelfRC, indicating greater difficulty due to longer context and reduced lexical overlap.
- The best-performing configuration for LongFormer on ParaphraseRC used a sequence length of 768, dropout of 0.3, and batch size of 4, achieving 52.78 F1 on the validation set.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.