DH 2026

Daejeon, July 27–31

Long Paper

Modelling Literary Variation in the Greek AnthologyA Case Study in Small Annotated Data and Explainable AI

Marcello Vitali-Rosati
Université de Montréal, Canada · marcello.vitali.rosati@umontreal.ca
William Bouchard
Université de Montréal, Canada · william.bouchard.2@umontreal.ca
Yann Audin
Université de Montréal, Canada · yann.audin@umontreal.ca
Dominic Forest
Université de Montréal, Canada · dominic.forest@umontreal.ca

What would it mean for a machine to be able to recognize a literary gesture? Is it possible to formalize a cultural practice or an interpretative act?

The IAL – Intelligence artificielle littéraire (Literary Artificial Intelligence) project aims to create a formal, unambiguous, and algorithmic definition of a literary concept to explore these questions. The specific notion investigated is epigrammatic variation in the Greek Anthology, a historical corpus of Ancient Greek poetry. Epigrammatists frequently engaged with earlier works through distinct patterns of rewriting, producing a dense web of intertextuality across the collection. An algorithmic definition of variation would take the form of a computational method that can assess whether a given pair of epigrams represents a variation, and, downstream, relate it to a typology. The project combines two streams of data: an API provided by a scholarly, collaborative digital edition of the Anthology, and manually curated philological annotations that list variation links and their types. IAL focuses on Book VI of the Greek Anthology, which contains dedications to the gods, also known as votive epigrams. Philologists and literary scholars annotated these epigrams by identifying relations of variation between poems, specifying both the type of variation and a level of certainty. The Anthology is used here as a compact but demanding case study for a broader problem in Digital Humanities and explainable AI: how to evaluate models when the target concept is not directly observable, but depends on expert interpretation.

By comparing traditional NLP and BERT-based methods, the presentation argues that their limited results are informative: they reveal the gap between computational similarity and philological similarity. We discuss the strengths and weaknesses of each family of methods for literary modelling, as well as their epistemic limits and affordances.

Literature review

IAL falls within the field of Digital Classics, where intertextuality and text reuse have long been approached with dedicated tools and infrastructures—ranging from Tesserae’s automated intertext discovery for Greek and Latin to configurable text reuse frameworks such as TRACER (Büchler et al. 2014; Coffee et al. 2017). However, this project focuses specifically on literary modelling: the aim is not to discover new variation links in the corpus (since it has been annotated), but to assess whether a formal model can reproduce the same links a philologist would.

In this sense, IAL engages with Willard McCarty’s definition of modelling in literary studies: “[T]he analysis that defines [literary models] obeys two fundamental rules: total explicitness and absolute consistency. Thus everything to be modeled must be explicitly represented, and it must be represented in exactly the same way every time” (McCarty 2013: 397). Computation (and, by extension, modelling) offers hermeneutical affordances: bridging the conceptual and the formal requires an understanding of the studied subject that is not necessary to attain when working solely in the natural language regime (Krämer 2023). Andrew Piper’s work on modelling describes an iterative process that moves between close reading and distant reading through cycles of implementation and validation; a model is tested on a constrained corpus, and the resulting errors prompt successive refinements until the implementation maps onto the concept (Piper 2015, 2017).

Figure 1. The hermeneutic circle applied to literary modelling according to Piper (2015).

From a classical philology perspective, IAL treats the Greek Anthology as a laboratory of rewriting, drawing in particular on Pierre Laurens’ (2012) typology of epigrammatic variation to describe how later poets systematically transpose, adapt, invert, or satirize earlier epigrams. Variation here is not an accident of transmission but a poetics: a set of recognizable operations through which authors position themselves within a web of intertextual relations. Following Laurens, IAL distinguishes stylistic, rhetorical, and paradigmatic variation, ranging from local reformulation to structural substitution. The point is not merely that two epigrams are similar, but that their similarity belongs to a recognizable poetics of rewriting.

Objectives

