Zero Labs
Industry News / AI

From Broken RNNs to ChatGPT: What My Own Research Taught Me About the LLM Revolution

Source · Towards AI By Rizwanul Islam Rudra

From the publisher’s feed, collected in the ZeroLabs newsroom.

Abstract illustration generated with AI (DALL·E / OpenAI).I ignored the transformer hype and built a better RNN instead. It taught me more about LLMs than any tutorial ever could.My RNN looked at “Too long movie. Not bad.” and called it negative.The actual IMDb rating was a 5. The word “not” was right there. The model walked straight past it, grabbed “bad,” and committed. Confidently wrong.That single failure became the obsession behind my IEEE research — and the same thread, pulled far enough, connects directly to why ChatGPT exists.The Two Problems I Kept Running IntoWhen my advisor Asst. Prof. Dr. Anilkumar Kothalil Gopalakrishnan and I started working on Sentiment Analysis of Consumer Reviews Using Machine Learning Approach (IEEE JCSSE 2023, Assumption University, Bangkok), the conventional wisdom was clear: use transformers, fine-tune BERT, move on. We didn’t. Not because we were contrarian, but because I wanted to understand why my model was failing before reaching for a bigger one.Two problems kept resurfacing.The vanishing gradient. Vanilla RNNs process tokens one at a time, chaining hidden states forward. The training signal flows backward through those same steps. Each step multiplies the gradient by a weight matrix — and if those values are less than 1, the signal decays exponentially. “Not” at position t=5 needs to influence the decision at t=7, but by the time backpropagation traces that path, the lesson has nearly vanished.Input: ["Too", "long", "movie", ".", "Not", "bad", "."] t=5 t=6 t=7Gradient flows backward: t=7 ← t=6 ← t=5Each step: gradient × weight_matrix (By t=5: signal is a fraction of what it was at t=7.Training conclusion: "bad" matters. "Not" doesn't.Prediction: NEGATIVE ❌ (Actual: POSITIVE)Preprocessing was erasing the evidence. This one surprised me. Most NLP pipelines use NLTK’s stopword list to strip noise — a, are, the, an — words that add nothing. Reasonable. But the default list also removes not, never, none, no, neither. The pipeline was deleting negation before the model could ever learn from it.from nltk.corpus import stopwordsstop_words = set(stopwords.words('english'))# Default: silently destroys negation contextfiltered = [w for w in tokens if w not in stop_words]# "not bad" → ["bad"] ❌ information already gone# The fix: protect negation words explicitlynegation_words = {'not', 'never', 'none', 'no', 'neither', 'nor'}custom_stop_words = stop_words - negation_wordsfiltered = [w for w in tokens if w not in custom_stop_words]# "not bad" → ["not", "bad"] ✓# "never disappoints" → ["never", "disappoints"] ✓This single preprocessing change — four lines of code — had more impact on negation detection than any architectural decision that followed. The lesson stuck: you can’t model what you’ve already thrown away.The Architecture: RNN + GRU + BiGRURather than switching to transformers, I worked within the RNN family and systematically stacked layers to address the gradient problem directly.The best-performing model: 1 RNN layer + 4 GRU layers, trained on 50,000 IMDb reviews (80/20 split) with 100-dimensional GloVe embeddings frozen from pre-training.1 RNN layer + 4 GRU layersOUTPUT → Positive (1) or Negative (0)Optimizer : NadamLoss : Binary Cross-EntropyRegularization : Dropout (20%) + L2 + Early StoppingWhy does stacking GRUs help? Each GRU cell has two learned gates that a vanilla RNN completely lacks:# UPDATE GATE — how much past to carry forward# Keeps "Not" influential through subsequent tokensz_t = sigmoid(W_z @ concat(h_prev, x_t))# RESET GATE — how much past to selectively ignore# Lets the model "start fresh" at key transitionsr_t = sigmoid(W_r @ concat(h_prev, x_t))# Final state: blend old and newh_t = (1 - z_t) * h_prev + z_t * tanh(W_h @ concat(r_t * h_prev, x_t))The BiGRU variant goes further — two GRU streams run in parallel, one forward, one backward, concatenated at each step. Where a standard GRU sees “Not → bad” sequentially, a BiGRU sees both directions simultaneously and understands “not bad” as a unit. I tested this too: 1 RNN + 2 BiGRU layers hit 90.4% accuracy.What the Numbers Actually SaidModel Test Accuracy Test Loss──────────────────────────────────────────────────────Vanilla RNN 50.8% 70.1% ← near-randomLSTM 84.9% 34.4%CNN 86.2% 40.5% ← heavy overfitLogistic Regression 88.0% —1 RNN + 2 GRU 90.2% 25.4%1 RNN + 2 BiGRU 90.4% 26.0%1 RNN + 4 GRU 90.7% ✓ 23.8% ✓1 RNN + 4 BiGRU 89.7% 27.8%──────────────────────────────────────────────────────A few things worth reading carefully here.The vanilla RNN’s 50.8% is essentially a coin flip. A model with 128 neurons, trained for 15 epochs on 40,000 reviews, learned almost nothing. That’s not a bad implementation — that’s the vanishing gradient problem doing exactly what it’s supposed to do.The CNN overtrained badly: 97.4% on training data, only 86.2% on test. CNNs are excellent at local n-gram patterns but have no sequential memory. They recognize “not bad” only if they’ve seen that exact phrase. GRUs generalize the pattern across contexts.More layers didn’t always help. Four BiGRU layers achieved the highest training accuracy (97.4%) but lower test accuracy than two BiGRU layers. The reason is architectural: BiGRU processes sequences in both forward and backward directions simultaneously, which doubles the trainable parameters per layer. More capacity without proportionally more training data is a reliable recipe for overfitting — the model starts memorizing specific review patterns rather than learning generalizable sentiment signals. There’s a point of diminishing returns in model complexity, and these results show exactly where it starts.Beyond the metrics, we did a small illustrative test — feeding the model two completely unseen, real-world reviews it had never encountered during training:"The movie could have been better." → Predicted: NEGATIVE ✓"Too long movie. Not bad." → Predicted: POSITIVE ✓Two sentences don’t prove generalization — a proper real-world validation would need far more examples. But that second prediction still meant something personally. “Too long movie. Not bad.” was the exact sentence that started this whole investigation. The vanilla RNN got it wrong. The hybrid model got it right — not because it was explicitly taught what “not bad” means, but because the gates learned to carry the negation signal forward, and the preprocessing made sure “not” survived long enough to be learned from in the first place.What This Had to Do With GPTWhile I was running these experiments, I was also reading everything I could about where NLP was heading. That’s when I found the original GPT paper — “Improving Language Understanding by Generative Pre-Training” (Radford et al., 2018) — and something clicked.The problems I had been engineering around — negation decay, long-range dependency, context loss — were the exact problems that motivated the transformer architecture. My GRU gates were a surgical patch. Transformers rebuilt the foundation.The key difference is in how they handle context:GRU approach:"Not" → gate update → hope signal survives to "bad"(sequential, bottlenecked, distance-sensitive)Transformer attention:"not" ←————————→ "bad" (direct learned weight)(parallel, every token sees every token, no decay)The attention mechanism doesn’t solve a different problem. It solves the same problem — by eliminating the bottleneck entirely rather than managing it with gates.Once I understood that, the GPT lineage made complete sense as an engineering story rather than a hype story.GPT-1 (2018) introduced the pattern: pre-train a large transformer on unlabeled text by predicting the next token, then fine-tune cheaply on specific tasks. One model, trained on everything, adapted to anything. 117 million parameters.GPT-2 (2019) scaled to 1.5 billion. GPT-3 (2020) reached 175 billion — over 100 times larger — and something strange happened. Capabilities nobody explicitly trained for started appearing. Writing code. Answering questions. Composing in different styles. Emergent behavior from scale.GPT-1 2018 117M ██GPT-2 2019 1.5B ████GPT-3 2020 175B ████████████████████████████████████████But scale alone wasn’t enough. GPT-3 was powerful and aimless — it completed prompts unpredictably. The missing piece was alignment: OpenAI’s InstructGPT (2022) introduced Reinforcement Learning from Human Feedback, training the model to actually follow instructions by having humans rate outputs and using those ratings as a reward signal.InstructGPT was smaller than GPT-3 and dramatically more useful. Then on November 30, 2022, ChatGPT wrapped that aligned model in a chat interface anyone could use without an API key. A million users in five days. A hundred million in two months.Not a sudden breakthrough. The right packaging of years of incremental engineering — each step fixing a specific failure the previous step exposed.The Thing the Hype MissesHere’s what doing this research taught me that reading about LLMs from the outside doesn’t:The most impactful interventions are rarely the most glamorous.Removing negation words from a stopword list isn’t publishable on its own. But it changed performance more than switching from LSTM to GRU. The preprocessing decision that takes four lines of code mattered more than the architectural decision that takes forty.The gap between a 50.8% RNN and a 90.7% RNN-GRU hybrid wasn’t just architecture. It was understanding each specific failure and fixing it deliberately: protect the negation words, add gates, add layers, regularize, stop when validation stalls. Every step was a response to a diagnosed failure, not a guess.That process — identify the failure mode, engineer a targeted fix, measure honestly — is the same process that produced attention mechanisms, RLHF, and the chain-of-thought reasoning that drives today’s frontier models. The scale changes by orders of magnitude. The method doesn’t change at all.GPT-4 handles “not bad” correctly. But it does so through exposure to billions of examples, not through an explicit mechanism that encodes negation. My model was smaller, slower, and more constrained — but that constraint forced genuine engagement with the problem. Sometimes understanding a small thing deeply is the fastest path to understanding a big thing at all.Where This Is All HeadingThe frontier has shifted again — and it’s worth paying attention to the direction.Scale dominated the conversation from 2018 to 2023. Bigger models, more parameters, more data. That era produced GPT-3, BERT, and eventually ChatGPT. But somewhere around 2024, a quieter realization set in: raw scale has diminishing returns. You can’t just keep adding parameters and expect proportional gains forever.The current bet is on reasoning — not bigger models, but smarter ones. OpenAI’s o3, DeepSeek R1, and similar systems don’t just predict the next token. They deliberate. They break problems into steps, check their own logic, and revise before committing to an answer. Chain-of-thought reasoning at inference time, not just at training time.This is a meaningful architectural shift, and it rhymes with something familiar. The jump from RNN to GRU wasn’t about adding more neurons — it was about adding mechanisms: gates that gave the model deliberate control over what to remember and what to discard. The jump from raw LLMs to reasoning models is similar — not more capacity, but more structure around how the model uses what it already knows.What comes after that? A few directions that feel genuinely important:Interpretability will matter more, not less. As models make higher-stakes decisions, “it works because scale” becomes an insufficient answer. The field is slowly building tools to understand why a model produces a given output — mechanistic interpretability, sparse autoencoders, circuit analysis. This is hard, unglamorous work. It’s also where the next real breakthroughs will come from.Smaller, specialized models are having a moment. The assumption that one giant model should do everything is eroding. A focused model trained on a specific domain — medicine, law, code, sentiment — can outperform a general model ten times its size on that task, at a fraction of the cost. The economics of deployment are pushing hard in this direction.The gap between understanding and performance is still real. GPT-4 can pass a medical licensing exam. It can also confidently tell you that “not bad” is negative if the context is unusual enough. Scale improves performance on benchmarks. It doesn’t automatically produce the kind of structured, mechanistic understanding that lets a model know when it’s wrong. That gap isn’t closed — it’s just better hidden.I think about that gap often, honestly. My RNN-GRU model was small and constrained, but I could trace exactly why it made a given prediction. That interpretability felt like understanding. The models that have replaced it are far more capable and far more opaque. We’ve traded comprehensibility for performance, and we’re still figuring out whether that’s a good deal.I started this journey frustrated by a model that couldn’t read two words together. The problem turned out to be the same one driving the entire field forward — just at a different scale.That’s the thing about research. You don’t always know which thread you’re pulling on until you’ve followed it far enough. Pull on negation detection in consumer reviews, and you eventually end up thinking about reasoning, interpretability, and the future of intelligence itself.Every problem in this field is connected to every other problem. The scale changes. The questions don’t.ReferencesIEEE paper: “Sentiment Analysis of Consumer Reviews Using Machine Learning Approach,” 20th International Joint Conference on Computer Science and Software Engineering (JCSSE 2023) — ieeexplore.ieee.org/document/10202106Original GPT paper: “Improving Language Understanding by Generative Pre-Training,” Radford et al., OpenAI (2018)AppendixRNN — Recurrent Neural Network. A type of neural network designed to process sequential data by maintaining a hidden state that carries information from previous steps.GRU — Gated Recurrent Unit. An improved RNN variant with reset and update gates that control information flow, solving the vanishing gradient problem.BiGRU — Bidirectional Gated Recurrent Unit. A GRU that processes sequences in both forward and backward directions simultaneously, capturing fuller context.LSTM — Long Short-Term Memory. Another gated RNN variant, similar to GRU but with an additional memory cell and more parameters.CNN — Convolutional Neural Network. Originally designed for image processing, also used in NLP for capturing local n-gram patterns in text.BERT — Bidirectional Encoder Representations from Transformers. A transformer-based model pre-trained on large text corpora, widely used for NLP tasks.GloVe — Global Vectors for Word Representation. A pre-trained word embedding model that encodes semantic relationships between words as numerical vectors.NLP — Natural Language Processing. A field of AI focused on enabling machines to understand, interpret, and generate human language.LLM — Large Language Model. A transformer-based model trained on massive text datasets capable of generating and understanding human language at scale.TF-IDF — Term Frequency-Inverse Document Frequency. A statistical method for measuring how important a word is within a document relative to a collection of documents.RLHF — Reinforcement Learning from Human Feedback. A training technique where human ratings of model outputs are used as a reward signal to align model behavior.SVM — Support Vector Machine. A traditional machine learning algorithm that finds an optimal boundary between classes in high-dimensional space.FFNN — Feed-Forward Neural Network. A basic neural network where information flows in one direction only, with no recurrent connections.IMDb — Internet Movie Database. The dataset used in this research, containing 50,000 labeled movie reviews for sentiment classification.From Broken RNNs to ChatGPT: What My Own Research Taught Me About the LLM Revolution was originally published in Towards AI on Medium, where people are continuing the conversation by highlighting and responding to this story.