AvinabhDutta-Dev commited on
Commit
4ee5615
·
verified ·
1 Parent(s): 200fb37

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +140 -0
README.md CHANGED
@@ -1,3 +1,143 @@
1
  ---
 
 
2
  license: mit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ language:
3
+ - as
4
  license: mit
5
+ library_name: keras
6
+ tags:
7
+ - sentiment-analysis
8
+ - text-classification
9
+ - assamese
10
+ - cnn
11
+ - billstm
12
+ - tensorflow
13
+ - keras
14
+ metrics:
15
+ - accuracy
16
+ - f1
17
+ - precision
18
+ - recall
19
+ - roc_auc
20
+ model-index:
21
+ - name: assamese-sentiment-cnn-bilstm
22
+ results:
23
+ - task:
24
+ type: text-classification
25
+ name: Sentiment Analysis
26
+ dataset:
27
+ name: Assamese Movie & Media Reviews
28
+ type: assamese-reviews
29
+ metrics:
30
+ - name: Accuracy
31
+ type: accuracy
32
+ value: 0.9305
33
+ - name: Macro F1
34
+ type: f1
35
+ value: 0.9238
36
+ - name: Macro Precision
37
+ type: precision
38
+ value: 0.9341
39
+ - name: Macro Recall
40
+ type: recall
41
+ value: 0.9160
42
+ - name: ROC-AUC
43
+ type: roc_auc
44
+ value: 0.9787
45
  ---
46
+
47
+ # Assamese Sentiment Analysis — Custom CNN-BiLSTM Baseline
48
+
49
+ This repository contains a custom deep learning baseline model combining a 1D Convolutional Neural Network with a Bidirectional LSTM (**CNN-BiLSTM**), optimized for binary sentiment analysis on Assamese textual reviews. It serves as a rigorous architectural baseline to evaluate the performance benefits of pre-trained transformer language models.
50
+
51
+ ---
52
+
53
+ ## Model Summary
54
+
55
+ * **Model Architecture:** Custom CNN + BiLSTM (Keras / TensorFlow)
56
+ * **Task:** Binary Sentiment Classification
57
+ * **Language:** Assamese (`as`)
58
+ * **Developer:** Avinabh Dutta
59
+ * **Primary Framework:** TensorFlow & Keras
60
+ * **Top Performance:** **93.05% Accuracy** | **0.9238 Macro F1**
61
+
62
+ ---
63
+
64
+ ## Architecture Details
65
+
66
+ The custom neural network combines local feature extraction with long-range contextual sequence dependencies through a sequential multi-layer layout:
67
+
68
+ * **Embedding Layer:** Transforms input token matrices into dense vector representations using a **300-dimensional** embedding space.
69
+ * **1D Convolutional Layer:** Employs **128 filters** with a kernel size of **5** to actively extract local semantic patterns and feature maps.
70
+ * **Max Pooling Layer:** Applied immediately after convolution to compress dimensionality and retain the most informative signals.
71
+ * **BiLSTM Layer:** Utilizes **64 hidden units** structured bidirectionally to process sequence dynamics from both forward and backward directions concurrently.
72
+ * **Dropout Layer:** Implements a strict dropout rate of **0.5** directly prior to final classification to mitigate overfitting.
73
+ * **Output Layer:** Features a single Dense layer driven by a **Sigmoid** activation function for binary sentiment distribution mapping.
74
+
75
+ ---
76
+
77
+ ## Performance & Evaluation Metrics
78
+
79
+ The CNN-BiLSTM baseline yielded robust deep learning results, outperforming traditional machine learning methods and establishing a high threshold before transformer integration:
80
+
81
+ | Metric | Score | Percentage / Value |
82
+ | :--- | :--- | :--- |
83
+ | **Accuracy** | `0.9305` | **93.05%** |
84
+ | **Macro F1-Score** | `0.9238` | **92.38%** |
85
+ | **Macro Precision** | `0.9341` | **93.41%** |
86
+ | **Macro Recall** | `0.9160` | **91.60%** |
87
+ | **ROC-AUC** | `0.9787` | **97.87%** |
88
+ | **Cohen's Kappa** | `0.8477` | **0.8477** |
89
+
90
+ ---
91
+
92
+ ## Dataset Overview
93
+
94
+ The dataset consists of localized social media commentaries, media assessments, and audience reviews covering drama (নাটক) and cultural content in Assamese.
95
+
96
+ * **Feature Representation:** Tracks linguistic subtext from Assamese textual tokens, including character length, word density, punctuation patterns, and emoji occurrences.
97
+ * **Target Classes:** Binary Classification (`0`: Negative, `1`: Positive).
98
+
99
+ ---
100
+
101
+ ## How to Use
102
+
103
+ Because this is a custom Keras architecture, you can load and use the saved model weights using TensorFlow:
104
+
105
+ ```python
106
+ import tensorflow as tf
107
+ from tensorflow.keras.models import load_model
108
+
109
+ # Load the saved model file (.h5 or SavedModel format)
110
+ model = load_model("assamese_sentiment_cnn_bilstm.h5")
111
+
112
+ # Example inference workflow requires tokenization/padding pipeline matching training setup
113
+ # predictions = model.predict(padded_sequences)
114
+ ```
115
+
116
+ ---
117
+
118
+ ## Training Hyperparameters
119
+
120
+ Training optimization and regularizations were tightly managed across the deep learning baseline execution sequence:
121
+
122
+ | Parameter | Value |
123
+ | :--- | :--- |
124
+ | **Max Epochs** | `15` (with Early Stopping enabled) |
125
+ | **Batch Size** | `32` |
126
+ | **Loss Function** | Binary Crossentropy |
127
+ | **Activation (Output)** | Sigmoid |
128
+ | **Optimization Strategy** | Early Stopping on Validation Loss / Macro F1 |
129
+
130
+ ---
131
+
132
+ ## Limitations & Edge Cases
133
+
134
+ * **Lack of Pre-trained Weights:** Unlike transformer models (MuRIL, IndicBERT, XLM-R) which leverage massive pre-existing language knowledge, this model must learn all semantic distributions entirely from scratch using only the local training dataset.
135
+ * **Complex Semantic Shifts:** While it captures local phrases and explicit sentiment words effectively, it exhibits limited capacity for deep contextual abstraction, struggling with complex sentence structures, implicit sentiment reversals, and subtle contextual shifts compared to transformer-based alternatives.
136
+
137
+ ---
138
+
139
+ ## Citation & Contact
140
+
141
+ If you use this model or refer to this work in your research, please link back to this Hugging Face repository or the GitHub project repository.
142
+ If you use this model, please cite the associated preprint:
143
+ > Dev, C., Baishya, B., Dey, N., Dutta, A., & Dutta, S. (2026). *Sentiment Analysis of Assamese Reviews using Transfer Learning Models*. Preprint. https://doi.org/10.2139/ssrn.6357982