GATE DA 2024 | Question 33

NAT · 1 mark

Let \(f: \mathbb{R} \to \mathbb{R}\) be the function \(f(x) = \dfrac{1}{1+e^{-x}}\).

The value of the derivative of \(f\) at \(x\) where \(f(x) = 0.4\) is ______
(rounded off to two decimal places).

Note: \(\mathbb{R}\) denotes the set of real numbers.

Answer

0.24

Explanation

This \(f\) is the logistic (sigmoid) function. Differentiating \(f(x) = (1+e^{-x})^{-1}\) gives

\[f'(x) = \frac{e^{-x}}{(1+e^{-x})^{2}} = \frac{1}{1+e^{-x}} \cdot \frac{e^{-x}}{1+e^{-x}} = f(x)\bigl(1 - f(x)\bigr).\]

So there is no need to find \(x\) itself: at the point where \(f(x) = 0.4\), the slope is \(0.4 \times (1 - 0.4) = 0.4 \times 0.6 = 0.24\). The same identity is why the sigmoid's gradient is so cheap to compute in logistic regression and neural networks.

Answer: 0.24