Elamur Research

Training and Evaluation of Named Entity Recognition Models for Classical Latin

Paper · 2023 · Marijke Beersmans, Evelien de Graaf, Tim Van de Cruys et al.

Summary

Finding the names in a Latin text involves more than looking for familiar words. Galli can refer to the Gauls or be a form of the name of a man called Gallus. A list of people can contain several names in succession, and a name in verse can have another name between its parts. Beersmans and colleagues study how well automatic named entity recognition handles such cases in classical Latin. Their systems mark where a mention begins and ends and classify it as a person, a place, or a group. The authors compare different approaches and inspect the errors to see which difficulties survive even when the overall scores are high.

The authors adapt a pretrained LatinBERT system to this task in two ways and train a simpler conditional random field that uses features such as capitalization and word endings. They also test existing Latin recognizers. They train on annotated prose from the Herodotos project and evaluate on held-out sentences from the same prose works and on Ovid’s Ars Amatoria. For a further test, they manually annotate prose by Tacitus and Cicero and poetry by Juvenal from the LASLA corpus. These additional texts give them a way to examine transfer to new prose as well as to another poet.

The LatinBERT variants lead on whole-entity scores averaged across the categories in all four test settings. LatinBERT2, whose training settings were selected by a search, reaches a macro F1 of 0.90 on Herodotos prose and 0.68 on the LASLA prose. The two poetry tests favor different variants. LatinBERT1 leads on Ovid with 0.54 macro F1, and LatinBERT2 leads on Juvenal with 0.51. A system can also lead on whole entities while trailing a competitor on token labels. On Juvenal, the large LatinCy pipeline scores slightly higher than LatinBERT2 on the micro F1 that focuses on entity tags, in spite of doing markedly worse on the whole-entity average.

The error analysis identifies problems that the aggregate scores hide. The systems frequently miss foreign names and sometimes join adjacent people into a single mention. A prediction can also get the category right while putting the beginning of the name in the wrong place. Some errors reflect decisions about what should count as an entity in the first place. The experts who annotated Juvenal agreed less well when the outside label was excluded, with Cohen’s kappa falling from 0.87 to 0.74. Group labels accounted for the largest disagreement. The authors release their recognizers, data, and code, and use the findings to argue for clearer annotation guidelines and training examples drawn specifically from poetry.

Deep dive: Training and Evaluation of Named Entity Recognition Models for Classical Latin

A study of named entity recognition in classical Latin compares systems on prose and poetry and explains where their predictions go wrong. · about 33 minutes to read

The problem and its context

What a recognizer has to decide

A person reading a historical text can use names to follow who is speaking, which places are under discussion, and how groups enter an account. A recognizer turns mentions of those things into explicit annotations that can be used by another process. The paper places the task upstream of information extraction, summarization, and the construction of knowledge bases. The immediate output is a set of labeled stretches of text. A reader interested in which people a passage names needs the boundaries of each mention as well as a distinction between people and other named things.

A dictionary entry can help with one part of that job. The harder question is what a particular occurrence means. In the authors’ examples, an expression associated with a place can describe an individual or name a group. A form that can denote a deity can also occur as an ordinary word. Even when a system has seen the spelling before, it has to decide which use the author intended in that passage. In a collection of unfamiliar texts, some names will also be missing from the examples on which the system was trained. A recognizer has to learn cues that remain informative in those circumstances.

There is a further question about what an annotation is supposed to record. If a place-derived expression identifies a person, a labeling scheme can emphasize the expression’s geographical origin or the individual it designates. If a title refers unmistakably to a particular emperor, an annotator may count it as a personal mention even though the same title in another passage receives no label. These decisions depend on the intended scope of the dataset. A system that learns one convention can disagree with a second dataset even when the words are used in much the same way.

Historical texts raise practical problems alongside those interpretive ones. The survey of historical named entity recognition discussed by the authors points to variation across genres and domains, shifts in spelling and naming conventions, and a scarcity of annotated resources. Categories designed for modern material may fit historical sources poorly. Work on Latin also drew attention to differences in editorial spelling and annotation conventions. Together, these issues make it possible for two resources covering the same language to differ in which cues are available and which answers are rewarded.

The paper also notes earlier reports of nested and overlapping names. A person’s designation can incorporate an expression derived from a place, and a building name can contain the name of a god or group. A reader can make sense of both levels. An annotation scheme that assigns one tag to each token has to choose what to represent. This matters when comparing predictions with historical corpora, because a clean-looking sequence of tags can conceal a decision about which part of a complex expression counts.

Earlier approaches to Latin texts

Previous studies had already built recognizers for medieval Latin charters. Chastang and colleagues trained a conditional random field on custom-annotated charters from Burgundy. Torres Aguilar investigated a multilingual charter pipeline covering Latin, French, and Spanish. One approach combined contextual and static word embeddings with a bidirectional recurrent classifier and a conditional random field. The other adapted pretrained multilingual BERT and RoBERTa. Each study depended on material annotated for its own charter setting.

For classical Latin, the Herodotos project had both a research purpose and a technical output. The project sought to catalogue ancient ethnopolitical groups and their interactions. Its recognizer used a bidirectional recurrent architecture with a conditional random field, an approach also described in earlier work on neural architectures for named entity recognition. The Herodotos annotations supplied the present study with examples of people, places, and groups in several classical authors. At the time the authors trained their recognizers, they identify it as the only available annotated dataset for classical Latin entity recognition. Charter data offered another resource, with a different period and kind of source.

