Mapping Hymns and Organizing Concepts in the Rigveda: Quantitatively Connecting the V edic Suktas (2025)

Abstract: Accessing and gaining insight into the Rigveda poses a non-trivial challenge due to its extremely ancient Sanskrit language, poetic structure, and large volume of text. By using NLP techniques, this study identified topics and semantic connections of hymns within the Rigveda that were corroborated by seven well-known groupings of hymns. The 1,028 suktas (hymns) from the modern English translation of the Rigveda by Jamison and Brereton were preprocessed and sukta-level embeddings were obtained using, i) a novel adaptation of LSA, presented herein, ii) SBERT, and iii) Doc2Vec embeddings. Following an UMAP dimension reduction of the vectors, the network of suktas was formed using k-nearest neighbours. Then, community detection of topics in the sukta networks was performed with the Louvain, Leiden, and label propagation methods, whose statistical significance of the formed topics were determined using an appropriate null distribution. Only the novel adaptation of LSA using the Leiden method, had detected sukta topic networks that were significant ( z = 2.726, p < .01) with a modularity score of 0.944. Of the seven famous sukta groupings analyzed (e.g., creation, funeral, water, etc.) the LSA derived network was successful in all seven cases, while Doc2Vec was not significant and failed to detect the relevant suktas. SBERT detected four of the famous suktas as separate groups, but mistakenly combined three of them into a single mixed group. Also, the SBERT network was not statistically significant.

