---
title: "Latin BERT: A Contextual Language Model for Classical Philology"
description: "Latin BERT learns from centuries of Latin writing to tag grammar, suggest missing words, distinguish senses, and find similar passages."
canonical: "https://research.elamur.ai/free/en/papers/bamman-2020-latin-bert-contextual-language-model/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/) · [Constitution](https://md.constitution.elamur.ai/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/bamman-2020-latin-bert-contextual-language-model/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2020](https://md.research.elamur.ai/free/en/papers/2020/) / Latin BERT: A Contextual Language Model for Classical Philology

# Latin BERT: A Contextual Language Model for Classical Philology

Paper · 2020 · David Bamman and Patrick J. Burns

**Authors:** [David Bamman](https://md.research.elamur.ai/free/en/authors/david-bamman/) and Patrick J. Burns · **Year:** 2020 · **Venue:** arXiv:2009.10053 · **Licence:** [arXiv — non-exclusive license to distribute](http://arxiv.org/licenses/nonexclusive-distrib/1.0/)

[**26** citations OpenAlex, 2026-10-14](https://openalex.org/works?filter=cites:W3088026279) · [Cited by **85** papers in our library of more than 163,000 papers whose bibliographies we read](https://md.research.elamur.ai/free/en/papers/bamman-2020-latin-bert-contextual-language-model/cited-by/) · [arXiv:2009.10053](https://openalex.org/S4306400194) · [licence](http://arxiv.org/licenses/nonexclusive-distrib/1.0/)

- [PDF](https://arxiv.org/pdf/2009.10053)
- [arXiv 2009.10053](https://arxiv.org/abs/2009.10053)
- [OpenAlex](https://openalex.org/W3088026279)

Citations: OpenAlex, 2026-10-14.

## Summary

A Latin word can look the same in two passages and do quite different work. The form *cum* can introduce a phrase meaning “with” or a clause giving the time or reason for an event. A system that assigns the word a single representation has to use that same representation for both occurrences. Latin BERT gives each occurrence its own representation, shaped by the words around it. The authors train a version of [BERT](https://md.research.elamur.ai/free/en/papers/devlin-2019-bert-pre-training-deep-bidirectional/) specifically for [Latin](https://md.research.elamur.ai/free/en/topics/latin/), drawing on 642.7 million tokens from Classical writing through contemporary texts. Their aim is to see whether learning from that range of writing can improve automatic language analysis and support tasks that philologists already carry out by hand.

The clearest gains come in [part-of-speech tagging](https://md.research.elamur.ai/free/en/concepts/part-of-speech-tagging/), which assigns grammatical categories such as preposition or conjunction to words in a passage. Latin BERT achieved the best reported test accuracy on all three Latin [Universal Dependencies](https://md.research.elamur.ai/free/en/topics/universal-dependencies/) datasets in the paper’s comparison. The largest reported improvement, 4.6 absolute points, came on Perseus, the dataset with the fewest training tokens. The authors also built a [word sense disambiguation](https://md.research.elamur.ai/free/en/concepts/word-sense-disambiguation/) dataset from examples in Lewis and Short’s Latin dictionary. Given an example and a choice between two dictionary senses of its target word, Latin BERT reached 75.4% accuracy on held-out data. The system using static [word embeddings](https://md.research.elamur.ai/free/en/concepts/word-embeddings/) reached 67.3%.

The paper also tests whether Latin BERT can propose words that editors have supplied in transmitted texts. On a collection of 2,205 single-word additions, its first suggestion matched the editor’s word in 33.1% of cases. The match rate rose to 62.2% when the first 10 suggestions counted. One example shows why a ranked list can be valuable even when its leading suggestion differs from the edition. The system favors a word placing an episode in the Second Punic War, which fits the pairing of names in the passage. The editor’s choice places it in the First Punic War, based on historical evidence about the event being described.

For [information retrieval](https://md.research.elamur.ai/free/en/topics/information-retrieval/), the authors use a word in a particular sentence as the query. A search for the use of *in* in a passage about dividing Gaul surfaces other passages about dividing a whole into smaller units. A search centered on *audentes* in a saying about fortune brings back variants of the saying, including a passage with a different word in the same role. These examples illustrate how a scholar can search by local usage. The authors release the trained Latin BERT checkpoint and supporting code and data.

## Deep dive: Latin BERT: A Contextual Language Model for Classical Philology

Latin BERT learns from centuries of Latin writing to tag grammar, suggest missing words, distinguish senses, and find similar passages. · about 32 minutes to read

**In this deep dive**

1. [The problem and its context](#dd-the-problem-and-its-context)
2. [The method, step by step](#dd-the-method-step-by-step)
3. [Experiments and results](#dd-experiments-and-results)
4. [What the ablations show](#dd-what-the-ablations-show)
5. [Limitations](#dd-limitations)
6. [What came after](#dd-what-came-after)

### The problem and its context

#### What changes when the unit is an occurrence

A dictionary brings the uses of a word together under a headword. Reading reverses that process. The reader starts with a particular occurrence and decides which of the word’s possible uses fits the passage. Sometimes the grammar provides a decisive clue. The Latin preposition *in* can express location with an ablative noun or movement toward something with an accusative noun. In other cases, a writer can use the same grammatical structure while changing the sense. The paper gives *vir* as an example. A passage can use it for a man in general or specifically for a husband, and the distinction need not alter the construction around it.

That difference matters when a computer represents words as vectors, or lists of numbers that can be compared. A static embedding gives a word type a single vector. A type is the form or lexical unit used as the key to look up the vector. A token is an occurrence of that unit at a particular location. The same static vector can be useful wherever the word appears, and a system processing a sequence can still use nearby words to infer a tag or sense. The constraint is at the point of representation. Looking up the target word itself gives the same vector each time. If the task is to find parallels for a particular use, the lookup alone provides no way to ask which occurrences of that form resemble the query occurrence.

Contextual representations make the passage part of the input to that lookup-like operation. A word at a given position receives a vector after the surrounding passage has been processed. Changing the sentence can therefore change the representation while leaving the spelling fixed. That opens several questions the paper can approach separately. Does a grammatical distinction appear in the vectors before the system sees any tag labels? Can labeled examples teach it to make a dictionary distinction that grammar alone may leave open? When the missing word is unknown or the goal is to discover parallels, can patterns learned from running text support a search without a task-specific classifier?

#### Latin already had texts, annotations, and tools

The authors describe Latin as comparatively under-resourced for large-scale language training, with a substantial tradition of digitization and computational scholarship. Roberto Busa’s Index Thomisticus made the works of Thomas Aquinas an early subject of corpus work in the humanities. The Perseus Project organized a digital collection around predominantly Classical texts. Such collections supplied passages that could be studied computationally and, when annotations had been added, could support evaluations with reference answers.

A [treebank](https://md.research.elamur.ai/free/en/topics/treebanks/) records the grammatical analysis of sentences. In a dependency treebank, words are linked by grammatical relations, and the datasets used here also identify the grammatical category of each word. Earlier work had produced multiple Latin treebanks as well as lexical and semantic resources. The paper also describes work on [lemmatization](https://md.research.elamur.ai/free/en/concepts/lemmatization/), which maps a form to its dictionary headword, and on [morphology](https://md.research.elamur.ai/free/en/concepts/morphology/), the structure and grammatical variation of words. These resources and tools provided ways to break down a passage before undertaking tasks such as identifying reuse or comparing writing styles across authors and genres.

Researchers had used static representations in this work as well. The paper describes applications of Latin embeddings to synonym judgments, grammatical tagging, and lemmatization, including efforts to use these tools across periods and genres. Some projects used vectors keyed by a [lemma](https://md.research.elamur.ai/free/en/concepts/lemma/), the headword under which inflected forms are grouped. Others used embeddings to study philosophical sentences in Neo-Latin or to investigate allusion and text reuse. Related work in [Ancient Greek](https://md.research.elamur.ai/free/en/topics/ancient-greek/) examined variation in the meaning of Homeric formulae. These examples establish that learning from the distribution of words was already part of Classical scholarship. Latin BERT changes the level at which a learned representation can be inspected and compared. For the earlier approach to learning fixed vectors, the paper draws on [word2vec](https://md.research.elamur.ai/free/en/papers/mikolov-2013-efficient-estimation-word-representations-vector/).

The difficulty of revisiting these tasks varies with the annotations available. Part-of-speech labels accompany existing grammatical analyses. Sense distinctions call for examples paired with a specific inventory of meanings. The paper contrasts Latin’s situation with English, where evaluation datasets let researchers test whether a system can select a sense assigned by human annotators. A historical dictionary offers Latin a different route to such an evaluation. Its quotations have already been organized by sense, although many are too short for the authors’ purpose. Editorial additions offer another kind of evidence. Their typography identifies places where an editor supplied wording, which makes it possible to test candidate generation on actual editorial decisions.

#### Why train a version specifically for Latin

The paper situates its approach alongside earlier [contextualized word representations](https://md.research.elamur.ai/free/en/papers/peters-2018-deep-contextualized-word-representations/) and BERT. It describes improvements in such areas as [dependency parsing](https://md.research.elamur.ai/free/en/topics/dependency-parsing/), which identifies grammatical links between words, and [coreference resolution](https://md.research.elamur.ai/free/en/topics/coreference-resolution/), which identifies expressions referring to the same entity. It also cites investigations into what grammatical distinctions BERT representations contain. The Latin study turns that line of inquiry into a local question about the difference between the prepositional and conjunctional uses of *cum*. The precedents include [BERT Rediscovers the Classical NLP Pipeline](https://md.research.elamur.ai/free/en/papers/tenney-2019-bert-rediscovers-classical-nlp-pipeline/) and [A Structural Probe for Finding Syntax in Word Representations](https://md.research.elamur.ai/free/en/papers/hewitt-2019-structural-probe-finding-syntax-word/).

Latin was already present in multilingual resources. Vicipaedia, the Latin edition of Wikipedia, gave projects using multilingual Wikipedia data a source of Latin text. The paper names multilingual BERT, or mBERT, which was trained on aggregated data in 104 languages, and multilingual FastText vectors. It also describes work training separate versions of BERT for individual languages, including Chinese and [French](https://md.research.elamur.ai/free/en/topics/french/). Those studies gave the authors a precedent for devoting training and a vocabulary to one language. For Latin, the question was what such training could learn from historical texts and contemporary writing together. The cited examples include [Learning Word Vectors for 157 Languages](https://md.research.elamur.ai/free/en/papers/grave-2018-learning-word-vectors-157-languages/), [CamemBERT](https://md.research.elamur.ai/free/en/papers/martin-2019-camembert-tasty-french-language-model/), and [FlauBERT](https://md.research.elamur.ai/free/en/papers/le-2019-flaubert-unsupervised-language-model-pre/).

Chronological reach matters to the problem. The paper describes surviving Latin writing from 200 BCE through the present, and a passage can reflect the subject matter, expressions, and editorial practices of its source. A corpus confined to a contemporary encyclopedia would offer a different range of usage from a collection of Classical authors. A collection of Classical authors would likewise differ from the work of Aquinas or the writing assembled in an ecclesiastical collection. The authors treat these sources as complementary for training. Their case studies then make separate, narrower demands on what the resulting representations can do.

### The method, step by step

#### Assemble and balance the training text

The training procedure begins with ordinary text. It uses no part-of-speech labels or dictionary sense assignments at this stage. Instead, the authors build a corpus in which an observed word can be hidden and used as its own answer during training. The range of writing available to that exercise determines which forms, constructions, and combinations of words the system has a chance to learn. Later, when the authors evaluate a tagger or a sense classifier, they use labeled data specific to that task.

From Latin collections to task-specific predictions and search The steps in order.

The corpus combines collections with different emphases. Perseus supplies primarily Classical material. The Latin Library covers a broad historical span. Ecclesiastical texts spanning the third through thirteenth centuries CE come from the Patrologia Latina, while the works of Thomas Aquinas come from the Corpus Thomisticum. These collections give the training corpus different kinds of continuity. The Latin Library reaches across periods, while the Aquinas material provides sustained exposure to the writing of a single author.

Vicipaedia adds encyclopedic Latin, including writing about modern subjects. The Internet Archive contributes books from digitized scans. According to the authors, the unfiltered Internet Archive collection held a billion words drawn from works published between about 200 BCE and 1922 CE. That describes the larger source pool. The paper gives 642.7 million tokens as the size of the assembled corpus associated with Latin BERT. The two figures refer to different stages and collections.

The scans were transcribed by optical character recognition, or OCR, and the resulting text varied in quality. The authors made a vocabulary from texts already available in digital form. They then checked each scanned book against that vocabulary, keeping a book if at least 40% of its tokens occurred in the vocabulary. The decision applies at the level of the book. It screens for an overall level of recognizable text while allowing a retained book to contain both unfamiliar Latin words and recognition errors. Vocabulary agreement offers a practical way to make this decision across a collection without manually inspecting every page.

A second decision concerns how frequently the accepted sources are seen during training. The authors increase the sampling of the sources outside the Internet Archive uniformly so that training uses approximately 50% Internet Archive text and 50% text from the remaining sources. This adjustment is a response to the greater noise of the scans. The percentages describe the balance between source groups during training. Ecclesiastical Latin, modern encyclopedic writing, and Classical prose sit within those groups, so the balance of the groups cannot stand in for a balance by period, author, or genre.

#### Decide where the words and pieces are

[Tokenization](https://md.research.elamur.ai/free/en/concepts/tokenization/) determines what counts as an input unit. The authors use the Classical Language Toolkit to identify sentences and split them into Latin word tokens. Its treatment of enclitics shows why this choice matters. An enclitic is written attached to a preceding word. In the opening of Vergil used in the paper, the toolkit separates *virumque* into *virum* and *-que*. The attached conjunction becomes a separate unit before BERT’s own division into pieces.

The next stage is [subword tokenization](https://md.research.elamur.ai/free/en/concepts/subword-tokenization/). The authors learn a Latin WordPiece vocabulary from their training text with the tensor2tensor library. The vocabulary contains 32,895 distinct sub-word types. A WordPiece unit can cover a whole word or part of one. In the example *audentes fortuna iuvat*, the token *audentes* becomes *audent* and *es*, and the other words remain whole. This gives the system a reusable set of input units from which it can represent many written forms. That is useful for Latin because inflection creates many variants.

The two stages serve different purposes. The toolkit decides which units count as words for analysis, including the separate treatment of an enclitic. WordPiece decides how each such unit is represented in the input to BERT. A tag belongs to the word-level position that the evaluation asks about. That position may correspond to multiple pieces internally. When the authors need a single contextual vector for such a word, they average the vectors of its pieces. In the *audentes* example, each coordinate of the word vector is the mean of the corresponding coordinates for *audent* and *es*. A whole word represented by one piece already has a single vector for that position.

This pooling operation allows a comparison between words that occupy different numbers of input positions. It keeps the output size the same whether a word is split or left whole. It also assigns equal weight to the pieces. The context can affect the vector computed for each piece before the averaging happens. The average therefore preserves information from contextual processing even though the pooling rule itself gives no piece special treatment.

#### Learn by hiding words

The authors pretrain a [language model](https://md.research.elamur.ai/free/en/concepts/language-model/) by hiding a selected word and asking BERT to predict it using the visible context. A passage provides both the input and the answer: the input is the passage with a mask, and the answer comes from the original text. Training can use passages from collections that have never been annotated for grammatical category or sense. The resulting representation can carry clues from either side of the target, which also makes the procedure applicable to a gap inside a sentence.

The Latin training uses whole-word masking. When a selected word spans several WordPiece units, the mask covers all of them. With *audentes*, for example, leaving one of its pieces visible would give the system part of the spelling of the answer. Masking the entire word makes the surrounding text the evidence for reconstruction. The paper cites an earlier application of this training choice in [Pre-Training with Whole Word Masking for Chinese BERT](https://md.research.elamur.ai/free/en/papers/cui-2019-pre-training-whole-word-masking/).

The [Transformer](https://md.research.elamur.ai/free/en/concepts/transformer/) in Latin BERT has 12 layers, each producing representations with 768 coordinates per position. Each layer updates the representation of a position using information from the input sequence. A later layer can thus represent *cum* differently in passages with different constructions, even when the tokenization of *cum* itself is identical. The paper takes the final layer as the source of vectors for several analyses. When it trains a tagger, the classifier works with the output of the pretrained system while training is allowed to change the underlying parameters as well.

Using TensorFlow on a TPU, the authors run a million pretraining steps with batches of 256 and cap each input at 256 WordPiece tokens. The input limit is expressed in pieces, so a word that splits occupies more of the available sequence than a word that stays intact. The run takes roughly 5 days on a TPU v2. The authors report a Google Cloud cost of $540 at $4.50 per TPU v2 hour. They convert the TensorFlow checkpoint to a form usable with HuggingFace and identify their Latin BERT repository as the place to obtain the trained checkpoint and supporting code and data.

#### Use the learned representations in different ways

Part-of-speech tagging adds a prediction layer to the pretrained system. A linear transformation maps each word’s contextual vector to scores for the grammatical categories. A softmax turns the scores into a distribution over the candidate tags, so the tag with the largest score also has the largest predicted probability. During [fine-tuning](https://md.research.elamur.ai/free/en/concepts/fine-tuning/), the training examples update both this prediction layer and the pretrained parameters. The treebank provides the target category for each word. The learning problem is to produce those categories from unseen sentences after training on annotated ones.

Word sense disambiguation also uses fine-tuning, with a separate classifier for each selected dictionary headword. It receives a passage containing that headword and chooses between the senses retained for it. Each headword has its own label meanings. A choice between senses of *in* provides no common label such as “preposition” that can also serve as the answer to a question about the senses of *vir*. The paper uses the pretrained system as a common starting point and learns the individual classification problems from the dictionary examples available for each word.

Infilling uses the ability to predict hidden material directly. The authors construct gaps from places where editors supplied single words. They present the context around a gap and use the predicted probabilities to order candidates. The highest-ranked candidate yields a single guess. A longer list lets the authors measure how much further down a reader would have to look to find the editor’s choice. Both evaluations use the same reference word, so changing the cutoff changes the definition of recovery while leaving the prediction problem intact.

Contextual search uses the vectors rather than the predictions. The authors represent a query word in its sentence and compare its vector with vectors of occurrences in a corpus. Nearby vectors identify words used in similar local environments. The result can point back to the full passage, where a reader can inspect the context. The query specifies the occurrence whose use matters, and the search can return a different spelling or lexical item if its representation is close. This is the step that turns a word-level representation into a way to navigate passages.

### Experiments and results

#### Grammatical tagging across treebanks

The tagging evaluation uses three Latin dependency treebanks with distinct coverage. Perseus contains Classical works and has 18,184 training tokens. The Index Thomisticus Treebank, abbreviated ITTB in the tagging experiment, uses works by Aquinas and has 293,305 training tokens. PROIEL includes Classical and Medieval material and has 172,133 training tokens. These are counts of annotated training tokens for the respective tagging tasks. The test metric is accuracy, the share of evaluated tokens whose predicted grammatical category matches the reference category.

The training schedules reflect the splits available in the treebanks. For ITTB and PROIEL, the authors monitor accuracy on development data and stop after 10 iterations without improvement. Development data serve to decide when training should end before reporting results on the test data. Perseus has no development split in this setup, so the authors fix its training duration at 5 epochs. An epoch is a pass through the training data. The Perseus accuracy thus comes from a fixed training schedule, and the other treebanks use a schedule determined by development performance.

The authors train one baseline with static word2vec embeddings learned from the same corpus as Latin BERT. Each static vector has 200 dimensions. These vectors are trainable inputs to a bidirectional long short-term memory network, or LSTM, which processes the sentence in both directions. Although this baseline starts each occurrence of a word with the same vector, the network can use surrounding words when making its prediction. It provides a comparison between a tagger built from static pretrained inputs and one built by adapting a pretrained contextual system.

The comparison also includes published test accuracies from an mBERT-based system and systems entered in the 2018 shared task on Universal Dependencies. A shared task gives different research groups a common evaluation problem. The paper draws on work that approached tagging within the broader task of processing text for grammatical analysis. Since these were results from earlier publications, the systems bring their own architectures and training procedures to the comparison. One of the shared-task sources is [Universal Dependency Parsing with Multi-Treebank Models](https://md.research.elamur.ai/free/en/papers/smith-2018-82-treebanks-34-models-universal/).

Latin BERT has the highest reported test tagging accuracy on Perseus, ITTB, and PROIEL in the paper’s comparison. The largest gain it reports is 4.6 absolute points on the Perseus test set. Perseus also has the least annotated training material of the three. That result shows that the pretrained system could be adapted successfully in the smallest tagging setup the authors tested. The treebanks differ in both their amount of training data and what they contain, and the Perseus stopping rule differs as well. The result on Perseus gives one observation about a small annotated collection, with those conditions attached.

#### Recovering a word supplied by an editor

An infilling benchmark can start from a complete sentence and hide a word purely for evaluation. That establishes whether a system can recover observed text after an artificial deletion. The authors ask a related historical question. They want the target word to come from an actual act of editing, where an editor has supplemented what was transmitted. The paper uses the convention of marking such additions with angle brackets. Earlier work described in the paper includes artificial masking experiments in English and Ancient Greek, and work on the general problem of [filling in blanks](https://md.research.elamur.ai/free/en/papers/donahue-2020-enabling-language-models-fill-blanks/).

The authors search the Latin Library for sentences of 10 to 100 words that include a bracketed single word at least two characters long. In their example from Ampelius, the brackets identify *ter*, meaning “three times,” as the supplied word. Removing that word gives a complete evaluation item: the gap is where the edition printed the addition, and *ter* is the reference answer. The selection rule admits additions marked in this way and suitable for a single-word prediction. Angle brackets indicate an editorial intervention, which can have been motivated by conjecture or by evidence from a parallel source.

A text can circulate in multiple editions or copies, so the marked sentence could have an unmarked counterpart in the training corpus. The authors address this at two stages. Before training Latin BERT, they remove sentences that contain a single word in angle brackets. For evaluation, they take the 5-gram centered on each candidate addition and check whether that sequence appears in the training corpus. An [n-gram](https://md.research.elamur.ai/free/en/concepts/n-gram/) is a sequence of adjacent tokens. This check excludes an item if training contained the local wording around the same supplied word, even without the brackets. It guards against a direct route by which the answer could have entered training.

The resulting dataset consists of 2,205 editorial additions. On this set, Latin BERT’s highest-probability candidate agrees with the edition in 33.1% of cases. The editor’s word occurs in the first 10 suggestions in 62.2% of cases and in the first 50 in 74.0%. These are exact-word recovery measures at different rank cutoffs. A plausible alternative can occupy a high rank and still count as a mismatch. Widening the cutoff also shifts some of the decision work to the reader, who must now assess more candidates.

Recovery of Latin Library editorial additions by rank cutoff A longer candidate list recovers more of the words chosen by editors.

**The numbers**

| System or setting | exact-word recovery % |
| --- | --- |
| Latin BERT first prediction | 33.1 |
| Latin BERT top 10 | 62.2 |
| Latin BERT top 50 (this paper) | 74.0 |

The chart compares ways of reading the same ranked output. It shows how frequently the reference word is available for consideration if the reader accepts a list rather than a single suggestion. The study gives no competing system’s recovery rate for this dataset. The reported proportions describe recovery of the editor’s wording under the authors’ selection and filtering rules.

#### Choosing between dictionary senses

For word sense disambiguation, the authors use Lewis and Short as both the inventory of candidate senses and the source of examples. An entry distinguishes major meanings and gives quotations attesting to them, primarily from Classical authors. A quotation assigned to a sense in the dictionary becomes a labeled example for that headword. This approach takes the editors’ organization as the reference analysis. The paper compares it with the kind of experimental task used in [English word sense disambiguation evaluations](https://md.research.elamur.ai/free/en/papers/raganato-2017-word-sense-disambiguation-unified-evaluation/), where examples are annotated for meaning in context.

Many dictionary quotations offer too little surrounding text for the intended experiment. The authors report that 55% of the citations have fewer than 5 words. For the dataset they retain example sentences longer than 5 words. They select headwords with at least two major senses, indicated by the dictionary’s Roman numerals, with at least 10 qualifying examples supporting each of the first two senses. They balance those senses by using equal numbers of examples. The resulting task gives each item a headword and a passage, with a choice between the two retained senses of that headword.

There are 8,354 examples covering 201 dictionary headwords. The authors divide the examples separately for each headword into training, development, and test portions of 80%, 10%, and 10%, preserving the sense balance in all of them. A headword can have as few as 16 training instances, 8 per sense, or as many as 192, with 96 per sense. For 59% of headwords, there are 24 or fewer training examples. Those counts refer to the training portion available for the individual sense classifiers. The full dataset size covers all headwords and all splits.

For both Latin BERT and the comparison system, the authors use development performance to choose the number of training epochs. The comparison system is a 200-dimensional bidirectional LSTM using static embeddings. It has access to the sequence of words around the target and can learn a contextual decision from the labeled examples. Latin BERT begins with contextual representations learned during pretraining. Random choice has an expected accuracy of 50% because the two labels are balanced. On held-out test data, the static baseline reaches 67.3% overall accuracy and Latin BERT reaches 75.4%. The authors report an absolute improvement of 8.1 points over the static system.

Overall held-out test accuracy on Lewis and Short sense examples Latin BERT has higher test accuracy than random choice and the static embedding system.

**The numbers**

| System or setting | accuracy % |
| --- | --- |
| Random choice | 50 |
| Bidirectional LSTM with static embeddings | 67.3 |
| Latin BERT (this paper) | 75.4 |

The test score concerns examples of headwords for which the authors have trained a classifier. It describes a method that can learn to reuse a dictionary distinction when it sees another example of that word. The paper draws a parallel with the difficulty of surpassing strong sense baselines in English and cites [GlossBERT](https://md.research.elamur.ai/free/en/papers/huang-2019-glossbert-bert-word-sense-disambiguation/) in that context. The English comparison provides background about the task. The scores above all concern the Latin dictionary dataset.

#### Searching for similar uses in running text

For the search demonstration, the authors compute Latin BERT vectors for 16 million tokens from a collection made up mainly of Classical texts. They choose a particular occurrence in a query sentence and look for the closest contextual vectors in that collection. Traditional searches that match word forms would group occurrences by their surface spelling. A nearest-neighbor search with static embeddings would compare vectors assigned to word types, as in [GloVe](https://md.research.elamur.ai/free/en/papers/pennington-2014-glove-global-vectors-word-representation/). The Latin BERT search can compare distinct occurrences of the same form and can also retrieve occurrences with different forms.

The first query selects *in* in the opening description of Gaul’s division. Its neighbors include uses of *in* with an accusative noun, consistent with the preposition’s directional or resultative use. The passages also share a more specific idea. The nouns identify the products or units of a division, including parts, districts, provinces, units of measurement, and kinds. The nearest occurrences therefore reflect both a grammatical cue and a pattern of meaning in the immediate passage.

The other query selects *audentes* in *audentes fortuna iuvat*, the saying in which fortune favors the daring. The nearby occurrences include variants with *audentis* and *audaces*. The search also retrieves a passage featuring *audentes* in a differently worded expression that the authors treat as intertextual. Here the returned passages show that a query can extend beyond one fixed word form and one verbatim sentence. The paper presents the neighbors as examples a reader can examine. It reports the size of the search collection and describes the retrieved material, with no aggregate retrieval score.

### What the ablations show

The paper reports no formal ablation that removes a training component while keeping the rest fixed. Its analyses instead compare learned representations and complete systems, examine individual predictions, and change the unit being compared in search. Each of these comparisons answers a different question about the contribution of context.

#### A grammatical distinction before the tagger is trained

The authors examine the two uses of *cum* in the Index Thomisticus Treebank before fitting a tagger. They sample 100 sentences tagged with *cum* as a preposition and 100 with it as a subordinating conjunction. The preposition, labeled ADP, accompanies an ablative nominal. The [subordinating conjunction](https://md.research.elamur.ai/free/en/concepts/upos-sconj/), labeled SCONJ, introduces a dependent clause. For each sentence, the authors take the 768-dimensional final-layer vector at the target position and project the vectors into two dimensions with t-SNE, a method for visualizing nearby points in high-dimensional data.

The plotted uses are almost completely separated. All the target occurrences have the same form, so a lookup by spelling would assign them the same vector. The observed grouping is evidence that the contextual vectors differ in ways associated with grammatical use. This is a test of what is already present after pretraining. Treebank tags select and identify the examples in the plot, but the authors have not trained on those tags to make the separation happen.

Several apparent exceptions make the analysis more informative. The authors identify prepositional labels in the expression *cum hoc* among points grouped with conjunctions. That expression occurs 17 times in the treebank, and *cum* is labeled SCONJ in 14 of those occurrences. Another point labeled as a preposition represents a conjunction according to the authors’ inspection of its sentence. In that case, the vector’s neighbors agree with the authors’ reading, while the recorded annotation gives the opposite category.

Among the conjunctions grouped with prepositions, the authors discuss an occurrence of *cum actu*. The following noun is ablative, a form associated with prepositional *cum*. The other occurrence of that expression in the treebank is labeled as a preposition. The authors suggest this might explain the location of the point. For another conjunction placed among prepositions, they give no explanation. The examples show that visual disagreements can reflect an annotation error, a local clue compatible with competing analyses, or a case whose cause remains unclear.

This analysis and the tagging benchmark are complementary. The plot addresses a single ambiguous spelling in a single collection and asks how its pretrained vectors are organized. The tagging evaluation assigns grammatical categories throughout held-out sentences after supervised adaptation. A separation in the plot gives a reason to expect that some distinctions will be accessible during fine-tuning. The test accuracies measure the behavior of the resulting tagger across many forms and categories.

#### A comparison with static starting representations

The static POS baseline shares Latin BERT’s pretraining texts, which makes the comparison more informative than one against embeddings drawn from a smaller or unrelated corpus. Both taggers can use the surrounding sentence. Their differences include the way the starting representation is learned and the network that turns that representation into a prediction. A higher score for Latin BERT supports using its full training and adaptation approach in this setup. The comparison leaves open how much of the advantage comes from the architecture, the masking objective, or other choices in how those systems are trained.

The mBERT comparison addresses the practical question of how the Latin-specific tagger fares against a published multilingual alternative. The Latin system has a Latin-derived vocabulary and trains on a broad collection of Latin sources. The cited multilingual system was pretrained across languages on Wikipedia. These systems differ in the corpus used to learn Latin as well as in how they allocate training across languages. The scores establish the ordering on the treebank tests reported in the paper. Isolating the contribution of Latin-only training would require holding other parts of the comparison fixed.

The word sense comparison has a related interpretation. Both systems see the same kind of supervised task, and both use development data to choose training duration. The static system’s accuracy shows that a classifier can use the input word sequence and learn some of the dictionary distinctions from those examples. The contextual system does better across the held-out examples. Together with the scarcity of per-headword training instances, that suggests a benefit from adapting an already contextual representation. The reported overall score leaves the size of that benefit at individual headwords unresolved.

#### Evidence that can pull an infilling prediction in different directions

The paper examines a gap in Ampelius’s account of Hanno and Mago and the capture of Cornelius at Lipari. Latin BERT’s leading word is *secundo*, which would place the episode in the Second Punic War. The editor’s choice, *primo*, also appears high in the ranking and places the episode in the First Punic War. The difference between these candidates changes which historical event the sentence is taken to describe, even though both are grammatically plausible in the gap.

The authors trace *primo* to Karl Halm through Eduard Wölfflin’s 1854 edition. Halm’s addition agrees with the historical placement of the capture at Lipari. The paper explains that Hanno and Mago, considered together, are more closely associated elsewhere in the surviving training material with the Second Punic War. The authors raise the possibility that Ampelius may have misidentified the people involved. They read the two sides of the gap as offering cues that support different answers.

This example illustrates what the ranked output contributes to textual criticism. It puts alternatives before the reader and makes a contextual disagreement visible. The historical dating gives a basis for choosing how to read the event, while the association of the names explains why the other candidate is plausible from the text. It remains an interpretation of a particular prediction. The authors did not test the explanation by systematically changing those clues and measuring changes in the ranking.

#### A change from sentence similarity to token similarity

For nearest-neighbor search, the authors compare using a sentence-level representation taken from the initial `[CLS]` token with comparing representations at the word positions of interest. They report that the latter provides greater precision in finding uses like the ones in their queries. A sentence can contain a relevant expression alongside material that differs from the query passage. Comparing the representation at that expression gives the search a narrower target.

The search for *in* shows what the narrower target can capture. A single occurrence sits in a construction about division, and the closest tokens retrieve other instances of that construction in spite of changes in the objects being divided. The *audentes* search demonstrates a complementary property. Lexical substitutions and changes in the broader saying can still leave a similar contextual representation. This is a qualitative comparison of retrieval units. In the paper, precision here describes how closely the shown passages fit the query. A labeled retrieval set and an aggregate precision measure would be needed to assess the size and consistency of that difference.

### Limitations

#### Limits the authors identify

The authors note that several parts of the study use the final BERT layer for their representations. The position of an example in the *cum* plot and the identity of a contextual neighbor are properties of the particular representation being compared. Earlier layers may encode useful distinctions in a different way. The paper points to probing individual layers as a direction for finding which representations suit different questions, including the search for parallel passages. Its experiments provide examples of what can be done with the final layer.

The paper also limits its claims about language analysis to the tasks tested. The supervised evaluations concern grammatical tagging and dictionary sense choice. The authors identify syntactic parsing and [named entity recognition](https://md.research.elamur.ai/free/en/topics/named-entity-recognition/) as possible next applications. Parsing would require predictions about relations between words. Named entity recognition would require identifying mentions such as names of people or places. Both call for their own labeled examples and evaluation. The paper similarly treats applications in lexicography and other forms of literary study as directions beyond these case studies. [Lexicography](https://md.research.elamur.ai/free/en/concepts/lexicography/) is the work of describing words and their uses, especially in dictionaries.

For the dictionary experiment, the authors emphasize how often the citations are fragmentary. Their restriction to longer examples supplies more context for disambiguation while leaving much of the dictionary unused. They propose looking up the passages behind the short quotations to recover additional context and increase the amount of training and evaluation material. They also point to Greek lexica as possible sources for a comparable experiment. In both cases the proposal depends on locating usable texts and connecting the cited occurrences to their assigned senses.

For infilling, the authors’ reading of the Ampelius example identifies a limit on the evidence available at prediction time. The editor could consult the historical record for the event at Lipari. Latin BERT ranked its candidates from the context and the patterns learned in training. Even a well-supported contextual prediction can diverge from a reading supported by external evidence. The authors discuss the probabilities as estimates that can inform editorial work, with the decision about the transmitted passage still requiring scholarly judgment.

#### Limits that follow from the design

The corpus has broad chronological coverage. The paper’s balancing rule gives a share to the Internet Archive and a share to all the other sources combined. Neither the coverage dates nor that rule measure how much text is available for a given author, genre, or period. The vocabulary filter likewise estimates the usability of books by how much of their wording is recognizable. An unfamiliar valid form and an OCR error can both fall outside its vocabulary. These design choices make it possible to use the collections at scale. Their effects on representation quality by period or source are unmeasured in the experiments.

The tagging comparisons show performance on the test splits of the selected treebanks. They offer evidence across distinct collections with Classical and Medieval material and the works of Aquinas. An evaluation across these collections after separate adaptation answers a different question from training on one period or author and testing directly on another. The larger improvement on Perseus motivates interest in small annotated collections, but the others vary in text, training size, and stopping procedure. The study provides no controlled estimate of how much annotation a new tagging project would need to obtain a similar gain.

The sense evaluation offers a deliberately constrained choice. The headwords must have enough long examples for their first two major senses, and each of those senses receives equal weight in constructing the dataset. A passage encountered outside this experiment can give a different distribution of senses, or use a meaning beyond the two under consideration. In addition, the test examples come from the same dictionary-based collection as the training examples. Applying the classifiers to newly annotated running text would add a change in how examples are selected. Similarly, learning a new sense inventory or tagging an unseen headword would be a different task from classifying new examples of a headword already trained.

The infilling benchmark measures agreement with a printed edition within a particular class of additions. It selects single words that meet the authors’ length and context rules. It cannot establish corresponding recovery rates for longer lacunae or cases in which the number of lost words is unknown. The reference word is evidence of an editorial decision. More than one candidate can make sense in the passage, so exact recovery cannot tell a reader whether an alternative is linguistically plausible or historically defensible. It also does not measure how much work an editor would save by consulting a list at any of the reported cutoffs.

The leakage check excludes exact overlap on the local sequence centered on the conjecture and removes marked instances before pretraining. This reduces direct exposure to the target wording. A version with a variant spelling or surrounding words could still convey closely related information without sharing the screened sequence. The resulting experiment gives a specific check against reuse of the tested wording. It does not establish complete independence among every edition or textual parallel that could occur in the collections.

The retrieval examples demonstrate that several kinds of resemblance can emerge from the same contextual comparison. In a study of intertextuality, resemblance can be a reason to read two passages together, and a claim of allusion requires further evidence. For teaching, a returned example would still need to be checked for the construction under study. The search corpus is predominantly Classical, and there is no labeled set against which to measure how frequently suitable parallels are recovered or missed. The demonstrations establish the kinds of candidates the method can surface, with remaining uncertainty about performance across queries and collections.

### What came after

#### From a Latin system to a broader research area

Later citing work places Latin BERT alongside projects that address different needs of ancient and historical languages. [Machine Learning for Ancient Languages: A Survey](https://md.research.elamur.ai/free/en/papers/sommerschield-2023-machine-learning-ancient-languages-survey/) (2023) brings the work into a survey of the field. The citation gives Latin BERT a place in a literature broader than Latin grammatical analysis or Classical textual criticism. A survey can connect projects that share a dependence on digitized texts while asking quite different questions of those texts.

The Latin BERT paper names parsing and named entity recognition as tasks for further investigation. Two later citing works address those areas in Latin. [UppsalaNLP at EvaLatin 2026: Multilingual parsing for Latin](https://md.research.elamur.ai/free/en/papers/stymne-2026-uppsalanlp-evalatin-2026-multilingual-parsing/) uses a multilingual approach to parsing. Where the original tagging experiment assigns a category to a word, parsing addresses how the words connect grammatically. The multilingual framing also returns to the question that motivated the comparison with mBERT, namely how resources involving other languages can contribute to a Latin task.

[Contextual Probing for Low-Resource Named Entity Recognition in Latin](https://md.research.elamur.ai/free/en/papers/trusca-2026-contextual-probing-low-resource-named/) (2026) addresses recognition of named entities through contextual probing under limited resources. Its point of contact is the question posed by the *cum* analysis. If the surrounding text changes what a representation captures at one position, a probe can ask how much of the distinction required by a downstream task is already accessible there. For entity recognition the application is identifying named mentions, which gives this question a different target from the grammatical ambiguity tested in the original paper.

The citing literature also takes the language-specific training question to other historical languages. [PortOldBERT: Portuguese Historical Language Models](https://md.research.elamur.ai/free/en/papers/osorio-2026-portoldbert-portuguese-historical-language-models/) (2026) addresses language modeling for historical Portuguese. [BEReshiT: an Ancient Hebrew Model based on DictaBERT](https://md.research.elamur.ai/free/en/papers/stoupak-2026-bereshit-ancient-hebrew-model-based/) (2026) develops a system for Ancient Hebrew based on DictaBERT. Both works belong to the line of inquiry in which a historical language or body of writing becomes the focus of representation learning. Their stated scopes concern their respective languages. The citation relationship alone leaves open which data and training choices they share with Latin BERT.

#### Retrieval, alignment, and restoration

The original nearest-neighbor experiment gives a reader passages to inspect. A later citing project makes retrieval itself the object of a benchmark. [Gretino: A Greek and Latin Dataset to Benchmark Retrieval Systems in Classical Languages](https://md.research.elamur.ai/free/en/papers/toyin-2026-gretino-greek-latin-dataset-benchmark/) (2026) contributes a Greek and Latin dataset for evaluating retrieval systems. It addresses the same broad problem of finding useful material within Classical texts, with a benchmark as its stated contribution. The original paper’s examples show how a relevant passage may differ in spelling or broader wording. A retrieval benchmark makes system evaluation an explicit part of the research task.

[Evaluating Latin and Ancient Greek Sentence Alignment through Parallel Sentence Mining](https://md.research.elamur.ai/free/en/papers/reichbauer-2026-evaluating-latin-ancient-greek-sentence/) (2026) examines a different kind of search. It focuses on finding corresponding sentences in Latin and Ancient Greek through parallel sentence mining. Latin BERT’s demonstration compares the local uses of individual words in Latin passages. The alignment work changes both the unit of comparison and the language relationship. Its focus is correspondence between sentences across the two languages, a distinct reason to look for similar text.

Two citing works concern restoration and epigraphy, the study of inscriptions. [Ithaca Revisited: Benchmarking a Domain-Specific Model for Epigraphy in the Age of LLMs](https://md.research.elamur.ai/free/en/papers/locaputo-2026-ithaca-revisited-benchmarking-domain-specific/) (2026) benchmarks a system specialized for epigraphy. That emphasis on domain specialization echoes the question posed by Latin BERT about the value of training for a particular body of material. Its domain is inscriptions, whereas the original infilling experiment draws targets from editorial additions marked in Latin Library texts.

[Draft, Verify, Restore: Self-Refining Historical Inscription Restoration with a Unified MLLM](https://md.research.elamur.ai/free/en/papers/zhang-2026-draft-verify-restore-self-refining/) (2026) addresses historical inscription restoration with a system organized around drafting, verification, and refinement. Its stated approach makes checking and revising a candidate part of the restoration process. The Latin BERT paper illustrates the importance of checking in a different setup: the predicted word can fit patterns in the passage, and a separate line of evidence can determine which restoration a scholar prefers. The later titles identify where citing work takes up these problems. They establish the subjects and stated approaches of the studies, while leaving implementation details and performance claims to the individual works.

## Cite

Cite as David Bamman and Patrick J. Burns. 2020. Latin BERT: A Contextual Language Model for Classical Philology. arXiv:2009.10053.

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.48550/arxiv.2009.10053](https://doi.org/10.48550/arxiv.2009.10053) · [arXiv 2009.10053](https://arxiv.org/abs/2009.10053)

```bibtex
@misc{bamman2020latin,
  title = {{Latin BERT: A Contextual Language Model for Classical Philology}},
  author = {David Bamman and Patrick J. Burns},
  year = {2020},
  doi = {10.48550/arxiv.2009.10053},
  eprint = {2009.10053},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.2009.10053}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