Named entity recognition was also available as part of broader Latin processing pipelines, including the Classical Language Toolkit and LatinCy. Those pipelines gave researchers a way to annotate texts without training a recognizer for each collection. LatinCy’s custom data drew on the Herodotos material and Latin Universal Dependencies treebanks. That background matters to the comparison. A ready-made pipeline could be evaluated as a practical alternative, even though its training material and objectives differed from those of a recognizer built for this experiment.

Meanwhile, work with transformers had reached other tasks for ancient languages. The authors discuss applications to Latin morphosyntactic tagging and to the alignment of ancient texts with translations. Alignment could support the transfer of entity annotations from a modern-language translation to its source. They also cite a successful application of a BERT-based approach to Ancient Greek entity recognition. For Latin, the relevant starting point was LatinBERT. As far as the authors knew, it had yet to be adapted specifically to this task.

That left a question about how to evaluate the adaptation. A test drawn from the prose used to build the recognizer would show whether it could handle held-out examples in a familiar setting. It would say less about what happens when the same recognizer encounters verse with different names, styles, and ways of expressing a mention. A test on separately annotated works would introduce an additional complication, because some disagreements could come from a change in annotation practice. The paper uses both kinds of test and examines individual predictions to understand where those explanations are plausible.

The method, step by step

Turn mentions into a sequence of labels

The authors treat recognition as a labeling task. The input is a sentence broken into tokens, the units that receive tags. The output marks each token as outside a mention, at the beginning of a mention, or inside a mention that has already started. A tag at the beginning or inside a mention also specifies its category. PERS denotes a person, LOC a location, and GRP a group. In the Herodotos scheme, the last category is oriented towards social and ethnic groups.

This representation is called BIO, for beginning, inside, and outside. A personal name that occupies a single token receives B-PERS. In a continuous personal name with several tokens, the opening token receives B-PERS and the continuation tokens receive I-PERS. Adjacent personal names can each start with B-PERS, which lets the annotation distinguish a list from a longer name. A token with no entity annotation receives O. These tags let the evaluator recover the spans and categories from the same sequence of predictions.

The distinction between beginning and inside carries information that can disappear in a coarse count of correct categories. Consider a sequence of personal names for which the recognizer assigns B-PERS to the first and I-PERS to the rest. It has detected that all the words are associated with people. Its output nonetheless describes a single mention. An error of that kind can invalidate the whole predicted span and leave several reference mentions unrecovered. The authors therefore keep both token-level and whole-entity measures.

The original Herodotos annotations leave nested entities outside the scope of the task. The LASLA analysis later shows how difficult it is to fit some poetic expressions into the same representation. For ordinary continuous names, however, BIO provides a common target for the conditional random field and the two LatinBERT variants. The comparison can use the same labeled sentences even though the systems represent those sentences differently.

From annotated Latin sentences to evaluated entity spans

The steps in order.

From annotated Latin sentences to evaluated entity spansStep 1: Read Herodotos sentences and their BIO labels1. Read Herodotos sentences and their BIO labelsStep 2: Separate prose from verse and divide the prose2. Separate prose from verse and divide the proseStep 3: Train the conditional random field on engineered features3. Train the conditional random field on engineered featuresStep 4: Adapt LatinBERT to predict entity labels4. Adapt LatinBERT to predict entity labelsStep 5: Annotate separate LASLA prose and verse5. Annotate separate LASLA prose and verseStep 6: Score token labels and whole entity spans6. Score token labels and whole entity spansStep 7: Inspect missed names, incorrect types, and boundary errors7. Inspect missed names, incorrect types, and boundary errors

Build the training and test partitions

The Herodotos collection contains the full text of Caesar’s Bellum Gallicum and Ovid’s Ars Amatoria, with excerpts from other works. Bellum Gallicum supplies 58,621 tokens, the largest contribution. Pliny the Elder’s Naturalis Historia contributes 35,672, and Pliny the Younger’s Epistulae contributes 18,571. The selection from Caesar’s Bellum Civile contributes 4,819. The 17,102 tokens in Ars Amatoria make up the poetry test. The editions come from the Latin Library and the Perseus Project. The authors make limited formatting corrections before preparing the splits.

They use the prose for training, validation, and in-domain testing. Here, in-domain means the same broad prose setting as the training material. They randomize the sentence order and allocate 75% to training, 12.5% to validation, and 12.5% to the in-domain test. Sentences, rather than continuous passages, are the units of this split. The validation set gives the authors a basis for selecting training settings, while the test set supplies the scores reported for held-out Herodotos prose. All of Ovid is kept apart from this procedure as the out-of-domain test.

Some tags are too rare for a straightforward random division to reliably put examples in every partition. The authors identify prose sentences containing multi-token locations and groups, divide those sentences separately, and then add the resulting portions to the main partitions. This ensures that each partition contains examples of the rare labels. It still leaves very few instances from which a system can learn how such expressions are written. A split that includes a category makes evaluation possible without making the resulting sample large.

