The forget gate in long short-term memory controls retention of the previous memory state in a long short-term memory recurrent neural network. In a simplified modern update,
Each component of multiplies the corresponding old memory component. Values near one retain it strongly; values near zero suppress it. The input gate in long short-term memory controls the separate new-write term.[ref]
If a scalar gate stays at and the new-write term is zero, then after steps . The half-retention time is
This gives an interpretable timescale for a learned multiplicative gate. An exact no-write term is an illustrative condition; finite logistic sigmoid function outputs are strictly between zero and one, though the candidate can itself be zero.
The forget gate was added after the 1997 architecture. Felix A. Gers, Jürgen Schmidhuber and Fred Cummins introduced adaptive forgetting to handle continuing streams where a memory needs to be reset rather than preserved indefinitely. The direct memory-path derivative contains products of forget gates; the full recurrent derivative also includes dependencies through other states and gates.[ref]
Long short-term memory 2026-11-05
Long short-term memory, usually abbreviated LSTM, is a recurrent neural network architecture that carries an explicit memory state through a sequence and learns when to write, retain and expose its contents. It addresses the vanishing gradient problem: in ordinary recurrence, repeated multiplication by small derivatives can make a distant input have almost no effect on the gradient used for learning. Sepp Hochreiter and Jürgen Schmidhuber's 1997 architecture provided a memory-cell path designed to preserve error flow, with gates controlling access.[ref]
A common simplified modern form, omitting peephole connections, is
Here is the input, the memory, the exposed state, the logistic sigmoid function, the hyperbolic tangent, and componentwise multiplication. The learned matrices and biases determine an input gate in long short-term memory , a forget gate in long short-term memory , and an output gate in long short-term memory . LSTM: A Search Space Odyssey by Klaus Greff and others gives a more general baseline with peephole connections; the equations above deliberately show the simpler variant.[ref]
For a scalar memory with writing switched off in the idealized limit and constant retention , . Over 100 steps, retains about , while retains about . This illustrates how a learned gate can select a retention timescale. Exactly zero or one are limiting idealizations for a finite-input logistic sigmoid function. The product of forget gates describes the direct memory path; it is not the entire recurrent derivative, because gates also depend on earlier states.
The forget gate in long short-term memory was introduced after the original architecture, in Learning to Forget: Continual Prediction with LSTM by Felix A. Gers, Jürgen Schmidhuber and Fred Cummins, to allow old contents to be reset during continuing input streams. Training still uses methods such as backpropagation through time. Artificial delayed-dependency tasks in the original paper demonstrated learning across more than 1,000 time steps in particular experiments; this does not imply unlimited memory or guaranteed success on every long sequence.[ref][ref]
The output gate in long short-term memory controls how much stored memory is exposed as the recurrent output of a long short-term memory network. In a common form,
The memory is , the exposed state is , is a logistic sigmoid function, and is the hyperbolic tangent. The output gate in long short-term memory modulates the exposed state rather than directly multiplying the stored memory itself.[ref]
For example, if , then . An output gate yields , whereas yields . Both cases can have the same current memory. A small exposed value therefore does not establish that the internal memory has been erased.
Selective exposure lets a network retain information until it becomes useful for a later prediction. The original architecture combined output gating with an input gate in long short-term memory to regulate access to persistent memory. Changing the exposed state may affect later gate decisions, so “does not directly erase” does not mean the output gate has no influence on future memory evolution.[ref]