Skip to Content
InformationInformation
  • Article
  • Open Access

27 July 2026

34 Pages

MythoBiLLM: BiLSTM-Guided Parameter-Efficient Fine-Tuning of Large Language Models for Coherent Summarization and Generation of Indian Mythological Texts

,
and
1
Centre for Intelligent Cloud Computing, COE for Advanced Cloud, Multimedia University, Melaka 75450, Malaysia
2
School of Engineering & Technology, K.R. Mangalam University, Sohna 122103, India
3
Faculty of Information Science and Technology, Multimedia University, Melaka 75450, Malaysia
*
Author to whom correspondence should be addressed.

Abstract

Indian mythological narratives contain long event chains, recurring characters, moral conflicts, interactions between human and divine agents, and source-specific narrative styles. General-purpose large language models can generate fluent text while losing character continuity, thematic relations, or source-supported events. This study presents MythoBiLLM, a parameter-efficient framework for summarization and continuation generation from Indian mythological texts. The framework combines a frozen Llama 3.2 3B-Instruct backbone, LoRA-based adaptation, and a gated BiLSTM narrative-memory adapter. A corpus of public-domain English translations from the Ramayana, Mahabharata, Bhagavad-Gita, Vishnupuranam, Harivamsha, Hindu Tales, and Indian Myth and Legend contains 3,684,838 word-level tokens and 6057 segmented passages. Evaluation covers language modeling, summarization, continuation generation, entity consistency, theme retention, component ablation, robustness, human assessment, and statistical testing. Relative to LLM+LoRA, the complete framework reduces average perplexity from 23.4 to 19.8. In controlled comparisons, the BiLSTM adapter achieves an MCS of 0.713 on both tasks, compared with 0.699 for the parameter-matched MLP adapter, 0.704 for independently trained long-context LoRA, and 0.708 for retrieval augmentation. Full MythoBiLLM reaches MCS values of 0.762 for summarization and 0.744 for continuation generation. After entity consistency and style alignment are excluded from MCS, the complete configuration retains the highest scores of 0.751 and 0.731. These findings support the complete framework on the evaluated corpus, while the controlled comparisons indicate a modest complementary contribution from the BiLSTM and do not identify it as the sole source of the performance gains.

1. Introduction

Indian mythological literature contains extended narrative chains, recurring characters, interactions between human and divine agents, moral dilemmas, philosophical dialogues, genealogies, exile, war, sacrifice, devotion, curses, vows, and boons. These works function not only as literary resources but also as culturally situated knowledge sources in which character identity, moral obligation, event order, and narrative style carry substantial meaning. Computational modeling of these texts therefore requires more than surface-level fluency. A suitable model should preserve entities, event dependencies, themes, and stylistic continuity across extended passages.
Large language models (LLMs) have substantially improved text generation, summarization, dialogue modeling, and instruction following. Transformer architectures support modern language modeling by learning contextual relations through self-attention [1]. General-purpose LLMs can nevertheless generate unsupported or unfaithful content when a task requires strong factual or narrative fidelity [2]. In a mythological narrative, a fluent continuation may assign an action to the wrong character, alter a moral conflict, weaken an earlier vow, or fail to connect a divine promise with its later consequence. Such errors reduce the value of generated material for literary, cultural, educational, and digital-humanities applications.
Domain adaptation provides a straightforward approach for improving performance when the target corpus differs from the broad pretraining distribution [3]. Parameter-efficient fine-tuning methods adapt a small set of parameters while keeping most pretrained weights frozen. Low-Rank Adaptation (LoRA) adds trainable low-rank updates to selected transformer layers and reduces the cost of domain adaptation [4]. Transformer self-attention already models contextual relationships among tokens within the available input window. The motivation for the BiLSTM adapter is therefore not that the transformer lacks contextual modeling. Instead, the adapter introduces a complementary recurrent sequence bias that explicitly propagates ordered forward and backward states across the available mythological passage.
A BiLSTM processes a sequence in forward and backward directions and represents each position using sequentially accumulated context from both directions [5,6]. This recurrent structure differs from self-attention, which learns flexible pairwise relationships, and from a position-wise MLP, which adds nonlinear capacity without sequential state propagation. The BiLSTM adapter is designed to emphasize ordered narrative dependencies involving characters, vows, curses, promises, moral decisions, and their later consequences. Its contribution is evaluated empirically rather than assumed from the architecture.
Controlled comparisons separate this contribution from three alternative explanations. A parameter-matched MLP tests whether additional adapter capacity alone produces the improvement. An independently trained 4096-token LoRA baseline tests whether a larger context window provides the same benefit. A retrieval-augmented baseline tests whether external narrative evidence can replace the recurrent source-memory mechanism. The BiLSTM adapter achieves an MCS of 0.713, compared with 0.699 for the MLP adapter, 0.704 for longer-context LoRA, and 0.708 for retrieval augmentation. These differences indicate a modest residual advantage for ordered recurrent memory, although retrieval remains stronger on selected entity- and theme-level measures.
This study presents MythoBiLLM, a parameter-efficient framework for summarizing and generating continuations from Indian mythological texts. The framework integrates a base LLM, a BiLSTM narrative-memory adapter, and LoRA-based fine-tuning. The base LLM provides contextual language generation, the BiLSTM adapter introduces forward–backward recurrent sequence modeling, and LoRA supports efficient domain adaptation. The corpus was constructed from public-domain English translations of the Ramayana, Mahabharata, Bhagavad-Gita, Vishnupuranam, Harivamsha, Hindu Tales, and Indian Myth and Legend obtained through Project Gutenberg. The resulting corpus contains 3,684,838 word-level tokens and 6057 segmented passages and supports both source-controlled training and cross-dataset evaluation.
The study evaluates MythoBiLLM on two major tasks: mythological summarization and continuation generation. The validation protocol compares the proposed model with classical, neural, transformer, Indic, and recent open LLM baselines, including Llama 3.2, Gemma 3, and Qwen3 [7,8,9]. The evaluation uses language modeling, summarization, generation, entity consistency, theme retention, human evaluation, ablation testing, robustness analysis, and statistical significance testing. Standard metrics such as ROUGE, BERTScore, and MAUVE are used with the proposed mythological coherence score (MCS) to capture both general text quality and mythology-specific consistency [10,11,12]. The reported results show that MythoBiLLM reduces average perplexity from 23.4 to 19.8 compared with the LLM+LoRA baseline, improves intra-dataset MCS from 0.713 for Qwen3+LoRA to 0.762, and improves continuation-generation MCS from 0.681 to 0.744 over LLM+LoRA.
The main contributions of this study are summarized as follows:
(1)
A BiLSTM-guided narrative-memory adapter is integrated with LoRA-based LLM adaptation to provide an explicit forward–backward sequence bias for mythological passages.
(2)
A controlled comparison isolates the BiLSTM contribution from additional adapter capacity, longer input context, and retrieval through a parameter-matched MLP adapter, a 4096-token LoRA baseline, and a retrieval-augmented baseline.
(3)
A mythology-aware evaluation design measures entity consistency, wrong-entity introduction, theme retention, style alignment, narrative coherence, and the combined mythological coherence score.
(4)
The complete framework is evaluated through summarization, continuation generation, intra-dataset and cross-dataset testing, component ablation, robustness analysis, human evaluation, and statistical testing.
The remaining manuscript is organized as follows. Section 2 reviews related work on literary NLP, domain-specific LLM fine-tuning, BiLSTM-based sequence modeling, and parameter-efficient adaptation. Section 3 presents the proposed MythoBiLLM framework, including corpus construction, preprocessing, segmentation, model architecture, loss functions, and training algorithm. Section 4 describes the datasets, experimental settings, baselines, evaluation metrics, and validation protocol. Section 5 presents the results and discussion. Section 6 concludes the study and outlines future research directions.