The counts make the imbalance concrete. In training, there are 82,696 instances of O and 2,706 of B-PERS. The beginning tag for a location occurs 839 times, whereas I-LOC occurs 31 times. The disparity is greater for groups, with 1,271 instances of B-GRP and 4 of I-GRP. The validation partition has 10 location continuation tags and 2 group continuation tags. A system can therefore see many examples of where a group starts and have almost no evidence about when to continue its name into the next token. These are counts of tags. A continuation count should be read as the number of tokens carrying that tag, since a long mention can contribute several.

Train the conditional random field

The conditional random field, or CRF, is the simpler system trained for the study. A CRF scores a sequence of labels using clues from the input and relationships between labels. The distinction is useful when a word admits several plausible tags in isolation. A continuation label, for example, has a different interpretation depending on the tag that precedes it. The implementation used here is based on CRFsuite, and the authors configure it to consider all possible transitions. The sequence setup gives it a way to learn transition preferences from examples.

The inputs are hand-designed features. The system is told whether a word is a digit, whether it is capitalized or entirely upper-case, and whether it stands at the beginning or end of a sentence. It receives the final three and final two letters and uses a neighborhood of two words to either side. Those clues let the system draw on forms and positions shared by different names. Capitalization can help identify candidates in an edition that uses it, while endings can give information about forms that share a pattern. Both kinds of cue can also occur in words that receive O.

The authors leave the full word out of the feature set, following earlier work that suggested this might help when the recognizer is applied in another context. The choice changes what the CRF can learn. It can associate a suffix or a feature in a neighboring position with a tag, but it has no feature that directly identifies the full target word. The comparison with LatinBERT therefore involves a substantial difference in input representation as well as in the way predictions are made.

The CRF uses the l-bfgs optimization method and a maximum of 100 iterations. The authors conduct a 50-fold random search over two regularization coefficients, c1 and c2. Regularization controls the extent to which training rewards a close fit to the annotated examples at the cost of a more complex set of learned weights. The random search samples from exponential distributions with scale 0.5 for c1 and 0.05 for c2. The selected coefficients are 0.183 and 0.086, respectively. The paper reports these as the chosen settings for the comparison system.

Adapt LatinBERT to entity recognition

LatinBERT starts with a representation of Latin acquired before the entity training. Its pretraining used a masked-word objective on a corpus of 642.7M words, spanning classical material from 200 BCE onwards and including Neolatin from Wikipedia. In such an objective, some input is hidden and the system learns to recover it from context. The entity recognizer reuses what was learned about how Latin words occur together. Its new task is to assign the Herodotos tags to tokens in a sentence.

The authors preserve the original subword tokenization by integrating the LatinBERT tokenizer into a custom tokenizer compatible with the Transformers library. Sub-word tokenization lets the system process a word as smaller units where needed. During tokenization, the authors convert the words to lower-case. This treatment differs from the CRF’s explicit capitalization features. The word-level BIO annotations still define what is to be recognized, while the pretrained system receives the input in the form it expects.

Through fine-tuning, the authors adapt the pretrained system using sentences with known entity tags. LatinBERT1 uses the initial training settings, with a learning rate of 2.00e-5 and weight decay of 0.01. The learning rate determines the scale of the adjustments made during training. Weight decay is a form of regularization. LatinBERT2 uses the settings selected by a ten-fold random search that minimizes validation loss, a measure of how poorly the system predicts the validation labels. The selected learning rate is 7.89e-5 and weight decay is 0.10.

Both variants train for 3 epochs, meaning 3 passes through the training data. Both use a per-device training batch size of 16 and a warmup ratio of 0.1. The batch size controls how many examples a device processes together during training. The warmup setting controls the initial portion of training during which the learning rate is brought up to its scheduled level. With these settings shared, the initial and optimized versions make it possible to examine how a change in the training configuration affects the same underlying recognizer. Because the learning rate and weight decay change together, their separate contributions cannot be read off the comparison.

Validation loss also serves a different purpose from the final whole-entity scores. It evaluates predictions on the validation examples during selection. Whole-entity F1 asks whether the final tags recover the exact extent and type of labeled mentions. The search uses Herodotos prose validation data. The paper then examines whether the chosen settings carry over to verse and to a separately annotated corpus.

Create an additional test with reviewed labels

To evaluate on previously unseen works, the authors draw on LASLA. The larger annotation effort uses a subset of that corpus containing 1,738,435 tokens drawn from 130 literary works by 21 authors and spanning the second century BCE through the second century CE. The complete portion receives automatic annotation. The manually examined benchmark is a smaller selection within that material. It consists of the first book of Tacitus’ Historiae, the first of Cicero’s Orationes Philippicae, and the opening three satires of Juvenal.

The authors group Tacitus and Cicero with the in-domain material because both are nonfictional prose. The choice still tests a change of work and author. Cicero also brings oratory into a comparison whose training examples came from other kinds of prose. Juvenal supplies a second poetry setting, with references to historical people, whereas the authors characterize the earlier Ovid test as predominantly mentioning mythical people. The choice makes the two poetry tests complementary. It gives the authors cases in which the form of the writing is verse while the kinds of figures named in it differ.

Two Latin experts annotate in BIO, retaining the categories of person, place, and group. They start from the Herodotos scheme and review points where that resource had proved difficult to apply. Both work on 4,463 tokens of Juvenal for the agreement check. Their decisions coincide more often across the full labeling task than they do when the outside label is excluded. Once they discuss the main disagreements, they establish decisions to use in the remaining annotation. That process produces a reference against which the recognizers can be scored and a record of what the experts had to resolve to produce it.

