Knowledge · AI Basics

Recurrent Neural Network · RNN/LSTM

Recurrent Neural Network / Long Short-Term Memory

📂AI Basics⏱2-min read📊Advanced🔗3 related

What is a recurrent neural network?

In one line
A recurrent neural network (Recurrent Neural Network) processes ordered data (text, speech, time series) while remembering earlier information. Long Short-Term Memory (LSTM) is its gated variant. Both were the workhorses before the Transformer.
⚡ Summary in 3 lines
  • Processes ordered data with memory
  • LSTM improves long context
  • Workhorse before Transformers

What the RNN really changed is that it does not treat the input as one block. Instead of pushing a fixed-size input through all at once, as in image classification, it applies the same set of weights at every time step and passes the hidden state on to the next one. This lets you handle data of varying lengths with a single model, so you no longer need separate models for 10-word and 50-word sentences. The trade-off is that each step can be computed only after the previous one finishes, so training time grows in proportion to sequence length.

The family splits into three main branches. The vanilla RNN is simple, but past roughly 10–20 time steps its gradients vanish and it effectively cannot use the early part of the sequence. The LSTM adds a cell state and three gates (input, forget, output), a structure that creates a separate channel for memory to flow through. The GRU cuts the gates to two, giving about 25% fewer parameters. In practice, with a few thousand records, a GRU often converges more stably than an LSTM.

The line between this and the Transformer is drawn by “length” and “resources.” Attention compares every time step with every other, so computation grows with the square of the length, while RNN-family models grow linearly with length. That is why, for sensor logs with tens of thousands of time steps or edge devices with only a few MB of memory, LSTM/GRU is still the realistic choice. Conversely, for tasks like translation and summarization, where the whole sentence must be weighed in both directions at once, sequential processing itself became the bottleneck.

The most common point of failure in practice is how the data is split. With time series, an analyst who splits training and validation by random shuffle out of habit lets future periods leak into training. The team gets sign-off on 95% validation accuracy, then finds in production that the model does worse than the existing rules. “It’s old tech, so just use a Transformer” is another common misconception. With only a few thousand labeled records of in-house data, a large model overfits first, and training costs multiply for nothing. The safer order is to set an LSTM baseline first and compare against it.

Courses that cover this term · AI & DX
Recommended courses · Recommended instructors · Quick quote
🧮 Mini quote · Based on instructor fees
About KRW 1.2 million (≈ US$900)2-hour talk · up to 20 people · Korean
Get a quote for these requirements →
💡 In plain English
It reads a sentence from the start while remembering what came before, and it was the workhorse of sequential processing before the Transformer.
Why it matters in practice
It is the foundational structure for handling sequential data and a stepping stone to understanding modern LLMs (Transformers).
Origin and sources

Proposed in 1997 by Hochreiter and Schmidhuber, the LSTM addressed the RNN’s long-term memory problem.

Source · Hochreiter & Schmidhuber (1997)
An example

Consider a hypothetical case. Company A, an auto-parts manufacturer with KRW 120 billion (≈ US$89,780,000) in annual revenue and 340 employees, had four press machines that stopped without warning an average of 3.2 times a month, halting the entire line. Vibration and current sensors logged data every second, but the rule was “alarm when a threshold is exceeded,” so more than 40 false alarms a day went off, and the floor worked with the alarm window switched off. The maintenance team validated LSTM failure prediction in a three-month proof of concept.

  1. Mr. Kim, a maintenance team manager, pulled 87 cases of the 30 minutes right before actual failures from the last two years of logs, and built the training set at a 1:5 ratio against normal periods.
  2. An outside advisory data scientist pointed out that “if you shuffle and split, the future teaches the past,” so the team split by time: 2023 for training, 2024 for validation.
  3. Feeding in 1,800 steps at 1-second intervals took three days per training run. Compressing them to 180 steps of 10-second averages cut training time to 4 hours.
  4. The head of production made it clear: “If false alarms exceed 5 a day, nobody will look.” The team raised the decision threshold from 0.5 to 0.8, prioritizing false-alarm suppression over recall.
  5. Three months later, unplanned stoppages fell from 3.2 to 1.1 per month and false alarms dropped from 40 to about 4 per day, recovering about 210 hours of annual downtime.
Related terms
Training linked to this term
📚Practical Introduction to Agentic AINanum Consulting corporate training · On-site or onlineView course →
Need in-house training on this topic?
Get a curriculum and quote tailored to your needs right away.
Ask About Training
Last updated 13 Sep 2026 · Reviewed by John Kim

FAQ

LSTM is a type of RNN improved with gates so it remembers long context better.
Transformers are now the mainstream, but RNNs and LSTMs are still taught as a foundation for sequential data and used in some areas.
LSTM is a type of RNN that adds gates so it can remember longer context.
Transformers are now the mainstream, but RNNs and LSTMs are still taught as a foundation for sequential data and used in some areas.