3. Proposed Methodology

The proposed MythoBiLLM framework is designed for Indian mythological text summarization and continuation generation. The methodology has five main stages: public corpus acquisition, text cleaning and normalization, passage-level segmentation, BiLSTM-guided LLM adaptation, and task-specific fine-tuning. The framework uses a base transformer LLM for contextual language generation, a BiLSTM adapter for forward–backward narrative memory, and LoRA for parameter-efficient model adaptation. Transformer models provide strong contextual representation through self-attention [1], while LSTM and BiLSTM models support ordered sequence-memory modeling [5,6]. LoRA reduces fine-tuning cost by updating low-rank trainable matrices instead of the full model weights [4].

3.1. Problem Formulation

Let the Indian mythological corpus be represented as:
D = { ( x i , m i ) } i = 1 N ,
where x i denotes a text unit and m i denotes its metadata, including source text, Gutenberg ID, corpus group, unit type, and task split. Equation (1) defines the complete corpus as a set of text–metadata pairs, which supports reproducible tracking from raw public text to final training samples.
The study addresses two generation tasks. In continuation generation, the model receives a mythological passage X = { x 1 , x 2 , … , x n } and generates a continuation Y = { y 1 , y 2 , … , y m } . The conditional generation objective is defined as:
P ( Y ∣ X ) = ∏ t = 1 m P ( y t ∣ X , y < t ) .
Equation  (2) estimates each output token using the input passage and the previously generated output tokens. This task evaluates whether the model can continue a mythological passage while preserving character continuity, event dependency, and narrative tone.
In summarization, the model maps a chapter, canto, story, or passage X into a concise summary S:
S = f θ ( X ) ,
where f θ denotes the fine-tuned model. Equation (3) formalizes the summarization task, where the generated summary should retain major entities, events, themes, and moral context.

3.2. Corpus Acquisition

The corpus was constructed from ten public-domain English translations obtained through Project Gutenberg. As summarized in Table 2, the collection includes epic narratives, philosophical dialogue, Puranic material, Krishna-centered narratives, short mythological tales, and secondary mythological narration. This combination provides long-form narrative structure together with variation in source style, thematic emphasis, and passage length.
Table 2. Indian mythological datasets used in the study.
The corpus composition according to text group is displayed in Figure 1. The bulk of the epic corpus consists of the core epics, which are the Ramayana and Mahabharata, which offer long-form narrative structure, repeated character arcs and multiple moral conflicts. The rest of the groups add philosophical, Puranic, Krishna based, short form and external narration styles which helps to enhance the variety of validation styles.
Figure 1. Corpus composition according to mythological text group. Percentages may not total 100% because of rounding.

3.3. Text Cleaning and Normalization

The dataset texts include license blocks, editorial notes, footnotes, page markers, scanner notes, inconsistent spacing and variant spellings. These elements can add noise to the model training. This cleaning stage thus generates a version ready for the model, but keeps the raw version for repeatability. The normalized text is defined as:
x i norm = f norm ( x i ) ,
where f norm applies Unicode normalization, Gutenberg header/footer removal, spacing correction, scanner-note removal, footnote filtering, and mythological name normalization. Equation (4) ensures that each raw text unit is converted into a consistent training unit. Table 3 summarizes all preprocessing steps and their purpose.
Table 3. Text preprocessing operations applied to the corpus.

3.4. Chapter-Level Segmentation

Related story fragments can be split into the training and testing subsets, due to random sentence splitting. This may overestimate the performance of the model as the same chain of events may be present in different splits. To minimize this risk, the framework first maintains the higher-level boundaries of narrative, like chapter, canto, parva or story unit, wherever possible. Each larger unit is then broken down into fixed-length training passages. A passage is represented as:
p j = [ t j , t j + 1 , … , t j + k ] ,
where t j denotes a token and k denotes the maximum passage length. Equation (5) defines each passage as an ordered token sequence.
The sliding-window passage construction is defined as:
p j = x [ j : j + k ] , p j + 1 = x [ j + s : j + s + k ] ,
where s denotes the stride. Equation (6) preserves partial continuity between adjacent passages while keeping the passage length suitable for fine-tuning. Table 4 reports the segment-level word-length distribution. Most passages have a median length of 700 words, which creates comparable context sizes across the corpus. The lower minimum values occur mainly at the final segment of a text or story.
Table 4. Segment-level word-length distribution after passage construction.
Figure 2 visualizes the passage-length distribution after segmentation. The ridgeline plot shows that most datasets concentrate near the target passage length, while shorter values mainly appear in final residual segments. This indicates that the segmentation process produces controlled and comparable passage lengths across texts.
Figure 2. Ridgeline distribution of passage lengths after segmentation.

3.5. Annotation Scheme

A manually checked validation subset was created to evaluate mythology-specific quality beyond generic text metrics. Table 5 defines the annotation scheme. The scheme covers characters, entity roles, narrative events, themes, and tone. These labels support later evaluation of entity consistency, theme retention, and human-perceived narrative quality.
Table 5. Annotation scheme for mythological narrative validation.
The entity set for the ith passage is defined as:
E i = { e 1 , e 2 , … , e m } ,
and the theme set is defined as:
T i = { t 1 , t 2 , … , t r } .
Equations (7) and (8) are later used to compute entity consistency and theme retention. Annotator agreement is measured using Cohen’s kappa [24]:
κ = P o − P e 1 − P e ,
where P o is the observed agreement and P e is the expected agreement by chance. Equation (9) provides a chance-corrected agreement measure for the manually checked validation subset.

3.6. Overall MythoBiLLM Framework

Figure 3 presents the MythoBiLLM architecture. A mythological passage is first processed by the LoRA-adapted Llama 3.2 3B-Instruct backbone. The final transformer layer produces a 3072-dimensional contextual representation for each token. These hidden states are projected to a 256-dimensional adapter space and processed by a two-layer BiLSTM with 128 hidden units in each direction. A vector-valued fusion gate combines the projected transformer representation with the BiLSTM memory representation. The fused representation is projected back to 3072 dimensions and added to the final transformer hidden state before the language-modeling or task head.
Figure 3. Overall architecture of the proposed MythoBiLLM framework.
The LoRA-adapted backbone produces the final-layer token representations
H = { h 1 , h 2 , … , h n } , h t ∈ R 3072 ,
where n is the number of tokens in the available input passage. A trainable input projection maps each transformer hidden state to the adapter dimension:
h t ′ = W in h t + c in , W in ∈ R 256 × 3072 , h t ′ ∈ R 256 .
The projected sequence H ′ = { h 1 ′ , … , h n ′ } is processed by two stacked bidirectional LSTM layers. Each direction contains 128 hidden units. The first layer is defined as
B ( 1 ) = BiLSTM ( 1 ) ( H ′ ) , B ( 1 ) ∈ R n × 256 ,
and the second layer is
B = BiLSTM ( 2 ) Dropout 0.10 B ( 1 ) , B ∈ R n × 256 .
For token position t, the output of the second BiLSTM layer is
b t = h t → ; h t ← , h t → , h t ← ∈ R 128 , b t ∈ R 256 .
The projected transformer state and the BiLSTM state are concatenated to obtain a 512-dimensional gate input. A vector-valued fusion gate is then computed as
g t = σ W g [ h t ′ ; b t ] + c g , W g ∈ R 256 × 512 , g t ∈ R 256 ,
where σ ( · ) is the sigmoid function. The fused adapter representation is
z t = g t ⊙ h t ′ + ( 1 − g t ) ⊙ b t , z t ∈ R 256 .
An output projection returns the fused representation to the LLM hidden-state dimension:
r t = W out z t + c out , W out ∈ R 3072 × 256 , r t ∈ R 3072 .
The adapter output is included through a residual update before the language-modeling or task head:
h ˜ t = h t + Dropout 0.10 ( r t ) .
The fusion gate is not trained through a separate objective. Its parameters W g and c g are initialized with the adapter and optimized jointly with the BiLSTM, input and output projections, and LoRA parameters through L total . The original backbone parameters remain frozen. Gradients from the task losses therefore determine, for each token and each adapter dimension, the relative contribution of the projected transformer state and the recurrent memory state.

