Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -56,24 +56,31 @@ All features are saved as memory-mapped Numpy binary files (`.npy`), allowing th
|
|
| 56 |
|
| 57 |
---
|
| 58 |
|
| 59 |
-
##
|
| 60 |
|
| 61 |
-
|
| 62 |
|
| 63 |
-
|
| 64 |
-
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 68 |
|
| 69 |
-
###
|
| 70 |
-
|
| 71 |
-
- **Best Test F1-Score**: **86.99%**
|
| 72 |
-
- **Training Time**: ~45 seconds per epoch on a local GPU.
|
| 73 |
|
| 74 |
-
|
| 75 |
|
| 76 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 77 |

|
| 78 |
|
| 79 |
#### 🎯 Confusion Matrix
|
|
|
|
| 56 |
|
| 57 |
---
|
| 58 |
|
| 59 |
+
## 🏆 Project Benchmarks & Leaderboard
|
| 60 |
|
| 61 |
+
This project involved an iterative design of multiple classification models. Below is the complete leaderboard of all runs, showing that the overall project reached a peak performance of **91.42% Accuracy** (SOTA-level for custom LSTMs):
|
| 62 |
|
| 63 |
+
| Version | Model Architecture | Key Techniques | Trainable Params | Best Test Accuracy | Best Test F1 |
|
| 64 |
+
|---|---|---|---|---|---|
|
| 65 |
+
| **v16** | 3-Layer LSTM (Pretrained) | **ULMFiT-style LM Pretraining (50K Unsupervised) + Gradual Unfreeze** | 8.4M | **91.42%** | **91.58%** |
|
| 66 |
+
| **v18** | Bidirectional LM (Pretrained) | Forward+Backward LM pretrain + combined classifier + FGM | - | **91.15%** | - |
|
| 67 |
+
| **v9** | 3-Layer BiLSTM + Attn | Vocab=20K, embed=128, hidden=256, max_len=300 | 12.5M | **90.13%** | - |
|
| 68 |
+
| **v13** | AWD-LSTM + Multi-Head Attn | Variational Dropout + Recurrent Weight Dropout | 12.5M | **90.12%** | 90.19% |
|
| 69 |
+
| **v15** | BiLSTM + MHA + Concat Pool | Adversarial Training (FGM, epsilon=0.5) | 6.2M | **90.12%** | 90.18% |
|
| 70 |
+
| **v17** | **DistilBERT (Frozen) + BiLSTM** | **Contextual Feature Extractor (This Cache)** | 4.7M | **86.86%** | **86.99%** |
|
| 71 |
+
| **v5** | BiLSTM + Attention | Single-layer LSTM + Dot-product Attention | 1.3M | **88.38%** | - |
|
| 72 |
+
| **v2** | BiLSTM + Grad Clip | Bidirectional + Gradient clipping max_norm=1.0 | 1.3M | **81.39%** | 79.86% |
|
| 73 |
|
| 74 |
+
### Why v17 (BERT Feature Cache) achieved 86.86%
|
| 75 |
+
The feature cache provided here (v17) uses a **completely frozen** DistilBERT encoder. Because the weights of the DistilBERT model are not fine-tuned on the IMDb reviews (to save GPU memory and prevent overfitting during training), it acts as a general feature extractor. Combined with a BiLSTM + Multi-Head Attention classifier head, it reaches a solid **86.86% Accuracy** in less than 45 seconds of training per epoch.
|
|
|
|
|
|
|
| 76 |
|
| 77 |
+
To reach **91%+**, language model pre-training (such as in **v16** and **v18**) on the 50,000 unsupervised IMDb reviews, or fully fine-tuning the transformer layers, is required.
|
| 78 |
|
| 79 |
+
---
|
| 80 |
+
|
| 81 |
+
## 📈 v17 Classifier Training Curves & Confusion Matrix
|
| 82 |
+
|
| 83 |
+
#### 📊 Training Curves
|
| 84 |

|
| 85 |
|
| 86 |
#### 🎯 Confusion Matrix
|