Temporal Effects on Pre-trained Models for Language Processing Tasks

Oshin Agarwal, Ani Nenkova

Abstract

Language is a dynamic entity, yet Natural Language Processing (NLP) models are frequently deployed under the assumption of temporal stability. This study investigates the impact of time on model performance across four distinct tasks, distinguishing between temporal model deterioration and the potential for temporal domain adaptation. Our findings reveal that modern contextualized pre-trained models, such as RoBERTa, exhibit significant resilience to temporal shifts, acting as a "temporal shield." Additionally, we demonstrate that unsupervised self-labeling on contemporary data serves as a potent mechanism for model refreshing, often exceeding the benefits of limited human-annotated updates.

Introduction

In the field of NLP, datasets are typically treated as static snapshots of language. However, language evolves through the emergence of new terminology (e.g., "COVID-19"), shifting entity roles, and changing sentiment expressions. This research addresses two primary questions:

  1. Temporal Model Deterioration: To what extent does a model's performance decline when applied to data from years subsequent to its training set?
  2. Temporal Domain Adaptation: Can performance be enhanced by retraining models on more recent data, even without new human labels?

Understanding these dynamics is vital for maintaining the long-term efficacy of deployed AI systems in a changing world.

Methodology

The researchers employed a "lower triangular matrix" experimental design, training models on data from specific years and evaluating them on all subsequent years. This approach allows for a clear visualization of performance trends over time.

Models and Representations

The study compared various word representations:

  • Non-pre-trained: BiLSTM models with random initialization.
  • Static Pre-trained: GloVe embeddings.
  • Contextualized Pre-trained: ELMo, BERT, and RoBERTa.

Adaptation Strategies

To mitigate the high cost of human annotation, two unsupervised methods were tested: Continual Pre-training (further masked language modeling on unlabeled recent data) and Self-labeling (retraining a model on its own predictions for new data).

Datasets

Experiments were conducted on four English-language datasets spanning significant timeframes:

  • Temporal Twitter Corpus (TTC): Named Entity Recognition (NER) on tweets (2014–2019).
  • NYT Annotated Corpus: Truecasing and Domain Classification (1897–2004).
  • Amazon Reviews (AR): Sentiment classification (2001–2018).
Performance of GloVe-based vs. RoBERTa models on the NER task across different training and testing years.

Analysis of Temporal Effects

Pre-training as a Temporal Shield

A key finding is that models leveraging large-scale pre-training are remarkably robust to temporal shifts. As shown in the performance matrices above, while simpler models experience sharp declines when tested on future data, models like RoBERTa maintain stable performance. In some cases, RoBERTa's performance on the NER task even improved over time without retraining, likely because later entities were better represented in its vast, multi-year pre-training corpus.

Task-Specific Deterioration

The degree of "aging" varies significantly by task. Domain classification, which relies on evolving topical vocabularies, showed the most substantial deterioration. In contrast, tasks like Truecasing remained largely unaffected, as the underlying rules of capitalization are temporally stable.

Key Results and Adaptation

The study quantified deterioration ($D_t^a$) and adaptation ($A_t^a$) scores across models. For Domain Classification, randomly initialized models showed a deterioration score of -5.7, which was mitigated to -3.7 by RoBERTa, as shown in the summary table below.

Detailed performance metrics, deterioration ($D$), and adaptation ($A$) scores across various tasks and pre-trained models.

One of the most striking results was the efficacy of self-labeling for temporal adaptation. In the NER task, BERT achieved an adaptation score of 2.27 through self-labeling, significantly outperforming the 1.14 score obtained by retraining on new human-annotated "gold" data (represented by the $A_t^a$ values in the table). This suggests that models can effectively "teach themselves" to adapt to new temporal contexts using their own high-confidence predictions.

Conclusion

While modern pre-trained models are resilient to the passage of time, they are not immune. Continuous adaptation to recent data—even through noisy, unsupervised methods like self-labeling—consistently yields performance gains. Future work should explore these effects in non-English languages and in tasks where labels themselves may change over time, such as open-domain question answering.

Summary updated

BibTeX
@article{agarwal2022temporal,
  author = {Oshin Agarwal and Ani Nenkova},
  title = {{Temporal Effects on Pre-trained Models for Language Processing Tasks}},
  journal = {Trans. Assoc. Comput. Linguistics},
  year = {2022},
  doi = {10.1162/tacl\_a\_00497},
}
Figure