3.7. LoRA-Based Parameter-Efficient Fine-Tuning

Full LLM fine-tuning requires large memory and computation because all model weights are updated. LoRA reduces this cost by freezing the pretrained weights and learning low-rank update matrices [4]. The adapted weight matrix is defined as:
W ′ = W + Δ W ,
where W is the frozen pretrained weight and Δ W is the trainable update. The low-rank update is defined as:
Δ W = α r B A ,
where A and B are trainable low-rank matrices, r is the LoRA rank, and α is the scaling factor. Equations (19) and (20) define the parameter-efficient adaptation mechanism used in MythoBiLLM.
LoRA was applied to the attention projections q_proj, k_proj, v_proj, and o_proj, and to the feed-forward projections gate_proj, up_proj, and down_proj. These modules were inserted into all 28 decoder blocks, indexed from layer 0 to layer 27. No other backbone module received a LoRA update. The final configuration used rank r = 16 , scaling factor α = 32 , and LoRA dropout of 0.05. The original transformer weights remained frozen, while the LoRA matrices were jointly optimized with the BiLSTM adapter, fusion gate, and projection layers. The complete implementation configuration is reported in Table 6.
Table 6. Architecture, fusion, LoRA, and auxiliary-loss configuration used in the MythoBiLLM experiments.

3.8. Training Objective

The training objective combines language modeling, style alignment, entity consistency, and task-specific summarization. The final weighted objective is
L total = L LM + 0.10 L style + 0.20 L entity + 0.10 L summary .
The entity-consistency term receives the largest auxiliary weight because preservation of character identity and reduction of unsupported entities are central to mythological faithfulness. The lower style and summarization weights allow these objectives to influence training without dominating the language-modeling objective.
The language modeling loss is:
L LM = − ∑ t = 1 n log P ( x t | x < t ) .
Equation (22) trains the model to predict the next token in the mythological corpus. The entity consistency loss is:
L entity = 1 − | E ref ∩ E gen | | E ref ∪ E gen | .
Equation (23) penalizes missing or unsupported entities by comparing the reference entity set E ref with the generated entity set E gen . This term directly supports character consistency in mythological summarization and continuation generation.
The summarization loss is computed using teacher-forced cross-entropy over the reference summary:
L summary = − ∑ t = 1 | S | log P ( s t | X , s < t ) ,
where S = { s 1 , s 2 , … , s | S | } denotes the reference summary.
The style loss is computed as the distributional difference between source-style and generated-style representations:
L style = JSD P source ‖ P generated ,
where P source and P generated denote normalized style-feature distributions of the source and generated text, respectively. Equations (24) and (25) complete the auxiliary loss definitions used in the total training objective in Equation (21).
The auxiliary-loss weights were selected through a validation-only grid search. Each of λ 1 , λ 2 , and λ 3 was evaluated at values in { 0.05 , 0.10 , 0.20 } , resulting in 27 candidate combinations. Candidate configurations were trained using the same training split and optimization settings. Validation ROUGE-L was used for the summarization task, while validation MAUVE was used for continuation generation. The final setting was λ 1 = 0.10 , λ 2 = 0.20 , and λ 3 = 0.10 . Neither test-set performance nor MCS was used for loss-weight selection or checkpoint selection, which prevents the mythology-specific evaluation score from directly influencing model selection.
Algorithm 1 presents the complete training procedure. The original Llama 3.2 3B-Instruct parameters remain frozen, while LoRA, projection, BiLSTM, and fusion-gate parameters are jointly optimized. The algorithm obtains the 3072-dimensional final-layer hidden states, projects them to 256 dimensions, applies the two-layer BiLSTM, performs gated residual fusion, and optimizes the weighted objective in Equation (21). Model selection uses validation ROUGE-L for summarization and validation MAUVE for continuation generation.
Algorithm 1 Training procedure of the MythoBiLLM framework
  • Require: Training corpus D train , validation corpus D val , Llama 3.2 3B-Instruct, auxiliary-weight candidate set { 0.05 , 0.10 , 0.20 }
  • Ensure: Trained MythoBiLLM parameters
  1:
Clean and normalize the public-domain mythological texts
  2:
Split the corpus at chapter, canto, parva, or story level
  3:
Construct summarization and continuation-generation samples
  4:
Initialize Llama 3.2 3B-Instruct and freeze the original backbone parameters
  5:
Insert LoRA modules into q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, and down_proj in decoder layers 0–27
  6:
Set LoRA rank r = 16 , scaling factor α = 32 , and dropout to 0.05
  7:
Initialize the 3072 → 256 input projection
  8:
Initialize two BiLSTM layers with 128 hidden units per direction and dropout 0.10
  9:
Initialize the 512-dimensional input and 256-dimensional output fusion gate
10:
Initialize the 256 → 3072 output projection
11:
for each auxiliary-weight combination in the 27-point validation grid do
12:
    for each training batch do
13:
        Obtain final-layer hidden states H ∈ R n × 3072
14:
        Project H to H ′ ∈ R n × 256
15:
        Compute B = BiLSTM ( 2 ) ( BiLSTM ( 1 ) ( H ′ ) )
16:
        Compute g t = σ ( W g [ h t ′ ; b t ] + c g )
17:
        Compute z t = g t ⊙ h t ′ + ( 1 − g t ) ⊙ b t
18:
        Compute h ˜ t = h t + Dropout 0.10 ( W out z t + c out )
19:
        Compute L total using the current auxiliary weights
20:
        Update LoRA, input/output projection, BiLSTM, and fusion-gate parameters using AdamW
21:
    end for
22:
    Evaluate validation ROUGE-L for summarization and validation MAUVE for continuation generation
23:
end for
24:
Select λ 1 = 0.10 , λ 2 = 0.20 , and λ 3 = 0.10 using validation-only results
25:
Select task checkpoints using validation ROUGE-L and MAUVE
26:
return Trained MythoBiLLM parameters

4. Experimental Setup

This section describes the experimental design used to evaluate MythoBiLLM. The setup covers corpus statistics, annotation statistics, data splitting, baseline and recent open LLMs, training configuration, and evaluation metrics. The design aims to test whether the proposed BiLSTM-guided LLM adaptation improves summarization, continuation generation, entity consistency, theme retention, style alignment, and cross-dataset generalization.

4.1. Dataset Description and Corpus Statistics

The experimental corpus was built from ten public-domain Indian mythological texts downloaded from Project Gutenberg. Table 7 reports the cleaned corpus size after preprocessing and segmentation. The corpus contains 194,021 sentences, 3,684,838 word-level tokens, and 6057 passages. The Mahabharata volumes provide the largest portion of the corpus, while the Ramayana, Harivamsha, Vishnupuranam, Hindu Tales, Bhagavad-Gita, and Indian Myth and Legend add complementary narrative styles for validation and cross-dataset testing.
Table 7. Corpus statistics for the unique cleaned source texts and constructed passages.
Figure 4 complements Table 7 by showing cumulative corpus concentration rather than repeating the individual counts. The curve shows that the four Mahabharata volumes and the Ramayana contribute most of the available text, while the smaller works add stylistic and narrative diversity.
Figure 4. Corpus contribution and cumulative coverage across datasets.
Figure 5 provides a normalized comparison across word-level tokens, sentences, passages, average tokens per passage, and average words per sentence. This representation highlights relative corpus structure that is not immediately visible from the absolute values in Table 7.
Figure 5. Normalized corpus-property heatmap showing relative differences in corpus scale, passage count, passage density, and sentence-level structure across the collected mythological texts.
A manually checked validation subset was prepared to evaluate mythology-specific quality. Table 8 reports 500 annotated passages containing 2474 entity mentions, 903 event labels, and 769 theme labels. Annotation agreement was measured using Cohen’s kappa [24]. The overall agreement score of 0.77 indicates acceptable agreement for the manually checked labels. Figure 6 shows the distribution of key mythological themes used for theme-retention evaluation.
Table 8. Annotation statistics for the mythological validation set.
Figure 6. Theme distribution in the annotated mythological validation set.

