AI GLOSSARY · AI CONCEPTS

Recurrent neural network (RNN)

Markdown version · Wikidata Q1457734

Definition

A recurrent neural network (RNN) is a neural network for sequential data that passes a hidden state from one step to the next, so earlier inputs can influence later outputs. Transformers have largely replaced it for language.

Also called: RNN, RNNs, recurrent neural networks, feedback neural network, neural network recurrent, recurrent network.

In plain language

A recurrent neural network reads a sequence one piece at a time, such as the words of a sentence or readings from a sensor, and keeps a running memory of what it has seen so far. At each step it combines the new piece with that memory to decide what to output. This made it a main tool for text, speech and time series. Newer models called transformers now do most of that work, but recurrent networks are still used where models must be small.

Technical definition

An RNN applies the same weights at every time step and feeds the hidden state from step t into step t+1, giving it a form of memory over the sequence. It is trained with backpropagation through time, which sums errors across steps. Plain RNNs suffer from vanishing gradients, which makes long-range dependencies hard to learn. LSTM cells address this with input, output and forget gates. Transformers replaced recurrence with attention, which parallelises better.

Worked examples in this catalogue

Catalogue examples point at a skill, guide or coding tool listed on this site, with what to run and what you see. An example marked illustrative describes the item from its own documentation; it was not executed for this page. Platform Scores are our assessment under a published method, not a safety guarantee.

  1. Skill by Skill Almanac · Illustrative, not executed

    local-model-sizing 57/100 · Provisional, not yet measuredScored · Method v0.2 · How we score

    What you see
    A calculation of whether an open-weight language model will run on a given GPU, Mac or PC, with a script that computes the memory needed.
    Why it exercises the concept
    An adjacent hardware-planning analogy: this skill estimates open-weight language-model memory, not RNN behavior or why an architecture is used. Resource limits matter when selecting either kind of model.
  2. Skill by Skill Almanac · Illustrative, not executed

    text-entity-extractor 41/100 · Provisional, not yet measuredScored · Method v0.2 · How we score

    What you see
    A report of URLs, hashtags, @mentions and dates found in one plain text file, with counts and first occurrences.
    Why it exercises the concept
    It processes text with fixed rules, with no learned memory. Comparing it with a recurrent network shows the other approach to sequences: a hand-written scan against a model that learns patterns.
  3. Guide · Illustrative, not executed

    What Is an LLM? The Facts Agent Users Need

    What you see
    An explanation of what a large language model can and cannot do, from the point of view of someone running a coding agent.
    Why it exercises the concept
    The guide contrasts the original Transformer decoder with BERT and explains runtime context versus learned parameters. It is an architecture comparison, not an RNN demonstration or a complete sequence-model history.

How it shows up when you use agents

You will rarely meet a recurrent network directly when running Claude Code, Codex or Cursor. Common language models used in coding agents are transformers, which use attention rather than the original RNN recurrence; check the selected model's documentation. The idea still explains behaviour you can observe.

An RNN carries a hidden state forward, summarizing earlier sequence inputs. Transformer attention can relate available positions inside a context window, subject to masking. A causal decoder cannot attend to future target positions and generates new tokens incrementally. Runtime context is separate from knowledge learned in model parameters; earlier material outside the supplied context is not directly available unless the application retrieves or summarizes it.

Where RNNs still appear is small, resource-limited work, which IBM says they remain suited to. For an adjacent example of hardware budgeting for open-weight language models, the local model sizing skill provides estimates; it does not demonstrate an RNN.

What breaks when the term is misunderstood: people assume a chat model carries a hidden memory between sessions, as a recurrent network does within a sequence. A coding agent uses the model's learned parameters together with runtime context, tools and any supplied memory files. Saved application state is different from a recurrent hidden state. See Neural network.

Common confusions

  • RNN versus transformer. An RNN processes a sequence step by step through a hidden state. Transformer attention is subject to its mask: encoder positions can be processed in parallel, while causal decoding generates tokens sequentially. IBM notes that transformers capture long-range dependencies more effectively and generally perform better on language tasks.
  • RNN versus LSTM. An LSTM is a kind of recurrent network with gates that control what is kept or discarded, designed to ease the vanishing gradient problem.
  • Myth: RNNs are obsolete. Their use has declined, but IBM says they remain useful in smaller, resource-constrained settings.
  • Recurrent versus recursive. Recurrent networks loop over time steps. Do not confuse the word with recursive networks, which apply the same network over a tree.

Terms that mention Recurrent neural network (RNN)

8 terms mention this one

More in AI concepts

Next steps

  1. What Is an LLM? The Facts Agent Users Need The long-form guide.
  2. local-model-sizing A skill that exercises it.
  3. Neural network Related term.
  4. Transformer Related term.
  5. All glossary terms A to Z and by family.

Sources

Definitions are written by Skill Almanac from these sources and were checked against them on 2026-11-25. Wikipedia is never the only source.

Review record

Last verified

Drafted by claude-sonnet-5-5; OpenAI Codex bounded factual repairs; sources and example targets checked by Independent automated source review (OpenAI Codex); not human peer review on 2026-11-25. Last verified .

Change log (4)
  • : Independent automated factual/example review completed. Cached US query estimate aligned to receipt; no traffic promise. Final technical gate recorded separately; publication disabled.
  • : First version.
  • : Bounded source repairs: Corrected causal attention and learned-versus-runtime knowledge; removed universal agent architecture/history claims and scoped hardware analogy. Pending independent re-review.
  • : Automated review completed; approved for the staged public release. Search indexing is controlled by the release configuration.