PINGALA: Prosody-Aware Decoding for Sanskrit Poetry Generation

๐Ÿ“… 2026-03-25
๐Ÿ“ˆ Citations: 0
โœจ Influential: 0
๐Ÿ“„ PDF
๐Ÿค– AI Summary
This work addresses the challenge of generating Sanskrit poetry, which requires balancing semantic coherence with strict metrical constraintsโ€”a trade-off that traditional approaches struggle to manage. The authors propose PINGALA, a novel decoding strategy that enhances semantic coherence through line-grouped generation, introduces a decoding bias favoring longer tokens, and leverages phonologically aware SLP1 transliteration to improve metrical alignment. Additionally, they design a reference-free poetry quality evaluation method based on a cross-encoder architecture, better aligned with authentic compositional standards. Experimental results demonstrate that when applied to instruction-tuned large language models such as Phi-4, PINGALA achieves a 10% improvement in semantic coherence and a 46% increase in metrical alignment accuracy, significantly outperforming baseline methods.

Technology Category

Application Category

๐Ÿ“ Abstract
Poetry generation in Sanskrit typically requires the verse to be semantically coherent and adhere to strict prosodic rules. In Sanskrit prosody, every line of a verse is typically a fixed length sequence of syllables adhering to prescribed binary patterns of syllable weights. We observe that instead of treating a verse as a monolithic sequence, segmenting them as grouped-lines leads to significant improvement in semantic coherence by 10\% with comparable metrical adherence. Specifically, PINGALA, our proposed decoding approach is designed to encourage every line to have well-formed words and our token selection biases the model towards it by preferring longer tokens. Writing in Sanskrit follows phonemic orthography, hence using a phonetically aware transliteration scheme, SLP1, increased the metrical alignment by 46\% with comparable semantic similarity, for a instruction fine-tuned large language models like Phi-4. We also introduce a new approach for reference-free evaluation using cross-encoders which achieved better alignment with true poetry instances.
Problem

Research questions and friction points this paper is trying to address.

Sanskrit poetry generation
prosody
semantic coherence
metrical adherence
decoding
Innovation

Methods, ideas, or system contributions that make the work stand out.

prosody-aware decoding
Sanskrit poetry generation
SLP1 transliteration
grouped-line segmentation
reference-free evaluation
๐Ÿ”Ž Similar Papers
No similar papers found.