Place-derived adjectives are one of the difficult cases. The experts agree to use GRP for such adjectives in keeping with the Herodotos practice they are following. They also adopt a wider convention for groups of people, drawing on a category in the Automatic Content Extraction guidelines. It covers a mention of multiple people even when its members form a family or another collection outside the narrower political or ethnic sense. At the same time, the experts decide against treating nicknames as personal entities. Their example involving a description of Horace preserves a location annotation for the place-derived part of the expression. These choices show where continuity with Herodotos is possible and where the new annotators must specify a rule more fully.

The authors publish data and code in the Ner-Latin-RANLP repository and associate the paper with the release of the trained recognizers. They also publish the automatic annotations of the larger LASLA collection, with identifiers for lemmas and tokens from the connection to the LiLa knowledge base. A lemma is the form used to group inflected occurrences under a common entry. The identifiers make it possible to connect an annotation to other information associated with a token or lemma. The manual scores concern the benchmark passages, while the automatic annotations extend beyond them.

Experiments and results

What the comparisons count

The CRF provides a baseline trained on the study’s Herodotos split. The other comparisons use recognizers that had already been released. On Herodotos, the authors test the large LatinCy pipeline, la_core_web_lg, and the transformer-backed la_core_web_trf, which uses multilingual BERT. On LASLA, the reported comparison includes the large LatinCy pipeline and the Herodotos recognizer. These comparisons answer a practical question about which system performs well on the given annotations. The systems bring different training histories to the test, so their scores also reflect differences in data and labeling practice.

The paper first reports token micro F1. Micro averaging pools decisions across labels. In the fully inclusive token calculation, each token has a single reference tag and a single predicted tag, so micro F1 corresponds to the proportion of correctly classified tokens. The authors report it both for the complete BIO label set and for the beginning and inside labels, shown as BI. The latter gives a picture of entity tagging that the numerous outside tokens cannot dominate. Getting the outside tag right is useful, but an abundance of such decisions can make very different recognizers look similar when all tags are pooled.

The whole-entity evaluation asks a stricter question. A correct result requires a predicted mention whose category and boundaries match the reference. Precision is the share of predicted mentions that satisfy that condition. Recall is the share of reference mentions the system correctly recovers. The paper describes whole-entity F1 as their harmonic mean, which can be written as follows.

F₁ = 2 × P × R / (P + R)

F₁ is the F1 score, with the subscript identifying the measure. P is precision and R is recall. The factor 2 gives the harmonic mean of the two measures. × indicates multiplication, / division, and + addition. The parentheses group the denominator. This measure rewards a system that both finds reference mentions and keeps spurious predictions down. A boundary error can impair both sides of the calculation if it introduces an incorrect span while leaving the correct span unrecovered.

The authors report a whole-entity F1 separately for each category, then take the macro average. In that average, person, location, and group each have the same weight regardless of how frequently they occur. A change in group recognition can therefore matter substantially to macro F1 even where there are few groups in the test. The category scores and their support, the number of reference examples, help explain what the aggregate represents.

Held-out prose in Herodotos

The Herodotos prose test contains 14,686 tokens, with 1,048 carrying beginning or inside tags. With the full BIO tag set, both LatinBERT variants reach a token micro F1 of 0.99. The CRF reaches 0.98. When the calculation focuses on BI tags, LatinBERT2 scores 0.92, LatinBERT1 scores 0.90, and the CRF scores 0.79. The large and transformer-backed LatinCy pipelines score 0.60 and 0.58, respectively, on BI tags. Including O lifts the apparent performance of every system and compresses the differences relevant to finding entities.

On whole mentions, LatinBERT2 leads with macro F1 of 0.90. LatinBERT1 records 0.88, and the CRF reaches 0.74. The large LatinCy pipeline scores 0.43 and the transformer-backed one 0.44. The relative order of the two LatinCy variants is thus different on token BI micro F1 and on whole-entity macro F1. A system can do better at marking tokens in names while faring worse once complete spans and equally weighted categories become the standard.

Whole-entity macro F1 on held-out Herodotos prose

LatinBERT2 leads LatinBERT1 and the comparison systems.

Whole-entity macro F1 on held-out Herodotos proseLatinBERT2 (this paper): 0.90LatinBERT2 (this paper)0.90LatinBERT1: 0.88LatinBERT10.88CRF: 0.74CRF0.74LatinCy transformer: 0.44LatinCy transformer0.44
The numbers
System or settingmacro F1
LatinBERT2 (this paper)0.90
LatinBERT10.88
CRF0.74
LatinCy transformer0.44

In this test there are 474 reference person mentions, 218 locations, and 247 groups. LatinBERT2 reaches whole-entity F1 of 0.92 for people, 0.87 for places, and 0.91 for groups. The CRF scores 0.80, 0.66, and 0.74 on those categories. The large LatinCy pipeline has a whole-entity F1 of 0.02 for groups, and the transformer-backed pipeline scores 0.06. Their macro averages make this weakness visible because it receives the same weight as their results on people or places.

