Activation function 2026-10-14
An activation function converts a unit's weighted input to its output. A sigmoid function, hyperbolic tangent or rectifier can give nonlinear features. Replacing all hidden activation functions by the identity collapses consecutive affine layers into a single affine map, removing the representational benefit of those hidden layers.
Forget gate in long short-term memory 2026-11-05
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]
LSTM: A Search Space Odyssey by Klaus Greff and others. Section II and Figure 1; simplified form here omits peepholes.
If a scalar gate stays at and the new-write term is zero, then after steps . The half-retention time isThis 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]
Learning to Forget: Continual Prediction with LSTM by Felix A. Gers, Jürgen Schmidhuber and Fred Cummins. Abstract and adaptive forget-gate motivation for continual prediction.
Input gate in long short-term memory 2026-11-05
The input gate in long short-term memory controls how much proposed new information is written into the memory state of a long short-term memory recurrent neural network. In a common modern form,Here is the candidate memory update, is the input-gate vector, and means componentwise multiplication. The sigmoid function places each gate component between zero and one. The forget gate in long short-term memory separately controls the existing memory: suppressing a new write does not by itself erase stored information.[ref]
LSTM: A Search Space Odyssey by Klaus Greff and others. Section II, Figure 1: memory update and input-gate role; equations here omit peephole connections.
For a scalar example, let , , and . Then . Increasing only to gives : a larger gate admits more of the negative candidate. The gate is a multiplier, not an instruction that the memory must increase.
The proposed write and its admission are learned separately. An input may suggest a strong candidate while the gate learns that this timestep should be ignored. This selective writing was part of the original memory-cell strategy for protecting information across long delays, together with gated reading through the output gate in long short-term memory.[ref]
Long Short-Term Memory by Sepp Hochreiter and Jürgen Schmidhuber. Memory-cell construction and input/output gates protecting constant error flow.
Logistic differential equation Created 2026-09-28 Updated 2026-10-20
The logistic differential equation is the nonlinear ordinary differential equationAs a mathematical model of population dynamics, it treats abundance as a continuous nonnegative quantity. The constant has units of inverse time, while the carrying capacity has the same units as . The useful idea is to combine growth resembling exponential growth at low abundance with a slowing approach to a finite abundance. The three trajectories below already show an important distinction: starting above the carrying capacity gives a decreasing curve, whereas starting below it gives an increasing one.
Logistic trajectories approach the carrying capacity from below or above
. Here and per day. The initial conditions are ; dashed horizontal lines show the two equilibrium points and . Only the trajectory has a future inflection point, marked at and days. The other marked values are and for that same trajectory. Details.For , dividing the derivative by abundance gives the instantaneous per-capita rate:It decreases linearly with : it approaches at low abundance, is at , vanishes at the carrying capacity, and is negative above it. This per-capita rate differs from the total rate , which also counts how many individuals contribute. It is an instantaneous rate, rather than a fixed percentage increase over a whole day. The linear per-capita assumption and the resulting qualitative picture are developed in MIT 18.03SC's logistic-model notes.
Writing , the equilibrium points satisfy , so the constant solutions of a differential equation are and . The phase line points upward for and downward for . Also and : the criterion for fixed point stability for an autonomous differential equation makes zero an unstable equilibrium and an asymptotically stable equilibrium point. Every positive initial condition approaches as ; stays exactly zero. Instability of zero means that a small positive population grows away from it, not that a zero population spontaneously appears.
For every , the unique solution of a differential equation for all isThe denominator is positive on this domain, including when . For , this is a translated and scaled logistic function; its extension to all real times is a sigmoid function. For the coefficient of the exponential function is negative, and the future curve instead decreases toward . No nonconstant positive solution of a differential equation crosses or reaches it at finite time. A short derivation uses the dimensionless variable : the chain rule gives , so exponential decay yields . The substitution divides by , so the zero equilibrium point must be included separately.
The total growth rate is a downward-opening quadratic function of abundance. Completing the square gives its maximum without solving the differential equation:The balance is beautiful: more individuals contribute to growth, but each contributes less, and the strongest total increase occurs halfway to the carrying capacity. This is a maximum over possible abundances. A trajectory starting above never passes through that abundance in its future.
Total logistic growth is greatest at half the carrying capacity
. With and per day, the maximum is individuals per day at . The function graph crosses zero at the equilibrium points and ; beyond the rate is negative. The lower phase line has arrows toward increasing abundance below and toward decreasing abundance above , with a hollow mark for the unstable equilibrium and a filled mark for the asymptotically stable equilibrium point. Details.The chain rule connects this maximum to the shape of the time trajectory through its second derivative:For , the trajectory initially has convexity and then concavity, with its one future inflection point atFor , this point lies at the initial time, with concavity for . For , the inflection point belongs to the past extension, so the future trajectory has concavity throughout. Above , the decreasing trajectory has convexity and no inflection point. The two constant solutions of a differential equation have no change of concavity. Thus an entire logistic function has an S shape, but its observed future segment need not show both bends. See also [ref].
For the plotted example with , and , time measured in days givesThe initial total rate is individuals per day, and the initial per-capita rate is . The fastest total increase is individuals per day, reached at days. At that time the per-capita rate has already fallen to .
These parameters are illustrative choices, rather than an empirical fit. The equation specifies deterministic evolution under a phenomenological assumption: it summarizes how net growth depends on abundance without separately modelling every process that affects it. The carrying capacity is a parameter for a specified setting, not a universal constant for all populations. In his 1838 paper "Notice sur la loi que la population suit dans son accroissement", Correspondance mathématique et physique 10, pp. 113–121, Pierre-François Verhulst proposed , equivalent to this equation with and . He also noted that different assumed growth-retarding terms could describe the observations similarly while giving very different limiting populations. This is an early illustration of why a good-looking curve alone does not establish a unique long-term prediction.[ref]
https://www.neo-classical-physics.info/uploads/3/4/3/6/34363841/verhulst_-_law_of_population.pdf. Verhulst's 1838 paper, translated by D. H. Delphenich
The logistic differential equation describes continuous time. The logistic map instead advances in discrete steps and can exhibit a period-doubling cascade and Devaney chaos; the monotone positive trajectories here cannot. Their connection through the forward Euler method is explained under Euler discretization of logistic growth, where a large step can introduce behaviour absent from the original differential equation.
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]
Long Short-Term Memory by Sepp Hochreiter and Jürgen Schmidhuber. Abstract and memory-cell construction: constant error flow and input/output gates.
A common simplified modern form, omitting peephole connections, isHere 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]
LSTM: A Search Space Odyssey by Klaus Greff and others. Section II and Figure 1: gate roles and baseline update equations.
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]
Learning to Forget: Continual Prediction with LSTM by Felix A. Gers, Jürgen Schmidhuber and Fred Cummins. Abstract and adaptive forget-gate motivation.
[ref]Long Short-Term Memory by Sepp Hochreiter and Jürgen Schmidhuber. Abstract and long-delay task experiments.
Output gate in long short-term memory 2026-11-05
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]
LSTM: A Search Space Odyssey by Klaus Greff and others. Section II, Figure 1: output activation and gate; simplified no-peephole equations.
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]
Long Short-Term Memory by Sepp Hochreiter and Jürgen Schmidhuber. Memory-cell input/output gates and long-delay learning motivation.
Past exam of the mathematics course of the University of Cambridge 2006 iii Paper 84 2 a Solution Created 2026-10-03 Updated 2026-10-14
Apply the chain rule to the squared loss, using the same pre-update weights throughout a forward and backward pass. At the output, and . ThereforeFor a gradient descent step of size , define . This gives .
A hidden activation affects all output units to which it connects. ThusandThe learning rate is already contained in and hence in ; do not multiply by it a second time. For a sigmoid function, . Thresholds can be treated as negative biases with an extra constant input and updated by the same derivative rule.
This is squared-error backpropagation. The forward pass computes activations, while the backward pass transports output-loss derivatives through the outgoing weights and the derivatives of the activation functions, yielding an error signal for every hidden unit. That reverse flow of derivatives explains the name backpropagation.
Past exam of the mathematics course of the University of Cambridge 2018 iii Paper 218 3 b Solution Created 2026-10-03 Updated 2026-10-05
The sigmoid function is strictly increasing. Therefore the risky region is . Its decision boundary is the hyperplanePoints on or above this score threshold are assigned to the risky class. For , the right side is zero.
Past exam of the mathematics course of the University of Cambridge 2018 iii Paper 218 3 c Solution Created 2026-10-03 Updated 2026-10-05
The feedforward neural network has three input coordinates, two hidden sigmoid function units and two output softmax function units. Every input is connected to each hidden unit, and each hidden unit to each output unit; each hidden and output unit also has a bias. A layer diagram isAlgebraically, with ,with responses conditionally independent. The fourteen displayed weight and bias parameters comprise six input weights, two hidden biases, four output weights and two output biases. The one-hot encoding supplies targets , , and the categorical cross-entropy loss is the negative of . There is softmax non-identifiability under a common shift of both output logits, but the predicted probabilities are well defined.
Past exam of the mathematics course of the University of Cambridge 2019 iii Paper 218 5 b Solution 2026-10-03
The loop divides each feature by its sample maximum, putting features with nonnegative values on comparable scales and improving numerical conditioning for gradient optimization. If exactly one hidden layer must use the sigmoid function, use layer 3. Sigmoid derivatives can become small in saturated regions; placing it latest minimizes the number of subsequent gradient multiplications affected by this saturation, while the earlier ReLU layers retain efficient gradient propagation.