4.2. Train–Validation–Test Splitting

The corpus was split at chapter, canto, parva, or story level whenever these boundaries were available. This design reduces leakage because related story events are less likely to appear simultaneously in training and testing subsets. Table 9 shows the intra-dataset split used for main experiments. The 70:10:20 setting provides sufficient training data while preserving separate validation and test portions for model selection and final evaluation.
Table 9. Intra-dataset train–validation–test split.
Cross-dataset validation was also used because strong performance on the same source text does not establish transfer to unseen sources. Table 10 lists four source-separated cross-dataset settings. Each experiment trains the model on one group of mythological texts and evaluates it on an unseen epic, Puranic, or Krishna-centered source. Figure 7 summarizes this validation design.
Table 10. Cross-dataset validation design.
Figure 7. Cross-dataset validation protocol for testing mythological generalization.

4.3. Baseline and Recent Open LLMs

The proposed model was compared with classical, neural, transformer, Indic, and recent open LLM baselines. Table 11 summarizes the role of each baseline. The 5-gram model provides a simple statistical baseline. LSTM and BiLSTM models test sequential learning without a large pretrained LLM. GPT-2 and GPT-Neo/GPT-NeoX represent autoregressive transformer baselines [25,26]. T5 and BART provide strong sequence-to-sequence baselines for summarization [27,28]. IndicBART provides an Indic-oriented NLG baseline [23]. Llama 3.2, Gemma 3, and Qwen3 provide recent open-model comparisons [7,8,9]. This model pool avoids relying only on weak baselines.
Table 11. Baseline and Recent Open LLMs used for comparison.

4.4. Controlled Adapter, Context-Length, and Retrieval Baselines

A controlled experiment was designed to determine whether the performance gain arises from the BiLSTM sequence-memory mechanism rather than from additional parameters, a larger context window, or external retrieval. All configurations use Llama 3.2 3B-Instruct, the same corpus splits, task instances, LoRA rank and scaling factor, optimizer, learning rate, batch setting, number of epochs, decoding settings, and five random seeds.
The LLM+LoRA configuration provides the 2048-token domain-adapted reference. The MLP configuration replaces the BiLSTM with a feed-forward adapter while retaining comparable input and output dimensions. It contains 28.64 million trainable parameters, compared with 28.65 million for the BiLSTM configuration, which controls for added parameter capacity. The long-context LoRA baseline is trained independently with a 4096-token context and contains the same 26.15 million trainable parameters as the standard LoRA model.
The retrieval-augmented configuration uses a 4096-token input and retrieves additional passages from an index constructed only from the training corpus. Retrieval provides non-trainable external context, and no validation or test passages are included in the index. The LLM+LoRA+BiLSTM configuration uses the 2048-token input and excludes the entity- and style-aware auxiliary objectives. Full MythoBiLLM combines the BiLSTM adapter with the complete training objective. This separation distinguishes the contribution of recurrent narrative memory from the additional gains produced by the auxiliary objectives.

4.5. Experimental Configuration

The experiments were implemented in Python using PyTorch and Hugging Face Transformers [29]. Table 12 reports the software, hardware, optimization, sequence-length, and controlled-baseline settings. Table 6 provides the exact adapter dimensions, fusion-gate training procedure, LoRA insertion locations, trainable modules, auxiliary-loss weights, and validation-only tuning protocol. The main model uses Llama 3.2 3B-Instruct with LoRA rank r = 16 , scaling factor α = 32 , AdamW optimization, four training epochs, and five random seeds.
Table 12. Experimental and hardware configuration.

4.6. Evaluation Metrics

The evaluation combines automatic metrics, mythology-aware metrics, human evaluation, and statistical testing. Perplexity measures language modeling quality and is computed as:
PPL = exp − 1 N ∑ t = 1 N log P ( x t ∣ x < t ) .
A lower value of Equation (26) indicates better next-token prediction.
For summarization, ROUGE-1, ROUGE-2, and ROUGE-L measure lexical overlap with reference summaries [10], while BERTScore measures semantic similarity using contextual embeddings [11]. Entity recall is computed as:
ER = | E summary ∩ E reference | | E reference | .
Equation (27) evaluates whether the generated summary retains the important mythological entities from the reference.
For continuation generation, MAUVE measures the distributional gap between model-generated text and reference text [12]. Distinct-n measures lexical diversity by counting unique n-grams [31], while Self-BLEU measures repetitive similarity among generated samples [32]. Entity consistency is computed as:
EC = | E input ∩ E generated | | E input ∪ E generated | .
Equation (28) checks whether generated text preserves entities from the input without adding unrelated characters.
Diversity is measured as:
Distinct - n = Number of unique n - grams Total number of generated n - grams .
Equation (29) measures lexical diversity as the ratio of unique generated n-grams to the total number of generated n-grams.
To evaluate mythological quality more directly, the study defines the mythological coherence score:
MCS = w 1 EC + w 2 TR + w 3 SA + w 4 NC ,
where E C denotes entity consistency, T R denotes theme retention, S A denotes style alignment, and N C denotes narrative coherence. Equal weights were used for the primary MCS because no validated empirical or expert-derived weighting standard is available for these four mythology-specific dimensions. Assigning w 1 = w 2 = w 3 = w 4 = 0.25 provides a transparent and reproducible default and prevents the score from being designed to favour a particular model strength. The weighting rule was applied consistently to every model and was not tuned using the test set. Alternative component emphasis was examined through the sensitivity analysis in Section 5.5, where each component was omitted separately and the remaining weights were renormalized. A further variant removed both entity consistency and style alignment, the components with the clearest overlap with the auxiliary training objectives. MCS is therefore treated as a composite diagnostic rather than an independent primary outcome and is interpreted together with perplexity, ROUGE, BERTScore, MAUVE, diversity, wrong-entity rate, and blinded human evaluation. MCS was not used for auxiliary-weight selection or checkpoint selection.
TR = | T input ∩ T generated | | T input ∪ T generated | .
Equation (31) measures thematic overlap between the input passage and the generated text. Style alignment is computed as:
S A = 1 − JSD P source ‖ P generated .
Equations (30)–(32) provide a compact diagnostic of mythology-specific output properties. The composite score does not independently establish model superiority because some of its components are related to the auxiliary training objectives. Independent task metrics, human ratings, controlled baselines, and the component-removal analysis are therefore considered alongside MCS.
Narrative coherence was computed using a deterministic sentence-transition coherence procedure. Each generated output was first split into sentences, and sentence-level contextual embeddings were extracted using the same pretrained encoder used for BERTScore evaluation. For an output containing m sentences, adjacent-sentence continuity was calculated as the mean cosine similarity between consecutive sentence embeddings:
C adj = 1 m − 1 ∑ i = 1 m − 1 max 0 , cos ( v i , v i + 1 ) ,
where v i and v i + 1 denote the contextual embeddings of two adjacent generated sentences. To ensure that the generated passage also remained connected to the source passage, a source-anchoring score was computed as the mean maximum cosine similarity between each generated sentence and the sentence embeddings of the input passage:
C src = 1 m ∑ i = 1 m max j max 0 , cos ( v i , u j ) ,
where u j denotes the embedding of the jth source sentence. The final narrative coherence score was computed as
NC = 0.60 C adj + 0.40 C src .
This weighting gives slightly greater importance to local sentence-to-sentence continuity while still checking that the generated text remains anchored to the input passage. The procedure was not trained on the test set and was not used for auxiliary-loss tuning or checkpoint selection. For each generated output, the resulting score was clipped to the interval [ 0 , 1 ] before inclusion in MCS. The same calculation and normalization procedure were applied to every model and evaluation task.
Table 13 summarizes all metrics, their tasks, purposes, and desired direction. The final evaluation uses these metrics together because a single metric cannot fully capture summarization quality, generation diversity, entity preservation, theme consistency, style alignment, and expert-perceived mythological quality.
Table 13. Evaluation metrics used in the study.

