Which gate inside an LSTM cell is responsible for deciding what information should be discarded from the cell state?
Select an answer to reveal the explanation.
Short Explanation and Infographic
The forget gate is the LSTM's housekeeper. At every time step, it looks at the current input and the previous hidden state, then decides, value by value, what parts of the cell state are no longer useful and should get flushed out, outputting numbers close to zero for stuff to forget and close to one for stuff to keep. The input gate is a different job, deciding what new information gets added in. The output gate decides what part of the cell state gets exposed as the hidden state for this step. And the update gate isn't even an LSTM term at all, that's GRU vocabulary, so it doesn't belong in this lineup.
Full explanation below image
Full Explanation
The forget gate in a Long Short-Term Memory (LSTM) cell is specifically responsible for deciding which information in the existing cell state should be discarded. It takes the previous hidden state and the current input, passes them through a sigmoid activation, and produces a vector of values between 0 and 1 for each element of the cell state; a value near 0 means "forget this component," while a value near 1 means "retain this component." This forget-gate output is then multiplied element-wise against the previous cell state, selectively erasing information that is no longer relevant to the sequence being processed.
The input gate is a distinct component responsible for deciding what new information from the current input should be added into the cell state; it works alongside a candidate value vector (typically produced via a tanh activation) to determine how much of that new candidate information gets written in, which is the opposite function of forgetting. The output gate is another distinct component that determines how much of the (now updated) cell state should be exposed as the hidden state output for the current time step, controlling what information flows forward to influence subsequent predictions or the next time step, rather than controlling what gets removed from memory. The update gate is not an LSTM component at all; it is the terminology used in the GRU architecture, which merges the roles of LSTM's input and forget gates into a single gate and does not maintain a separate cell state, so labeling it as an LSTM gate is a category error.
A solid memory aid for LSTM's three gates: forget decides what to erase from long-term memory, input decides what new information to write into long-term memory, and output decides what to reveal from that memory as the current output. The forget gate specifically is credited with helping LSTMs overcome the vanishing-gradient limitations of vanilla RNNs, because it gives the network an explicit, learnable mechanism to preserve or discard long-range information rather than being forced to pass everything through the same repeated nonlinear transformation at every step.