# LSTM i GRU — sieci z bramkami pamięci

EN: **LSTM and GRU (gated recurrent networks)** · id `lstmgru` · aliases: LSTM, long short-term memory, GRU, gated recurrent unit, gated RNN

Path: [AI Atlas](https://aiatlasgraph.com/llms.txt) › [Sieci i modele generatywne](https://aiatlasgraph.com/t/neural.md) › [Sieci konwolucyjne i sekwencyjne](https://aiatlasgraph.com/t/cnn.md) › LSTM i GRU — sieci z bramkami pamięci

## Description

- PL: Rekurencyjne sieci z mechanizmami bramkującymi, które sterują przepływem i przechowywaniem informacji w stanie ukrytym. LSTM używa osobnego stanu komórki oraz bramek wejścia, zapominania i wyjścia; GRU łączy część tych mechanizmów w prostszej konstrukcji z bramkami resetu i aktualizacji.
- EN: Recurrent networks with gating mechanisms that control how information flows into and remains in hidden state. LSTM uses a separate cell state with input, forget and output gates; GRU combines some of these mechanisms in a simpler design with reset and update gates.

## In one sentence

- PL: To sieci sekwencyjne z bramkami decydującymi, jakie wcześniejsze informacje zachować, zmienić lub zapomnieć.
- EN: These sequence networks use gates to decide which earlier information to retain, update or forget.

## Problem it solves

- PL: Zwykła sieć sekwencyjna może gubić informacje potrzebne wiele kroków później.
- EN: A basic sequence network can lose information needed many steps later.

## What it does

- PL: Wyuczone bramki regulują przepływ do pamięci i z pamięci, pomagając utrzymać wybrane sygnały przez dłuższy czas.
- EN: Learned gates regulate information flowing into and out of memory, helping selected signals persist longer.

## Everyday example

- PL: Model śledzi nagranie wypowiedzi i zachowuje informacje potrzebne do zinterpretowania jej dalszej części.
- EN: A model follows a speech recording and retains information needed to interpret later parts.

## This concerns you if you…

- PL: ważne informacje są rozdzielone w czasie
- PL: poznajesz sposoby utrzymywania pamięci w sieci
- EN: work with important information separated in time
- EN: study ways to maintain network memory

## Keywords

LSTM · GRU · forget gates · cell state · update gates · bidirectional RNN

## How it works

- PL: Bramki zależne od wejścia i stanu regulują zachowanie, dodawanie i ujawnianie informacji. LSTM oddziela stan komórki od wyjścia, a GRU łączy aktualizację pamięci w prostszą rekurencję z bramkami resetu i aktualizacji.
- EN: Input- and state-dependent gates regulate information retention, addition and exposure. LSTM separates cell state from output, while GRU combines memory updates into a simpler recurrence with reset and update gates.

## Limits

- PL: Bramkowanie łagodzi problemy pamięci, ale nie usuwa sekwencyjnego kosztu obliczeń. Długie zależności nadal bywają trudne, a dodatkowe macierze zwiększają liczbę parametrów.
- EN: Gating mitigates memory problems but does not remove sequential computation costs. Long dependencies remain challenging, and additional matrices increase parameter count.

## Key terms

- PL: **stan komórki**: Osobna ścieżka pamięci regulowana przez bramki w LSTM.
- PL: **bramka aktualizacji**: Współczynnik określający udział wcześniejszego stanu i nowych informacji.
- EN: **cell state**: A separate memory path regulated by gates in LSTM.
- EN: **update gate**: A coefficient controlling contributions from previous state and new information.

## Know first

- [Sieci rekurencyjne (RNN) (Recurrent neural networks (RNN))](https://aiatlasgraph.com/t/rnn.md)
- [Rachunek różniczkowy i gradienty (Calculus and gradients)](https://aiatlasgraph.com/t/calculus.md)

## Examples

- PL: LSTM · GRU · dwukierunkowe RNN
- EN: LSTM · GRU · bidirectional RNN

## Sources

- [Dive into Deep Learning — table of contents](<https://d2l.ai/>) `d2l-toc` · by Aston Zhang, Zachary C. Lipton, Mu Li, Alexander J. Smola
- [Understanding LSTM Networks](<https://colah.github.io/posts/2015-08-Understanding-LSTMs/>) `colah-lstm-2015` · by Christopher Olah
- [Learning Phrase Representations using RNN Encoder-Decoder for Statistical Machine Translation](<https://arxiv.org/html/1406.1078>) `cho-gru-2014` · by Kyunghyun Cho, Bart van Merriënboer, Caglar Gulcehre, Dzmitry Bahdanau, Fethi Bougares, Holger Schwenk, Yoshua Bengio

---

AI Atlas revision 124 (2026-10-31) · HTML: https://aiatlasgraph.com/t/lstmgru · index: https://aiatlasgraph.com/llms.txt · everything: https://aiatlasgraph.com/llms-full.txt · updated 2026-10-30