The strong aggregate score for groups from LatinBERT2 coexists with a failure on multi-token groups. The supplementary token results give it 0.92 F1 for B-GRP, where the prose test has 247 instances, and 0.00 for I-GRP, where the test has 3. None of the systems correctly detects a whole multi-token group in the Herodotos evaluation. The variants do somewhat better on location continuations. In prose, with 8 reference I-LOC tokens, LatinBERT1 records 0.33 F1 on that tag and LatinBERT2 records 0.50. The other scored systems record 0.00 on it. Those numbers describe performance on a very small set of continuation tokens, so the main category scores are stronger evidence about the kinds of mentions that occur more often.

From Herodotos prose to Ovid

The test on Ars Amatoria includes 17,102 tokens, of which 570 bear beginning or inside tags. LatinBERT1 and LatinBERT2 both score 0.98 in token micro F1 with the full BIO tag set. The CRF scores 0.97. On BI tags, the scores distinguish the variants more clearly. LatinBERT1 reaches 0.65 and LatinBERT2 reaches 0.60. The CRF and large LatinCy each record 0.39, and the transformer-backed LatinCy reaches 0.31.

The drop becomes more visible on complete mentions. LatinBERT1’s whole-entity macro F1 is 0.54, and LatinBERT2’s is 0.50. The CRF scores 0.33, large LatinCy scores 0.25, and transformer-backed LatinCy records 0.20. The systems find fewer of the exact reference mentions, by this measure, than they did in the held-out Herodotos prose. The ranking within the LatinBERT pair also reverses. The initial settings give the stronger result on Ovid.

Whole-entity macro F1 on Ovid in Herodotos

LatinBERT1 leads on Ovid after trailing LatinBERT2 on held-out prose.

Whole-entity macro F1 on Ovid in HerodotosLatinBERT1 (this paper): 0.54LatinBERT1 (this paper)0.54LatinBERT2: 0.50LatinBERT20.50CRF: 0.33CRF0.33LatinCy large: 0.25LatinCy large0.25
The numbers
System or settingmacro F1
LatinBERT1 (this paper)0.54
LatinBERT20.50
CRF0.33
LatinCy large0.25

The Ovid test has 375 person mentions, 87 places, and 107 groups. LatinBERT1 scores 0.76 on people, 0.43 on places, and 0.45 on groups, all at the whole-entity level. LatinBERT2 reaches 0.72, 0.38, and 0.40 respectively. Both variants recognize people better than the other categories, as do the comparison systems on this test. The contrast with prose is especially visible for locations and groups. Recognizing a class in a familiar collection of works leaves ample room for failure when that class appears under the naming and stylistic conditions of Ovid’s verse.

The Ovid result also illustrates why all-token micro F1 answers a different question from entity F1. On the inclusive measure, the CRF remains close to LatinBERT1. On complete person mentions, the CRF scores 0.44 while LatinBERT1 scores 0.76. On groups, the respective whole-entity scores are 0.25 and 0.45. A reader choosing a system to extract names would care about those differences even if ordinary tokens are handled well by either recognizer.

New prose in LASLA

The LASLA prose test combines Tacitus and Cicero. The token results report 15,737 reference tokens, with 1,320 in the BI subset. LatinBERT2 reaches 0.98 micro F1 over the full tag set and 0.79 over the BI tags. LatinBERT1 records 0.97 and 0.78 on those respective measures. The Herodotos recognizer scores 0.72 on BI tags, compared with 0.66 for large LatinCy and 0.61 for the CRF. LatinBERT2 leads in both versions of the token measure on this prose, and the separation from LatinBERT1 is small.

The whole-entity scores give LatinBERT2 macro F1 of 0.68 and LatinBERT1 0.65. The Herodotos recognizer reaches 0.61. The CRF scores 0.46, and large LatinCy scores 0.40. The reference annotations contain 711 people, 222 places, and 154 groups. LatinBERT2 has F1 of 0.85 for people, 0.55 for places, and 0.64 for groups. The Herodotos recognizer scores 0.74, 0.49, and 0.60 on the same categories. LatinCy’s 0.53 for locations puts it close to the leading location score, while its group F1 is 0.02. A fairly competitive position on one category can coexist with a weak macro average.

This result provides a different kind of evidence from the initial prose test. Tacitus and Cicero were absent from the training set, and the reference annotation followed decisions reviewed specifically for the new material. The broad advantage of the LatinBERT variants survives those changes, while their entity scores are lower than on held-out Herodotos prose. The comparison bundles transfer to new authors and works with changes in editorial and annotation practice. The error analysis helps identify particular instances in which a change in practice is likely to matter.

A second poetry test in LASLA

The Juvenal results report 4,399 tokens, with 284 in the BI subset. Every system in the comparison reaches 0.96 on token micro F1 across all BIO tags. Focusing on BI tags separates the systems modestly. Large LatinCy reaches 0.51 and LatinBERT2 reaches 0.50. LatinBERT1 and the Herodotos recognizer each record 0.48, and the CRF records 0.45. LatinCy’s lead on this measure establishes that the best whole-entity system need not be the strongest on the individual tags.

The whole-entity evaluation puts LatinBERT2 first at 0.51 macro F1. LatinBERT1 scores 0.46, followed by the CRF at 0.43. The Herodotos recognizer scores 0.37 and large LatinCy 0.36. The two poetry tests therefore have different winners inside the LatinBERT pair. The validation-selected variant leads in Juvenal, and the variant using the initial settings leads in Ovid. Both results concern specific works, with their own contents and labeling conditions.

