TicTac: Time-aware Supervised Fine-tuning for Automatic Text Dating

Han Ren, Minna PengACL 2025

Introduction

Automatic Text Dating (ATD) is the task of identifying the composition date of a document based on its linguistic content, serving as a vital tool for historians and digital librarians. While modern Pre-trained Language Models (PLMs) like BERT excel at contextual understanding, they are fundamentally "time-agnostic." Standard classification treats temporal labels (e.g., "1800–1820" and "1820–1840") as independent categories, ignoring their sequential relationship. This leads to two major issues: the neglect of temporal relatedness between adjacent periods and a binary penalty system where "near misses" are penalized as heavily as "far misses."

TicTac addresses these gaps by introducing "temporal awareness" into the fine-tuning process, treating time as a continuum rather than a set of discrete, unrelated buckets.

Methodology

The TicTac framework enhances standard fine-tuning with two primary components designed to capture the chronological nature of text evolution.

The TicTac framework architecture, featuring Time-aware Contrastive Learning and Time-aware Metric Learning.

Time-aware Contrastive Learning

This component focuses on the relationships between document representations in the latent space through two mechanisms:

  • Relative Temporal Relation: The model is trained to minimize the distance between documents from the same era while maximizing the distance between those from different eras.
  • Absolute Temporal Relation: The framework introduces learnable label embeddings. Each temporal category (e.g., a specific dynasty) has its own representation. Documents are encouraged to cluster around their respective temporal centers, effectively aligning text with its absolute position in time.

Time-aware Ordinal Classification

To address the "binary penalty" of standard cross-entropy loss, TicTac utilizes Earth Mover’s Distance (EMD) within a Time-aware Metric Learning module. By comparing Cumulative Distribution Functions (CDF) of predicted and true distributions, the model is penalized less for predicting an adjacent time period than for a distant one. This encourages the model to learn the inherent chronological order of the categories.

Experimental Setup

The model was evaluated on two distinct diachronic corpora:

  1. Twenty-Four Histories Corpus: A massive Chinese historical collection spanning from 2500 B.C. to 1600 A.D., divided into 12 discrete historical periods.
  2. Royal Society Corpus: An English-language collection of scientific documents from 1660 to 1880, divided into 11 categories of 20-year spans.

Results and Discussion

TicTac consistently outperformed state-of-the-art baselines and massive Large Language Models (LLMs) across both datasets.

Performance comparison of TicTac against various baselines on the Twenty-Four Histories and Royal Society corpora.

Key Performance Metrics

On the Twenty-Four Histories Corpus, TicTac achieved an F1 score of 88.36% and a classification accuracy (C-acc) of 90.18%. Notably, its adjacent accuracy (A-acc) reached 95.01%, indicating that errors were typically off by only one period. On the Royal Society Corpus, it achieved an F1 of 62.60%, surpassing the best RoBERTa baseline (59.96%).

Comparison with Large Language Models

A significant finding was the poor performance of general-purpose LLMs like GPT-4o-mini and Qwen2.5, which often yielded F1 scores below 10%. This suggests that massive scale does not substitute for the specialized temporal understanding required for historical text dating, where linguistic drift is subtle.

Latent Space Visualization

t-SNE visualizations confirmed that TicTac creates tighter, more chronologically ordered clusters compared to standard BERT. In TicTac's latent space, the representations effectively map out a timeline, reflecting the continuous nature of language change.

Conclusion and Future Work

TicTac demonstrates that incorporating temporal awareness significantly improves ATD. By treating time as an ordinal sequence and using contrastive learning to align document representations with temporal categories, the model achieves superior accuracy and robustness. Future research will explore the model's performance on a wider variety of language families and its effectiveness in eras with stable linguistic patterns or for very short texts where evolutionary markers are sparse.

Summary updated

BibTeX
@inproceedings{ren2025tictac,
  author = {Han Ren and Minna Peng},
  title = {{TicTac: Time-aware Supervised Fine-tuning for Automatic Text Dating}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2025},
}
Figure