## background and significance the rigveda is written in vedic sanskrit and is the oldest existing sample of sanskrit literature, written approximately 3000 years ago, in the region of present-day afghanistan and the punjab region of india @xcite . it is a heterogeneous collection of hymns (suktas) written by various poets (rishis), that praise gods, describe rituals, and provide wisdom @xcite . popular mantras recited by hindus, such as the gayatri mantra, is chanted at three different times of the day @xcite for the purposes of mental well-being, and the mahamrityunjaya mantra, which is recited for physical protection and longevity, are both sourced from the rigveda @xcite . yet despite being a central text in hinduism, navigating the rigveda and obtaining insights regarding concepts and topics are not as straightforward as the bible or quran, for which there are innumerable resources (such as commentaries) and written for individuals at varying levels of skill and familiarity with the books. this is especially true for individuals who do not speak or understand any of the indian languages. although scholarly articles regarding specific topics (such as death) in the rigveda are available, for the layperson interested in learning about the rigveda, organizing and collating the information may be unwieldy @xcite . this is further evidenced in nlp studies, where the quantity of studies focused on the abrahamic religions vastly outnumbers those focused on hindu religious texts @xcite . ## related work recent studies have analyzed hindu religious and literary texts from various aspects. one study extracted and formed social networks among the pandavas (protagonists) and kuaravas (antagonists) in the mahabharata (an epic poem from the hindu scriptures) using matrix factorization and spectral graph theory techniques @xcite . in another study, using linguistic and lexical features in sanskrit, the mahabharata was stratified into clusters @xcite . another study had determined topics on the english translations of two other important hindu texts @xcite , the upanishads and the bhagavad gita, using pre-trained sentence embeddings obtained from deep learning networks, sentence embeddings using siamese bert-networks (sbert) @xcite and universal sentence encoder (use) embeddings @xcite . many hymns in the rigveda can be attributed to specific devas (deities in hinduism), such as indra and agni and were predicted using neural networkbased word embedding models such as word2vec @xcite and glove @xcite with linear classifiers @xcite . many studies have focused on modelling the syntactics and parsing of the sanskrit language using various deep learning techniques, such as recurrent neural networks @xcite or transformers @xcite @xcite to generate new sanskrit text. another use has been to create sentence and word embeddings using transformers and static models for semantic and analogy tasks @xcite . some studies have shown that combining semantic information from the sanskrit word net @xcite with parsed sentences in the vedic treebank @xcite can help to provide better understanding of sentence structure @xcite and may improve sanskrit language modelling using sanskrit neural word embeddings @xcite only a handful of studies have focused on clustering or stratifying vedic texts for the purposes of obtaining insights about texts written in vedic sanskrit. one such study had performed bayesian mixture modelling to obtain a chronological ordering of texts written in vedic sanksrit, such as the rigveda, atharvaveda, and post-rigvedic sanskrit, such as the aitareya brahmana @xcite . a similar study had analyzed the similarity of passages within the maitrayani and kathaka samhitas using word embeddings @xcite . another study had performed clustering on the linguistic and textual features of the 10 books in the rigveda to determine whether the historical order of these books can be obtained in a data-centric way @xcite . this study showed that the stratification generally followed the historical divisions. the rigveda has been historically divided into ten books of which the oldest parts are books ii to vii (called the "family books"), followed by books i, viii, and ix which are accepted to be younger than the family books, and book x is the youngest @xcite . however, no study has directly investigated the possible organization of the suktas in the rigveda using nlp techniques such as word, sentence, or document embeddings. ## aim and contribution thus, the goal of this study was to organize the network of related suktas and uncover the topics contained within the 10 books of the rigveda in a datadriven manner, without employing prior knowledge about the suktas or topics. potentially providing a guide for individuals unfamiliar with this complex and varied religious text. this endeavour was mainly facilitated by a novel innovation presented in this study, which we call mean-lsa, where the document vectors obtained using lsa (latent semantic analysis) @xcite were computed from the original length of each sukta (document). this was accomplished by taking the average of all lsa word vectors in a sukta. this is in contrast to obtaining the sukta vectors from suktas that were split into a pre-specified document length, which generally causes a loss of semantic information in normal lsa document vectors. another innovation of this study was that the significance of the sukta networks and detected topics were assessed using a null distribution formed by a random permutation of the network adjacency matrices. although network structure and topics detected may appear well clustered and organized, i.e. visually the documents appear to be clustered with clear structure, the structure may be due to chance occurrence or an inducement of the preprocessing. this test provides an unbiased method of assessing whether real network structure has been found. using both innovations, this study demonstrated that historically relevant topics in the rigveda were detected using the mean-lsa embeddings and were more significant and accurate than those obtained by using the deep learning embedding techniques of sbert and doc2vec @xcite , both of which provided non-significant network structure. ## methods the six steps to obtain the network of hymns (suktas) and topics within the rigveda is summarized in figure 1 . the processing pipeline contained six rigveda preprocessing sukta embeddings sukta networks sukta topic detection significance testing performance evaluation extract suktas format text for lsa & doc2vec mean-lsa, sbert, doc2vec umap knn network adj. matrix louvain, leiden, propagation modularity randomize adj. matrix obtain p-value analyze famous suktas obtain topics 1 2 3 6 4 5 figure 1 : processing pipeline for obtaining the network of suktas and topics using the three types of embedding techniques (mean-lsa, sbert, doc2vec). steps (1) and ( 2 ) created the embeddings to form the sukta networks. in steps ( 3 ) and ( 4 ), using the 4-nearest neighbours of each sukta, the network of topics were detected using community detection methods. finally, in steps ( 5 ) and ( 6 ), the statistical significance of the detected network structures were determined and the grouped suktas were analyzed. ## discussion and conclusion to our knowledge, this is the first study to create a network of suktas contained in the rigveda. this is accomplished by using the novel method of mean-lsa, which we presented herein. the mean-lsa method creates a document embedding using the word embeddings obtained from lsa by taking the average of the word embeddings for all words contained in a document. also, we demonstrated that despite having a high modularity score, this may not be indicative of actual topics found by the network structure. this was corroborated by obtaining the significance values of the network structure through randomization of the network adjacency matrices. this was further demonstrated by the discrepancy of the modularity scores and the signifance values. the doc2vec based sukta network, which had the highest modularity score, did not have a statistically significant structure and it failed to detected any meaningful sukta topic communities, especially in the case of the seven famous suktas. the sbert based network had a similar situation, in which the modularity score was the second highest, yet it was also not statistically significant. when analyzing the seven famous suktas, it mistakenly combined the funeral suktas with the creation, and heaven & earth suktas. it may be possible to use the presented statistical significance testing method as a way of determining the cohesiveness and unity of the detected topics. this could be similar to the computation of coherence measures that indicate the relevance of topics against the co-occurrence of words in a topic @xcite . however, the statistical test performed with the random permutation of the adjacency matrix may be considering higher-order concepts, since it is manipulating the connections between documents, rather than only analyzing the collection of words. the underlying premise here is that documents are not simply a collection of words. we plan to investigate this application of statistical significance testing of detected topics in a future study. we also plan to investigate the training of unsupervised transformer language models.