Whole-entity macro F1 on Juvenal in LASLA

LatinBERT2 leads on complete mentions despite LatinCy’s edge on entity-token micro F1.

Whole-entity macro F1 on Juvenal in LASLALatinBERT2 (this paper): 0.51LatinBERT2 (this paper)0.51LatinBERT1: 0.46LatinBERT10.46CRF: 0.43CRF0.43LatinCy large: 0.36LatinCy large0.36
The numbers
System or settingmacro F1
LatinBERT2 (this paper)0.51
LatinBERT10.46
CRF0.43
LatinCy large0.36

Juvenal has 143 reference person mentions, 83 locations, and 36 groups. LatinBERT2 and large LatinCy both record 0.64 for whole person mentions. LatinBERT1 has the best location result, 0.46, while LatinBERT2 records 0.36. LatinBERT2 obtains the strongest group result, 0.52, ahead of the CRF at 0.47. LatinCy gets 0.00 for whole groups. Its relative strength on person mentions and weakness on groups help explain how it can lead on the pooled entity-token measure while finishing behind on the equally weighted category average.

The authors connect LatinCy’s better showing on LASLA to the kinds of errors it makes. They report that 38% of its total errors concern groups. In their comparison of the test data, groups make up 23.5% of entities in Herodotos and 14.1% in LASLA. They also observe a tendency for LatinCy to label capitalized words as entities. Sentence-initial capitalization in Herodotos supplies opportunities for such false positives, while LASLA’s text lacks that capitalization. These observations account for plausible sources of the score change. The corpus comparison itself varies both label composition and capitalization along with the texts.

What the ablations show

Changing the training settings

The paper has no component-removal ablation. Its closest controlled comparison is between LatinBERT1 and LatinBERT2, which share the pretrained starting point, labeled training data, and basic fine-tuning procedure. The optimized run changes the learning rate and weight decay together. The study also examines errors by reference tag, training-set exposure, and annotation disagreement, making it possible to trace several aggregate differences to specific kinds of predictions.

The prose findings favor LatinBERT2 on both corpora. The poetry findings depend on the test. The initial settings work better on Ovid, while the optimized settings work better on Juvenal by whole-entity macro F1. The choice based on prose validation loss thus identifies a configuration that performs well in several cases, with a reversal on the first verse benchmark. Since each configuration couples the two changed settings, the evidence concerns their joint effect. There is no comparison that varies one and holds the other fixed.

On the Herodotos test material, the variants make different predictions in 223 cases. The authors find that the initial variant has an advantage on the B-PERS cases highlighted in their comparison of disagreements. The change can involve entity boundaries as well as missed categories. In some examples LatinBERT2 identifies the category as person but uses I-PERS where it should use B-PERS, while LatinBERT1 is also wrong. That distinction is easy to lose in a count of disagreements. Getting the kind of entity right can still yield the wrong number of spans or put a word in the wrong span. The Herodotos prose appendix, meanwhile, gives LatinBERT2 the higher B-PERS F1 on that split. The disagreement analysis and split-specific F1 describe different subsets of the predictions.

The authors also identify a pattern in the Herodotos cases LatinBERT1 alone gets right. LatinBERT2 predicts a non-entity in 46 of those cases. Of those tokens, 42 are absent from the training and validation sets. The rest are either rare in the training material or occur with both entity and outside labels. LASLA gives a similar observation. The authors report 22 out of 27 cases for prose and 16 out of 18 for verse as involving words absent from training and validation in the corresponding comparison. The association concerns exposure in the labeled task data. It gives no information about whether the same forms were available during LatinBERT pretraining.

Finding the wrong boundaries

One example from Pliny the Younger shows what a boundary mistake looks like in a passage where the system recognizes the type of reference. Both LatinBERT variants separate the names Lysias through Hyperides earlier in a list. Later in the same passage they treat the sequence containing Pollio, Caesar, and Caelius as a single name. The two portions illustrate the competing interpretations of consecutive person words. At the start of the list the system repeatedly starts a new mention. In the later sequence it continues a span through tokens that each require a new start.

The inverse problem occurs when a continuation label appears without a suitable beginning label before it. In Ovid, both variants assign I-LOC to Memphitidos. The gold tag is B-GRP, and the preceding prediction supplies no B-LOC to start a location mention. This is simultaneously a category disagreement and a malformed boundary sequence for a simple continuous location. Counting category and boundary mistakes separately helps distinguish a decision about the use of the geographical expression from a decision about how to join it to the surrounding words.

The LASLA prose analysis shows that boundary errors account for many mistakes on inside tags. For LatinBERT1, the authors record 40 out of 78 I-tag errors in which the category is correct but the recognizer predicts a beginning tag. For LatinBERT2, the corresponding count is 32 out of 62. These are cases in which a recognizer finds evidence for a location, person, or group but starts its label sequence too late to recover the reference span. The category-level gain from a stronger recognizer and its ability to combine tokens over a boundary are related questions that the BIO results can separate.

Juvenal provides an especially difficult example. The words Cecropiam and Cotyton belong together in the reference personal mention, with Baptae, itself a group mention, occurring between them. The reference tags in order are B-PERS B-GRP I-PERS. Both LatinBERT variants assign the outside label to Baptae and Cotyton. The example puts pressure on the usual reading of an inside tag as a continuation of the immediately preceding span. It also shows how a single construction can produce several misses. The recognizer fails to finish the person mention and to identify the intervening group.

