# Long Short-Term Memory (LSTM)

> An RNN with gates that choose what to keep and what to forget.

**Field:** Artificial Intelligence  
**Category:** Machine Learning  
**Also known as:** LSTM, LSTM Network

## Think of it like

Think of it like a notebook and a pen. You choose what to write down and what to cross out.

## Definition

Long short-term memory is a kind of recurrent neural network with a better memory. Inside each step, small gates decide what to keep, what to forget and what to pass on. This lets it hold on to facts for much longer than a plain RNN. It was the standard choice for speech and translation for many years. Transformers have since taken over most of those jobs.

## Example

Emma's app turns long voice notes into text. An LSTM keeps track of who is being talked about across many sentences.

## Why it matters

It fixed the short memory of plain RNNs. That made voice helpers and translation apps much better.

## Common mistake

Picking an LSTM for a new text project out of habit. Transformers usually do better now, and they train faster.

## Three principles

- **A kind of RNN.** It still reads in order.
- **Gates.** Keep, forget, pass on.
- **Longer memory.** Holds facts for longer.

## Related terms

- [Recurrent Neural Network (RNN)](https://learn.benibix.com/term/ai/recurrent-neural-network)
- [Neural Network](https://learn.benibix.com/term/ai/neural-network)
- [Deep Learning](https://learn.benibix.com/term/ai/deep-learning)

## Taught in

- [CNNs, RNNs and LSTMs](https://learn.benibix.com/learn/ai-machine-learning/cnns-rnns-and-lstms): Machine Learning, 15/18

![Four boxes in a row, one per word. Each box reads a word from below and passes a memory arrow to the next box. In the LSTM version, each box has gates marked keep and forget.](https://learn.benibix.com/diagrams/nn-rnn.svg)

---

Source: https://learn.benibix.com/term/ai/long-short-term-memory
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