5. Results and Discussion

This section assesses MythoBiLLM through language modeling, summarization, cross-dataset generalization, continuation generation, controlled adapter comparisons, MCS component-removal sensitivity, entity consistency, component ablation, robustness analysis, human evaluation, and statistical testing. Lower perplexity, Self-BLEU, and wrong-entity rates indicate better performance, while higher ROUGE, BERTScore, MAUVE, Distinct-n, entity consistency, theme retention, style alignment, MCS, and human scores indicate better performance. MCS is interpreted as a domain-specific diagnostic and not as the sole evidence of model quality.

5.1. Language Modeling Performance

The perplexity results are reported on four Indian mythological test sets in Table 14. The perplexity of the 5-gram language model is the highest with an average of 94.1, which means that a shallow statistical model can only capture the narrative and lexical complexity of the corpus to a limited extent. The baselines of LSTM and BiLSTM-only decrease average perplexity to 49.1 and 43.7, respectively, which shows that sequential memory helps to predict better than n-gram modeling. The perplexity of the transformer baseline is further reduced to 31.6 and perplexity of LLM+LoRA is 23.4. MythoBiLLM obtains the lowest average perplexity of 19.8.
Table 14. Language modeling performance on Indian mythological test sets.
The reduction from 23.4 to 19.8 corresponds to a 15.4% relative decrease in average perplexity. LoRA accounts for the largest initial improvement by adapting the backbone to the vocabulary and discourse distribution of the mythological corpus. The additional decrease obtained by the complete framework is consistent with a combination of recurrent sequence modelling, gated residual fusion, and mythology-aware supervision. The recurrent path can propagate ordered contextual information across the available passage, while the gate can retain the original transformer state when the recurrent update is less useful. Because this comparison contrasts the complete framework with LoRA alone, it does not assign the full reduction to the BiLSTM; the matched controls in Section 5.4 provide the narrower architectural comparison.

5.2. Summarization Results

Table 15 reports the intra-dataset summarization results. MythoBiLLM obtains the highest score for every reported measure. Relative to Qwen3+LoRA, ROUGE-L increases from 0.421 to 0.447, BERTScore from 0.896 to 0.904, and entity recall from 0.759 to 0.821. The comparatively small BERTScore difference suggests that the recent open LLMs already generate semantically fluent summaries. The larger improvement in entity recall shows that the main benefit is concentrated in retaining the characters and narrative participants required by the source passage.
Table 15. Intra-dataset summarization results.
Entity retention has direct importance for mythological summarization because omitting a principal character or transferring an action to another character can change the meaning of the story even when the summary remains fluent. The improvement in entity recall is consistent with the entity-aware objective, while the simultaneous gains in ROUGE-L and BERTScore show that stronger entity preservation was not obtained by sacrificing general summary quality.
Cross-dataset performance is reported in Table 16. The complete framework improves ROUGE-L, BERTScore, entity recall, theme retention, and MCS on each unseen test source. The improvement is observed across epic, Puranic, and Krishna-centred narratives, which reduces the likelihood that the main result is limited to one source text. These experiments support transfer across the evaluated public-domain translations, although they do not establish generalisation to all mythological styles or languages.
Table 16. Cross-dataset summarization results.
The component-level pattern is similar across the unseen texts. BERTScore changes are smaller than the gains in entity recall and theme retention, suggesting that the framework mainly improves constrained narrative faithfulness rather than basic semantic fluency. A plausible explanation is that LoRA adapts the model to the mythological discourse, while the recurrent path preserves ordered context and the auxiliary objectives penalize character loss and stylistic drift. These mechanisms act jointly, so the cross-dataset improvement should be attributed to the complete configuration rather than to one component alone.

5.3. Continuation Generation Results

Table 17 reports continuation-generation quality and diversity. Compared with LLM+LoRA, MythoBiLLM increases MAUVE from 0.642 to 0.693 and Distinct-2 from 0.319 to 0.353, while reducing Self-BLEU from 0.642 to 0.613. The combination of higher MAUVE, higher lexical diversity, and lower repetition is important because an improvement in reference similarity alone could otherwise be obtained through conservative or repetitive generation. The complete framework produces continuations that are closer to the reference distribution without reducing output variety.
Table 17. Continuation generation results on Indian mythological texts.
The generation pattern is consistent with the complementary functions of the model components. LoRA adapts the backbone to mythological vocabulary and discourse, the BiLSTM path propagates ordered information across the available passage, and the fusion gate controls the contribution of the recurrent update at each token. Entity- and style-aware objectives further discourage unsupported characters and stylistic drift. The resulting improvement spans distributional similarity, diversity, repetition, semantic similarity, and mythology-specific coherence, although the full-system comparison cannot uniquely assign each gain to an individual component.

5.4. Controlled Adapter, Context-Length, and Retrieval Comparison

The controlled comparison evaluates whether the BiLSTM contributes beyond LoRA adaptation, additional adapter parameters, a larger context window, and retrieval-based external evidence. All results are reported as mean ± standard deviation over five random seeds.
Table 18 shows that the MLP and BiLSTM configurations are closely parameter matched, with 28.64M and 28.65M trainable parameters, respectively. Relative to the MLP adapter, the BiLSTM adapter increases ROUGE-L from 0.411 to 0.417, entity F1 from 0.724 to 0.738, theme retention from 0.665 to 0.676, and MCS from 0.699 to 0.713. The BiLSTM configuration also exceeds the 4096-token LoRA and retrieval-augmented baselines in MCS, which reach 0.704 and 0.708, respectively.
Table 18. Controlled comparison of adapter, context-length, and retrieval alternatives for mythological text summarization.
The comparison with retrieval is more mixed at the component level. The BiLSTM produces slightly higher ROUGE-L, entity F1, style alignment, and MCS, whereas retrieval produces slightly higher BERTScore and theme retention. This pattern indicates that the recurrent adapter does not dominate every individual measure. Instead, it provides a small but consistent aggregate advantage while retaining a 2048-token context and avoiding dependence on retrieved passages.
Table 19 separates the strengths of the controlled alternatives. The BiLSTM adapter obtains lower perplexity, higher MAUVE, higher Distinct-2, lower Self-BLEU, and a slightly higher MCS than the MLP, longer-context, and RAG configurations. These differences are modest, which is consistent with the fact that the transformer backbone already provides strong contextual modelling.
Table 19. Controlled comparison of adapter, context-length, and retrieval alternatives for mythological continuation generation.
RAG performs better than the BiLSTM-only configuration for entity F1, theme retention, and wrong-entity rate. Retrieved passages provide explicit source evidence and are therefore particularly useful when the required character or theme is present in the retrieval index. The recurrent adapter instead learns a compact representation of sequence order and performs better on language modelling, distributional similarity, and diversity. The two mechanisms capture different information rather than offering interchangeable solutions.
Full MythoBiLLM obtains the strongest overall profile only after recurrent memory is combined with gated fusion and the auxiliary objectives. The difference between the BiLSTM-only and full configurations is therefore best interpreted as an interaction among model components. It does not establish the BiLSTM as the sole cause of the final improvement.

