Neural Temporality Adaptation for Document Classification: Diachronic Word Embeddings and Domain Adaptation Models

Xiaolei Huang, Michael J. PaulACL 2019

Abstract

Language is dynamic, with word meanings and usage patterns evolving over time—a phenomenon known as temporal drift. Standard document classifiers often fail when applied to data from different time periods than their training set. This paper presents the Neural Temporality Adaptation Model (NTAM), a framework designed to handle such diachronic shifts. NTAM utilizes a novel concatenative method for building time-aware word embeddings and a sequential Bi-LSTM architecture that tracks linguistic evolution across time intervals. Evaluations across six diverse datasets demonstrate that NTAM consistently outperforms static models and traditional domain adaptation techniques.

Introduction: The Challenge of Temporal Drift

Most Natural Language Processing (NLP) models are treated as static entities, trained on a fixed snapshot of data. However, language is a "moving target." Words undergo semantic shifts (e.g., "sick" evolving from a medical term to slang for "excellent") and usage shifts. When a classifier trained on historical data encounters future documents, its performance typically degrades because the underlying linguistic features have changed.

The authors define temporality adaptation as the task of building models robust to these variations. The challenge lies in creating a system that can "learn" the trajectory of language change to maintain high accuracy over long periods.

Methodology: NTAM and Diachronic Embeddings

The proposed solution, the Neural Temporality Adaptation Model (NTAM), introduces two key innovations:

1. Concatenative Diachronic Embeddings

To capture time-specific nuances without complex alignment, the authors append a time-interval suffix to every word in the training corpus (e.g., "sickness_T1"). They then train a fastText model on this modified data. By leveraging fastText's sub-word (n-gram) sharing, the model learns a general root representation while allowing suffixes to capture era-specific contexts.

2. Sequential Neural Architecture

The NTAM architecture employs a "$T+1$" strategy. For $T$ time intervals, it generates $T$ time-specific views plus one "general" view. These views are processed by a chain of Bi-LSTM units.

Architecture of the Neural Temporality Adaptation Model (NTAM), showing the flow from diachronic embeddings through sequential Bi-LSTMs to class prediction.

As shown in the figure above, the hidden state ($h_t$) and memory cell ($c_t$) of the Bi-LSTM for time $t$ initialize the unit for time $t+1$. This sequential initialization allows the model to explicitly track the gradual evolution of document representations through time.

Datasets and Experimental Setup

The model was tested on six datasets with varying time scales and languages:

  • Amazon: Music reviews (1997–2014).
  • Yelp-hotel & Yelp-rest: Service reviews (2005–2017).
  • Twitter: Flu-related tweets (2013–2016).
  • Economy: US economy news articles (1950–2014).
  • Dianping: Chinese restaurant reviews (2009–2012).

Datasets were split chronologically, with the latest period reserved for testing to simulate real-world deployment scenarios.

Key Insights: The Proximity Principle

A core finding of the research is the Proximity Principle: temporally adjacent domains share more linguistic similarities than distant ones.

Similarity heatmaps between temporal domains across various datasets, illustrating the Proximity Principle.

Analysis using Wasserstein distance and mutual information (visualized in the heatmaps above) confirms that as the time gap between domains increases, the correlation in word usage decreases. Interestingly, while frequent "stop words" remain stable, the "important" predictive words for classification are the most prone to shift, explaining why standard models degrade so quickly.

Results and Performance

NTAM achieved the highest weighted F1 scores on 4 out of 6 datasets. Key takeaways include:

  • Impact of Diachronic Embeddings: Replacing standard embeddings with the proposed diachronic versions provided an average boost of 2.53 points.
  • Effectiveness on Volatile Data: The model excelled on datasets with high linguistic volatility, such as Twitter, and long-term historical data, such as the 60-year Economy dataset.
  • Comparison with Baselines: NTAM outperformed standard CNNs, Bi-LSTMs, and Domain-Adversarial Neural Networks (DANN), proving that temporal-specific modeling is superior to general domain adaptation for time-series text data.

Limitations and Future Directions

While effective, the current approach has limitations. The model treats time as discrete intervals rather than a continuous flow, which may overlook subtle intra-period shifts. Additionally, training multiple views and a chain of LSTMs increases computational overhead compared to single-pass models. Future research may explore continuous time modeling and more efficient architectures to reduce training complexity while maintaining temporal awareness.

Summary updated

BibTeX
@inproceedings{huang2019neural,
  author = {Xiaolei Huang and Michael J. Paul},
  title = {{Neural Temporality Adaptation for Document Classification: Diachronic Word Embeddings and Domain Adaptation Models}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2019},
  doi = {10.18653/v1/p19-1403},
}
Figure