EXPLORING NLP AND
LLMS: A TECHNICAL
LEARNING JOURNEY
PR A NAV R MA L L I A
DEPARTMENT O F C O MPUTER SC I ENC E
UNDER THE G UI DA NC E O F DR . J I MSO N MATHEW
• Knowledge graphs
• MAMS for ABSA and TF-IDF vs
BERT-CapsNet accuracy
comparison
• Emotion classification using
SemEval dataset(multiple
AGENDA emotions)
• Twitter sentiment analysis
(TwitEval dataset)
• MiniLLMs for binary sentiment
classification (SST)
• Top-10 product recommendation
using amazon review sentiments.
2
Learning from GitHub: rasbt
/LLMs-from-scratch
Used to understand inner mechanics of LLMs from
tokenization to output.
Studied about:
KNOWLEDGE GRAPHS
•Token embedding lookup
•QKV attention → Multi-Head Self-Attention
•Positional encodings
•Feed-forward layers
•Training pipeline (loss, optimizer, batching)
•LLM architecture
•Finetuning
Treated the repo as a conceptual knowledge graph of
LLM design.
Helped in grounding later projects. Created internal
diagrams of token flow and attention behavior.
3
ABSA ON MAMS
DATASET
(Multi-Aspect Sentiment Analysis on
MAMS Dataset)
Aspect-Based Sentiment Analysis & Model
Comparison
4
•Multi-aspect product reviews labeled by
aspect (e.g. price, quality, service)
•BERT encoder for contextualized token
representations
•GLOVE embeddings to inject static semantic
priors
•Capsule Network to preserve aspect–
sentiment spatial relationships
•TF-IDF + traditional classifier as bag-of-
words baseline
•BERT + CAPSNET for fine-grained, context-
sensitive inference
Model Accuracy
PROJECT SUMMARY
TF-IDF ~72%
BERT + CapsNet ~90 %
5
EMOTION CLASSIFICATION (SEMEVAL TASK
3)
• Task: classify utterances into 7
emotions (joy, anger, etc.)
• Data: SemEval 2024 Task 3
(utterance IDs, dialog context)
• Model: BERT fine-tuned with
attention masks
• Performance: ~82% accuracy
• Lesson: CapsNet underperforms on
PROJECT SUMMARY fine-grained, sentence-level
emotions
7
TWITTER SENTIMENT ANALYSIS (TWEET-
EVAL DATASET)
•Used pretrained twitter-roberta-base-emotion
for classifying tweet emotions.
•Preprocessed input tweets and ran inference
using Hugging Face Transformers.
•Applied softmax to extract emotion
probabilities for a single sentence.
•Used mapping.txt to convert label IDs to one
of 7 emotions (e.g., surprised, anger) and
displayed top 4 predicted emotion with its
confidence score.
•Also explored masked word prediction (fill-
PROJECT SUMMARY
mask) to see how context affects word choice.
9
MINI LLMS FOR BINARY SENTIMENT
CLASSIFICATION (SST DATA)
•Dataset: Stanford Sentiment Treebank (SST)
containing movie reviews, positive/negative in a
tree like structure.
•Used lightweight DistilBERT to classify movie-
review sentiments on SST (positive vs.
negative), achieving strong results with faster
inference than full BERT.
•Outcome: competitive accuracy with PROJECT SUMMARY
drastically reduced model size and computation
11
TOP-10 PRODUCT RECOMMENDATION
USING AMAZON REVIEW SENTIMENT
Goal: surface top 10 products by average
positive sentiment
Pipeline:
1.Crawl Amazon reviews
2.Predict review sentiment with mircrosoft’s
MiniLM.
3.Aggregate scores per product
4.Rank and select top 10.
PROJECT SUMMARY •Application: dynamic “Top-10” widget on e-
commerce platforms
•Benefit: data-driven, customer-centric
product discovery
13
SUMMARY
• E X P L O R E D K N O W L E D G E G R A P H S T O G R O U N D L L M S W I T H R E A L - W O R L D FA C T S B E Y O N D
T E X T.
• B U I LT A M U LT I - A S P E C T S E N T I M E N T A N A LY Z E R ( M A M S ) U S I N G B E R T + G L O V E +
CAPSULENET — OUTPERFORMED TF-IDF BASELINES.
• F I N E - T U N E D B E R T F O R E M O T I O N D E T E C T I O N O N S E M E VA L — A C H I E V E D ~ 8 2 %
ACCURACY ACROSS 7 EMOTIONS.
• A P P L I E D R O B E R TA O N T W E E T E VA L — H A N D L E D N O I S Y T W I T T E R D ATA ( H A S H TA G S ,
S L A N G ) E F F E C T I V E LY A N D T O P 4 E M O T I O N O N T W E E T.
• U S E D D I S T I L B E R T O N S S T F O R S E N T I M E N T C L A S S I F I C AT I O N .
• DEVELOPED A TOP-10 PRODUCT RECOMMENDER FROM AMAZON REVIEW SENTIMENTS
USING MINILM
THANK YOU