Missing names and following inconsistent examples

Some missed mentions occur in clusters. In a passage in Ovid that names Lebinthos, Calymne, and Astypalaea, LatinBERT2 misses all of the relevant names, while LatinBERT1 misses Astypalaea. The qualitative analysis also points to individual foreign names that the variants tend to label as outside. In Juvenal, among 10 tokens with the Greek accusative ending the authors examine, only Deucalion is correctly identified as an entity by LatinBERT1. In Herodotos, the same discussion reports 29 out of 40 such forms identified correctly by LatinBERT1 and 22 by LatinBERT2. The ending helps define a group of errors worth inspecting, while performance on those forms varies substantially across the tests.

The study’s check for words missed by every system also points to sparse training coverage. The authors report that 132 of 180 distinct missed tokens are absent from the training data. This helps explain why better use of context is important, and why an evaluation with unfamiliar names is revealing. The analysis uses the subset already known to have been missed. It gives the composition of those failures and leaves open the overall error rate for all previously unseen tokens.

Other mistakes involve words present in training with different reference tags. Some variation makes sense. Galli can denote a man or a people. A form of Sol can name a deity or refer to the sun. A patronymic such as Atrides can designate an individual, while forms of a patronymic can also refer to a collective. For these cases, seeing an alternative tag during training is part of what the system has to learn from. The surrounding words help determine whether a particular tag is appropriate.

Some examples suggest divergent annotation choices for similar constructions. The designation Amphilocho Athenaeo receives a person tag followed by a group tag in one Herodotos instance and a continuous person annotation in another. The authors likewise compare temple expressions annotated differently in the same work. A recognizer trained on those examples receives conflicting evidence about the extent of a name. For the LASLA labels, the annotators apply explicit decisions about when words such as urbs denote a particular place and when titles such as imperator identify a particular person. The recognizers apply those decisions unevenly. This kind of error analysis can show where a system’s inconsistency resembles a difficulty in the training references, though it cannot establish which training example caused an individual prediction.

Comparing system errors with human disagreements

The Juvenal agreement exercise offers a way to examine the part of the benchmark that the two experts initially found hard. The authors use Cohen’s kappa, a measure that adjusts observed agreement for the agreement expected from the annotators’ use of the categories. Kappa is 0.87 with all labels included and 0.74 with O excluded. The largest disagreement concerns B-GRP. The figures describe agreement between the experts, rather than either expert’s accuracy, and the calculation focused on entity tags puts more emphasis on the decisions about names.

The disagreements cover several kinds of reference. The experts have to decide whether an adjective derived from a place should be treated as a group label, and how a category modeled on social and ethnic groups should apply to families, gods, or groups named after representative individuals. After discussion they classify a wider range of references to several people as groups. Most predictions for those less conventional groups are O for both LatinBERT variants, with some family names among the exceptions. The change in annotation policy gives the benchmark examples of a group category that the recognizers encountered in a narrower form during task training.

Of the 69 tokens on which the human annotations differ, LatinBERT1 gets 39 wrong, accounting for 20.5% of its total errors in the authors’ comparison. LatinBERT2 gets 41 wrong, accounting for 22.5% of its errors. The overlap also includes decisions in the opposite direction, where a recognizer supplies an entity tag the reviewers ultimately leave out. For example, the reviewers leave titles of literary works formed from personal names without an entity annotation. LatinBERT2 labels instances such as Theseide as entities, while LatinBERT1 assigns O. The exact benchmark result depends on what the guidelines decide about the use of a person’s name in a work’s title.

The human disagreement and the system errors identify related difficulties, with several possible explanations for their overlap. Some passages require a close reading to establish the referent. In others, the referent is clear and the hard decision is whether the annotation includes it. The new annotation process resolves these cases sufficiently to score the benchmark. The review of the disputed tokens preserves evidence about the decisions behind that score.

Limitations

Limits identified by the authors

The authors identify the shortage of consistently annotated material as a central problem. The Herodotos data provide a starting point, but some examples differ in how they handle place-derived words, unnamed references to known places or people, and expressions made up of several tokens. The authors also find stretches of Ars Amatoria and Naturalis Historia without annotation. An unmarked stretch reduces the evidence available for learning or evaluating entities within it. Where an evaluator treats unmarked tokens as outside, a genuine mention recovered by a recognizer can appear to be a false positive. The paper does not establish the extent of that effect on its scores.

The results on verse lead the authors to call for training data that specifically cover poetry. Their observations concern difficulties with boundaries, foreign names, and complete passages in which recognizers miss several mentions. A prose-trained system has to handle those cases using patterns learned from different styles and subject matter. The study demonstrates that this transfer is difficult on the selected verse. The proposal to train on more poetry remains a direction for subsequent evaluation.

The authors also identify preprocessing and normalization as areas to investigate. They mention harmonizing the use of v and u and of i and j. They propose examining additional multilingual pretrained systems that include Latin and taking advantage of LASLA information such as lemmatization and part-of-speech tagging. Each could change the cues available for recognizing an inflected name or distinguishing a proper use from an ordinary one. The reported comparisons do not include experiments that measure the effect of those changes.

