A deep learning project comparing BiLSTM and Multi-Filter CNN architectures for sentiment classification of student feedback. Built as a group assignment for SAIA 2153 – Deep Learning, Universiti Teknologi Malaysia.
Two models are trained and evaluated across two datasets:
- BiLSTM – Bidirectional LSTM with spatial dropout and learned embeddings
- Multi-Filter CNN – Kim (2014)-inspired CNN with parallel convolutional filters and optional pre-trained GloVe embeddings
Sentiments are classified into three categories: Negative, Neutral, and Positive.
| Model | Dataset | Val Accuracy |
|---|---|---|
| BiLSTM | Synthetic (Dataset A) | 92.50% |
| BiLSTM | Real-world (Dataset B) | 67.57% |
| CNN (GloVe) | Synthetic (Dataset A) | 75.00% |
| CNN (GloVe) | Real-world (Dataset B) | 89.19% |
The CNN with GloVe transfer learning generalises better on noisy real-world data, while BiLSTM excels on clean, structured synthetic data.
sentiment-analysis/
├── SentimentAnalysis.ipynb # BiLSTM & CNN Notebook
├── student-feedback-sentiment-analysis.csv # Dataset A (upload manually)
├── glove.2024.wikigiga.100d/ # GloVe embeddings folder (see setup)
│ └── wiki_giga_2024_100_MFT20_vectors_seed_2024_alpha_0.75_eta_0.05.050_combined.txt
├── requirements.txt
└── README.md
Dataset B (
brarajit18/student-feedback-dataset) is downloaded automatically viakagglehub— no manual upload needed.
git clone https://github.com/wanaalif/student-feedback-sentiment-analysis.git
cd student-feedback-sentiment-analysispip install -r requirements.txtPlace student-feedback-sentiment-analysis.csv in the root of the project directory.
It is sourced from GoMask.ai Marketplace and is not included in this repo.
Download the GloVe file and place it under glove.2024.wikigiga.100d/. Update GLOVE_PATH in the notebook if your path differs. If the file is not found, the CNN will fall back to learning embeddings from scratch.
Dataset B is fetched via kagglehub. Make sure your Kaggle API key is configured:
# Place kaggle.json in ~/.kaggle/
# or set environment variables:
export KAGGLE_USERNAME=your_username
export KAGGLE_KEY=your_api_keyOpen and run either notebook top-to-bottom in Jupyter or any compatible environment.
See requirements.txt. Main libraries: TensorFlow 2.x, scikit-learn, pandas, numpy, matplotlib, seaborn, kagglehub.
- Hochreiter, S., & Schmidhuber, J. (1997). Long short-term memory. Neural Computation, 9(8), 1735–1780.
- Kim, Y. (2014). Convolutional neural networks for sentence classification. EMNLP 2014.
- Rajit, B. (2022). Student Feedback Dataset. Kaggle. https://www.kaggle.com/datasets/brarajit18/student-feedback-dataset
- GoMask. (2024). Student Feedback Sentiment Analysis Dataset. https://gomask.ai