Introduction
Determining the chronological origin of historical documents, known as Automatic Text Dating (ATD), is a critical task for historians and linguists. However, it faces a significant hurdle: semantic shift. The meanings of words are not static; for example, the Chinese character "寺" (sì) transitioned from denoting government offices to Buddhist monasteries over centuries.
Traditional NLP methods often rely on static representations that ignore this temporal evolution or require computationally expensive, separate models for different eras. Even modern Large Language Models (LLMs) frequently suffer from "temporal hallucinations" due to the scarcity of niche historical data in their training sets. To address these issues, researchers have introduced TASPT (Temporal-Aware Soft Prompt Tuning), a framework that decouples language into "semantic variance" (evolving meanings) and "semantic invariance" (stable features), allowing for precise dating while tuning only a tiny fraction of model parameters.
Methodology: The TASPT Framework
The authors propose a two-stage framework designed to capture the "flow" of language history through temporal-aware representation and parameter-efficient tuning.
1. ATD-Bert: Temporal-Aware Representation
In the first stage, a specialized model called ATD-Bert is pre-trained to learn three distinct temporal features:
- Semantic Variance Learning (SVL): Uses contrastive learning to ensure that texts from distant eras have distinct vector representations, capturing how meanings diverge over time.
- Semantic Invariance Learning (SIL): Employs adversarial learning via a Gradient Reversal Layer (GRL) to identify linguistic features that remain stable across centuries.
- Temporal Context-Aware Learning (TCL): Utilizes Masked Language Modeling (MLM) on concatenated texts from different periods to learn domain-invariant contextual features.
2. Soft Prompt Tuning
Instead of fine-tuning a massive model entirely, TASPT uses Parameter-Efficient Fine-Tuning (PEFT). Temporal features from ATD-Bert are injected as "soft prompts"—virtual tokens—into a frozen Pre-trained Language Model (PLM). The most effective variant, TASPT v1 LSTM, uses an LSTM to reparameterize these temporal features before they enter the PLM.
Experimental Results and Discussion
The model was evaluated on two major diachronic corpora: The Twenty-Four Histories (Chinese, 202 B.C. – 1911 A.D.) and The Royal Society Corpus (English, 1660–1880). These datasets are particularly challenging due to label imbalance and the long-tail nature of historical vocabulary.
Performance Comparison
TASPT consistently outperformed all baselines, including RoBERTa and specialized models like TALM. On the Twenty-Four Histories, it achieved an F1-score of 89.09%, surpassing the best baseline by 1.57%. Notably, it significantly outperformed state-of-the-art LLMs such as Qwen2-7B and Llama3.1-8B, which performed poorly in zero-shot settings.
Key Insights
- The Importance of Decoupling: Ablation studies revealed that the Semantic Variance module is the most critical component. Removing it led to a performance drop of over 40% on the Chinese dataset, confirming that capturing semantic shift is essential for ATD.
- Efficiency vs. Performance: By adjusting only 1.4% to 5.2% of total parameters, TASPT achieves state-of-the-art results, making it highly scalable for researchers with limited computational resources.
- Error Tolerance: On the Chinese dataset, TASPT reached over 98% accuracy when allowing for a small temporal margin (Acc@5), demonstrating robust performance even when exact dating is difficult.
Conclusion and Future Work
TASPT represents a significant step forward in automatic text dating by explicitly modeling the temporal evolution of language. While the Semantic Variance module proved vital, future work will focus on optimizing Semantic Invariance and Temporal Context modules to better capture stable linguistic features. Additionally, the researchers plan to explore how to better integrate these temporal-aware prompts into even larger models to combat temporal hallucinations and improve zero-shot performance on historical texts.
Summary updated