Learning Dynamic Contextualised Word Embeddings via Template-based Temporal Adaptation

Xiaohang Tang, Yi Zhou, Danushka Bollegala
8/23/2022
cs.CL

Official code: LivNLP/TimeAdapted-DCWE (0 stars, Python, last commit 2023-05-13).

Abstract

Dynamic contextualised word embeddings (DCWEs) represent the temporal semantic variations of words. We propose a method for learning DCWEs by time-adapting a pretrained Masked Language Model (MLM) using time-sensitive templates.

Show full abstract

Given two snapshots $C_1$ and $C_2$ of a corpus taken respectively at two distinct timestamps $T_1$ and $T_2$, we first propose an unsupervised method to select (a) \emph{pivot} terms related to both $C_1$ and $C_2$, and (b) \emph{anchor} terms that are associated with a specific pivot term in each individual snapshot. We then generate prompts by filling manually compiled templates using the extracted pivot and anchor terms. Moreover, we propose an automatic method to learn time-sensitive templates from $C_1$ and $C_2$, without requiring any human supervision. Next, we use the generated prompts to adapt a pretrained MLM to $T_2$ by fine-tuning using those prompts. Multiple experiments show that our proposed method reduces the perplexity of test sentences in $C_2$, outperforming the current state-of-the-art.

View on arXivView PDF

Code Implementations(1)

00Python, ShellMay 13, 20233 years ago

Similar Papers

Cite this paper

@article{tang2022learning,
  title  = {Learning Dynamic Contextualised Word Embeddings via Template-based Temporal Adaptation},
  author = {Xiaohang Tang and Yi Zhou and Danushka Bollegala},
  year   = {2022},
  eprint = {2208.10734},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2208.10734}
}

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

Discussion