Pretraining Language Models on Historical Text
This paper introduces TypewriterLM, a 7.24B language model trained exclusively on pre-1913 English text, along with its associated 54B-token TypewriterCorpus, lexically grounded post-training datasets, and the History-Event benchmark to address challenges in data quality, temporal leakage, and evaluation for historical language models.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you are trying to teach a time traveler how to speak and think exactly like someone living in the year 1912. If you give them a modern textbook or let them browse the internet, they will accidentally learn about airplanes, the internet, and Einstein's theories of relativity. They might then confidently tell you that "computers" are the big machines in your basement, not realizing that in 1912, a "computer" was actually a person who did math by hand.
This is the problem the authors of this paper are solving. They built a special AI, called TYPEWRITERLM, that is strictly forbidden from knowing anything that happened after 1913.
Here is how they did it, explained through simple analogies:
1. The "Time-Capsule" Library (The Data)
To train this AI, the researchers couldn't use the modern internet. Instead, they built a massive digital library called TYPEWRITERCORPUS.
- The Source: They gathered 54 billion words from old books, parliamentary records, scientific papers, and court transcripts from the years 1700 to 1913.
- The Cleaning: Old books scanned by computers often have "glitches" (like the words "Digitized by Google" or modern page numbers). The team acted like strict librarians, scrubbing out every single modern artifact, URL, or anachronistic note to ensure the library was purely historical.
- The Result: A massive pile of text that represents the world exactly as it was before World War I.
2. The "Strict Librarian" Rule (Instruction Tuning)
Usually, when we teach AI to follow instructions, we use modern examples or ask a super-smart modern AI to write the answers. But that would ruin the time traveler's "period accuracy."
So, the researchers invented a new method called Lexically Grounded Instruction Tuning.
- The Analogy: Imagine you are playing a game where you must answer questions using only the words found in a specific old book. You can't invent new words or use modern slang.
- The Process: They created two new datasets (HISTORY-LIMA and HISTORY-SELFINSTRUCT). For every question the AI is asked, the answer is constructed directly from the text of the 1913-era documents. If the word "airplane" isn't in the source text, the AI isn't allowed to use it. This ensures the AI doesn't accidentally "leak" modern knowledge into its answers.
3. The "Surprise Test" (Evaluation)
How do you know the AI really doesn't know about the future? You test it with a "Surprise Test" called HISTORY-EVENT.
- The Test: They showed the AI descriptions of historical events.
- Event A: Happened in 1850 (Before the cutoff).
- Event B: Happened in 1950 (After the cutoff).
- The Reaction: They measured how "surprised" the AI was by reading the text.
- When the AI (TYPEWRITERLM) read about 1950 events, it was genuinely confused and surprised, as if it had never heard of them.
- In contrast, a standard modern AI (like Llama) wasn't surprised at all; it knew the facts because it had read about them during its training.
- The Leak Check: They also checked if the AI accidentally knew facts it shouldn't. They found that while the AI was very good at staying in the past, a tiny, tiny fraction of modern information still "leaked" in (less than 1%), proving that keeping a time machine perfectly sealed is incredibly hard.
4. The Results
- The Time Traveler: The resulting AI (TYPEWRITERLM) is a 7.24 billion-parameter model that speaks and reasons like a person from 1913.
- The Comparison: When tested on general logic puzzles, it performed competitively against other historical AIs, even though it was trained on much less data than modern models.
- The Lesson: The paper proves that you can build a smart AI that is "blind" to the future, provided you are extremely careful about the data you feed it and how you teach it to answer questions.
In short: The authors built a digital time machine. They fed it only old books, taught it to answer questions using only the words found in those books, and proved that it truly doesn't know what happens after 1913. This allows historians and researchers to study the past without the AI accidentally "spoiling" the plot with modern knowledge.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.