5.5. Sensitivity of MCS to Component Removal

Because entity consistency and style alignment overlap with auxiliary training objectives, the equal-weight MCS may partly reflect dimensions that the complete framework is trained to improve. A component-removal analysis was therefore performed using held-out per-sample values of entity consistency, theme retention, style alignment, and narrative coherence. After removing a component, the remaining weights were renormalized to sum to one. The final variant removes both entity consistency and style alignment and therefore evaluates only theme retention and narrative coherence.
Table 20 reports the sensitivity of MCS to the removal of individual components and to the joint removal of entity consistency and style alignment.
Table 20. Sensitivity of the mythological coherence score to component removal.
Full MythoBiLLM retains the highest score under all six weighting variants for both tasks. When entity consistency and style alignment are removed together, it reaches 0.751 for summarization and 0.731 for continuation generation, compared with 0.715 and 0.716 for the BiLSTM adapter. This result shows that the comparative advantage of the complete framework is not entirely produced by the two components with the clearest overlap with its auxiliary objectives.
The ordering among the controlled alternatives is not completely invariant. The BiLSTM adapter exceeds the parameter-matched MLP and long-context LoRA configurations under every tested variant. It also exceeds RAG in ten of the twelve task–variant comparisons. When narrative coherence is omitted, RAG slightly exceeds the BiLSTM adapter by 0.002 for summarization and 0.003 for continuation generation. This small reversal indicates that the individual MCS components emphasize different strengths and that MCS should not be interpreted as a standalone proof of architectural superiority.
The sensitivity analysis reduces, but does not eliminate, the circularity concern. Training objectives can indirectly influence theme and narrative behavior even when their corresponding evaluation components are excluded. For this reason, the main interpretation also considers perplexity, ROUGE-L, BERTScore, MAUVE, diversity, wrong-entity rate, controlled baselines, and blinded human ratings.

5.6. Entity Consistency and Theme Retention Analysis

Table 21 separates the effects on character preservation and thematic continuity. Adding the BiLSTM adapter increases entity F1 from 0.711 to 0.738 and reduces the wrong-entity rate from 0.122 to 0.101. The larger change occurs after the entity-aware objective is added, with entity F1 increasing to 0.783 and the wrong-entity rate decreasing to 0.071. Full MythoBiLLM reaches an entity F1 of 0.812, theme retention of 0.752, and a wrong-entity rate of 0.052. This progression is consistent with recurrent memory providing a modest sequence-level contribution and the targeted objective providing stronger supervision against unsupported character introduction.
Table 21. Entity consistency and theme retention results.
Relative to LLM+LoRA, the wrong-entity rate decreases from 0.122 to 0.052, corresponding to a 57.4% relative reduction in the reported error rate. This change has direct practical relevance because an unsupported character can alter kinship, responsibility, allegiance, or the causal structure of a mythological passage. Figure 8 provides information not available in the aggregate table by showing that the improvement extends across named characters and broader groups such as sages, kings, warriors, deities, and demons.
Figure 8. Entity consistency heatmap across major mythological character groups.

5.7. Ablation Study

Table 22 shows that the components contribute at different stages. LoRA produces the largest increase, raising MCS from 0.574 to 0.689, which confirms that domain adaptation is the primary source of improvement over the unadapted backbone. The BiLSTM adapter raises MCS to 0.713, while the parameter-matched MLP reaches 0.699 in the controlled comparison. The remaining difference is compatible with a modest benefit from recurrent sequence propagation rather than additional parameter capacity alone.
Table 22. Ablation study of the proposed MythoBiLLM framework.
The auxiliary objectives produce more targeted changes. The entity-aware objective increases entity consistency and reduces unsupported entity introduction, whereas the style-aware objective has its largest effect on style alignment and theme retention. The complete configuration benefits from these complementary effects rather than from uniform improvement produced by a single component. The ablation pattern therefore supports a layered interpretation: LoRA provides domain adaptation, the recurrent adapter adds ordered contextual bias, and the auxiliary objectives direct the model toward mythology-specific constraints.

5.8. Robustness Analysis

Table 23 evaluates conditions that place different demands on narrative memory. The largest gains occur for character-heavy prompts ( + 0.086 ) and moral-conflict prompts ( + 0.080 ) . These cases contain multiple character roles, duties, vows, or competing moral constraints, making them more dependent on ordered contextual relations than a simple descriptive prompt. The pattern is therefore consistent with the complete framework being most useful when the input contains dense narrative dependencies.
Table 23. Robustness testing under different mythological input conditions.
The smaller gain for short-context inputs ( + 0.045 ) shows that the framework cannot recover information that is absent from the prompt. The stronger gain under long-context input ( + 0.065 ) suggests that the additional modelling path benefits when more narrative evidence is available. Improvements under unseen-text and altered-style conditions further show that the model is not restricted to one prompt formulation. For educational and digital-humanities use, this stability is relevant because source passages vary considerably in length, style, number of characters, and moral complexity.

5.9. Human Evaluation

Automatic metrics do not fully capture mythological correctness, moral continuity, or the acceptability of a generated narrative. A blinded human evaluation was therefore conducted on 100 randomly selected outputs. Model identities were concealed, and each output was rated for correctness, coherence, style, theme preservation, fluency, and hallucination control using a five-point Likert scale. Table 24 reports the mean ratings.
Table 24. Human evaluation results.
The difference in fluency between MythoBiLLM and Qwen3+LoRA is relatively small, with scores of 4.32 and 4.25. Larger differences appear for coherence, theme preservation, and hallucination control, where MythoBiLLM scores 4.28, 4.19, and 4.13 compared with 3.87, 3.80, and 3.77. This concentration of improvement agrees with the automatic evaluation: recent LLMs already produce readable text, while the principal benefit of the complete framework lies in maintaining characters, themes, and narrative constraints. Human assessment therefore provides complementary evidence rather than merely repeating the lexical and semantic metrics.

5.10. Statistical Significance Analysis

The experiments were repeated across five random seeds. The mean score across K runs is:
μ = 1 K ∑ i = 1 K x i .
The standard deviation is:
σ = 1 K − 1 ∑ i = 1 K ( x i − μ ) 2 .
Equations (33) and (34) summarize the variation across runs. Paired bootstrap resampling was used to estimate significance because it can evaluate paired system outputs without assuming a normal distribution [33]. Bootstrap testing was performed with 1000 paired resamples over the evaluated outputs, and a result was considered statistically significant when p < 0.05 . Effect size was reported using Cohen’s d [34].
Table 25 reports statistically significant differences for the tested complete-framework comparisons at p < 0.05 . These tests support differences between full MythoBiLLM and the listed baselines under the evaluated protocol. They do not isolate the BiLSTM as the cause of those differences because the full configuration also includes LoRA adaptation, gated fusion, and auxiliary objectives. The MCS significance result is interpreted cautiously because MCS contains dimensions related to the training objectives; the independent ROUGE-L, BERTScore, human-rating, perplexity, MAUVE, and diversity results provide complementary evidence.
Table 25. Statistical significance comparison between MythoBiLLM and baseline models.

5.11. Qualitative Output Analysis

Table 26 illustrates the error patterns represented by the quantitative measures. The baseline continuations remain fluent but may introduce an unsupported adviser, weaken the relation between a sage and a king, or omit an earlier vow. These errors preserve surface readability while changing the narrative structure. The MythoBiLLM examples retain the relevant characters, moral relation, and earlier narrative commitment more consistently. The examples therefore clarify why entity consistency, theme retention, coherence, and hallucination-control ratings improve more strongly than general fluency.
Table 26. Qualitative comparison of generated mythological continuations.

5.12. Discussion

