Abstract
Large Language Models (LLMs) are increasingly used for forecasting and backtesting, yet they often suffer from "temporal contamination"—the accidental inclusion of future information in training data. We present TimeMachineGPT (TiMaGPT), a suite of models pre-trained on strict historical snapshots. By ensuring no data post-dating a specific year is included, TiMaGPT provides a clean environment for evaluating how AI handles time-series forecasting and language evolution without the benefit of hindsight.
Introduction: The Problem of Temporal Contamination
When researchers use LLMs to predict historical outcomes—such as economic shifts or social trends—they rely on "backtesting." However, standard models like GPT-4 or Llama are trained on massive internet scrapes that include retrospective analyses. If a model is asked to forecast the 2019 economy using data from 2015, it may "cheat" if its training set included articles from 2021 discussing the 2019 market crash. This "foresight" leads to over-optimistic performance metrics that do not reflect real-world utility.
Methodology
To address this, the authors developed a series of point-in-time LLMs built from the ground up:
- Architecture: Models utilize the GPT-2 Small architecture (117M parameters).
- Strict Temporal Partitioning: For each yearly iteration (e.g., TiMaGPT-2015), the training corpus was strictly limited to data published on or before December 31st of that year.
- Dynamic Sampling: To simulate a realistic information environment, a negative exponential probability function was used to prioritize "fresh" data (the most recent 5 years) over older historical records.
- Comparison Baseline: TiMaGPT was compared against Conventional Temporally Adapted (CTA) models—standard models pre-trained on 2022 data and then fine-tuned on historical snapshots—to test if fine-tuning alone can erase future knowledge.
Datasets and Benchmarking
The researchers reconstructed historical states of Wikipedia (2004–2023) and utilized the WMT News dataset (2007–2022). To ensure these models remained capable reasoners despite their restricted knowledge, they were evaluated on standard benchmarks including HellaSwag, TruthfulQA, and Winogrande.
Key Results and Insights
Temporal Integrity vs. Fine-Tuning
A critical finding was that fine-tuning is not a "memory eraser." CTA models "pretending" to be from the past still exhibited low perplexity (high familiarity) with future terms. For instance, a CTA model fine-tuned on 2012 data still "knew" about COVID-19, whereas TiMaGPT remained appropriately ignorant until the 2020 snapshot.
Stability of Reasoning
While the knowledge within the models evolved annually, their reasoning capability remained remarkably stable. As shown in the benchmark table, TiMaGPT models performed on par with other similarly sized models like OPT-125m, achieving an average score of ~48.5. This suggests that changes in forecasting performance over time are due to available information, not fluctuations in the model's underlying logic.
Limitations and Future Directions
The current study is limited by model scale (117M parameters) and the availability of high-quality temporal metadata in larger datasets like Common Crawl. Future work aims to scale these "time machine" models to larger architectures and quantify the exact "look-ahead bias" present in current financial and social forecasting applications.
Citation: Drinkall, F., Rahimikia, E., Pierrehumbert, J. B., & Zohren, S. (2024). Time Machine GPT. Findings of the Association for Computational Linguistics: NAACL 2024.
Summary updated