Rare Words: A Major Problem for Contextualized Embeddings And How to Fix it by Attentive Mimicking

Timo Schick, Hinrich Schütze
4/14/2019
110 citations
cs.CLcs.LG

Official code: timoschick/am-for-bert (14 stars, Python, last commit 2020-02-02). 1 more implementation below.

Abstract

Pretraining deep neural network architectures with a language modeling objective has brought large improvements for many natural language processing tasks. Exemplified by BERT, a recently proposed such architecture, we demonstrate that despite being trained on huge amounts of data, deep language models still struggle to understand rare words.

Show full abstract

To fix this problem, we adapt Attentive Mimicking, a method that was designed to explicitly learn embeddings for rare words, to deep language models. In order to make this possible, we introduce one-token approximation, a procedure that enables us to use Attentive Mimicking even when the underlying language model uses subword-based tokenization, i.e., it does not assign embeddings to all words. To evaluate our method, we create a novel dataset that tests the ability of language models to capture semantic properties of words without any task-specific fine-tuning. Using this dataset, we show that adding our adapted version of Attentive Mimicking to BERT does indeed substantially improve its understanding of rare words.

View on arXivView PDF

Code Implementations(2)

Code implementations of this paper
RepositoryTypeStarsLanguageLicenseLast commit
timoschick/am-for-bertOfficial14Python–2020-02-02
timoschick/one-token-approximationOfficial12Python–2020-05-07

This repository contains the WordNet Language Model Probing (WNLaMPro) dataset introduced in "Rare Words: A Major Problem for Contextualized Embeddings and How to Fix it by Attentive Mimicking".

142PythonApr 18, 20196 years ago

This repository contains the code for applying One-Token Approximation to a pretrained language model using subword-level tokenization.

124PythonOct 22, 20196 years ago

Similar Papers

Cite this paper

@article{schick2019rare,
  title  = {Rare Words: A Major Problem for Contextualized Embeddings And How to Fix it by Attentive Mimicking},
  author = {Timo Schick and Hinrich Schütze},
  year   = {2019},
  eprint = {1904.06707},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1904.06707}
}

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/1904.06707.svg)](https://codeofpaper.com/paper/1904.06707)

Discussion