The performance pattern reflects complementary contributions rather than a single dominant mechanism. LoRA produces the largest initial gain by adapting the pretrained model to the lexical, stylistic, and discourse distribution of the mythological corpus. The BiLSTM adapter then introduces an ordered recurrent representation that differs from both transformer attention and a position-wise MLP. Its advantage over the parameter-matched MLP, longer-context LoRA, and RAG configurations is present but modest. The fusion gate allows this recurrent representation to modify the transformer state selectively rather than replacing it at every token.
The auxiliary objectives explain much of the difference between the BiLSTM-only configuration and full MythoBiLLM. Entity-aware training directly penalizes missing or unsupported characters, while style-aware training discourages shifts away from the source narrative style. The ablation results match these functions: entity supervision has its clearest effect on entity consistency and wrong-entity introduction, whereas style supervision has a larger effect on style alignment and theme retention. The complete model performs best because these objectives act on different error types.
The comparison with retrieval clarifies that recurrent memory and external evidence solve different problems. RAG performs well when a relevant training passage supplies explicit character or theme information. The BiLSTM adapter instead learns ordered relationships from the current sequence and performs better on perplexity, MAUVE, and diversity. A hybrid design that combines retrieval with recurrent memory may therefore be more useful than treating the two mechanisms as competitors.
The MCS sensitivity analysis shows that the aggregate ranking is not produced only by entity consistency and style alignment. Full MythoBiLLM remains the highest-scoring tested system when either component is omitted and when both are removed together. At the same time, the small reversal between RAG and the BiLSTM adapter when narrative coherence is omitted confirms that the composite score depends on its component definition. MCS is therefore most useful as a compact diagnostic interpreted alongside task metrics, controlled comparisons, and human assessment.
The practical importance of the improvement is concentrated in domain-specific errors. Relative to LLM+LoRA, the wrong-entity rate decreases by 57.4%, while the largest robustness gains occur for character-heavy and moral-conflict prompts. These changes correspond to fewer unsupported character insertions, stronger preservation of moral and thematic relations, and better continuity between earlier commitments and later events. Such properties are relevant for educational summaries, digital-humanities analysis, corpus exploration, and assisted preparation of mythological content, where a fluent but incorrectly attributed event can be more harmful than a minor stylistic imperfection.
The model should nevertheless be used as an assistive system rather than an authoritative source. The experiments cover one compact backbone, English public-domain translations, a limited expert-annotated subset, and a finite set of mythological works. Historical variants, translation choices, regional traditions, and interpretive differences may not be represented fully. Expert verification remains necessary when generated material is used for scholarship, cultural interpretation, or educational publication.

6. Conclusions

MythoBiLLM combines a LoRA-adapted Llama 3.2 3B-Instruct backbone, a gated BiLSTM narrative-memory adapter, and mythology-aware auxiliary objectives for summarization and continuation generation. The experiments used 3,684,838 word-level tokens and 6057 passages derived from public-domain English translations of the Ramayana, Mahabharata, Bhagavad-Gita, Vishnupuranam, Harivamsha, Hindu Tales, and Indian Myth and Legend.
Within this corpus and experimental protocol, the complete configuration reduces average perplexity from 23.4 for LLM+LoRA to 19.8, obtains a summarization MCS of 0.762, and reaches a continuation-generation MCS of 0.744. It also achieves an entity F1 of 0.812 and reduces the wrong-entity rate from 0.122 to 0.052. Improvements in ROUGE-L, BERTScore, MAUVE, diversity, human ratings, and cross-dataset evaluation provide evidence beyond the composite MCS.
The MCS sensitivity analysis shows that the full configuration remains the highest-scoring tested system when individual components are removed. When entity consistency and style alignment are excluded together, it retains scores of 0.751 for summarization and 0.731 for continuation generation. This result reduces concern that the overall ranking is produced only by dimensions directly related to the auxiliary objectives. Nevertheless, MCS remains a diagnostic composite and is not treated as independent evidence by itself.
The controlled comparisons provide limited rather than decisive evidence for the BiLSTM mechanism. The BiLSTM adapter reaches an MCS of 0.713, compared with 0.699 for the parameter-matched MLP, 0.704 for long-context LoRA, and 0.708 for RAG. These differences indicate a modest complementary contribution under the tested conditions. The larger improvement of full MythoBiLLM cannot be attributed solely to the BiLSTM because the complete system also includes LoRA adaptation, gated fusion, and entity-, style-, and task-aware objectives.
The findings are limited to one compact LLM backbone, English public-domain translations, a relatively small expert-annotated subset, and the selected model and evaluation settings. They do not establish universal superiority of BiLSTM adapters over transformer-only, longer-context, feed-forward, or retrieval-based alternatives.
Future research should proceed in four specific directions. First, multilingual corpora should be constructed for Sanskrit, Hindi, Tamil, Bengali, and other Indian languages using source-level separation and expert verification of translated or parallel passages. Second, the same controlled protocol should be applied to larger open LLMs and additional parameter-matched adapters, including unidirectional recurrent, convolutional, state-space, and attention-based memory modules. Third, hybrid retrieval–memory systems should be tested to determine whether explicit retrieved evidence and recurrent sequence representations provide complementary gains on long documents. Fourth, the evaluation framework should be validated using independently constructed external corpora, larger blinded expert panels, and expert-derived or empirically calibrated MCS weighting schemes. These extensions would clarify the generality of the current findings and support more reliable use across languages, textual traditions, and narrative tasks.

Author Contributions

Conceptualization, S.B., S.Y. and S.F.A.R.; methodology, S.B.; software, S.B.; validation, S.B., S.Y. and S.F.A.R.; formal analysis, S.B. and S.Y.; investigation, S.B.; data curation, S.B.; writing—original draft preparation, S.B.; writing—review and editing, S.B., S.Y. and S.F.A.R.; visualization, S.B.; supervision, S.Y. and S.F.A.R. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Ethical review and approval were waived by the K.R. Mangalam University because the study involved anonymous evaluation of model-generated textual outputs and did not collect sensitive, clinical, intervention-related, or personally identifiable information.

Data Availability Statement

The data and supporting files presented in this study are openly available in Zenodo at https://doi.org/10.5281/zenodo.20697625. These data were derived from public-domain Indian mythological texts obtained through Project Gutenberg, as described in the manuscript.

Acknowledgments

