Introduction
In Machine Reading Comprehension (MRC), the pursuit of higher F1 scores often results in increasingly complex and "bloated" models. While architectures like BERT and the original FusionNet deliver impressive accuracy, their high computational cost and latency frequently hinder real-world deployment. FastFusionNet addresses this "efficiency gap" by streamlining the FusionNet architecture, specifically targeting the DAWNBench competition's criteria for rapid and cost-effective training and inference on the SQuAD dataset.
Bottleneck Analysis and Methodology
To optimize FusionNet, the authors conducted a detailed bottleneck analysis to identify components that contributed more to latency than to performance.
The analysis revealed that Contextualized Word Vectors (CoVe) and standard LSTM layers accounted for nearly 95% of total inference time. Specifically, CoVe consumed 35.5% of the time while providing only a marginal 1.1% boost in F1 score. Based on these findings, FastFusionNet introduces two primary modifications:
- Replacing LSTMs with Simple Recurrent Units (SRUs): Standard LSTMs are inherently sequential, limiting their performance on modern GPUs. SRUs move heavy matrix multiplications outside the recurrence loop, enabling parallel computation and achieving speeds comparable to convolutional networks while maintaining recurrent modeling benefits.
- Eliminating CoVe Layers: By removing these computationally expensive layers, the model prioritizes speed with minimal impact on accuracy.
Despite these prunings, FastFusionNet retains the "Fully-aware" attention mechanism, allowing it to aggregate information across various word representation levels, such as GloVe, POS tags, and NER.
Experimental Results
The model was evaluated on the SQuAD v1.1 benchmark. FastFusionNet established new records for both training speed and inference latency.
Training Efficiency
FastFusionNet reached the benchmark F1 score of 75% in just 18 minutes and 46 seconds on a single NVIDIA GTX-1080 Ti. This represents a 45% speedup over the previous leader, DrQA, and is 2.6 times faster per epoch than the original FusionNet.
Inference Performance
The model achieved a 1-example latency of 7.9 ms, which is 5.8 times faster than the original FusionNet and 2.8 times faster than a BERT-base model. Ultimately, FastFusionNet reached an F1 score of 82.5%, matching the performance of FusionNet variants that lacked CoVe.
Key Insights
The development of FastFusionNet underscores several critical principles for efficient deep learning:
- The 80/20 Rule: A small number of model components often account for the vast majority of computational overhead.
- Prioritizing Parallelism: For modern GPU hardware, the capacity for parallel computation is often more vital than the theoretical complexity of recurrent cells.
- Strategic Pruning: Removing high-cost, low-reward features can yield models that are "good enough" for production while being orders of magnitude faster than accuracy-focused leaders.
Limitations and Future Directions
While FastFusionNet demonstrates significant gains, there are avenues for further optimization. The authors suggest that moving from single-precision (FP32) to half-precision (FP16) floating-point arithmetic could provide additional speedups. Furthermore, while the model excels on SQuAD v1.1, future work should evaluate its performance on SQuAD v2.0, which includes unanswerable questions. Finally, comparing these optimized RNNs against distilled or quantized Transformer models remains a relevant area for future study.
Summary updated