The paper treats named entity disambiguation as future work. A recognizer may identify a span as a person without specifying which individual it denotes. Disambiguation would connect that mention to a specific identity using other resources. The authors propose exploring whether recognition and disambiguation can improve each other once both are available. The published recognition evaluation measures the form and category of mentions, and the linked token and lemma identifiers support reuse of the annotations without resolving the identity of every named person or place.

Limits visible in the evaluation design

The original prose test holds out sentences from the works used in training. This tests predictions on unseen sentences, with potential continuity of subject matter, naming patterns, and editorial practice across the split. The LASLA selection tests new works and authors and gives some evidence of broader prose transfer. Its scores are for particular passages of historical writing and oratory. Neither prose setup provides a breakdown that isolates the contribution of genre, authorship, or the recurrence of the same name across partitions.

The comparison with verse also changes several factors together. Ovid and Juvenal differ from the prose authors in style and theme, and from each other in the people they tend to mention. The Herodotos and LASLA tests also differ in editorial presentation and annotation choices. The paper can report that the systems trained on prose struggle on these verse texts and can point to constructions that seem to account for some failures. Estimating how much verse form itself contributes would require a comparison that holds more of the other differences constant.

The tool comparisons mix architectures, training resources, and annotation histories. The LatinCy data draw partly on Herodotos, and the recognizer released by the Herodotos project was trained for that project’s task. A comparison of these tools on the reported test sets remains informative about available recognizers and their behavior under different annotation conditions. It cannot independently attribute the gap to contextual pretraining, the size of the training resource, or the conventions under which labels were learned. Even within the LatinBERT comparison, the change in learning rate is coupled with the change in weight decay. The reported runs give point estimates under their chosen settings, without showing how consistently the differences would recur across repeated training runs.

The group and location continuation labels have thin support. Holding out rare examples makes it possible to observe errors on them, although individual examples can have a large influence on their scores. The benchmark’s stronger evidence concerns the categories as used in these texts, where many mentions occupy a single token. Similarly, token and exact-span metrics cannot measure performance on all the complexities the annotation leaves out. The discontinuous Juvenal example shows an attempt to encode a difficult case inside BIO. The study supplies no separate benchmark for recognizing nested or discontinuous mentions as a class.

The LASLA annotation adds an agreement check and a record of how disagreements were negotiated. It also introduces differences from the training scheme, particularly in the treatment of groups. A score against that reference measures how well the recognizer reproduces the resulting annotations, including the new decisions. The jointly annotated portion of Juvenal is reported as 4,463 tokens, whereas the Juvenal token results report support of 4,399. The paper gives these counts for different stages and leaves their precise relationship unexplained. The agreement statistic and test scores are therefore best read with the respective counts attached to them.

Finally, the release includes automatic annotation on a much larger collection than the manually labeled benchmark. The analysis supplies examples of strengths and recurring failures that readers can use when interpreting those annotations. The reported gold comparisons cover the selections from Tacitus, Cicero, and Juvenal, with no direct measurement of recognition quality for each of the remaining texts. Performance across the larger release may vary with the kinds of names and editorial conventions in those works.

What came after

One subsequent paper carries the retrieval problem into Ancient Greek. Its stated task is to retrieve people from ancient texts by combining transformer methods with domain knowledge. That scope is narrower in entity type than the Latin study’s joint evaluation of people, places, and groups. It also makes the combination with domain knowledge explicit. The thematic connection is to the Latin error analysis, where detecting person mentions frequently requires interpreting a form in context and deciding which tokens belong together. The citation establishes a connection between the papers. The later title identifies the language, retrieval target, and broad approach, while leaving the use of specific Latin resources or procedures open. Retrieving people in Ancient Greek texts

Another subsequent study retains Latin and frames the task as low-resource named entity recognition. It identifies contextual probing as its approach. That framing continues a question raised by the earlier comparison. A recognizer with contextual representations can succeed on a name in one setting and miss it in another, especially when the references are sparse or the use of the expression is ambiguous. The later title supports the connection through contextual evidence and limited labeled resources. It leaves open which annotations, evaluation splits, or baselines the study uses. Contextual Probing for Low-Resource Named Entity Recognition in Latin

The citing studies pursue complementary parts of the earlier problem. The Greek work focuses on retrieving people with the aid of domain knowledge. The Latin work continues investigation of contextual evidence under low-resource conditions. Their stated scopes show where the questions about historical names and limited supervision continued, while the measured comparisons and the documented annotation decisions discussed here belong to the classical Latin study.

Cite

Cite as Marijke Beersmans, Evelien de Graaf, Tim Van de Cruys and Margherita Fantoli. 2023. Training and Evaluation of Named Entity Recognition Models for Classical Latin. Proceedings of the Ancient Language Processing Workshop.

The paper itself, not this page. BibTeX from the library's record of the work.

@inproceedings{beersmans2023training,
  title = {{Training and Evaluation of Named Entity Recognition Models for Classical Latin}},
  author = {Marijke Beersmans, Evelien {de Graaf}, Tim {Van de Cruys} and Margherita Fantoli},
  booktitle = {Proceedings of the Ancient Language Processing Workshop},
  year = {2023},
  url = {https://aclanthology.org/2023.alp-1.1/}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/beersmans-2023-training-evaluation-named-entity-recognition/