arXiv:2609.04755cs.CLSep 2026

Manuscript Offprint

arXiv:2609.04755

Vectorizing Classical Tamil: Representation Learning for Verse-Commentary Pairs

Amrit Gopinath, Sangeetha Sivanesan

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

We construct a corpus of 1,262 verse-commentary (urai) pairs from five Classical Tamil source sections, ranging from technical grammatical prose to modern paraphrase, and ask what information representation learning can recover. We train recurrent and Transformer encoders, a Siamese-style pair-matching network, an mBART-style encoder-decoder, and a decoder-only language model. Each analysis is interpreted against an appropriate control on the same data. TF-IDF provides a strong no-training lexical retrieval baseline, alongside representation analyses and generation controls for the learned models. A fixed string containing the 25 most frequent commentary words scores higher on generation overlap than the decoder-only model. Canonical correlation reaches 1.000 on Gaussian noise at these sample sizes, token-F1 spans only about 0.02–0.20 on this corpus, and the encoder-decoder continues to lower training loss for sixteen epochs after validation loss has begun to rise. One narrow result remains: the decoder-only model prefers authentic word order in 107 of 112 minimal-pair comparisons (95.5%), but does not reproduce held-out commentary content. We release the extraction and evaluation protocol; redistribution of the source commentaries remains subject to permission.

1 Introduction

Throughout this paper, urai refers to the commentary associated with a verse.

Classical Tamil has a long textual and commentary tradition, but it remains largely absent from contemporary NLP. Tamil-capable models are trained mainly on Modern Tamil and web text, including the AI4Bharat/IndicNLP corpus (Kunchukuttan et al., 2020) and multilingual models such as mBERT (Devlin et al., 2019). Modelling Classical Tamil is therefore a small-data

problem in its own right, not a smaller version of modern-Tamil modelling.

We collected 1,262 verse–urai pairs from the Tamil Virtual University (Tamil Virtual University, 2024) and Project Madurai (Project Madurai, 2024). The corpus combines three explanatory registers: a modern paraphrase, gloss-and-gist material, and sectioned scholarly commentary. This variation matters because the same verse-to-urai task has different target formats across sources.

Our question is straightforward: when a model is trained on verse–urai pairs, does it learn anything beyond lexical overlap and recurring commentary forms? We examine recurrent and attention-based encoders, encoder–decoder generation, and decoder-only continuation. Cosine similarity, CCA, KCCA, and t-SNE provide views of the learned spaces; separate verse and urai encoders are compared with shared and Siamese-style settings.

The encoder–decoder lets us inspect how a verse is mapped to an urai and whether high attention weights reflect more than repeated vocabulary. We also test generalisation and use a pair-choice probe in which words or clauses are modified and reordered. That probe measures probability preference for the authentic order; it does not demonstrate grammatical understanding.

This is not a study of a deployable generator. It is a pilot study of a controls-first protocol for identifying what small-data models learn from verse–urai pairs, and what they do not.