Examining Temporality in Document Classification

Xiaolei Huang, Michael J. PaulACL 2018

Introduction

In the field of Natural Language Processing (NLP), machine learning models are frequently treated as static entities. However, the language they process is inherently dynamic. Statistical properties of text shift over time due to diachronic linguistic change, evolving social media slang, and recurring seasonal cycles. This paper investigates the impact of temporal non-stationarity on document classifiers and evaluates domain adaptation techniques to mitigate performance degradation.

Methodology

The researchers implemented a classification pipeline using Logistic Regression with TF-IDF weighted n-grams (unigrams, bigrams, and trigrams) and Elastic Net regularization. To address temporal shifts, they employed a Feature Augmentation approach. This method triples every feature into three versions: a general version shared across all time periods, a specific version active only for a particular interval (e.g., a specific year range or season), and zeroed-out versions for other intervals. This allows the model to distinguish between "timeless" indicators and era-specific features.

The Impact of Temporal Drift

A primary finding of the study is the universal presence of "Time Rot"—the degradation of classifier performance when training and testing data come from different time periods. The most dramatic evidence was found in the US political data corpus, where the model classified sentences as Republican or Democrat.

Temporal sensitivity in US political data, illustrating significant performance degradation as training and testing periods diverge.

As shown in the heatmap above, F1 scores plummeted by nearly 40 points when the model was tested on decades far removed from its training data. This reflects the profound evolution of political discourse and party platforms over generations. While topic modeling (LDA) suggested that broad themes remained stable, the specific vocabulary used to discuss those themes shifted significantly, tripping up the classifiers.

Interestingly, the study found that temporal drift does not always lead to lower performance over time. In the Yelp restaurant and hotel review datasets, sentiment classification performance consistently increased as the data became more recent.

Performance heatmap for restaurant reviews, showing an upward trend in classification accuracy over time.

The authors suggest that review-writing styles may be evolving to become more explicit or standardized, making sentiment easier for machines to detect in modern datasets. Beyond long-term drift, seasonality also played a role; for instance, the "Economic News" corpus showed a 10-point drop when training and testing across mismatched seasons (e.g., summer vs. winter), likely due to the cyclical nature of economic reporting.

Key Results and Adaptation

The study demonstrates that treating time intervals as distinct "domains" for adaptation generally improves robustness. For seasonal data, domain adaptation provided consistent boosts. In the News (Economy) dataset, combining seasonal and non-seasonal adaptation raised the F1 score from a baseline of .763 to .859.

Ultimately, the paper argues that chronological splits are essential for realistic model evaluation. To understand how a model will perform in production, researchers must validate and test on the most recent data available rather than relying on random shuffling, which obscures the reality of temporal drift.

Limitations and Future Work

While feature augmentation helps, it struggles with the "unseen future" problem, as the model cannot learn weights for time periods it hasn't encountered. Future research could explore generative approaches to predict linguistic shifts or examine if temporal sensitivity is more pronounced in multi-class problems and complex tasks like Named Entity Recognition (NER).

Summary updated

BibTeX
@inproceedings{huang2018examining,
  author = {Xiaolei Huang and Michael J. Paul},
  title = {{Examining Temporality in Document Classification}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2018},
  doi = {10.18653/v1/p18-2110},
}
Figure