TaCL: Improving BERT Pre-training with Token-aware Contrastive Learning [article]

Yixuan Su and Fangyu Liu and Zaiqiao Meng and Tian Lan and Lei Shu and Ehsan Shareghi and Nigel Collier
2022 arXiv   pre-print
Masked language models (MLMs) such as BERT and RoBERTa have revolutionized the field of Natural Language Understanding in the past few years. However, existing pre-trained MLMs often output an anisotropic distribution of token representations that occupies a narrow subset of the entire representation space. Such token representations are not ideal, especially for tasks that demand discriminative semantic meanings of distinct tokens. In this work, we propose TaCL (Token-aware Contrastive
more » ... ), a novel continual pre-training approach that encourages BERT to learn an isotropic and discriminative distribution of token representations. TaCL is fully unsupervised and requires no additional data. We extensively test our approach on a wide range of English and Chinese benchmarks. The results show that TaCL brings consistent and notable improvements over the original BERT model. Furthermore, we conduct detailed analysis to reveal the merits and inner-workings of our approach.
arXiv:2111.04198v4 fatcat:dfenijgyqrfxngzyc52il7rn7y