This presentation reports on a modelling experiment within IAL, focused on whether computational models of textual similarity can identify epigrammatic variation in ways that remain interpretable for philological reasoning. The aim is to compare traditional NLP and statistical methods with more computationally demanding BERT-based approaches. We test whether neural representations and the attention mechanism constitute a meaningful improvement over expert-system approaches for this modelling task.

This comparison is not conceived as a competition to determine which approach is “best” in general. Rather, it tests which paradigm yields models that remain philologically interpretable: a model’s behavior must be relatable to features of the text that are meaningful within a philological framework. Since modelling is also a way of learning what counts as variation, explainability is methodological rather than merely technical (McCarty 2013; Piper 2017).

Data

The data used by the project come from two streams.

The first stream is a collaborative digital edition of the Greek Anthology, accessible via an API, which provides Greek text, metadata, scholia, and translations in JSON format while preserving the corpus’s editorial complexity (Mellet 2020; Vitali-Rosati et al. 2020, 2021).

The second stream is a collection of philological annotations produced for this project. Pairs or clusters of epigrams are proposed, then read independently by multiple annotators who assign a variation type (following Laurens’ typology) and a confidence score to each link. Disagreements are resolved through discussion and, when relevant, recourse to secondary literature; the resulting consensus annotations are encoded as structured relations in a shared database. For example, an annotation may link two votive epigrams that share a dedicatory structure but replace the dedicated object, deity, or speaker, and classify the relation as paradigmatic variation with a given confidence level. The resulting record therefore does not only state that two poems are “similar”; it specifies the philological reason why their similarity counts as variation. This process produces a curated gold standard of variation links that can be used to train models and evaluate their performance.

Methodology

This presentation compares feature-engineered, fully interpretable expert-system methods and language-model methods for detecting epigrammatic variation in the corpus. Two parallel pipelines are implemented: one based on traditional NLP features and fully explainable statistical models, and another based on the BERT architecture. Both approaches produce a similarity score for any given pair of epigrams and compare it to a threshold value, above which the pair is flagged as a variation. Thresholds are calibrated against the annotated gold standard, and model outputs are evaluated through precision, recall, and error analysis. In this context, “validation” means both quantitative agreement with the annotated links and qualitative interpretability of the features or tokens used to justify a positive relation. The traditional pipeline combines lexical, sequence-based, and structural similarity features in simple interpretable classifiers.

BERT-based methods, mostly using ancient-greek-BERT (Singh et al. 2021), embed each epigram independently, then treat variation detection as a similarity-and-threshold problem over the resulting representations. To keep this pipeline usable for literary modelling (not just prediction), the approach is paired with a token-level interpretability layer. We introduce Route×Effect, a composite attribution method combining attention rollout and Integrated Gradients to highlight tokens that contribute to a similarity decision. These prompts can be compared across epigrams within a variation cluster to identify philologically meaningful cues (e.g., shared formulas, substitutions, paraphrastic equivalents), and to support error analysis and iterative refinement.

Discussion

In terms of Piper’s modelling cycle, theorization is grounded in engagement with the philological tradition, while corpus selection was based on a subcorpus in which variation relations are well attested. Successive iterations produced models that did not pass validation against the gold standard, prompting us to treat these partial failures as evidence of a mismatch between computational and philological similarity.

Model performance against the annotated data is only one dimension of evaluation; explainability and coherence also weigh in the balance. Given the aims of literary modelling, a model that cannot be related back to intelligible textual features is of limited use: the goal is not merely heuristic discovery, but a hermeneutic account of what the model treats as evidence for variation. The BERT pipeline extends this experiment by testing whether contextual embeddings, paired with token-level attribution, can make model decisions interpretable in philological terms.

Conclusion

IAL treats the Greek Anthology as a small but intensively curated laboratory for thinking about how literary concepts can be modelled without being flattened. By combining expert systems, contextual embeddings, and interpretability techniques within a single well-understood corpus, the project makes it possible to compare not only performance but also the epistemic affordances and limits of different algorithmic approaches.

