Exploring Large Language Models for Classical Philology

Frederick Riemenschneider, Anette Frank

Abstract

Researchers from Heidelberg University have released a new suite of state-of-the-art language models specifically designed for Ancient Greek and Latin. By moving beyond standard BERT architectures to RoBERTa and T5, and training on a massive new 185-million-token corpus, they have set new benchmarks for tasks like part-of-speech tagging, dependency parsing, and generative lemmatization.

Introduction: The Challenge of Historical Languages

While Large Language Models (LLMs) have revolutionized modern languages, "low-resource" historical languages like Ancient Greek (AG) have lagged behind. Previous attempts at AG models suffered from three primary limitations:

  1. Data Scarcity: Models were typically trained on relatively small datasets.
  2. Modern Bias: Many models were initialized from Modern Greek, which often ignores the complex diacritics (accent marks) essential to Ancient Greek meaning and grammar.
  3. Architectural Monoculture: Prior work predominantly used BERT (encoder-only) architectures, neglecting the potential of generative models (encoder-decoder) for complex tasks like lemmatization.

The authors aim to provide a systematic benchmarking of different architectures and investigate how "multilinguality"—training on Greek, Latin, and English together—affects performance on these ancient tongues.

Methodology: New Architectures for Ancient Texts

The researchers introduced four new Pre-trained Language Models (PLMs):

  • GRεBERTA & GRεTA: Monolingual Ancient Greek models based on RoBERTa (encoder-only) and T5 (encoder-decoder), respectively.
  • PHILBERTA & PHILTA: Trilingual versions (Greek, Latin, and English) of the same architectures.

Key technical innovations include training from scratch with a custom tokenizer that preserves diacritics and implementing generative lemmatization. Instead of using rule-based systems, the T5 model "translates" inflected words into their dictionary forms (lemmas) in a context-aware manner.

Data and Benchmarks

The study utilized a significant scale-up in training data, as detailed in the table below.

Table 1: Overview of the pre-training datasets and token counts for Ancient Greek, Latin, and English.

The pre-training corpus for Ancient Greek reached 185.1 million tokens, including a new scrape from the Internet Archive processed with specialized OCR. For evaluation, the team used standard treebanks like Perseus and PROIEL, alongside the EvaLatin 2022 benchmark. They also developed new probing tasks for semantic understanding (synonyms vs. antonyms) and mythological world knowledge.

Analysis and Results

The new models achieved state-of-the-art (SoTA) results across multiple linguistic tasks.

Figure 1: Accuracy comparison of PhilBERTa and GreBERTa against previous benchmarks across varying amounts of training examples.

Key Insights

  • The "Curse of Multilinguality": Monolingual Greek models (GRεBERTA) generally outperformed trilingual ones (PHILBERTA) on Greek-specific tasks. This suggests that for mid-resource languages, "diluting" model capacity with other languages can degrade performance on specialized linguistic tasks.
  • Architecture and Task Alignment: RoBERTa remains superior for classification tasks like Part-of-Speech (PoS) tagging. However, the T5 architecture is a game-changer for lemmatization, handling irregular forms that challenge rule-based systems.
  • Contextualization: The T5-based lemmatizer uses full sentence context to resolve ambiguities where a single spelling could correspond to multiple dictionary entries.

Performance Highlights

  • Ancient Greek: On the Perseus dataset, GRεBERTA achieved 95.83% accuracy in PoS tagging and 88.20% in Unlabeled Attachment Score (UAS) for dependency parsing.
  • Lemmatization: The T5-based GRεTA model reached 91.14% accuracy on Perseus, significantly outperforming the UDPIPE baseline (86.70%).
  • Latin: The trilingual PHILBERTA model outperformed all EvaLatin 2022 participants in PoS tagging.

Conclusion and Future Directions

While these models represent a significant leap forward, limitations remain. The semantic probing datasets are currently small, and the study focused on "base" sized models (~125M–250M parameters). Future work may explore scaling to multi-billion parameter models or applying generative architectures to more creative tasks like machine translation between classical languages or automated commentary generation.

The models and the new Ancient Greek pre-training corpus are available on GitHub at Heidelberg-NLP/ancient-language-models.

Summary updated

BibTeX
@inproceedings{riemenschneider2023exploring,
  author = {Frederick Riemenschneider and Anette Frank},
  title = {{Exploring Large Language Models for Classical Philology}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2023},
  doi = {10.18653/v1/2023.acl-long.846},
}
Figure