Contextual Representation Learning beyond Masked Language Modeling

Zhiyi Fu, Wangchunshu Zhou, Jingjing Xu, Hao Zhou, Lei Li
4/8/2022
cs.CL

Official code: FUZHIYI/TACO (33 stars, Python, last commit 2022-10-23).

Abstract

How do masked language models (MLMs) such as BERT learn contextual representations? In this work, we analyze the learning dynamics of MLMs.

Show full abstract

We find that MLMs adopt sampled embeddings as anchors to estimate and inject contextual semantics to representations, which limits the efficiency and effectiveness of MLMs. To address these issues, we propose TACO, a simple yet effective representation learning approach to directly model global semantics. TACO extracts and aligns contextual semantics hidden in contextualized representations to encourage models to attend global semantics when generating contextualized representations. Experiments on the GLUE benchmark show that TACO achieves up to 5x speedup and up to 1.2 points average improvement over existing MLMs. The code is available at https://github.com/FUZHIYI/TACO.

View on arXivView PDF

Code Implementations(1)

FUZHIYI/TACOOfficial100%

Code for the ACL 2022 paper "Contextual Representation Learning beyond Masked Language Modeling"

334Python, Jupyter NotebookMar 8, 20224 years ago

Similar Papers

Cite this paper

@article{fu2022contextual,
  title  = {Contextual Representation Learning beyond Masked Language Modeling},
  author = {Zhiyi Fu and Wangchunshu Zhou and Jingjing Xu and Hao Zhou and Lei Li},
  year   = {2022},
  eprint = {2204.04163},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2204.04163}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2204.04163.svg)](https://codeofpaper.com/paper/2204.04163)

Discussion