Introduction
Standard BERT fine-tuning for classification tasks typically relies exclusively on the final layer's [CLS] token. This approach creates a representational bottleneck, ignoring potentially rich linguistic features captured in intermediate layers and the contextual information embedded in other tokens across the sequence. MaxPoolBERT addresses this by harvesting this "wasted" information through lightweight architectural modifications during the fine-tuning stage.
Methodology
The authors propose three distinct strategies to enrich the classification representation without requiring expensive re-pre-training:
- MaxCLS (Depth-wise Aggregation): Instead of using only the 12th layer's
[CLS]token, this method aggregates[CLS]tokens from the last $k$ layers (with $k=3$ found to be optimal) using element-wise max-pooling. - MHA (Width-wise Aggregation): A single, freshly initialized Multi-Head Attention (MHA) layer is added at the end. This allows the final
[CLS]token to explicitly attend to all other token embeddings in the final layer, capturing broader sequence context. - MaxPoolBERT (Hybrid Aggregation): The flagship approach combines both dimensions. It performs sequence-wide max-pooling across the last $k$ layers and passes the resulting representation through an additional MHA layer.
These modifications are "plug-and-play," adding negligible computational overhead—typically only a few seconds per epoch during fine-tuning.
Experimental Results
The models were evaluated on the GLUE benchmark. MaxPoolBERT achieved an average improvement of 1.25 points over the BERT-base baseline, with gains observed in 7 out of 9 tasks. Notable improvements were seen in WNLI (+5.63 points), RTE (+3.25 points), and MRPC (+3.52 points).
The Low-Resource Advantage
The most significant performance boosts occurred in low-resource settings. As training set sizes decrease, the relative improvement offered by MaxPoolBERT increases significantly.
This suggests that richer, aggregated representations provide a stronger inductive bias, helping the model generalize better when training data is scarce and patterns are harder to learn from scratch.
Robustness and Efficiency
Beyond raw accuracy, the proposed methods improved training stability. Fine-tuning on small datasets often suffers from high variance across different random seeds; the authors found that their aggregation techniques reduced this variance, leading to more reliable models. Furthermore, the inference time remains nearly identical to standard BERT, making it a practical choice for production environments.
Conclusion
MaxPoolBERT demonstrates that significant performance gains can be achieved by simply reconsidering how we extract information from pre-trained models. By looking "deeper" into layers and "wider" across tokens, we can overcome the [CLS] bottleneck. Future work may explore task-specific tuning of the pooling depth and the application of these techniques to larger-scale models and token-level tasks.
Summary updated