Merlin041 commited on
Commit
a1c0645
·
verified ·
1 Parent(s): dfad732

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +20 -13
README.md CHANGED
@@ -56,24 +56,31 @@ All features are saved as memory-mapped Numpy binary files (`.npy`), allowing th
56
 
57
  ---
58
 
59
- ## 🚀 Downstream Classification Benchmark (Model v17)
60
 
61
- We trained an LSTM-Attention hybrid head on top of these frozen features to evaluate their quality:
62
 
63
- ### Classifier Architecture (Model v17)
64
- - **Input**: Frozen DistilBERT Features (768-dim)
65
- - **Encoder**: 2-layer Bidirectional LSTM (`hidden_dim=256`, `dropout=0.3`, total 4.67M trainable parameters)
66
- - **Aggregation**: Multi-Head Attention (8 heads) followed by Concat Pooling (mean + max pooling)
67
- - **Output**: Fully Connected (FC) layer with Label Smoothing (0.05)
 
 
 
 
 
68
 
69
- ### Results
70
- - **Best Test Accuracy**: **86.86%**
71
- - **Best Test F1-Score**: **86.99%**
72
- - **Training Time**: ~45 seconds per epoch on a local GPU.
73
 
74
- ### Training curves and confusion matrix:
75
 
76
- #### 📈 Training Curves
 
 
 
 
77
  ![Training Curves](v17_training_curves.png)
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
  ![Training Curves](v17_training_curves.png)
85
 
86
  #### 🎯 Confusion Matrix