The authors acknowledge Multimedia University, Melaka, Malaysia, for institutional support. The authors also acknowledge the publicly accessible source repositories and benchmark providers used in this study.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.N.; Kaiser, Ł.; Polosukhin, I. Attention is all you need. In Proceedings of the 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA, 4–9 December 2017; Volume 30. [Google Scholar]
  2. Ji, Z.; Lee, N.; Frieske, R.; Yu, T.; Su, D.; Xu, Y.; Ishii, E.; Bang, Y.J.; Madotto, A.; Fung, P. Survey of hallucination in natural language generation. ACM Comput. Surv. 2023, 55, 248. [Google Scholar] [CrossRef] [Scilit]
  3. Gururangan, S.; Marasović, A.; Swayamdipta, S.; Lo, K.; Beltagy, I.; Downey, D.; Smith, N.A. Don’t stop pretraining: Adapt language models to domains and tasks. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, Online, 5–10 July 2020; pp. 8342–8360. [Google Scholar]
  4. Hu, E.J.; Shen, Y.; Wallis, P.; Allen-Zhu, Z.; Li, Y.; Wang, S.; Wang, L.; Chen, W. LoRA: Low-rank adaptation of large language models. In Proceedings of the Tenth International Conference on Learning Representations (ICLR 2022), Virtual Event, 25–29 April 2022. [Google Scholar]
  5. Hochreiter, S.; Schmidhuber, J. Long short-term memory. Neural Comput. 1997, 9, 1735–1780. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  6. Schuster, M.; Paliwal, K.K. Bidirectional recurrent neural networks. IEEE Trans. Signal Process. 1997, 45, 2673–2681. [Google Scholar] [CrossRef] [Scilit]
  7. Grattafiori, A.; Dubey, A.; Jauhri, A.; Pandey, A.; Kadian, A.; Al-Dahle, A.; Letman, A.; Mathur, A.; Schelten, A.; Vaughan, A.; et al. The Llama 3 Herd of Models. arXiv 2024, arXiv:2407.21783. [Google Scholar]
  8. Gemma Team. Gemma 3 Technical Report. arXiv 2025, arXiv:2503.19786. [Google Scholar]
  9. Yang, A.; Li, A.; Yang, B.; Zhang, B.; Hui, B.; Zheng, B.; Yu, B.; Gao, C.; Huang, C.; Lv, C.; et al. Qwen3 technical report. arXiv 2025, arXiv:2505.09388. [Google Scholar]
  10. Lin, C.Y. Rouge: A package for automatic evaluation of summaries. In Proceedings of the Text Summarization Branches Out; Association for Computational Linguistics: Barcelona, Spain, 2004; pp. 74–81. [Google Scholar]
  11. Zhang, T.; Kishore, V.; Wu, F.; Weinberger, K.Q.; Artzi, Y. BERTScore: Evaluating Text Generation with BERT. In Proceedings of the Eighth International Conference on Learning Representations (ICLR 2020), Virtual Event, 26 April–1 May 2020. [Google Scholar]
  12. Pillutla, K.; Swayamdipta, S.; Zellers, R.; Thickstun, J.; Welleck, S.; Choi, Y.; Harchaoui, Z. Mauve: Measuring the gap between neural text and human text using divergence frontiers. In Proceedings of the 35th International Conference on Neural Information Processing Systems, Online, 6–14 December 2021; Volume 34, pp. 4816–4828. [Google Scholar]
  13. Gorman, R. Morphosyntactic annotation in literary stylometry. Information 2024, 15, 211. [Google Scholar] [CrossRef] [Scilit]
  14. He, X.; Lashkari, A.H.; Vombatkere, N.; Sharma, D.P. Authorship attribution methods, challenges, and future research directions: A comprehensive survey. Information 2024, 15, 131. [Google Scholar] [CrossRef] [Scilit]
  15. Yang, L.; Wang, G.; Wang, H. Reimagining literary analysis: Utilizing artificial intelligence to classify modernist French poetry. Information 2024, 15, 70. [Google Scholar] [CrossRef] [Scilit]
  16. Vargas-Solar, G. Processing the Narrative: Innovative Graph Models and Queries for Textual Content Knowledge Extraction. Electronics 2024, 13, 3688. [Google Scholar] [CrossRef] [Scilit]
  17. Han, S.; Wang, M.; Zhang, J.; Li, D.; Duan, J. A review of large language models: Fundamental architectures, key technological evolutions, interdisciplinary technologies integration, optimization and compression techniques, applications, and challenges. Electronics 2024, 13, 5040. [Google Scholar] [CrossRef] [Scilit]
  18. Peykani, P.; Ramezanlou, F.; Tanasescu, C.; Ghanidel, S. Large language models: A structured taxonomy and review of challenges, limitations, solutions, and future directions. Appl. Sci. 2025, 15, 8103. [Google Scholar] [CrossRef] [Scilit]
  19. He, Y.; Zhu, X.; Li, D.; Wang, H. Enhancing large language models for specialized domains: A two-stage framework with parameter-sensitive LoRA fine-tuning and chain-of-thought RAG. Electronics 2025, 14, 1961. [Google Scholar] [CrossRef] [Scilit]
  20. Repede, S.E.; Brad, R. LLaMA 3 vs. state-of-the-art large language models: Performance in detecting nuanced fake news. Computers 2024, 13, 292. [Google Scholar]
  21. Abou Baker, N.; Rohrschneider, D.; Handmann, U. Parameter-efficient fine-tuning of large pretrained models for instance segmentation tasks. Mach. Learn. Knowl. Extr. 2024, 6, 2783–2807. [Google Scholar] [CrossRef] [Scilit]
  22. Kazlaris, I.; Antoniou, E.; Diamantaras, K.; Bratsas, C. From illusion to insight: A taxonomic survey of hallucination mitigation techniques in LLMs. AI 2025, 6, 260. [Google Scholar] [CrossRef] [Scilit]
  23. Dabre, R.; Shrotriya, H.; Kunchukuttan, A.; Puduppully, R.; Khapra, M.M.; Kumar, P. IndicBART: A pre-trained model for indic natural language generation. In Proceedings of the Findings of the Association for Computational Linguistics: ACL 2022, Dublin, Ireland, 22–27 May 2022; pp. 1849–1863. [Google Scholar]
  24. Cohen, J. A coefficient of agreement for nominal scales. Educ. Psychol. Meas. 1960, 20, 37–46. [Google Scholar] [CrossRef] [Scilit]
  25. Radford, A.; Wu, J.; Child, R.; Luan, D.; Amodei, D.; Sutskever, I. Language Models Are Unsupervised Multitask Learners. Technical Report. OpenAI. 2019. Available online: https://cdn.openai.com/better-language-models/language_models_are_unsupervised_multitask_learners.pdf (accessed on 20 July 2026).
  26. Black, S.; Biderman, S.; Hallahan, E.; Anthony, Q.; Gao, L.; Golding, L.; He, H.; Leahy, C.; McDonell, K.; Phang, J.; et al. Gpt-neox-20b: An open-source autoregressive language model. In Proceedings of the BigScience Episode# 5–Workshop on Challenges & Perspectives in Creating Large Language Models, Virtual Event, 27 May 2022; pp. 95–136. [Google Scholar]
  27. Raffel, C.; Shazeer, N.; Roberts, A.; Lee, K.; Narang, S.; Matena, M.; Zhou, Y.; Li, W.; Liu, P.J. Exploring the limits of transfer learning with a unified text-to-text transformer. J. Mach. Learn. Res. 2020, 21, 1–67. [Google Scholar]
  28. Lewis, M.; Liu, Y.; Goyal, N.; Ghazvininejad, M.; Mohamed, A.; Levy, O.; Stoyanov, V.; Zettlemoyer, L. BART: Denoising sequence-to-sequence pre-training for natural language generation, translation, and comprehension. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, Online, 5–10 July 2020; pp. 7871–7880. [Google Scholar]
  29. Wolf, T.; Debut, L.; Sanh, V.; Chaumond, J.; Delangue, C.; Moi, A.; Cistac, P.; Rault, T.; Louf, R.; Funtowicz, M.; et al. Transformers: State-of-the-art natural language processing. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: System Demonstrations, Online, 16–20 November 2020; pp. 38–45. [Google Scholar]
  30. Loshchilov, I.; Hutter, F. Decoupled Weight Decay Regularization. In Proceedings of the International Conference on Learning Representations, New Orleans, LA, USA, 6–9 May 2019. [Google Scholar]
  31. Li, J.; Galley, M.; Brockett, C.; Gao, J.; Dolan, W.B. A diversity-promoting objective function for neural conversation models. In Proceedings of the 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, San Diego, CA, USA, 12–17 June 2016; pp. 110–119. [Google Scholar]
  32. Zhu, Y.; Lu, S.; Zheng, L.; Guo, J.; Zhang, W.; Wang, J.; Yu, Y. Texygen: A benchmarking platform for text generation models. In Proceedings of the 41st International ACM SIGIR Conference on Research & Development in Information Retrieval, Ann Arbor, MI, USA, 8–12 July 2018; pp. 1097–1100. [Google Scholar]
  33. Efron, B.; Tibshirani, R.J. An Introduction to the Bootstrap; Chapman and Hall/CRC: Boca Raton, FL, USA, 1994. [Google Scholar]
  34. Cohen, J. Statistical Power Analysis for the Behavioral Sciences; Routledge: New York, NY, USA, 2013. [Google Scholar]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.