The experiment shows that modelling epigrammatic variation is not simply a matter of optimizing similarity detection. Its negative or partial results are productive because they expose where computational similarity fails to coincide with philological similarity, and therefore clarify what a model of literary variation would need to explain. In doing so, it contributes to Digital Classics while also speaking to broader debates in Digital Humanities about small data, annotation, and explainable AI. By working on a low-resource ancient language, the project also broadens the corpora and methodological perspectives represented in DH while keeping models accountable to philological knowledge.

References
  1. Büchler, Marco / Burns, Philip R. / Müller, Martin / Franzini, Emily / Franzini, Greta (2014): “Towards a Historical Text Re-Use Detection”, in: Biemann, Chris / Mehler, Alexander (eds.): Text Mining. From Ontology Learning to Automated Text Processing Applications. Cham: Springer International Publishing 221–238. DOI: 10.1007/978-3-319-12655-5_11.
  2. Coffee, Neil / Forstall, Christopher / Gawley, James (2017): “The Tesserae Project: Detecting Intertextuality of Meaning and Sound”, in: Mastandrea, Paolo (ed.): Strumenti digitali e collaborativi per le Scienze dell’Antichità. Venezia: Edizioni Ca’ Foscari - Digital Publishing 189–192. DOI: 10.14277/6969-182-9/ANT-14-14.
  3. Krämer, Sybille (2023): “Should We Really ‘Hermeneutise’ the Digital Humanities? A Plea for the Epistemic Productivity of a ‘Cultural Technique of Flattening’ in the Humanities”, in: Journal of Cultural Analytics 7, 4. DOI: 10.22148/001c.55592.
  4. Laurens, Pierre (2012): L’abeille dans l’ambre : célébration de l’épigramme de l’époque alexandrine à la fin de la Renaissance. 2e édition revue et augmentée. Paris: Les Belles Lettres.
  5. McCarty, Willard (2013): “Knowing…: Modeling in Literary Studies”, in: Siemens, Ray / Schreibman, Susan (eds.): A Companion to Digital Literary Studies. Chichester: Wiley-Blackwell 389–401. DOI: 10.1002/9781405177504.ch21.
  6. Mellet, Margot (2020): “Penser le palimpseste numérique. Le projet d’édition numérique collaborative de l’Anthologie palatine”, in: Captures 5, 1. DOI: 10.7202/1073479ar.
  7. Piper, Andrew (2015): “Novel Devotions: Conversional Reading, Computational Modeling, and the Modern Novel”, in: New Literary History 46, 1: 63–98. DOI: 10.1353/nlh.2015.0008.
  8. Piper, Andrew (2017): “Think Small: On Literary Modeling”, in: PMLA 132, 3: 651–658. DOI: 10.1632/pmla.2017.132.3.651.
  9. Singh, Pranaydeep / Rutten, Gorik / Lefever, Els (2021): “A Pilot Study for BERT Language Modelling and Morphological Analysis for Ancient and Medieval Greek”, in: Degaetano-Ortlieb, Stefania / Kazantseva, Anna / Reiter, Nils / Szpakowicz, Stan (eds.): Proceedings of the 5th Joint SIGHUM Workshop on Computational Linguistics for Cultural Heritage, Social Sciences, Humanities and Literature (LaTeCH-CLfL 2021). Punta Cana, Dominican Republic (online): Association for Computational Linguistics 128–137. DOI: 10.18653/v1/2021.latechclfl-1.15.
  10. Vitali-Rosati, Marcello / Monjour, Servanne / Casenave, Joana / Bouchard, Elsa / Mellet, Margot (2020): “Editorializing the Greek Anthology: The Palatin Manuscript as a Collective Imaginary”, in: Digital Humanities Quarterly 14, 1. DOI: 10.63744/6tqtxmxjq3ej.
  11. Vitali-Rosati, Marcello / Mellet, Margot / Monjour, Servanne / Fauchié, Antoine / Guicherd, Timothée / Larlet, David / Agostini-Marchese, Enrico (2021): “L’épopée numérique de l’Anthologie grecque : entre questions épistémologiques, modèles techniques et dynamiques collaboratives”, in: Sens Public: 1–25. DOI: 10.7202/1089649ar.