[Paper Review] Exploring BERT Parameter Efficiency on the Stanford Question Answering Dataset v2.0
This paper evaluates parameter efficiency in BERT for the SQuAD2.0 question answering task by freezing transformer layers, applying adapter modules, and testing context-aware CNNs. It finds that adapter modules offer strong F1 performance (75.0%) with only 26% of BERT's parameters, while context-aware CNNs underperform and increase inference time significantly.
In this paper we explore the parameter efficiency of BERT arXiv:1810.04805 on version 2.0 of the Stanford Question Answering dataset (SQuAD2.0). We evaluate the parameter efficiency of BERT while freezing a varying number of final transformer layers as well as including the adapter layers proposed in arXiv:1902.00751. Additionally, we experiment with the use of context-aware convolutional (CACNN) filters, as described in arXiv:1709.08294v3, as a final augmentation layer for the SQuAD2.0 tasks. This exploration is motivated in part by arXiv:1907.10597, which made a compelling case for broadening the evaluation criteria of artificial intelligence models to include various measures of resource efficiency. While we do not evaluate these models based on their floating point operation efficiency as proposed in arXiv:1907.10597, we examine efficiency with respect to training time, inference time, and total number of model parameters. Our results largely corroborate those of arXiv:1902.00751 for adapter modules, while also demonstrating that gains in F1 score from adding context-aware convolutional filters are not practical due to the increase in training and inference time.
Motivation & Objective
- To evaluate parameter efficiency of BERT on SQuAD2.0 using techniques like layer freezing and adapter modules.
- To assess the trade-offs between model performance, training time, inference time, and parameter count.
- To investigate whether context-aware CNNs improve performance over standard BERT fine-tuning.
- To determine if adapter modules offer a viable alternative to full fine-tuning with reduced parameter count.
- To explore the impact of freezing early BERT layers on efficiency and performance.
Proposed method
- Freeze varying numbers of final BERT transformer layers while fine-tuning the remaining layers.
- Inject adapter modules between BERT layers, training only the adapter parameters while keeping BERT weights frozen.
- Apply context-aware convolutional (CACNN) filters as a final layer after BERT, with and without context vectorization.
- Train models with different adapter sizes (64, 768) and compare performance against full fine-tuning.
- Measure training time, inference time, and F1 score across all configurations.
- Use a standard BERT-base architecture as the base model, with no task-specific modifications.
Experimental results
Research questions
- RQ1Can adapter modules achieve competitive F1 scores on SQuAD2.0 while reducing the number of trainable parameters?
- RQ2Does freezing early BERT layers reduce training time and parameter count without degrading performance?
- RQ3Do context-aware CNNs improve answer span prediction over standard BERT fine-tuning?
- RQ4How do training and inference times scale with different adapter sizes and CACNN configurations?
- RQ5Is the performance gain from CACNNs justified by the increase in training and inference time?
Key findings
- The 768-sized adapter model with all BERT layers frozen achieved an F1 score of 75.0%, close to the full fine-tuned BERT’s 75.8%, while using only 26% of the parameters.
- Adapter models required nearly the same training time as full fine-tuned BERT, with inference time increased by ~20% (188.8s vs. 154.3s).
- Context-aware CNNs with 200 feature maps increased inference time by 80% (261.5s) and achieved only 61.2% F1, significantly underperforming adapter models.
- The best-performing CACNN (200 maps) had a 9.5ms increase in inference time per example, which may be significant in low-latency systems.
- Freezing the first six BERT layers reduced trainable parameters and training time without affecting inference time or model size.
- Adapter modules demonstrated superior parameter efficiency compared to CACNNs, which showed poor performance despite high parameter counts in some cases.
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.