This page assumes nothing. Before you can read the parent note LSTM — gates, cell state, you need to recognise a handful of symbols on sight. We build each one from a picture, in an order where every symbol only uses ones already defined.
Before any equation, two ideas the parent note silently assumes.
Look at the figure: the grid shows three rows (labelled "ch 1", "ch 2", "ch 3" on the vertical axis) and four columns (labelled t=1 to t=4 on the horizontal axis). The orange box frames a single column — that column is one input vector xt. Reading down a column gives you all channels at one instant; reading across a row shows one channel evolving over time.
Recall Why sequences at all?
Because aerospace data — vibration, temperature, RPM — arrives as a stream over time, and the order carries meaning. See Time Series Forecasting.
Now we can name the three vectors that flow through the machine.
Why two memories? A plain RNN keeps only one note (ht) and rewrites it every tick, smearing out old information. The LSTM adds ct as a "conveyor belt" that can carry a message for thousands of ticks without being overwritten. That extra line is the entire reason LSTMs beat RNNs.
Look at the figure: the horizontal axis is the timestep t. The thick blue line near the top is the cell state ct — notice it stays almost flat, and the pale blue arrows between ticks show information sliding forward with little change (a "highway"). The thin gray line along the bottom is the hidden state ht — it jumps up and down every tick because it is rewritten each time. The flatness of the blue line is exactly what "protected memory" looks like.
Why concatenate? Each gate needs to look at both what the machine remembers (ht−1) and what just arrived (xt) to make its decision. Gluing them together into zt lets a single weight layer see everything at once.
Why do we need it? The gates must be learnable. The numbers in W and b are exactly what training adjusts so the machine discovers, on its own, when to remember and when to forget.
Affine maps can output any number, huge or tiny. We need to squash them into a controlled range. Two squashers appear. Both first need one constant.
Look at the figure: the horizontal axis is the raw input value (the number coming out of Wz+b); the vertical axis is the squashed output. The blue curve is σ — it hugs the dotted line at 1 on the right and 0 on the left, and the blue dot marks σ(0)=0.5. The orange curve is tanh — it saturates at the dotted lines +1 and −1, and the orange dot marks tanh(0)=0, i.e. it passes through the origin. Both are flat (saturated) at the ends and steep in the middle.
Why sigmoid for a gate? A number in (0,1) is a perfect valve-opening fraction: 0 = fully shut (block everything), 1 = fully open (pass everything), 0.5 = half open. Why tanh for the candidate note? Because a new memory value might need to be positive or negative; tanh allows signed, zero-centred writes. More on both in Sigmoid and Tanh Activations.
Why elementwise and not matrix multiply? A gate decides, per channel, how much to let through. Channel 5's valve should touch only channel 5's memory — no mixing. That independence is exactly what ⊙ gives.
Look at the figure: the horizontal axis lists four channels (ch1–ch4); the vertical axis is value. For each channel there are three bars — gray is the memory value before gating, blue is the gate value (printed above each bar, all in 0 to 1), and green is the result gate⊙memory. The red arrow points at ch3, where the gate is 0.0: its green result bar vanishes — that channel is blacked out. Where the gate is 1.0 (ch1) the green bar equals the gray bar exactly; where it is 0.5 the green bar is halved.
Now every ingredient is defined — zt, W, b, σ, tanh, elementwise application — so the parent's four names finally make sense, with their affine arguments spelled out in full.
The whole update, in words you can now decode:
ct=keep oldft⊙ct−1+add newit⊙c~t,ht=read out (bounded)ot⊙tanh(ct).
Recall Why the additive "+" is the hero
Because ct is built by adding to ct−1 (not overwriting), the memory can survive many steps — this is what defeats the vanishing gradient problem, and what the GRU achieves more cheaply.