A standard sigmoid function used in machine learning is the logistic function
Part of the reason for its use is the simplicity of its first derivative:
To evaluate higher-order derivatives, assume an expression of the form
with to return the function itself when no derivative is taken. Since the expression always contains a linear term, the next derivative is
where terms in each sum with indices not included in the other sum have been separated. Comparing these separated terms with the first and last terms on the right-hand side gives
The left-hand expression here indicates that all coefficients for are equal. With the initial value already assumed for consistency with not taking a derivative, this means .
The remaining right-hand expression indicates that there is a change in sign and an additional numerical factor every time either n or k increases. Inspecting the pair of terms in brackets in the last line of the derivative evaluation, the index that changes is not n but k. Assuming the latter is responsible for the behavior of the right-hand expression, one can take
where the remaining functional behavior will be determined by comparing the remaining terms of the derivative evaluation. Canceling common factors, this gives
This is the recursion relation for Stirling numbers of the second kind, quantities well known in combinatorics and number theory. Explicit values are available online as OEIS A008277. The offset in the first index is necessary due to how Stirling numbers are defined.
The final expression for the arbitrary multiple derivative of the sigmoid function is thus
This result is consistent with the evaluation by Minai and Williams. Explicit values of the coefficients can also be found online as OEIS A163626.
These derivatives find application in using neural networks to solve differential equations.
The results of this presentation are unchanged if the function is taken with a either a positive or negative sign in the denominator,
because the first derivative remains the same:
One can in fact use any positive or negative amount as a multiplicative factor in the denominator, since it arises as a constant of integration in solving the differential equation:
Curiouser and curiouser...
Uploaded 2020.02.22 — Updated 2020.06.13 analyticphysics.com